@@ -213,7 +213,7 @@ struct HStrangeCorrelation {
213213 Configurable<int > minITSClustersForDaughterTracks{" minITSClustersForDaughterTracks" , 1 , " Minimum number of ITS clusters for V0 daughter tracks" };
214214 Configurable<bool > requireDCAzCut{" requireDCAzCut" , false , " require DCAz cut for trigger and associated primary tracks" };
215215 Configurable<bool > doITSChi2Selection{" doITSChi2Selection" , false , " require ITS chi2 cut for trigger and associated primary tracks" };
216- Configurable<bool > checkForITSTPCMissmatchMC{" checkForITSTPCMissmatchMC" , false , " if true, reject tracks with MC mask 13 (ITS-TPC mismatch) for trigger and associated primary tracks" };
216+ Configurable<bool > checkForITSTPCMissmatchMC{" checkForITSTPCMissmatchMC" , false , " if true, reject tracks with MC mask bit 13 (ITS-TPC mismatch) for trigger and associated primary tracks" };
217217 // --- Trigger: DCA variation from basic formula: |DCAxy| < 0.004f + (0.013f / pt)
218218 Configurable<float > dcaXYconstant{" dcaXYconstant" , 0.004 , " [0] in |DCAxy| < [0]+[1]/pT" };
219219 Configurable<float > dcaXYpTdep{" dcaXYpTdep" , 0.013 , " [1] in |DCAxy| < [0]+[1]/pT" };
@@ -839,7 +839,7 @@ struct HStrangeCorrelation {
839839 if (!isValidTrigger (trigg, triggerTrack.isLeading ())) {
840840 continue ;
841841 }
842- if (trackSelection.checkForITSTPCMissmatchMC && triggerTrack.mcMask () == 13 ) {
842+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck ( triggerTrack.mcMask (), 13 ) ) {
843843 continue ;
844844 }
845845 float efficiencyTrigg = 1 .0f ;
@@ -1218,6 +1218,9 @@ struct HStrangeCorrelation {
12181218 if (!isValidTrigger (trigg, triggerTrack.isLeading ())) {
12191219 continue ;
12201220 }
1221+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck (triggerTrack.mcMask (), 13 )) {
1222+ continue ;
1223+ }
12211224
12221225 float efficiencyTrigg = 1 .0f ;
12231226 float efficiencyTriggError = 0 .0f ;
@@ -1535,6 +1538,9 @@ struct HStrangeCorrelation {
15351538 if (!isValidTrigger (trigg, triggerTrack.isLeading ())) {
15361539 continue ;
15371540 }
1541+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck (triggerTrack.mcMask (), 13 )) {
1542+ continue ;
1543+ }
15381544
15391545 float efficiencyTrigger = 1 .0f ;
15401546 float efficiencyTriggerError = 0 .0f ;
@@ -1599,6 +1605,9 @@ struct HStrangeCorrelation {
15991605 if (!isValidAssocHadron (assoc)) {
16001606 continue ;
16011607 }
1608+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck (assocTrack.mcMask (), 13 )) {
1609+ continue ;
1610+ }
16021611 if (doAssocPhysicalPrimary && !assocTrack.mcPhysicalPrimary ()) {
16031612 continue ;
16041613 }
@@ -2411,6 +2420,9 @@ struct HStrangeCorrelation {
24112420 if (!isValidTrigger (track, triggerTrack.isLeading ())) {
24122421 continue ;
24132422 }
2423+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck (triggerTrack.mcMask (), 13 )) {
2424+ continue ;
2425+ }
24142426 auto binNumber = histos.get <TH1 >(HIST (" axes/hPtTriggerAxis" ))->FindFixBin (track.pt ()) - 1 ;
24152427 SETBIT (triggerPresenceMap[collision.globalIndex ()], binNumber);
24162428 }
@@ -2455,6 +2467,9 @@ struct HStrangeCorrelation {
24552467 if (!isValidTrigger (track, triggerTrack.isLeading ())) {
24562468 continue ;
24572469 }
2470+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck (triggerTrack.mcMask (), 13 )) {
2471+ continue ;
2472+ }
24582473 histos.fill (HIST (" hDCAzTriggerHadron" ), track.dcaZ (), track.pt ());
24592474 histos.fill (HIST (" hDCAxyTriggerHadron" ), track.dcaXY (), track.pt ());
24602475 float efficiency = 1 .0f ;
@@ -2479,6 +2494,9 @@ struct HStrangeCorrelation {
24792494 if (!isValidAssocHadron (assoc)) {
24802495 continue ;
24812496 }
2497+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck (assocTrack.mcMask (), 13 )) {
2498+ continue ;
2499+ }
24822500 float efficiency = 1 .0f ;
24832501 float purity = 1 .0f ;
24842502 histos.fill (HIST (" hDCAzAssociatedHadron" ), assoc.dcaZ (), assoc.pt ());
@@ -2636,6 +2654,9 @@ struct HStrangeCorrelation {
26362654 if (!isValidTrigger (track, triggerTrack.isLeading ())) {
26372655 continue ;
26382656 }
2657+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck (triggerTrack.mcMask (), 13 )) {
2658+ continue ;
2659+ }
26392660 histos.fill (HIST (" hTriggerAllSelectedEtaVsPt" ), track.pt (), track.eta (), cent);
26402661 histos.fill (HIST (" hTriggerPtResolution" ), track.pt (), triggerTrack.mcOriginalPt ());
26412662 if (masterConfigurations.doTriggPhysicalPrimary && !triggerTrack.mcPhysicalPrimary ()) {
@@ -2791,6 +2812,9 @@ struct HStrangeCorrelation {
27912812 if (!isValidTrigger (track, triggerTrack.isLeading ())) {
27922813 continue ;
27932814 }
2815+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck (triggerTrack.mcMask (), 13 )) {
2816+ continue ;
2817+ }
27942818 histos.fill (HIST (" hTriggerAllSelectedEtaVsPt" ), track.pt (), track.eta (), cent);
27952819 histos.fill (HIST (" hTriggerPtResolution" ), track.pt (), triggerTrack.mcOriginalPt ());
27962820 if (masterConfigurations.doTriggPhysicalPrimary && !triggerTrack.mcPhysicalPrimary ()) {
@@ -2849,6 +2873,9 @@ struct HStrangeCorrelation {
28492873 if (!isValidAssocHadron (pionTrack)) {
28502874 continue ;
28512875 }
2876+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck (pion.mcMask (), 13 )) {
2877+ continue ;
2878+ }
28522879
28532880 histos.fill (HIST (" hPionEtaVsPtAllSelected" ), pionTrack.pt (), pionTrack.eta (), collision.centFT0M ());
28542881 if (doAssocPhysicalPrimary && !pion.mcPhysicalPrimary ()) {
@@ -2870,6 +2897,9 @@ struct HStrangeCorrelation {
28702897 if (!isValidTrigger (track, triggerTrack.isLeading ())) {
28712898 continue ;
28722899 }
2900+ if (trackSelection.checkForITSTPCMissmatchMC && bitcheck (triggerTrack.mcMask (), 13 )) {
2901+ continue ;
2902+ }
28732903 histos.fill (HIST (" hTriggerAllSelectedEtaVsPt" ), track.pt (), track.eta (), collision.centFT0M ());
28742904 histos.fill (HIST (" hTriggerPtResolution" ), track.pt (), triggerTrack.mcOriginalPt ());
28752905 if (masterConfigurations.doTriggPhysicalPrimary && !triggerTrack.mcPhysicalPrimary ()) {
@@ -3504,6 +3534,8 @@ struct HStrangeCorrelation {
35043534 double getatrigger = triggerParticle.eta ();
35053535 double gphitrigger = triggerParticle.phi ();
35063536 double pttrigger = triggerParticle.pt ();
3537+ auto const * triggerPdg = pdgDB->GetParticle (triggerParticle.pdgCode ());
3538+ const double triggerCharge = triggerPdg ? triggerPdg->Charge () : 0 .;
35073539 auto const & mother = triggerParticle.mothers_first_as <aod::McParticles>();
35083540 auto globalIndex = mother.globalIndex ();
35093541 static_for<0 , 8 >([&](auto i) { // associated loop
@@ -3531,12 +3563,18 @@ struct HStrangeCorrelation {
35313563 histos.fill (HIST (" ClosureTest/sameEvent/" ) + HIST (Particlenames[Index]), computeDeltaPhi (gphitrigger, gphiassoc), deltaeta, ptassoc, pttrigger, bestCollisionVtxZ, bestCollisionCentpercentile);
35323564 }
35333565 if (i < 3 && TESTBIT (doCorrelation, i) && masterConfigurations.doCorrelationsHadronV0daughter ) {
3534- auto assocParticleDaugters = assocParticle.daughters_as <aod::McParticles>();
3535- for (const auto & assocParticleDaugter : assocParticleDaugters) {
3536- if (((assocParticleDaugter.pdgCode () == PDG_t::kPiPlus || assocParticleDaugter.pdgCode () == PDG_t::kProton ) && (triggerParticle.pdgCode () > 0 )) || ((assocParticleDaugter.pdgCode () == PDG_t::kPiMinus || assocParticleDaugter.pdgCode () == PDG_t::kProtonBar ) && (triggerParticle.pdgCode () < 0 ))) {
3537- histos.fill (HIST (" ClosureTest/sameEvent/" ) + HIST (Particlenames[Index]) + HIST (" _SameSignDaughter" ), computeDeltaPhi (gphitrigger, assocParticleDaugter.phi ()), getatrigger - assocParticleDaugter.eta (), assocParticleDaugter.pt (), pttrigger, bestCollisionVtxZ, bestCollisionCentpercentile);
3566+ auto const assocParticleDaughters = assocParticle.daughters_as <aod::McParticles>();
3567+ for (const auto & assocParticleDaughter : assocParticleDaughters) {
3568+ auto const * daughterPdg = pdgDB->GetParticle (assocParticleDaughter.pdgCode ());
3569+ const double daughterCharge = daughterPdg ? daughterPdg->Charge () : 0 .;
3570+ // Neutral daughters, including pi0, do not correspond to reconstructed V0 daughter tracks.
3571+ if (triggerCharge == 0 . || daughterCharge == 0 .) {
3572+ continue ;
3573+ }
3574+ if (triggerCharge * daughterCharge > 0 .) {
3575+ histos.fill (HIST (" ClosureTest/sameEvent/" ) + HIST (Particlenames[Index]) + HIST (" _SameSignDaughter" ), computeDeltaPhi (gphitrigger, assocParticleDaughter.phi ()), getatrigger - assocParticleDaughter.eta (), assocParticleDaughter.pt (), pttrigger, bestCollisionVtxZ, bestCollisionCentpercentile);
35383576 } else {
3539- histos.fill (HIST (" ClosureTest/sameEvent/" ) + HIST (Particlenames[Index]) + HIST (" _OppSignDaughter" ), computeDeltaPhi (gphitrigger, assocParticleDaugter .phi ()), getatrigger - assocParticleDaugter .eta (), assocParticleDaugter .pt (), pttrigger, bestCollisionVtxZ, bestCollisionCentpercentile);
3577+ histos.fill (HIST (" ClosureTest/sameEvent/" ) + HIST (Particlenames[Index]) + HIST (" _OppSignDaughter" ), computeDeltaPhi (gphitrigger, assocParticleDaughter .phi ()), getatrigger - assocParticleDaughter .eta (), assocParticleDaughter .pt (), pttrigger, bestCollisionVtxZ, bestCollisionCentpercentile);
35403578 }
35413579 }
35423580 }
0 commit comments