@@ -65,7 +65,9 @@ struct ThreePartCorr {
6565 using MyFilteredMCGenCollision = soa::Filtered<aod::McCollisions>::iterator;
6666 using MyFilteredMCParticles = soa::Filtered<aod::McParticles>;
6767 using MyFilteredMCRecCollision = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels>>::iterator;
68- using MyFilteredMCTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::McTrackLabels>>;
68+ using MyFilteredMCTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::McTrackLabels,
69+ aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCPr,
70+ aod::pidTOFPi, aod::pidTOFKa, aod::pidTOFPr, aod::pidTOFbeta>>;
6971
7072 // Mixed-events binning policy
7173 SliceCache cache;
@@ -100,6 +102,7 @@ struct ThreePartCorr {
100102 void init (InitContext const &)
101103 {
102104
105+ // Histograms axes
103106 const AxisSpec CentralityAxis{ConfCentBins};
104107 const AxisSpec ZvtxAxis{ConfZvtxBins};
105108 const AxisSpec PhiAxis{36 , (-1 . / 2 ) * M_PI, (3 . / 2 ) * M_PI};
@@ -108,6 +111,7 @@ struct ThreePartCorr {
108111 const AxisSpec TrackPtAxis{28 , 0.2 , 3 };
109112 const AxisSpec LambdaInvMassAxis{100 , 1.08 , 1.16 };
110113
114+ // QA & PID
111115 QARegistry.add (" hTrackPt" , " hTrackPt" , {HistType::kTH1D , {{100 , 0 , 4 }}});
112116 QARegistry.add (" hTrackEta" , " hTrackEta" , {HistType::kTH1D , {{100 , -1 , 1 }}});
113117 QARegistry.add (" hTrackPhi" , " hTrackPhi" , {HistType::kTH1D , {{100 , (-1 . / 2 ) * M_PI, (5 . / 2 ) * M_PI}}});
@@ -129,19 +133,37 @@ struct ThreePartCorr {
129133 QARegistry.add (" hInvMassLambda" , " hInvMassLambda" , {HistType::kTH3D , {{LambdaInvMassAxis}, {V0PtAxis}, {CentralityAxis}}});
130134 QARegistry.add (" hInvMassAntiLambda" , " hInvMassAntiLambda" , {HistType::kTH3D , {{LambdaInvMassAxis}, {V0PtAxis}, {CentralityAxis}}});
131135
136+ // Efficiency
137+ MCRegistry.add (" hGenerated" , " hGenerated" , {HistType::kTH1D , {TrackPtAxis}});
132138 MCRegistry.add (" hGenPionP" , " hGenPionP" , {HistType::kTH1D , {TrackPtAxis}});
133139 MCRegistry.add (" hGenPionN" , " hGenPionN" , {HistType::kTH1D , {TrackPtAxis}});
134140 MCRegistry.add (" hGenKaonP" , " hGenKaonP" , {HistType::kTH1D , {TrackPtAxis}});
135141 MCRegistry.add (" hGenKaonN" , " hGenKaonN" , {HistType::kTH1D , {TrackPtAxis}});
136142 MCRegistry.add (" hGenProtonP" , " hGenProtonP" , {HistType::kTH1D , {TrackPtAxis}});
137143 MCRegistry.add (" hGenProtonN" , " hGenProtonN" , {HistType::kTH1D , {TrackPtAxis}});
144+ MCRegistry.add (" hReconstructed" , " hReconstructed" , {HistType::kTH1D , {TrackPtAxis}});
138145 MCRegistry.add (" hRecPionP" , " hRecPionP" , {HistType::kTH1D , {TrackPtAxis}});
139146 MCRegistry.add (" hRecPionN" , " hRecPionN" , {HistType::kTH1D , {TrackPtAxis}});
140147 MCRegistry.add (" hRecKaonP" , " hRecKaonP" , {HistType::kTH1D , {TrackPtAxis}});
141148 MCRegistry.add (" hRecKaonN" , " hRecKaonN" , {HistType::kTH1D , {TrackPtAxis}});
142149 MCRegistry.add (" hRecProtonP" , " hRecProtonP" , {HistType::kTH1D , {TrackPtAxis}});
143150 MCRegistry.add (" hRecProtonN" , " hRecProtonN" , {HistType::kTH1D , {TrackPtAxis}});
144151
152+ // Purity
153+ MCRegistry.add (" hSelectPionP" , " hSelectPionP" , {HistType::kTH1D , {TrackPtAxis}});
154+ MCRegistry.add (" hSelectPionN" , " hSelectPionN" , {HistType::kTH1D , {TrackPtAxis}});
155+ MCRegistry.add (" hSelectKaonP" , " hSelectKaonP" , {HistType::kTH1D , {TrackPtAxis}});
156+ MCRegistry.add (" hSelectKaonN" , " hSelectKaonN" , {HistType::kTH1D , {TrackPtAxis}});
157+ MCRegistry.add (" hSelectProtonP" , " hSelectProtonP" , {HistType::kTH1D , {TrackPtAxis}});
158+ MCRegistry.add (" hSelectProtonN" , " hSelectProtonN" , {HistType::kTH1D , {TrackPtAxis}});
159+ MCRegistry.add (" hTrueSelectPionP" , " hTrueSelectPionP" , {HistType::kTH1D , {TrackPtAxis}});
160+ MCRegistry.add (" hTrueSelectPionN" , " hTrueSelectPionN" , {HistType::kTH1D , {TrackPtAxis}});
161+ MCRegistry.add (" hTrueSelectKaonP" , " hTrueSelectKaonP" , {HistType::kTH1D , {TrackPtAxis}});
162+ MCRegistry.add (" hTrueSelectKaonN" , " hTrueSelectKaonN" , {HistType::kTH1D , {TrackPtAxis}});
163+ MCRegistry.add (" hTrueSelectProtonP" , " hTrueSelectProtonP" , {HistType::kTH1D , {TrackPtAxis}});
164+ MCRegistry.add (" hTrueSelectProtonN" , " hTrueSelectProtonN" , {HistType::kTH1D , {TrackPtAxis}});
165+
166+ // Correlations
145167 SECorrRegistry.add (" hSameLambdaPion_SGNL" , " Same-event #Lambda - #pi correlator (SGNL region)" , {HistType::kTHnSparseD , {{PhiAxis}, {EtaAxis}, {CentralityAxis}, {ZvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
146168 SECorrRegistry.add (" hSameLambdaPion_SB" , " Same-event #Lambda - #pi correlator (SB region)" , {HistType::kTHnSparseD , {{PhiAxis}, {EtaAxis}, {CentralityAxis}, {ZvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
147169 SECorrRegistry.add (" hSameLambdaKaon_SGNL" , " Same-event #Lambda - K correlator (SGNL region)" , {HistType::kTHnSparseD , {{PhiAxis}, {EtaAxis}, {CentralityAxis}, {ZvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
@@ -298,6 +320,8 @@ struct ThreePartCorr {
298320 for (const auto & particle : particles) {
299321 if (particle.isPhysicalPrimary ()) {
300322
323+ // Efficiency - Generated
324+ MCRegistry.fill (HIST (" hGenerated" ), particle.pt ());
301325 if (particle.pdgCode () == kPiPlus ) { // Pos pions
302326 MCRegistry.fill (HIST (" hGenPionP" ), particle.pt ());
303327 } else if (particle.pdgCode () == kPiMinus ) { // Neg pions
@@ -332,6 +356,8 @@ struct ThreePartCorr {
332356 auto particle = track.mcParticle ();
333357 if (particle.isPhysicalPrimary ()) {
334358
359+ // Efficiency - Reconstructed
360+ MCRegistry.fill (HIST (" hReconstructed" ), track.pt ());
335361 if (particle.pdgCode () == kPiPlus ) { // Pos pions
336362 MCRegistry.fill (HIST (" hRecPionP" ), track.pt ());
337363 } else if (particle.pdgCode () == kPiMinus ) { // Neg pions
@@ -345,6 +371,47 @@ struct ThreePartCorr {
345371 } else if (particle.pdgCode () == kProtonBar ) { // Neg protons
346372 MCRegistry.fill (HIST (" hRecProtonN" ), track.pt ());
347373 }
374+
375+ // Purity
376+ A_PID = TrackPID (track);
377+ if (A_PID[1 ] < 4.0 ) {
378+
379+ if (track.sign () > 0 ) { // Positive tracks
380+ if (A_PID[0 ] == 0.0 ) { // Pions
381+ MCRegistry.fill (HIST (" hSelectPionP" ), track.pt ());
382+ if (particle.pdgCode () == kPiPlus ) {
383+ MCRegistry.fill (HIST (" hTrueSelectPionP" ), track.pt ());
384+ }
385+ } else if (A_PID[0 ] == 1.0 ) { // Kaons
386+ MCRegistry.fill (HIST (" hSelectKaonP" ), track.pt ());
387+ if (particle.pdgCode () == kKPlus ) {
388+ MCRegistry.fill (HIST (" hTrueSelectKaonP" ), track.pt ());
389+ }
390+ } else if (A_PID[0 ] == 2.0 ) { // Protons
391+ MCRegistry.fill (HIST (" hSelectProtonP" ), track.pt ());
392+ if (particle.pdgCode () == kProton ) {
393+ MCRegistry.fill (HIST (" hTrueSelectProtonP" ), track.pt ());
394+ }
395+ }
396+ } else if (track.sign () < 0 ) { // Negative tracks
397+ if (A_PID[0 ] == 0.0 ) { // Pions
398+ MCRegistry.fill (HIST (" hSelectPionN" ), track.pt ());
399+ if (particle.pdgCode () == kPiMinus ) {
400+ MCRegistry.fill (HIST (" hTrueSelectPionN" ), track.pt ());
401+ }
402+ } else if (A_PID[0 ] == 1.0 ) { // Kaons
403+ MCRegistry.fill (HIST (" hSelectKaonN" ), track.pt ());
404+ if (particle.pdgCode () == kKMinus ) {
405+ MCRegistry.fill (HIST (" hTrueSelectKaonN" ), track.pt ());
406+ }
407+ } else if (A_PID[0 ] == 2.0 ) { // Protons
408+ MCRegistry.fill (HIST (" hSelectProtonN" ), track.pt ());
409+ if (particle.pdgCode () == kProtonBar ) {
410+ MCRegistry.fill (HIST (" hTrueSelectProtonN" ), track.pt ());
411+ }
412+ }
413+ }
414+ }
348415 }
349416 }
350417 // End of the Monte-Carlo reconstructed QA
0 commit comments