@@ -122,6 +122,9 @@ struct Chargedkstaranalysis {
122122 // Other cuts on Ks
123123 Configurable<int > rotationalCut{" rotationalCut" , 6 , " Cut value (Rotation angle pi - pi/cut and pi + pi/cut)" };
124124
125+ // for Kinematics checks
126+ Configurable<bool > genKinematicsChecks{" genKinematicsChecks" , false , " Activate the Kinematics cuts on the gen MC" };
127+
125128 // fixed variables
126129 float rapidityMotherData = 0.5 ;
127130 float beamEnergy = 13600.0 ;
@@ -1446,15 +1449,35 @@ struct Chargedkstaranalysis {
14461449 const int pdg1 = d1.pdgCode ();
14471450 if (pdg1 == pionWanted) {
14481451 lDecayDaughter_bach = LorentzVectorSetXYZM (d1.px (), d1.py (), d1.pz (), MassPionCharged);
1452+ if (helicityCfgs.genKinematicsChecks ) {
1453+ if (lDecayDaughter_bach.pt () <= trackCutCfgs.cMinPtcut || std::abs (lDecayDaughter_bach.eta ()) >= trackCutCfgs.cMaxEtacut ) {
1454+ continue ;
1455+ }
1456+ }
14491457 hasRightPion = true ;
14501458 } else if (std::abs (pdg1) == kPDGK0 ) {
14511459 for (const auto & d2 : d1.template daughters_as <aod::McParticles>()) {
14521460 if (std::abs (d2.pdgCode ()) == kPDGK0s ) {
1461+ if (helicityCfgs.genKinematicsChecks ) {
1462+ if (d2.pt () <= secondaryCutsCfgs.cSecondaryPtMin || std::abs (d2.eta ()) >= secondaryCutsCfgs.cSecondaryRapidityMax ) {
1463+ continue ;
1464+ }
1465+ }
14531466 bool seenPip = false , seenPim = false ;
14541467 for (const auto & d3 : d2.template daughters_as <aod::McParticles>()) {
14551468 if (d3.pdgCode () == +kPiPlus ) {
1469+ if (helicityCfgs.genKinematicsChecks ) {
1470+ if (d3.pt () <= trackCutCfgs.cMinPtcut || std::abs (d3.eta ()) >= trackCutCfgs.cMaxEtacut ) {
1471+ continue ;
1472+ }
1473+ }
14561474 seenPip = true ;
14571475 } else if (d3.pdgCode () == -kPiPlus ) {
1476+ if (helicityCfgs.genKinematicsChecks ) {
1477+ if (d3.pt () <= trackCutCfgs.cMinPtcut || std::abs (d3.eta ()) >= trackCutCfgs.cMaxEtacut ) {
1478+ continue ;
1479+ }
1480+ }
14581481 seenPim = true ;
14591482 }
14601483 }
0 commit comments