@@ -56,7 +56,6 @@ struct ThreeParticleCorrelations {
5656 Filter globalTracks = requireGlobalTrackInFilter();
5757
5858 // Particle filters
59- Filter particlePt = aod::mcparticle::pt > 0 .2f && aod::mcparticle::pt < 3 .0f ;
6059 Filter particleEta = nabs(aod::mcparticle::eta) < 0 .8f ;
6160
6261 // Table aliases - Data
@@ -68,7 +67,8 @@ struct ThreeParticleCorrelations {
6867 aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr, aod::pidTOFbeta>>;
6968
7069 // Table aliases - MC
71- using MyFilteredMCGenCollision = soa::Filtered<aod::McCollisions>::iterator;
70+ using MyFilteredMCGenCollisions = soa::Filtered<soa::Join<aod::McCollisions, aod::CentFT0Ms>>;
71+ using MyFilteredMCGenCollision = MyFilteredMCGenCollisions::iterator;
7272 using MyFilteredMCParticles = soa::Filtered<aod::McParticles>;
7373 using MyFilteredMCRecCollision = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels>>::iterator;
7474 using MyFilteredMCTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::McTrackLabels,
@@ -82,7 +82,8 @@ struct ThreeParticleCorrelations {
8282 using BinningType = ColumnBinningPolicy<aod::cent::CentFT0M, aod::collision::PosZ>;
8383
8484 BinningType collBinning{{confCentBins, confZvtxBins}, true };
85- Pair<MyFilteredCollisions, MyFilteredV0s, MyFilteredTracks, BinningType> pair{collBinning, 5 , -1 , &cache};
85+ Pair<MyFilteredCollisions, MyFilteredV0s, MyFilteredTracks, BinningType> pairData{collBinning, 5 , -1 , &cache};
86+ SameKindPair<MyFilteredMCGenCollisions, MyFilteredMCParticles, BinningType> pairMC{collBinning, 5 , -1 , &cache};
8687
8788 // Process configurables
8889 Configurable<bool > confFilterSwitch{" confFilterSwitch" , false , " Switch for the fakeV0Filter function" };
@@ -97,7 +98,7 @@ struct ThreeParticleCorrelations {
9798 TH1D** hEffProtons = new TH1D*[2 ];
9899
99100 // Correlation variables
100- int triggSign;
101+ int triggSign, assocSign ;
101102 double candMass;
102103 double * assocPID;
103104
@@ -145,6 +146,7 @@ struct ThreeParticleCorrelations {
145146
146147 rQARegistry.add (" hInvMassLambda" , " hInvMassLambda" , {HistType::kTH3D , {{lambdaInvMassAxis}, {v0PtAxis}, {centralityAxis}}});
147148 rQARegistry.add (" hInvMassAntiLambda" , " hInvMassAntiLambda" , {HistType::kTH3D , {{lambdaInvMassAxis}, {v0PtAxis}, {centralityAxis}}});
149+ rQARegistry.add (" hNLambdas_MC" , " hNLambdas_MC" , {HistType::kTH3D , {{2 , -2 , 2 }, {v0PtAxis}, {centralityAxis}}});
148150
149151 // PhiStar
150152 rPhiStarRegistry.add (" hSEProtonPreCut" , " hSEProtonPreCut" , {HistType::kTH2D , {{80 , -0.2 , 0.2 }, {40 , -0.1 , 0.1 }}});
@@ -189,13 +191,19 @@ struct ThreeParticleCorrelations {
189191 rSECorrRegistry.add (" hSameLambdaKaon_SB" , " Same-event #Lambda - K correlator (SB region)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
190192 rSECorrRegistry.add (" hSameLambdaProton_SGNL" , " Same-event #Lambda - p correlator (SGNL region)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
191193 rSECorrRegistry.add (" hSameLambdaProton_SB" , " Same-event #Lambda - p correlator (SB region)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
194+ rSECorrRegistry.add (" hSameLambdaPion_MC" , " Same-event #Lambda - #pi correlator (MC)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
195+ rSECorrRegistry.add (" hSameLambdaKaon_MC" , " Same-event #Lambda - K correlator (MC)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
196+ rSECorrRegistry.add (" hSameLambdaProton_MC" , " Same-event #Lambda - p correlator (MC)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
192197
193198 rMECorrRegistry.add (" hMixLambdaPion_SGNL" , " Mixed-event #Lambda - #pi correlator (SGNL region)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
194199 rMECorrRegistry.add (" hMixLambdaPion_SB" , " Mixed-event #Lambda - #pi correlator (SB region)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
195200 rMECorrRegistry.add (" hMixLambdaKaon_SGNL" , " Mixed-event #Lambda - K correlator (SGNL region)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
196201 rMECorrRegistry.add (" hMixLambdaKaon_SB" , " Mixed-event #Lambda - K correlator (SB region)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
197202 rMECorrRegistry.add (" hMixLambdaProton_SGNL" , " Mixed-event #Lambda - p correlator (SGNL region)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
198203 rMECorrRegistry.add (" hMixLambdaProton_SB" , " Mixed-event #Lambda - p correlator (SB region)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
204+ rMECorrRegistry.add (" hMixLambdaPion_MC" , " Mixed-event #Lambda - #pi correlator (MC)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
205+ rMECorrRegistry.add (" hMixLambdaKaon_MC" , " Mixed-event #Lambda - K correlator (MC)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
206+ rMECorrRegistry.add (" hMixLambdaProton_MC" , " Mixed-event #Lambda - p correlator (MC)" , {HistType::kTHnSparseD , {{phiAxis}, {etaAxis}, {centralityAxis}, {zvtxAxis}, {2 , -2 , 2 }, {2 , -2 , 2 }}});
199207
200208 ccdb->setURL (" http://alice-ccdb.cern.ch" );
201209 ccdb->setCaching (true );
@@ -253,7 +261,7 @@ struct ThreeParticleCorrelations {
253261 }
254262 // End of the Track QA
255263
256- // Start of the V0-Track Correlations
264+ // Start of the Same-Event Correlations
257265 for (const auto & trigger : v0s) {
258266 if (v0Filters (trigger)) {
259267
@@ -296,14 +304,14 @@ struct ThreeParticleCorrelations {
296304 }
297305 }
298306 }
299- // End of the V0-Track Correlations
307+ // End of the Same-Event Correlations
300308 }
301309
302310 void processMixed (MyFilteredCollisions const &, MyFilteredV0s const &, MyFilteredTracks const &, aod::BCsWithTimestamps const &)
303311 {
304312
305313 // Start of the Mixed-events Correlations
306- for (const auto & [coll_1, v0_1, coll_2, track_2] : pair ) {
314+ for (const auto & [coll_1, v0_1, coll_2, track_2] : pairData ) {
307315
308316 auto bc = coll_1.bc_as <aod::BCsWithTimestamps>();
309317 auto bField = getMagneticField (bc.timestamp ());
@@ -346,11 +354,104 @@ struct ThreeParticleCorrelations {
346354 // End of the Mixed-events Correlations
347355 }
348356
357+ void processMCSame (MyFilteredMCGenCollision const & collision, MyFilteredMCParticles const & particles)
358+ {
359+
360+ Partition<MyFilteredMCParticles> mcTriggers = (aod::mcparticle::pdgCode == static_cast <int >(kLambda0 ) || aod::mcparticle::pdgCode == static_cast <int >(kLambda0Bar )) && aod::mcparticle::pt > 0 .6f && aod::mcparticle::pt < 12 .0f && nabs (aod::mcparticle::eta) < 0 .72f ;
361+ Partition<MyFilteredMCParticles> mcAssociates = (((aod::mcparticle::pdgCode == static_cast <int >(kPiPlus ) || aod::mcparticle::pdgCode == static_cast <int >(kPiMinus )) && aod::mcparticle::pt > 0 .3f && aod::mcparticle::pt < 2 .3f ) ||
362+ ((aod::mcparticle::pdgCode == static_cast <int >(kKPlus ) || aod::mcparticle::pdgCode == static_cast <int >(kKMinus )) && aod::mcparticle::pt > 0 .5f && aod::mcparticle::pt < 2 .5f ) ||
363+ ((aod::mcparticle::pdgCode == static_cast <int >(kProton ) || aod::mcparticle::pdgCode == static_cast <int >(kProtonBar )) && aod::mcparticle::pt > 0 .5f ));
364+ mcTriggers.bindTable (particles);
365+ mcAssociates.bindTable (particles);
366+
367+ // Start of the MC Same-Event Correlations
368+ for (const auto & trigger : mcTriggers) {
369+ if (trigger.isPhysicalPrimary ()) {
370+
371+ if (trigger.pdgCode () > 0 ) {
372+ triggSign = 1 ;
373+ rQARegistry.fill (HIST (" hNLambdas_MC" ), 1 , trigger.pt (), collision.centFT0M ());
374+ } else if (trigger.pdgCode () < 0 ) {
375+ triggSign = -1 ;
376+ rQARegistry.fill (HIST (" hNLambdas_MC" ), -1 , trigger.pt (), collision.centFT0M ());
377+ }
378+
379+ for (const auto & associate : mcAssociates) {
380+ if (associate.isPhysicalPrimary ()) {
381+
382+ if (associate.pdgCode () > 0 ) {
383+ assocSign = 1 ;
384+ } else if (associate.pdgCode () < 0 ) {
385+ assocSign = -1 ;
386+ }
387+
388+ deltaPhi = RecoDecay::constrainAngle (trigger.phi () - associate.phi (), -constants::math::PIHalf);
389+ deltaEta = trigger.eta () - associate.eta ();
390+
391+ if (std::abs (associate.pdgCode ()) == kPiPlus ) {
392+ rSECorrRegistry.fill (HIST (" hSameLambdaPion_MC" ), deltaPhi, deltaEta, collision.centFT0M (), collision.posZ (), triggSign, assocSign);
393+ } else if (std::abs (associate.pdgCode ()) == kKPlus ) {
394+ rSECorrRegistry.fill (HIST (" hSameLambdaKaon_MC" ), deltaPhi, deltaEta, collision.centFT0M (), collision.posZ (), triggSign, assocSign);
395+ } else if (std::abs (associate.pdgCode ()) == kProton ) {
396+ rSECorrRegistry.fill (HIST (" hSameLambdaProton_MC" ), deltaPhi, deltaEta, collision.centFT0M (), collision.posZ (), triggSign, assocSign);
397+ }
398+ }
399+ }
400+ }
401+ }
402+ // End of the MC Same-Event Correlations
403+ }
404+
405+ void processMCMixed (MyFilteredMCGenCollisions const &, MyFilteredMCParticles const &)
406+ {
407+
408+ // Start of the MC Mixed-events Correlations
409+ for (const auto & [coll_1, v0_1, coll_2, track_2] : pairMC) {
410+ Partition<MyFilteredMCParticles> mcTriggers = (aod::mcparticle::pdgCode == static_cast <int >(kLambda0 ) || aod::mcparticle::pdgCode == static_cast <int >(kLambda0Bar )) && aod::mcparticle::pt > 0 .6f && aod::mcparticle::pt < 12 .0f && nabs (aod::mcparticle::eta) < 0 .72f ;
411+ Partition<MyFilteredMCParticles> mcAssociates = (((aod::mcparticle::pdgCode == static_cast <int >(kPiPlus ) || aod::mcparticle::pdgCode == static_cast <int >(kPiMinus )) && aod::mcparticle::pt > 0 .3f && aod::mcparticle::pt < 2 .3f ) ||
412+ ((aod::mcparticle::pdgCode == static_cast <int >(kKPlus ) || aod::mcparticle::pdgCode == static_cast <int >(kKMinus )) && aod::mcparticle::pt > 0 .5f && aod::mcparticle::pt < 2 .5f ) ||
413+ ((aod::mcparticle::pdgCode == static_cast <int >(kProton ) || aod::mcparticle::pdgCode == static_cast <int >(kProtonBar )) && aod::mcparticle::pt > 0 .5f ));
414+ mcTriggers.bindTable (v0_1);
415+ mcAssociates.bindTable (track_2);
416+
417+ for (const auto & [trigger, associate] : soa::combinations (soa::CombinationsFullIndexPolicy (mcTriggers, mcAssociates))) {
418+ if (trigger.isPhysicalPrimary () && associate.isPhysicalPrimary ()) {
419+
420+ if (trigger.pdgCode () > 0 ) {
421+ triggSign = 1 ;
422+ } else if (trigger.pdgCode () < 0 ) {
423+ triggSign = -1 ;
424+ }
425+ if (associate.pdgCode () > 0 ) {
426+ assocSign = 1 ;
427+ } else if (associate.pdgCode () < 0 ) {
428+ assocSign = -1 ;
429+ }
430+
431+ deltaPhi = RecoDecay::constrainAngle (trigger.phi () - associate.phi (), -constants::math::PIHalf);
432+ deltaEta = trigger.eta () - associate.eta ();
433+
434+ if (std::abs (associate.pdgCode ()) == kPiPlus ) {
435+ rMECorrRegistry.fill (HIST (" hMixLambdaPion_MC" ), deltaPhi, deltaEta, coll_1.centFT0M (), coll_1.posZ (), triggSign, assocSign);
436+ } else if (std::abs (associate.pdgCode ()) == kKPlus ) {
437+ rMECorrRegistry.fill (HIST (" hMixLambdaKaon_MC" ), deltaPhi, deltaEta, coll_1.centFT0M (), coll_1.posZ (), triggSign, assocSign);
438+ } else if (std::abs (associate.pdgCode ()) == kProton ) {
439+ rMECorrRegistry.fill (HIST (" hMixLambdaProton_MC" ), deltaPhi, deltaEta, coll_1.centFT0M (), coll_1.posZ (), triggSign, assocSign);
440+ }
441+ }
442+ }
443+ }
444+ // End of the MC Mixed-events Correlations
445+ }
446+
349447 void processMCGen (MyFilteredMCGenCollision const &, MyFilteredMCParticles const & particles)
350448 {
351449
450+ Partition<MyFilteredMCParticles> mcParticles = aod::mcparticle::pt > 0 .2f && aod::mcparticle::pt < 3 .0f ;
451+ mcParticles.bindTable (particles);
452+
352453 // Start of the Monte-Carlo generated QA
353- for (const auto & particle : particles ) {
454+ for (const auto & particle : mcParticles ) {
354455 if (particle.isPhysicalPrimary ()) {
355456
356457 // Efficiency - Generated
@@ -452,6 +553,8 @@ struct ThreeParticleCorrelations {
452553
453554 PROCESS_SWITCH (ThreeParticleCorrelations, processSame, " Process same-event correlations" , true );
454555 PROCESS_SWITCH (ThreeParticleCorrelations, processMixed, " Process mixed-event correlations" , true );
556+ PROCESS_SWITCH (ThreeParticleCorrelations, processMCSame, " Process MC same-event correlations" , true );
557+ PROCESS_SWITCH (ThreeParticleCorrelations, processMCMixed, " Process MC mixed-event correlations" , true );
455558 PROCESS_SWITCH (ThreeParticleCorrelations, processMCGen, " Process Monte-Carlo, generator level" , false );
456559 PROCESS_SWITCH (ThreeParticleCorrelations, processMCRec, " Process Monte-Carlo, reconstructed level" , false );
457560
0 commit comments