@@ -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 ;
@@ -1442,24 +1445,46 @@ struct Chargedkstaranalysis {
14421445 const int pionWanted = (part.pdgCode () > 0 ) ? +kPiPlus : -kPiPlus ;
14431446 bool hasRightPion = false ;
14441447 bool hasK0sToPipi = false ;
1448+ bool passDauAcceptance = false ;
14451449 for (const auto & d1 : part.template daughters_as <aod::McParticles>()) {
14461450 const int pdg1 = d1.pdgCode ();
14471451 if (pdg1 == pionWanted) {
14481452 lDecayDaughter_bach = LorentzVectorSetXYZM (d1.px (), d1.py (), d1.pz (), MassPionCharged);
1453+ if (helicityCfgs.genKinematicsChecks ) {
1454+ if (!((lDecayDaughter_bach.pt () > trackCutCfgs.cMinPtcut ) && (std::abs (lDecayDaughter_bach.eta ()) < trackCutCfgs.cMaxEtacut ))) {
1455+ continue ;
1456+ }
1457+ }
1458+ passDauAcceptance = (lDecayDaughter_bach.pt () > trackCutCfgs.cMinPtcut ) && (std::abs (lDecayDaughter_bach.eta ()) < trackCutCfgs.cMaxEtacut );
14491459 hasRightPion = true ;
14501460 } else if (std::abs (pdg1) == kPDGK0 ) {
14511461 for (const auto & d2 : d1.template daughters_as <aod::McParticles>()) {
14521462 if (std::abs (d2.pdgCode ()) == kPDGK0s ) {
14531463 bool seenPip = false , seenPim = false ;
14541464 for (const auto & d3 : d2.template daughters_as <aod::McParticles>()) {
14551465 if (d3.pdgCode () == +kPiPlus ) {
1466+ if (helicityCfgs.genKinematicsChecks ) {
1467+ if (!((d3.pt () > trackCutCfgs.cMinPtcut ) && (std::abs (d3.eta ()) < trackCutCfgs.cMaxEtacut ))) {
1468+ continue ;
1469+ }
1470+ }
14561471 seenPip = true ;
14571472 } else if (d3.pdgCode () == -kPiPlus ) {
1473+ if (helicityCfgs.genKinematicsChecks ) {
1474+ if (!((d3.pt () > trackCutCfgs.cMinPtcut ) && (std::abs (d3.eta ()) < trackCutCfgs.cMaxEtacut ))) {
1475+ continue ;
1476+ }
1477+ }
14581478 seenPim = true ;
14591479 }
14601480 }
14611481 if (seenPip && seenPim) {
14621482 lResoSecondary = LorentzVectorSetXYZM (d2.px (), d2.py (), d2.pz (), MassK0Short);
1483+ if (helicityCfgs.genKinematicsChecks ) {
1484+ if (!((d2.pt () > secondaryCutsCfgs.cSecondaryPtMin ) && (std::abs (d2.eta ()) < secondaryCutsCfgs.cSecondaryRapidityMax ))) {
1485+ continue ;
1486+ }
1487+ }
14631488 hasK0sToPipi = true ;
14641489 break ;
14651490 }
0 commit comments