1515#include " Common/DataModel/PIDResponse.h"
1616#include " PWGLF/DataModel/LFStrangenessTables.h"
1717
18+ #include " TPDGCode.h"
1819#include " TLorentzVector.h"
1920
2021using namespace o2 ;
@@ -29,10 +30,11 @@ struct ThreePartCorr {
2930 HistogramRegistry MCRegistry{" MCRegistry" , {}, OutputObjHandlingPolicy::AnalysisObject, false , true };
3031 HistogramRegistry QARegistry{" QARegistry" , {}, OutputObjHandlingPolicy::AnalysisObject, false , true };
3132
32- // Collision filters
33+ // Collision & Event filters
3334 Filter CollCent = aod::cent::centFT0C > 0 .0f && aod::cent::centFT0C < 90 .0f ;
3435 Filter CollZvtx = nabs(aod::collision::posZ) < 7 .0f ;
3536 Filter MCCollZvtx = nabs(aod::mccollision::posZ) < 7 .0f ;
37+ Filter EvSelect = aod::evsel::sel8 == true ;
3638
3739 // V0 filters
3840 Filter V0Pt = aod::v0data::pt > 0 .6f && aod::v0data::pt < 12 .0f ;
@@ -41,24 +43,25 @@ struct ThreePartCorr {
4143 // Track filters
4244 Filter TrackPt = aod::track::pt > 0 .2f && aod::track::pt < 3 .0f ;
4345 Filter TrackEta = nabs(aod::track::eta) < 0 .8f ;
46+ Filter GlobalTracks = requireGlobalTrackInFilter();
4447
4548 // Particle filters
4649 Filter ParticlePt = aod::mcparticle::pt > 0 .2f && aod::mcparticle::pt < 3 .0f ;
4750 Filter ParticleEta = nabs(aod::mcparticle::eta) < 0 .8f ;
4851
4952 // Table aliases - Data
50- using MyFilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::CentFT0Cs>>;
53+ using MyFilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::CentFT0Cs, aod::EvSels >>;
5154 using MyFilteredCollision = MyFilteredCollisions::iterator;
5255 using MyFilteredV0s = soa::Filtered<aod::V0Datas>;
53- using MyFilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra,
56+ using MyFilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection,
5457 aod::pidTPCPi, aod::pidTPCKa, aod::pidTPCPr,
5558 aod::pidTOFPi, aod::pidTOFKa, aod::pidTOFPr, aod::pidTOFbeta>>;
5659
5760 // Table aliases - MC
5861 using MyFilteredMCGenCollision = soa::Filtered<aod::McCollisions>::iterator;
5962 using MyFilteredMCParticles = soa::Filtered<aod::McParticles>;
60- using MyFilteredMCRecCollision = soa::Filtered<soa::Join<aod::Collisions, aod::McCollisionLabels>>::iterator;
61- using MyFilteredMCTracks = soa::Filtered<soa::Join<aod::Tracks, aod::McTrackLabels>>;
63+ using MyFilteredMCRecCollision = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod:: McCollisionLabels>>::iterator;
64+ using MyFilteredMCTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod:: McTrackLabels>>;
6265
6366 // Mixed-events binning policy
6467 SliceCache cache;
@@ -70,10 +73,10 @@ struct ThreePartCorr {
7073 Pair<MyFilteredCollisions, MyFilteredV0s, MyFilteredTracks, BinningType> pair{CollBinning, 5 , -1 , &cache};
7174
7275 // Process configurables
73- Configurable<bool > FilterSwitch{ " FilterSwitch " , false , " Switch for the FakeV0Filter function" };
76+ Configurable<bool > ConfFilterSwitch{ " ConfFilterSwitch " , false , " Switch for the FakeV0Filter function" };
7477
7578 // Particle masses
76- Double_t massLambda = 1.115683 ;
79+ Double_t massLambda = o2::constants::physics::MassLambda0 ;
7780 Double_t DGaussSigma = 0.0021 ;
7881
7982 // Correlation variables
@@ -117,18 +120,18 @@ struct ThreePartCorr {
117120 QARegistry.add (" hInvMassLambda" , " hInvMassLambda" , {HistType::kTH3D , {{LambdaInvMassAxis}, {V0PtAxis}, {CentralityAxis}}});
118121 QARegistry.add (" hInvMassAntiLambda" , " hInvMassAntiLambda" , {HistType::kTH3D , {{LambdaInvMassAxis}, {V0PtAxis}, {CentralityAxis}}});
119122
120- MCRegistry.add (" hGenPionP" , " hGenMomPionP " , {HistType::kTH1D , {TrackPtAxis}});
121- MCRegistry.add (" hGenPionN" , " hGenMomPionN " , {HistType::kTH1D , {TrackPtAxis}});
122- MCRegistry.add (" hGenKaonP" , " hGenMomKaonP " , {HistType::kTH1D , {TrackPtAxis}});
123- MCRegistry.add (" hGenKaonN" , " hGenMomKaonN " , {HistType::kTH1D , {TrackPtAxis}});
124- MCRegistry.add (" hGenProtonP" , " hGenMomProtonP " , {HistType::kTH1D , {TrackPtAxis}});
125- MCRegistry.add (" hGenProtonN" , " hGenMomProtonN " , {HistType::kTH1D , {TrackPtAxis}});
126- MCRegistry.add (" hRecPionP" , " hRecMomPionP " , {HistType::kTH1D , {TrackPtAxis}});
127- MCRegistry.add (" hRecPionN" , " hRecMomPionN " , {HistType::kTH1D , {TrackPtAxis}});
128- MCRegistry.add (" hRecKaonP" , " hRecMomKaonP " , {HistType::kTH1D , {TrackPtAxis}});
129- MCRegistry.add (" hRecKaonN" , " hRecMomKaonN " , {HistType::kTH1D , {TrackPtAxis}});
130- MCRegistry.add (" hRecProtonP" , " hRecMomProtonP " , {HistType::kTH1D , {TrackPtAxis}});
131- MCRegistry.add (" hRecProtonN" , " hRecMomProtonN " , {HistType::kTH1D , {TrackPtAxis}});
123+ MCRegistry.add (" hGenPionP" , " hGenPionP " , {HistType::kTH1D , {TrackPtAxis}});
124+ MCRegistry.add (" hGenPionN" , " hGenPionN " , {HistType::kTH1D , {TrackPtAxis}});
125+ MCRegistry.add (" hGenKaonP" , " hGenKaonP " , {HistType::kTH1D , {TrackPtAxis}});
126+ MCRegistry.add (" hGenKaonN" , " hGenKaonN " , {HistType::kTH1D , {TrackPtAxis}});
127+ MCRegistry.add (" hGenProtonP" , " hGenProtonP " , {HistType::kTH1D , {TrackPtAxis}});
128+ MCRegistry.add (" hGenProtonN" , " hGenProtonN " , {HistType::kTH1D , {TrackPtAxis}});
129+ MCRegistry.add (" hRecPionP" , " hRecPionP " , {HistType::kTH1D , {TrackPtAxis}});
130+ MCRegistry.add (" hRecPionN" , " hRecPionN " , {HistType::kTH1D , {TrackPtAxis}});
131+ MCRegistry.add (" hRecKaonP" , " hRecKaonP " , {HistType::kTH1D , {TrackPtAxis}});
132+ MCRegistry.add (" hRecKaonN" , " hRecKaonN " , {HistType::kTH1D , {TrackPtAxis}});
133+ MCRegistry.add (" hRecProtonP" , " hRecProtonP " , {HistType::kTH1D , {TrackPtAxis}});
134+ MCRegistry.add (" hRecProtonN" , " hRecProtonN " , {HistType::kTH1D , {TrackPtAxis}});
132135
133136 SECorrRegistry.add (" hSameLambdaPion_SGNL" , " Same-event #Lambda - #pi correlator (SGNL region)" , {HistType::kTHnSparseD , {{PhiAxis}, {EtaAxis}, {CentralityAxis}, {ZvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
134137 SECorrRegistry.add (" hSameLambdaPion_SB" , " Same-event #Lambda - #pi correlator (SB region)" , {HistType::kTHnSparseD , {{PhiAxis}, {EtaAxis}, {CentralityAxis}, {ZvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
@@ -276,17 +279,17 @@ struct ThreePartCorr {
276279 for (const auto & particle : particles) {
277280 if (particle.isPhysicalPrimary ()) {
278281
279- if (particle.pdgCode () == 211 ) { // Pos pions
282+ if (particle.pdgCode () == kPiPlus ) { // Pos pions
280283 MCRegistry.fill (HIST (" hGenPionP" ), particle.pt ());
281- } else if (particle.pdgCode () == - 211 ) { // Neg pions
284+ } else if (particle.pdgCode () == kPiMinus ) { // Neg pions
282285 MCRegistry.fill (HIST (" hGenPionN" ), particle.pt ());
283- } else if (particle.pdgCode () == 310 ) { // Pos kaons
286+ } else if (particle.pdgCode () == kKPlus ) { // Pos kaons
284287 MCRegistry.fill (HIST (" hGenKaonP" ), particle.pt ());
285- } else if (particle.pdgCode () == - 310 ) { // Neg kaons
288+ } else if (particle.pdgCode () == kKMinus ) { // Neg kaons
286289 MCRegistry.fill (HIST (" hGenKaonN" ), particle.pt ());
287- } else if (particle.pdgCode () == 2212 ) { // Pos protons
290+ } else if (particle.pdgCode () == kProton ) { // Pos protons
288291 MCRegistry.fill (HIST (" hGenProtonP" ), particle.pt ());
289- } else if (particle.pdgCode () == - 2212 ) { // Neg protons
292+ } else if (particle.pdgCode () == kProtonBar ) { // Neg protons
290293 MCRegistry.fill (HIST (" hGenProtonN" ), particle.pt ());
291294 }
292295 }
@@ -310,18 +313,18 @@ struct ThreePartCorr {
310313 auto particle = track.mcParticle ();
311314 if (particle.isPhysicalPrimary ()) {
312315
313- if (particle.pdgCode () == 211 ) { // Pos pions
314- MCRegistry.fill (HIST (" hRecPionP" ), particle .pt ());
315- } else if (particle.pdgCode () == - 211 ) { // Neg pions
316- MCRegistry.fill (HIST (" hRecPionN" ), particle .pt ());
317- } else if (particle.pdgCode () == 310 ) { // Pos kaons
318- MCRegistry.fill (HIST (" hRecKaonP" ), particle .pt ());
319- } else if (particle.pdgCode () == - 310 ) { // Neg kaons
320- MCRegistry.fill (HIST (" hRecKaonN" ), particle .pt ());
321- } else if (particle.pdgCode () == 2212 ) { // Pos protons
322- MCRegistry.fill (HIST (" hRecProtonP" ), particle .pt ());
323- } else if (particle.pdgCode () == - 2212 ) { // Neg protons
324- MCRegistry.fill (HIST (" hRecProtonN" ), particle .pt ());
316+ if (particle.pdgCode () == kPiPlus ) { // Pos pions
317+ MCRegistry.fill (HIST (" hRecPionP" ), track .pt ());
318+ } else if (particle.pdgCode () == kPiMinus ) { // Neg pions
319+ MCRegistry.fill (HIST (" hRecPionN" ), track .pt ());
320+ } else if (particle.pdgCode () == kKPlus ) { // Pos kaons
321+ MCRegistry.fill (HIST (" hRecKaonP" ), track .pt ());
322+ } else if (particle.pdgCode () == kKMinus ) { // Neg kaons
323+ MCRegistry.fill (HIST (" hRecKaonN" ), track .pt ());
324+ } else if (particle.pdgCode () == kProton ) { // Pos protons
325+ MCRegistry.fill (HIST (" hRecProtonP" ), track .pt ());
326+ } else if (particle.pdgCode () == kProtonBar ) { // Neg protons
327+ MCRegistry.fill (HIST (" hRecProtonN" ), track .pt ());
325328 }
326329 }
327330 }
@@ -434,7 +437,7 @@ struct ThreePartCorr {
434437 Bool_t FakeV0Filter (const V0Cand& V0, const TrackCand& Track)
435438 {
436439
437- if (FilterSwitch ) {
440+ if (ConfFilterSwitch ) {
438441
439442 TLorentzVector Daughter, Associate;
440443 if (TrackPID (Track)[0 ] == 1.0 ) { // Kaons
0 commit comments