From 061dc536391bf69e431a7b09fc3cadc446b46e47 Mon Sep 17 00:00:00 2001 From: Rahul Verma <110929992+rahulverma012@users.noreply.github.com> Date: Thu, 8 Oct 2026 17:44:57 +0530 Subject: [PATCH 1/3] Update hParticleCorrelation.cxx changed the names and description of the derived data tables to resolve error during o2-aod-merge and changed the configurables names to make them appear in order in the hyperloop wagon interface. --- .../Tasks/hParticleCorrelation.cxx | 1134 ++++++++--------- 1 file changed, 567 insertions(+), 567 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx b/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx index 9f23c51d17f..1325cf71f8a 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx @@ -128,7 +128,7 @@ DECLARE_SOA_COLUMN(MixingBin, mixingBin, int32_t); DECLARE_SOA_COLUMN(CorrMask, corrMask, uint64_t); } // namespace hpcorrcollision -DECLARE_SOA_TABLE(HPCorrCollisions, "AOD", "HPCORRCOLLS", o2::soa::Index<>, +DECLARE_SOA_TABLE(HPCorrColls, "AOD", "HPCORRCOLL", o2::soa::Index<>, hpcorrcollision::GlobalCollisionId, hpcorrcollision::OriginalCollisionId, o2::aod::origins::DataframeID, @@ -144,7 +144,7 @@ DECLARE_SOA_TABLE(HPCorrCollisions, "AOD", "HPCORRCOLLS", o2::soa::Index<>, namespace hpcorrtrack { -DECLARE_SOA_INDEX_COLUMN(HPCorrCollision, hpCorrCollision); // o2-linter: disable=name/o2-column (Keep HPCorrCollision naming consistent with the existing derived collision table) +DECLARE_SOA_INDEX_COLUMN(HPCorrColl, hpCorrColl); // o2-linter: disable=name/o2-column (Keep HPCorrColl naming consistent with the existing derived collision table) DECLARE_SOA_COLUMN(GlobalColRefId, globalColRefId, int64_t); DECLARE_SOA_COLUMN(OriginalColRefId, originalColRefId, int64_t); @@ -188,8 +188,8 @@ DECLARE_SOA_COLUMN(TofNSigmaDe, tofNSigmaDe, float); } // namespace hpcorrtrack -DECLARE_SOA_TABLE(HPCorrTracks, "AOD", "HPCORRTRKS", o2::soa::Index<>, - hpcorrtrack::HPCorrCollisionId, +DECLARE_SOA_TABLE(HPCorrTracks, "AOD", "HPCORRTRACK", o2::soa::Index<>, + hpcorrtrack::HPCorrCollId, hpcorrtrack::GlobalColRefId, hpcorrtrack::OriginalColRefId, @@ -231,7 +231,7 @@ DECLARE_SOA_TABLE(HPCorrTracks, "AOD", "HPCORRTRKS", o2::soa::Index<>, //______________________________________________________________________________ namespace hpcorrresonance { -DECLARE_SOA_INDEX_COLUMN(HPCorrCollision, hpCorrCollision); // o2-linter: disable=name/o2-column (Keep HPCorrCollision naming consistent with the existing derived collision table) +DECLARE_SOA_INDEX_COLUMN(HPCorrColl, hpCorrColl); // o2-linter: disable=name/o2-column (Keep HPCorrColl naming consistent with the existing derived collision table) DECLARE_SOA_INDEX_COLUMN_FULL(PosTrack, posTrack, int, HPCorrTracks, "_Pos"); DECLARE_SOA_INDEX_COLUMN_FULL(NegTrack, negTrack, int, HPCorrTracks, "_Neg"); @@ -272,10 +272,10 @@ DECLARE_SOA_COLUMN(Lambda1520BarTag, lambda1520BarTag, uint8_t); } // namespace hpcorrresonance -DECLARE_SOA_TABLE(HPCorrResonances, "AOD", "HPCORRRESOS", o2::soa::Index<>, +DECLARE_SOA_TABLE(HPCorrResonances, "AOD", "HPCORRRESO", o2::soa::Index<>, // Derived-table relations - hpcorrresonance::HPCorrCollisionId, + hpcorrresonance::HPCorrCollId, hpcorrresonance::PosTrackId, hpcorrresonance::NegTrackId, @@ -1191,66 +1191,66 @@ void addIdentifiedQAHistos(H& histReg, const std::string& basePath, const AxisSp // Common Histograms booking functions are over //__________________________________________________________________________________________________________________________ -struct HParticleCorrelationResonanceProducer { +struct HParticleCorrelation1ResonanceProducer { Produces resonanceCndts; HistogramRegistry resonanceQAPlots{"resonanceQAPlots", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; static constexpr float ResonancePidNSigmaMax = 3.5f; struct : ConfigurableGroup { - Configurable printDebugMessages{"printDebugMessages", false, "Print debug messages"}; + Configurable c0001printDebugMessages{"c0001printDebugMessages", false, "Print debug messages"}; } cfgDebug; struct : ConfigurableGroup { - Configurable requireSel8{"requireSel8", true, "Require sel8 event selection"}; - Configurable cutZvertex{"cutZvertex", 10.0f, "Maximum |z_{vtx}| (cm)"}; + Configurable c0002requireSel8{"c0002requireSel8", true, "Require sel8 event selection"}; + Configurable c0003cutZvertex{"c0003cutZvertex", 10.0f, "Maximum |z_{vtx}| (cm)"}; } cfgEvent; struct : ConfigurableGroup { - Configurable ptMin{"ptMin", 0.15f, "Minimum track pT (GeV/c)"}; - Configurable ptMax{"ptMax", 100.0f, "Maximum track pT (GeV/c)"}; - Configurable etaMax{"etaMax", 0.8f, "Maximum |eta|"}; + Configurable c0004ptMin{"c0004ptMin", 0.15f, "Minimum track pT (GeV/c)"}; + Configurable c0005ptMax{"c0005ptMax", 100.0f, "Maximum track pT (GeV/c)"}; + Configurable c0006etaMax{"c0006etaMax", 0.8f, "Maximum |eta|"}; - Configurable useFixedDCAxy{"useFixedDCAxy", false, "Apply fixed DCAxy cut"}; - Configurable dcaXYMax{"dcaXYMax", 0.1f, "Maximum |DCAxy| (cm)"}; + Configurable c0007useFixedDCAxy{"c0007useFixedDCAxy", false, "Apply fixed DCAxy cut"}; + Configurable c0008dcaXYMax{"c0008dcaXYMax", 0.1f, "Maximum |DCAxy| (cm)"}; - Configurable useFixedDCAz{"useFixedDCAz", false, "Apply fixed DCAz cut"}; - Configurable dcaZMax{"dcaZMax", 0.2f, "Maximum |DCAz| (cm)"}; + Configurable c0009useFixedDCAz{"c0009useFixedDCAz", false, "Apply fixed DCAz cut"}; + Configurable c0010dcaZMax{"c0010dcaZMax", 0.2f, "Maximum |DCAz| (cm)"}; } cfgTrackCuts; struct : ConfigurableGroup { - Configurable doPhi1020{"doPhi1020", true, "Build Phi(1020) candidates"}; - Configurable doKStar892{"doKStar892", true, "Build K*(892)0 candidates"}; - Configurable doKStar892Bar{"doKStar892Bar", true, "Build anti-K*(892)0 candidates"}; - Configurable doLambda1520{"doLambda1520", true, "Build Lambda(1520) candidates"}; - Configurable doLambda1520Bar{"doLambda1520Bar", true, "Build anti-Lambda(1520) candidates"}; + Configurable c0011doPhi1020{"c0011doPhi1020", true, "Build Phi(1020) candidates"}; + Configurable c0012doKStar892{"c0012doKStar892", true, "Build K*(892)0 candidates"}; + Configurable c0013doKStar892Bar{"c0013doKStar892Bar", true, "Build anti-K*(892)0 candidates"}; + Configurable c0014doLambda1520{"c0014doLambda1520", true, "Build Lambda(1520) candidates"}; + Configurable c0015doLambda1520Bar{"c0015doLambda1520Bar", true, "Build anti-Lambda(1520) candidates"}; } cfgResonances; struct : ConfigurableGroup { - Configurable phi1020PeakLow{"phi1020PeakLow", 1.013f, "Phi(1020) peak lower mass"}; - Configurable phi1020PeakUp{"phi1020PeakUp", 1.026f, "Phi(1020) peak upper mass"}; - Configurable phi1020LSBLow{"phi1020LSBLow", 0.995f, "Phi(1020) LSB lower mass"}; - Configurable phi1020LSBUp{"phi1020LSBUp", 1.005f, "Phi(1020) LSB upper mass"}; - Configurable phi1020RSBLow{"phi1020RSBLow", 1.040f, "Phi(1020) RSB lower mass"}; - Configurable phi1020RSBUp{"phi1020RSBUp", 1.060f, "Phi(1020) RSB upper mass"}; + Configurable c0016phi1020PeakLow{"c0016phi1020PeakLow", 1.013f, "Phi(1020) peak lower mass"}; + Configurable c0017phi1020PeakUp{"c0017phi1020PeakUp", 1.026f, "Phi(1020) peak upper mass"}; + Configurable c0018phi1020LSBLow{"c0018phi1020LSBLow", 0.995f, "Phi(1020) LSB lower mass"}; + Configurable c0019phi1020LSBUp{"c0019phi1020LSBUp", 1.005f, "Phi(1020) LSB upper mass"}; + Configurable c0020phi1020RSBLow{"c0020phi1020RSBLow", 1.040f, "Phi(1020) RSB lower mass"}; + Configurable c0021phi1020RSBUp{"c0021phi1020RSBUp", 1.060f, "Phi(1020) RSB upper mass"}; } cfgPhi1020Mass; struct : ConfigurableGroup { - Configurable kstar892PeakLow{"kstar892PeakLow", 0.846f, "K*(892)0 peak lower mass"}; - Configurable kstar892PeakUp{"kstar892PeakUp", 0.946f, "K*(892)0 peak upper mass"}; - Configurable kstar892LSBLow{"kstar892LSBLow", 0.700f, "K*(892)0 LSB lower mass"}; - Configurable kstar892LSBUp{"kstar892LSBUp", 0.780f, "K*(892)0 LSB upper mass"}; - Configurable kstar892RSBLow{"kstar892RSBLow", 1.010f, "K*(892)0 RSB lower mass"}; - Configurable kstar892RSBUp{"kstar892RSBUp", 1.090f, "K*(892)0 RSB upper mass"}; + Configurable c0022kstar892PeakLow{"c0022kstar892PeakLow", 0.846f, "K*(892)0 peak lower mass"}; + Configurable c0023kstar892PeakUp{"c0023kstar892PeakUp", 0.946f, "K*(892)0 peak upper mass"}; + Configurable c0024kstar892LSBLow{"c0024kstar892LSBLow", 0.700f, "K*(892)0 LSB lower mass"}; + Configurable c0025kstar892LSBUp{"c0025kstar892LSBUp", 0.780f, "K*(892)0 LSB upper mass"}; + Configurable c0026kstar892RSBLow{"c0026kstar892RSBLow", 1.010f, "K*(892)0 RSB lower mass"}; + Configurable c0027kstar892RSBUp{"c0027kstar892RSBUp", 1.090f, "K*(892)0 RSB upper mass"}; } cfgKstar892Mass; struct : ConfigurableGroup { - Configurable lambda1520PeakLow{"lambda1520PeakLow", 1.500f, "Lambda(1520) peak lower mass"}; - Configurable lambda1520PeakUp{"lambda1520PeakUp", 1.540f, "Lambda(1520) peak upper mass"}; - Configurable lambda1520LSBLow{"lambda1520LSBLow", 1.440f, "Lambda(1520) LSB lower mass"}; - Configurable lambda1520LSBUp{"lambda1520LSBUp", 1.480f, "Lambda(1520) LSB upper mass"}; - Configurable lambda1520RSBLow{"lambda1520RSBLow", 1.560f, "Lambda(1520) RSB lower mass"}; - Configurable lambda1520RSBUp{"lambda1520RSBUp", 1.600f, "Lambda(1520) RSB upper mass"}; + Configurable c0028lambda1520PeakLow{"c0028lambda1520PeakLow", 1.500f, "Lambda(1520) peak lower mass"}; + Configurable c0029lambda1520PeakUp{"c0029lambda1520PeakUp", 1.540f, "Lambda(1520) peak upper mass"}; + Configurable c0030lambda1520LSBLow{"c0030lambda1520LSBLow", 1.440f, "Lambda(1520) LSB lower mass"}; + Configurable c0031lambda1520LSBUp{"c0031lambda1520LSBUp", 1.480f, "Lambda(1520) LSB upper mass"}; + Configurable c0032lambda1520RSBLow{"c0032lambda1520RSBLow", 1.560f, "Lambda(1520) RSB lower mass"}; + Configurable c0033lambda1520RSBUp{"c0033lambda1520RSBUp", 1.600f, "Lambda(1520) RSB upper mass"}; } cfgLambda1520Mass; void init(InitContext const&) @@ -1309,14 +1309,14 @@ struct HParticleCorrelationResonanceProducer { } // Event Filter - Filter eventFilter = (!cfgEvent.requireSel8) || (o2::aod::evsel::sel8 == true); - Filter posZFilter = (nabs(o2::aod::collision::posZ) < cfgEvent.cutZvertex); + Filter eventFilter = (!cfgEvent.c0002requireSel8) || (o2::aod::evsel::sel8 == true); + Filter posZFilter = (nabs(o2::aod::collision::posZ) < cfgEvent.c0003cutZvertex); // Track Filter - Filter ptFilter = (o2::aod::track::pt > cfgTrackCuts.ptMin) && (o2::aod::track::pt < cfgTrackCuts.ptMax); - Filter etaFilter = (nabs(o2::aod::track::eta) < cfgTrackCuts.etaMax); - Filter dcaFilter = ((!cfgTrackCuts.useFixedDCAxy) || (nabs(o2::aod::track::dcaXY) < cfgTrackCuts.dcaXYMax)) && - ((!cfgTrackCuts.useFixedDCAz) || (nabs(o2::aod::track::dcaZ) < cfgTrackCuts.dcaZMax)); + Filter ptFilter = (o2::aod::track::pt > cfgTrackCuts.c0004ptMin) && (o2::aod::track::pt < cfgTrackCuts.c0005ptMax); + Filter etaFilter = (nabs(o2::aod::track::eta) < cfgTrackCuts.c0006etaMax); + Filter dcaFilter = ((!cfgTrackCuts.c0007useFixedDCAxy) || (nabs(o2::aod::track::dcaXY) < cfgTrackCuts.c0008dcaXYMax)) && + ((!cfgTrackCuts.c0009useFixedDCAz) || (nabs(o2::aod::track::dcaZ) < cfgTrackCuts.c0010dcaZMax)); using MyFilteredCollisions = soa::Filtered>; using MyFilteredTracks = soa::Filtered>; @@ -1326,21 +1326,21 @@ struct HParticleCorrelationResonanceProducer { Partition negTracks = aod::track::signed1Pt < 0.0f; int dfNumber = 0; - // void processNothing(aod::HPCorrCollisions const&) + // void processNothing(aod::HPCorrColls const&) void processNothing(aod::Origins const& origins) { - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c0001printDebugMessages) { LOG(info) << "DEBUG :: Process Nothing :: df_" << dfNumber << " :: origins = " << origins.size(); } // Intentionally empty. // Keeps the task alive when running purely on derived data. } - PROCESS_SWITCH(HParticleCorrelationResonanceProducer, processNothing, "Dummy process for derived-data analysis", true); + PROCESS_SWITCH(HParticleCorrelation1ResonanceProducer, processNothing, "Dummy process for derived-data analysis", true); void processSameEvent(MyFilteredCollisions const& collisions, MyFilteredTracks const& fullTracks, o2::aod::Origins const& /*Origins*/) { dfNumber++; - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c0001printDebugMessages) { LOG(info) << "DEBUG :: df_" << dfNumber << " :: SE :: collisions = " << collisions.size() << " :: fullTracks = " << fullTracks.size(); } @@ -1422,9 +1422,9 @@ struct HParticleCorrelationResonanceProducer { lambda1520BarTag = kMassOutside; // phi(1020) -> K+ + K- - if (cfgResonances.doPhi1020 && posIsKa && negIsKa) { + if (cfgResonances.c0011doPhi1020 && posIsKa && negIsKa) { mPhi1020 = RecoDecay::m(p, ePosKa + eNegKa); - phi1020Tag = getMassRegionTag(mPhi1020, cfgPhi1020Mass.phi1020LSBLow, cfgPhi1020Mass.phi1020LSBUp, cfgPhi1020Mass.phi1020PeakLow, cfgPhi1020Mass.phi1020PeakUp, cfgPhi1020Mass.phi1020RSBLow, cfgPhi1020Mass.phi1020RSBUp); + phi1020Tag = getMassRegionTag(mPhi1020, cfgPhi1020Mass.c0018phi1020LSBLow, cfgPhi1020Mass.c0019phi1020LSBUp, cfgPhi1020Mass.c0016phi1020PeakLow, cfgPhi1020Mass.c0017phi1020PeakUp, cfgPhi1020Mass.c0020phi1020RSBLow, cfgPhi1020Mass.c0021phi1020RSBUp); if (phi1020Tag != kMassOutside) { fillTable = true; } @@ -1432,9 +1432,9 @@ struct HParticleCorrelationResonanceProducer { } // K(892)* -> K+ + pi- - if (cfgResonances.doKStar892 && posIsKa && negIsPi) { + if (cfgResonances.c0012doKStar892 && posIsKa && negIsPi) { mKStar892 = RecoDecay::m(p, ePosKa + eNegPi); - kStar892Tag = getMassRegionTag(mKStar892, cfgKstar892Mass.kstar892LSBLow, cfgKstar892Mass.kstar892LSBUp, cfgKstar892Mass.kstar892PeakLow, cfgKstar892Mass.kstar892PeakUp, cfgKstar892Mass.kstar892RSBLow, cfgKstar892Mass.kstar892RSBUp); + kStar892Tag = getMassRegionTag(mKStar892, cfgKstar892Mass.c0024kstar892LSBLow, cfgKstar892Mass.c0025kstar892LSBUp, cfgKstar892Mass.c0022kstar892PeakLow, cfgKstar892Mass.c0023kstar892PeakUp, cfgKstar892Mass.c0026kstar892RSBLow, cfgKstar892Mass.c0027kstar892RSBUp); if (kStar892Tag != kMassOutside) { fillTable = true; } @@ -1442,9 +1442,9 @@ struct HParticleCorrelationResonanceProducer { } // K(892)*Bar -> K- + pi+ - if (cfgResonances.doKStar892Bar && posIsPi && negIsKa) { + if (cfgResonances.c0013doKStar892Bar && posIsPi && negIsKa) { mKStar892Bar = RecoDecay::m(p, ePosPi + eNegKa); - kStar892BarTag = getMassRegionTag(mKStar892Bar, cfgKstar892Mass.kstar892LSBLow, cfgKstar892Mass.kstar892LSBUp, cfgKstar892Mass.kstar892PeakLow, cfgKstar892Mass.kstar892PeakUp, cfgKstar892Mass.kstar892RSBLow, cfgKstar892Mass.kstar892RSBUp); + kStar892BarTag = getMassRegionTag(mKStar892Bar, cfgKstar892Mass.c0024kstar892LSBLow, cfgKstar892Mass.c0025kstar892LSBUp, cfgKstar892Mass.c0022kstar892PeakLow, cfgKstar892Mass.c0023kstar892PeakUp, cfgKstar892Mass.c0026kstar892RSBLow, cfgKstar892Mass.c0027kstar892RSBUp); if (kStar892BarTag != kMassOutside) { fillTable = true; } @@ -1452,9 +1452,9 @@ struct HParticleCorrelationResonanceProducer { } // Λ(1520) -> P+ + Ka- - if (cfgResonances.doLambda1520 && posIsPr && negIsKa) { + if (cfgResonances.c0014doLambda1520 && posIsPr && negIsKa) { mLambda1520 = RecoDecay::m(p, ePosPr + eNegKa); - lambda1520Tag = getMassRegionTag(mLambda1520, cfgLambda1520Mass.lambda1520LSBLow, cfgLambda1520Mass.lambda1520LSBUp, cfgLambda1520Mass.lambda1520PeakLow, cfgLambda1520Mass.lambda1520PeakUp, cfgLambda1520Mass.lambda1520RSBLow, cfgLambda1520Mass.lambda1520RSBUp); + lambda1520Tag = getMassRegionTag(mLambda1520, cfgLambda1520Mass.c0030lambda1520LSBLow, cfgLambda1520Mass.c0031lambda1520LSBUp, cfgLambda1520Mass.c0028lambda1520PeakLow, cfgLambda1520Mass.c0029lambda1520PeakUp, cfgLambda1520Mass.c0032lambda1520RSBLow, cfgLambda1520Mass.c0033lambda1520RSBUp); if (lambda1520Tag != kMassOutside) { fillTable = true; } @@ -1462,9 +1462,9 @@ struct HParticleCorrelationResonanceProducer { } // Λ(1520)Bar -> PBar + Ka+ - if (cfgResonances.doLambda1520Bar && posIsKa && negIsPr) { + if (cfgResonances.c0015doLambda1520Bar && posIsKa && negIsPr) { mLambda1520Bar = RecoDecay::m(p, ePosKa + eNegPr); - lambda1520BarTag = getMassRegionTag(mLambda1520Bar, cfgLambda1520Mass.lambda1520LSBLow, cfgLambda1520Mass.lambda1520LSBUp, cfgLambda1520Mass.lambda1520PeakLow, cfgLambda1520Mass.lambda1520PeakUp, cfgLambda1520Mass.lambda1520RSBLow, cfgLambda1520Mass.lambda1520RSBUp); + lambda1520BarTag = getMassRegionTag(mLambda1520Bar, cfgLambda1520Mass.c0030lambda1520LSBLow, cfgLambda1520Mass.c0031lambda1520LSBUp, cfgLambda1520Mass.c0028lambda1520PeakLow, cfgLambda1520Mass.c0029lambda1520PeakUp, cfgLambda1520Mass.c0032lambda1520RSBLow, cfgLambda1520Mass.c0033lambda1520RSBUp); if (lambda1520BarTag != kMassOutside) { fillTable = true; } @@ -1486,12 +1486,12 @@ struct HParticleCorrelationResonanceProducer { } // Pos Tracks } // collision Loop is over } - PROCESS_SWITCH(HParticleCorrelationResonanceProducer, processSameEvent, "Process Same event", true); + PROCESS_SWITCH(HParticleCorrelation1ResonanceProducer, processSameEvent, "Process Same event", true); }; -struct HParticleCorrelationSameEvent { +struct HParticleCorrelation2SameEvent { - Produces derivedCollisions; + Produces derivedCollisions; Produces derivedTracks; Produces derivedResonances; @@ -1509,220 +1509,220 @@ struct HParticleCorrelationSameEvent { HistogramRegistry mixingQA{"mixingQA", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; struct : ConfigurableGroup { - Configurable printDebugMessages{"printDebugMessages", false, "Print debug messages"}; + Configurable c1001printDebugMessages{"c1001printDebugMessages", false, "Print debug messages"}; } cfgDebug; struct : ConfigurableGroup { // Basic event selection - Configurable cutZvertex{"cutZvertex", 10.f, "Maximum |z_{vtx}| (cm)"}; // Imp : All - Configurable requireSel8{"requireSel8", true, "Require sel8 event selection"}; // Imp : All - Configurable requireTriggerTVX{"requireTriggerTVX", false, "Require kIsTriggerTVX"}; + Configurable c1002cutZvertex{"c1002cutZvertex", 10.f, "Maximum |z_{vtx}| (cm)"}; // Imp : All + Configurable c1003requireSel8{"c1003requireSel8", true, "Require sel8 event selection"}; // Imp : All + Configurable c1004requireTriggerTVX{"c1004requireTriggerTVX", false, "Require kIsTriggerTVX"}; - Configurable minNFilteredTracks{"minNFilteredTracks", 3, "Minimum number of filtered tracks required per collision"}; - Configurable minNSelectedTracks{"minNSelectedTracks", 3, "Minimum number of selected tracks required per collision"}; + Configurable c1005minNFilteredTracks{"c1005minNFilteredTracks", 3, "Minimum number of filtered tracks required per collision"}; + Configurable c1006minNSelectedTracks{"c1006minNSelectedTracks", 3, "Minimum number of selected tracks required per collision"}; // Time-frame / ROF border selections - Configurable requireNoITSROFrameBorder{"requireNoITSROFrameBorder", false, "Require kNoITSROFrameBorder"}; - Configurable requireNoTimeFrameBorder{"requireNoTimeFrameBorder", false, "Require kNoTimeFrameBorder"}; + Configurable c1007requireNoITSROFrameBorder{"c1007requireNoITSROFrameBorder", false, "Require kNoITSROFrameBorder"}; + Configurable c1008requireNoTimeFrameBorder{"c1008requireNoTimeFrameBorder", false, "Require kNoTimeFrameBorder"}; // Vertex quality - Configurable requireVertexITSTPC{"requireVertexITSTPC", true, "Require kIsVertexITSTPC"}; // Imp : Light Ions + pp - Configurable requireGoodZvtxFT0vsPV{"requireGoodZvtxFT0vsPV", false, "Require kIsGoodZvtxFT0vsPV"}; // Imp : Light Ions - Configurable requireVertexTOFmatched{"requireVertexTOFmatched", false, "Require kIsVertexTOFmatched"}; - Configurable requireVertexTRDmatched{"requireVertexTRDmatched", false, "Require kIsVertexTRDmatched"}; - Configurable requireGoodITSLayersAll{"requireGoodITSLayersAll", false, "Require kIsGoodITSLayersAll"}; // Imp : Light Ions + Configurable c1009requireVertexITSTPC{"c1009requireVertexITSTPC", true, "Require kIsVertexITSTPC"}; // Imp : Light Ions + pp + Configurable c1010requireGoodZvtxFT0vsPV{"c1010requireGoodZvtxFT0vsPV", false, "Require kIsGoodZvtxFT0vsPV"}; // Imp : Light Ions + Configurable c1011requireVertexTOFmatched{"c1011requireVertexTOFmatched", false, "Require kIsVertexTOFmatched"}; + Configurable c1012requireVertexTRDmatched{"c1012requireVertexTRDmatched", false, "Require kIsVertexTRDmatched"}; + Configurable c1013requireGoodITSLayersAll{"c1013requireGoodITSLayersAll", false, "Require kIsGoodITSLayersAll"}; // Imp : Light Ions // Pileup / neighbouring-collision rejection - Configurable requireNoSameBunchPileup{"requireNoSameBunchPileup", true, "Require kNoSameBunchPileup"}; // Imp : Light Ions + pp - Configurable requireNoCollInTimeRangeStandard{"requireNoCollInTimeRangeStandard", false, "Require kNoCollInTimeRangeStandard"}; - Configurable requireNoCollInTimeRangeStrict{"requireNoCollInTimeRangeStrict", false, "Require kNoCollInTimeRangeStrict"}; - Configurable requireNoCollInTimeRangeNarrow{"requireNoCollInTimeRangeNarrow", false, "Require kNoCollInTimeRangeNarrow"}; - Configurable requireNoCollInRofStandard{"requireNoCollInRofStandard", false, "Require kNoCollInRofStandard"}; - Configurable requireNoCollInRofStrict{"requireNoCollInRofStrict", false, "Require kNoCollInRofStrict"}; - Configurable requireNoHighMultCollInPrevRof{"requireNoHighMultCollInPrevRof", false, "Require kNoHighMultCollInPrevRof"}; + Configurable c1014requireNoSameBunchPileup{"c1014requireNoSameBunchPileup", true, "Require kNoSameBunchPileup"}; // Imp : Light Ions + pp + Configurable c1015requireNoCollInTimeRangeStandard{"c1015requireNoCollInTimeRangeStandard", false, "Require kNoCollInTimeRangeStandard"}; + Configurable c1016requireNoCollInTimeRangeStrict{"c1016requireNoCollInTimeRangeStrict", false, "Require kNoCollInTimeRangeStrict"}; + Configurable c1017requireNoCollInTimeRangeNarrow{"c1017requireNoCollInTimeRangeNarrow", false, "Require kNoCollInTimeRangeNarrow"}; + Configurable c1018requireNoCollInRofStandard{"c1018requireNoCollInRofStandard", false, "Require kNoCollInRofStandard"}; + Configurable c1019requireNoCollInRofStrict{"c1019requireNoCollInRofStrict", false, "Require kNoCollInRofStrict"}; + Configurable c1020requireNoHighMultCollInPrevRof{"c1020requireNoHighMultCollInPrevRof", false, "Require kNoHighMultCollInPrevRof"}; // INEL event classes - Configurable requireINELgt0{"requireINELgt0", false, "Require INEL > 0"}; - Configurable requireINELgt1{"requireINELgt1", false, "Require INEL > 1"}; + Configurable c1021requireINELgt0{"c1021requireINELgt0", false, "Require INEL > 0"}; + Configurable c1022requireINELgt1{"c1022requireINELgt1", false, "Require INEL > 1"}; // Multiplicity selection - Configurable useMultiplicitySelection{"useMultiplicitySelection", false, "Apply multiplicity selection"}; - Configurable multiplicityEstimator{"multiplicityEstimator", 0, "0: multNTracksPV, 1: numContrib, 2: multFT0C, 3: multFT0M"}; - Configurable minMultiplicity{"minMultiplicity", 0.f, "Minimum multiplicity"}; - Configurable maxMultiplicity{"maxMultiplicity", 1.e9f, "Maximum multiplicity"}; + Configurable c1023useMultiplicitySelection{"c1023useMultiplicitySelection", false, "Apply multiplicity selection"}; + Configurable c1024multiplicityEstimator{"c1024multiplicityEstimator", 0, "0: multNTracksPV, 1: numContrib, 2: multFT0C, 3: multFT0M"}; + Configurable c1025minMultiplicity{"c1025minMultiplicity", 0.f, "Minimum multiplicity"}; + Configurable c1026maxMultiplicity{"c1026maxMultiplicity", 1.e9f, "Maximum multiplicity"}; // Centrality selection - Configurable useCentralitySelection{"useCentralitySelection", false, "Apply centrality selection"}; - Configurable centralityEstimator{"centralityEstimator", 0, "0: centFT0C, 1: centFT0M, 2: centFT0A, 3: centFV0A"}; - Configurable minCentrality{"minCentrality", 0.f, "Minimum centrality percentile"}; - Configurable maxCentrality{"maxCentrality", 100.f, "Maximum centrality percentile"}; + Configurable c1027useCentralitySelection{"c1027useCentralitySelection", false, "Apply centrality selection"}; + Configurable c1028centralityEstimator{"c1028centralityEstimator", 0, "0: centFT0C, 1: centFT0M, 2: centFT0A, 3: centFV0A"}; + Configurable c1029minCentrality{"c1029minCentrality", 0.f, "Minimum centrality percentile"}; + Configurable c1030maxCentrality{"c1030maxCentrality", 100.f, "Maximum centrality percentile"}; // Occupancy selection - Configurable useOccupancySelection{"useOccupancySelection", false, "Apply event occupancy selection"}; - Configurable useFT0CbasedOccupancy{"useFT0CbasedOccupancy", false, "Use FT0C occupancy instead of track occupancy"}; - Configurable minOccupancy{"minOccupancy", -1.f, "Minimum occupancy"}; - Configurable maxOccupancy{"maxOccupancy", 1.e9f, "Maximum occupancy"}; + Configurable c1031useOccupancySelection{"c1031useOccupancySelection", false, "Apply event occupancy selection"}; + Configurable c1032useFT0CbasedOccupancy{"c1032useFT0CbasedOccupancy", false, "Use FT0C occupancy instead of track occupancy"}; + Configurable c1033minOccupancy{"c1033minOccupancy", -1.f, "Minimum occupancy"}; + Configurable c1034maxOccupancy{"c1034maxOccupancy", 1.e9f, "Maximum occupancy"}; // Interaction-rate selection - Configurable useInteractionRateSelection{"useInteractionRateSelection", false, "Apply interaction-rate selection"}; - Configurable minInteractionRate{"minInteractionRate", -1.f, "Minimum interaction rate"}; - Configurable maxInteractionRate{"maxInteractionRate", 1.e9f, "Maximum interaction rate"}; + Configurable c1035useInteractionRateSelection{"c1035useInteractionRateSelection", false, "Apply interaction-rate selection"}; + Configurable c1036minInteractionRate{"c1036minInteractionRate", -1.f, "Minimum interaction rate"}; + Configurable c1037maxInteractionRate{"c1037maxInteractionRate", 1.e9f, "Maximum interaction rate"}; // RCT / detector-quality selection - Configurable requireRCTFlagChecker{"requireRCTFlagChecker", false, "Apply Run Condition Table event-quality selection"}; - Configurable requireCorrelationAnalysisRCTFlagChecker{"requireCorrelationAnalysisRCTFlagChecker", false, "Apply correlation-analysis RCT selection"}; - Configurable rctFlagCheckerLabel{"rctFlagCheckerLabel", "CBT_muon_global", "RCT flag checker label"}; - Configurable rctCheckZDC{"rctCheckZDC", false, "Include ZDC in RCT detector-quality check"}; - Configurable rctTreatLimitedAcceptanceAsBad{"rctTreatLimitedAcceptanceAsBad", false, "Treat limited detector acceptance as bad"}; + Configurable c1038requireRCTFlagChecker{"c1038requireRCTFlagChecker", false, "Apply Run Condition Table event-quality selection"}; + Configurable c1039requireCorrelationAnalysisRCTFlagChecker{"c1039requireCorrelationAnalysisRCTFlagChecker", false, "Apply correlation-analysis RCT selection"}; + Configurable c1040rctFlagCheckerLabel{"c1040rctFlagCheckerLabel", "CBT_muon_global", "RCT flag checker label"}; + Configurable c1041rctCheckZDC{"c1041rctCheckZDC", false, "Include ZDC in RCT detector-quality check"}; + Configurable c1042rctTreatLimitedAcceptanceAsBad{"c1042rctTreatLimitedAcceptanceAsBad", false, "Treat limited detector acceptance as bad"}; } cfgEvent; struct : ConfigurableGroup { // Kinematics - Configurable ptMin{"ptMin", 0.2f, "Minimum track pT (GeV/c)"}; - Configurable ptMax{"ptMax", 1.e10f, "Maximum track pT (GeV/c)"}; - Configurable etaMax{"etaMax", 0.8f, "Maximum |eta|"}; + Configurable c1043ptMin{"c1043ptMin", 0.2f, "Minimum track pT (GeV/c)"}; + Configurable c1044ptMax{"c1044ptMax", 1.e10f, "Maximum track pT (GeV/c)"}; + Configurable c1045etaMax{"c1045etaMax", 0.8f, "Maximum |eta|"}; // Standard O2 track-selection flags - Configurable requireGlobalTrack{"requireGlobalTrack", false, "Require isGlobalTrack()"}; - Configurable requireGlobalTrackWoDCA{"requireGlobalTrackWoDCA", false, "Require isGlobalTrackWoDCA()"}; - Configurable requirePVContributor{"requirePVContributor", false, "Require track to be a PV contributor"}; + Configurable c1046requireGlobalTrack{"c1046requireGlobalTrack", false, "Require isGlobalTrack()"}; + Configurable c1047requireGlobalTrackWoDCA{"c1047requireGlobalTrackWoDCA", false, "Require isGlobalTrackWoDCA()"}; + Configurable c1048requirePVContributor{"c1048requirePVContributor", false, "Require track to be a PV contributor"}; // Detector matching / presence - Configurable requireITS{"requireITS", false, "Require ITS information"}; - Configurable requireTPC{"requireTPC", false, "Require TPC information"}; - Configurable requireTOF{"requireTOF", false, "Require TOF information"}; - Configurable requireTRD{"requireTRD", false, "Require TRD information"}; + Configurable c1049requireITS{"c1049requireITS", false, "Require ITS information"}; + Configurable c1050requireTPC{"c1050requireTPC", false, "Require TPC information"}; + Configurable c1051requireTOF{"c1051requireTOF", false, "Require TOF information"}; + Configurable c1052requireTRD{"c1052requireTRD", false, "Require TRD information"}; // TPC quality - Configurable tpcNClsFoundMin{"tpcNClsFoundMin", 0, "Minimum number of found TPC clusters"}; - Configurable tpcNClsCrossedRowsMin{"tpcNClsCrossedRowsMin", 80, "Minimum number of TPC crossed rows"}; - Configurable tpcCrossedRowsOverFindableMin{"tpcCrossedRowsOverFindableMin", 0.f, "Minimum TPC crossed rows / findable clusters"}; - Configurable tpcFoundOverFindableMin{"tpcFoundOverFindableMin", 0.f, "Minimum TPC found / findable clusters"}; - Configurable tpcFractionSharedMax{"tpcFractionSharedMax", 1.f, "Maximum fraction of shared TPC clusters"}; - Configurable tpcChi2NClMin{"tpcChi2NClMin", 0.f, "Minimum TPC chi2 per cluster"}; - Configurable tpcChi2NClMax{"tpcChi2NClMax", 1.e10f, "Maximum TPC chi2 per cluster"}; + Configurable c1053tpcNClsFoundMin{"c1053tpcNClsFoundMin", 0, "Minimum number of found TPC clusters"}; + Configurable c1054tpcNClsCrossedRowsMin{"c1054tpcNClsCrossedRowsMin", 80, "Minimum number of TPC crossed rows"}; + Configurable c1055tpcCrossedRowsOverFindableMin{"c1055tpcCrossedRowsOverFindableMin", 0.f, "Minimum TPC crossed rows / findable clusters"}; + Configurable c1056tpcFoundOverFindableMin{"c1056tpcFoundOverFindableMin", 0.f, "Minimum TPC found / findable clusters"}; + Configurable c1057tpcFractionSharedMax{"c1057tpcFractionSharedMax", 1.f, "Maximum fraction of shared TPC clusters"}; + Configurable c1058tpcChi2NClMin{"c1058tpcChi2NClMin", 0.f, "Minimum TPC chi2 per cluster"}; + Configurable c1059tpcChi2NClMax{"c1059tpcChi2NClMax", 1.e10f, "Maximum TPC chi2 per cluster"}; // ITS quality - Configurable itsNClsMin{"itsNClsMin", 0, "Minimum number of ITS clusters"}; - Configurable itsNClsMax{"itsNClsMax", 7, "Maximum number of ITS clusters"}; - Configurable itsNClsInnerBarrelMin{"itsNClsInnerBarrelMin", 0, "Minimum number of ITS inner-barrel clusters"}; - Configurable itsChi2NClMin{"itsChi2NClMin", 0.f, "Minimum ITS chi2 per cluster"}; - Configurable itsChi2NClMax{"itsChi2NClMax", 1.e10f, "Maximum ITS chi2 per cluster"}; + Configurable c1060itsNClsMin{"c1060itsNClsMin", 0, "Minimum number of ITS clusters"}; + Configurable c1061itsNClsMax{"c1061itsNClsMax", 7, "Maximum number of ITS clusters"}; + Configurable c1062itsNClsInnerBarrelMin{"c1062itsNClsInnerBarrelMin", 0, "Minimum number of ITS inner-barrel clusters"}; + Configurable c1063itsChi2NClMin{"c1063itsChi2NClMin", 0.f, "Minimum ITS chi2 per cluster"}; + Configurable c1064itsChi2NClMax{"c1064itsChi2NClMax", 1.e10f, "Maximum ITS chi2 per cluster"}; // Fixed DCA - Configurable useFixedDCAxy{"useFixedDCAxy", true, "Apply fixed |DCAxy| cut"}; - Configurable dcaXYMax{"dcaXYMax", 0.1f, "Maximum fixed |DCAxy| (cm)"}; - Configurable useFixedDCAz{"useFixedDCAz", true, "Apply fixed |DCAz| cut"}; - Configurable dcaZMax{"dcaZMax", 0.2f, "Maximum fixed |DCAz| (cm)"}; + Configurable c1065useFixedDCAxy{"c1065useFixedDCAxy", true, "Apply fixed |DCAxy| cut"}; + Configurable c1066dcaXYMax{"c1066dcaXYMax", 0.1f, "Maximum fixed |DCAxy| (cm)"}; + Configurable c1067useFixedDCAz{"c1067useFixedDCAz", true, "Apply fixed |DCAz| cut"}; + Configurable c1068dcaZMax{"c1068dcaZMax", 0.2f, "Maximum fixed |DCAz| (cm)"}; // pT-dependent DCAxy: // |DCAxy| < A + B * pT^C - Configurable usePtDependentDCAxy{"usePtDependentDCAxy", false, "Apply pT-dependent DCAxy cut"}; - Configurable dcaXYPtA{"dcaXYPtA", 0.0105f, "A coefficient of pT-dependent DCAxy cut"}; - Configurable dcaXYPtB{"dcaXYPtB", 0.035f, "B coefficient of pT-dependent DCAxy cut"}; - Configurable dcaXYPtC{"dcaXYPtC", 1.1f, "Power C of pT-dependent DCAxy cut"}; + Configurable c1069usePtDependentDCAxy{"c1069usePtDependentDCAxy", false, "Apply pT-dependent DCAxy cut"}; + Configurable c1070dcaXYPtA{"c1070dcaXYPtA", 0.0105f, "A coefficient of pT-dependent DCAxy cut"}; + Configurable c1071dcaXYPtB{"c1071dcaXYPtB", 0.035f, "B coefficient of pT-dependent DCAxy cut"}; + Configurable c1072dcaXYPtC{"c1072dcaXYPtC", 1.1f, "Power C of pT-dependent DCAxy cut"}; // pT-dependent DCAz: // |DCAz| < A + B * pT^C - Configurable usePtDependentDCAz{"usePtDependentDCAz", false, "Apply pT-dependent DCAz cut"}; - Configurable dcaZPtA{"dcaZPtA", 0.1f, "A coefficient of pT-dependent DCAz cut"}; - Configurable dcaZPtB{"dcaZPtB", 0.0f, "B coefficient of pT-dependent DCAz cut"}; - Configurable dcaZPtC{"dcaZPtC", 0.0f, "Power C of pT-dependent DCAz cut"}; + Configurable c1073usePtDependentDCAz{"c1073usePtDependentDCAz", false, "Apply pT-dependent DCAz cut"}; + Configurable c1074dcaZPtA{"c1074dcaZPtA", 0.1f, "A coefficient of pT-dependent DCAz cut"}; + Configurable c1075dcaZPtB{"c1075dcaZPtB", 0.0f, "B coefficient of pT-dependent DCAz cut"}; + Configurable c1076dcaZPtC{"c1076dcaZPtC", 0.0f, "Power C of pT-dependent DCAz cut"}; } cfgTrackCuts; struct : ConfigurableGroup { - Configurable triggerPtLow{"triggerPtLow", 4.0f, "Minimum pT for trigger tracks"}; - Configurable triggerPtHigh{"triggerPtHigh", 8.0f, "Maximum pT for trigger tracks"}; - Configurable assocPtLowMin{"assocPtLowMin", 0.0f, "Minimum pT for low-pT associated tracks"}; - Configurable assocPtLowMax{"assocPtLowMax", 2.0f, "Maximum pT for low-pT associated tracks"}; - Configurable assocPtHighMin{"assocPtHighMin", 2.0f, "Minimum pT for high-pT associated tracks"}; - Configurable assocPtHighMax{"assocPtHighMax", 4.0f, "Maximum pT for high-pT associated tracks"}; + Configurable c1077triggerPtLow{"c1077triggerPtLow", 4.0f, "Minimum pT for trigger tracks"}; + Configurable c1078triggerPtHigh{"c1078triggerPtHigh", 8.0f, "Maximum pT for trigger tracks"}; + Configurable c1079assocPtLowMin{"c1079assocPtLowMin", 0.0f, "Minimum pT for low-pT associated tracks"}; + Configurable c1080assocPtLowMax{"c1080assocPtLowMax", 2.0f, "Maximum pT for low-pT associated tracks"}; + Configurable c1081assocPtHighMin{"c1081assocPtHighMin", 2.0f, "Minimum pT for high-pT associated tracks"}; + Configurable c1082assocPtHighMax{"c1082assocPtHighMax", 4.0f, "Maximum pT for high-pT associated tracks"}; } cfgPartitions; struct : ConfigurableGroup { - Configurable resoRapidityMin{"resoRapidityMin", -0.5f, "Minimum rapidity for resonance candidates"}; - Configurable resoRapidityMax{"resoRapidityMax", 0.5f, "Maximum rapidity for resonance candidates"}; - - Configurable phiPtLowMin{"phiPtLowMin", 0.0f, "Minimum pT for low-pT Phi(1020)"}; - Configurable phiPtLowMax{"phiPtLowMax", 2.0f, "Maximum pT for low-pT Phi(1020)"}; - Configurable phiPtHighMin{"phiPtHighMin", 2.0f, "Minimum pT for high-pT Phi(1020)"}; - Configurable phiPtHighMax{"phiPtHighMax", 4.0f, "Maximum pT for high-pT Phi(1020)"}; - - Configurable kstarPtLowMin{"kstarPtLowMin", 0.0f, "Minimum pT for low-pT K*(892)0"}; - Configurable kstarPtLowMax{"kstarPtLowMax", 2.0f, "Maximum pT for low-pT K*(892)0"}; - Configurable kstarPtHighMin{"kstarPtHighMin", 2.0f, "Minimum pT for high-pT K*(892)0"}; - Configurable kstarPtHighMax{"kstarPtHighMax", 4.0f, "Maximum pT for high-pT K*(892)0"}; - - Configurable kstarBarPtLowMin{"kstarBarPtLowMin", 0.0f, "Minimum pT for low-pT anti-K*(892)0"}; - Configurable kstarBarPtLowMax{"kstarBarPtLowMax", 2.0f, "Maximum pT for low-pT anti-K*(892)0"}; - Configurable kstarBarPtHighMin{"kstarBarPtHighMin", 2.0f, "Minimum pT for high-pT anti-K*(892)0"}; - Configurable kstarBarPtHighMax{"kstarBarPtHighMax", 4.0f, "Maximum pT for high-pT anti-K*(892)0"}; - - Configurable lambda1520PtLowMin{"lambda1520PtLowMin", 0.0f, "Minimum pT for low-pT Lambda(1520)"}; - Configurable lambda1520PtLowMax{"lambda1520PtLowMax", 2.0f, "Maximum pT for low-pT Lambda(1520)"}; - Configurable lambda1520PtHighMin{"lambda1520PtHighMin", 2.0f, "Minimum pT for high-pT Lambda(1520)"}; - Configurable lambda1520PtHighMax{"lambda1520PtHighMax", 4.0f, "Maximum pT for high-pT Lambda(1520)"}; - - Configurable lambda1520BarPtLowMin{"lambda1520BarPtLowMin", 0.0f, "Minimum pT for low-pT anti-Lambda(1520)"}; - Configurable lambda1520BarPtLowMax{"lambda1520BarPtLowMax", 2.0f, "Maximum pT for low-pT anti-Lambda(1520)"}; - Configurable lambda1520BarPtHighMin{"lambda1520BarPtHighMin", 2.0f, "Minimum pT for high-pT anti-Lambda(1520)"}; - Configurable lambda1520BarPtHighMax{"lambda1520BarPtHighMax", 4.0f, "Maximum pT for high-pT anti-Lambda(1520)"}; + Configurable c1083resoRapidityMin{"c1083resoRapidityMin", -0.5f, "Minimum rapidity for resonance candidates"}; + Configurable c1084resoRapidityMax{"c1084resoRapidityMax", 0.5f, "Maximum rapidity for resonance candidates"}; + + Configurable c1085phiPtLowMin{"c1085phiPtLowMin", 0.0f, "Minimum pT for low-pT Phi(1020)"}; + Configurable c1086phiPtLowMax{"c1086phiPtLowMax", 2.0f, "Maximum pT for low-pT Phi(1020)"}; + Configurable c1087phiPtHighMin{"c1087phiPtHighMin", 2.0f, "Minimum pT for high-pT Phi(1020)"}; + Configurable c1088phiPtHighMax{"c1088phiPtHighMax", 4.0f, "Maximum pT for high-pT Phi(1020)"}; + + Configurable c1089kstarPtLowMin{"c1089kstarPtLowMin", 0.0f, "Minimum pT for low-pT K*(892)0"}; + Configurable c1090kstarPtLowMax{"c1090kstarPtLowMax", 2.0f, "Maximum pT for low-pT K*(892)0"}; + Configurable c1091kstarPtHighMin{"c1091kstarPtHighMin", 2.0f, "Minimum pT for high-pT K*(892)0"}; + Configurable c1092kstarPtHighMax{"c1092kstarPtHighMax", 4.0f, "Maximum pT for high-pT K*(892)0"}; + + Configurable c1093kstarBarPtLowMin{"c1093kstarBarPtLowMin", 0.0f, "Minimum pT for low-pT anti-K*(892)0"}; + Configurable c1094kstarBarPtLowMax{"c1094kstarBarPtLowMax", 2.0f, "Maximum pT for low-pT anti-K*(892)0"}; + Configurable c1095kstarBarPtHighMin{"c1095kstarBarPtHighMin", 2.0f, "Minimum pT for high-pT anti-K*(892)0"}; + Configurable c1096kstarBarPtHighMax{"c1096kstarBarPtHighMax", 4.0f, "Maximum pT for high-pT anti-K*(892)0"}; + + Configurable c1097lambda1520PtLowMin{"c1097lambda1520PtLowMin", 0.0f, "Minimum pT for low-pT Lambda(1520)"}; + Configurable c1098lambda1520PtLowMax{"c1098lambda1520PtLowMax", 2.0f, "Maximum pT for low-pT Lambda(1520)"}; + Configurable c1099lambda1520PtHighMin{"c1099lambda1520PtHighMin", 2.0f, "Minimum pT for high-pT Lambda(1520)"}; + Configurable c1100lambda1520PtHighMax{"c1100lambda1520PtHighMax", 4.0f, "Maximum pT for high-pT Lambda(1520)"}; + + Configurable c1101lambda1520BarPtLowMin{"c1101lambda1520BarPtLowMin", 0.0f, "Minimum pT for low-pT anti-Lambda(1520)"}; + Configurable c1102lambda1520BarPtLowMax{"c1102lambda1520BarPtLowMax", 2.0f, "Maximum pT for low-pT anti-Lambda(1520)"}; + Configurable c1103lambda1520BarPtHighMin{"c1103lambda1520BarPtHighMin", 2.0f, "Minimum pT for high-pT anti-Lambda(1520)"}; + Configurable c1104lambda1520BarPtHighMax{"c1104lambda1520BarPtHighMax", 4.0f, "Maximum pT for high-pT anti-Lambda(1520)"}; } cfgResPartitions; struct : ConfigurableGroup { - ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", {80, -2.0f, 6.0f}, "#Delta#varphi"}; - ConfigurableAxis axisDeltaEta{"axisDeltaEta", {84, -2.1f, 2.1f}, "#Delta#eta"}; + ConfigurableAxis c1105axisDeltaPhi{"c1105axisDeltaPhi", {80, -2.0f, 6.0f}, "#Delta#varphi"}; + ConfigurableAxis c1106axisDeltaEta{"c1106axisDeltaEta", {84, -2.1f, 2.1f}, "#Delta#eta"}; - ConfigurableAxis axisCorrSparseTriggerPt{"axisCorrSparseTriggerPt", {8, 4.0f, 8.0f}, "#it{p}_{T}^{trig} (GeV/#it{c})"}; - ConfigurableAxis axisCorrSparseAssocPt{"axisCorrSparseAssocPt", {8, 0.0f, 4.0f}, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; - ConfigurableAxis axisCorrSparseDeltaPhi{"axisCorrSparseDeltaPhi", {32, -2.0f, 6.0f}, "#Delta#varphi"}; - ConfigurableAxis axisCorrSparseDeltaEta{"axisCorrSparseDeltaEta", {24, -2.1f, 2.1f}, "#Delta#eta"}; + ConfigurableAxis c1107axisCorrSparseTriggerPt{"c1107axisCorrSparseTriggerPt", {8, 4.0f, 8.0f}, "#it{p}_{T}^{trig} (GeV/#it{c})"}; + ConfigurableAxis c1108axisCorrSparseAssocPt{"c1108axisCorrSparseAssocPt", {8, 0.0f, 4.0f}, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; + ConfigurableAxis c1109axisCorrSparseDeltaPhi{"c1109axisCorrSparseDeltaPhi", {32, -2.0f, 6.0f}, "#Delta#varphi"}; + ConfigurableAxis c1110axisCorrSparseDeltaEta{"c1110axisCorrSparseDeltaEta", {24, -2.1f, 2.1f}, "#Delta#eta"}; } cfgAxis; - Configurable fillDauQAOnce{"fillDauQAOnce", false, "Fill each resonance daughter in QA only once per event"}; - Configurable rejectResoWithAnyTriggerDaughter{"rejectResoWithAnyTriggerDaughter", false, "Reject resonance if either daughter belongs to the event trigger population"}; - Configurable requireSelectedTriggerForInvariantMass{"requireSelectedTriggerForInvariantMass", true, "Require at least one selected trigger track before filling resonance invariant-mass spectra"}; + Configurable c1111fillDauQAOnce{"c1111fillDauQAOnce", false, "Fill each resonance daughter in QA only once per event"}; + Configurable c1112rejectResoWithAnyTriggerDaughter{"c1112rejectResoWithAnyTriggerDaughter", false, "Reject resonance if either daughter belongs to the event trigger population"}; + Configurable c1113requireSelectedTriggerForInvariantMass{"c1113requireSelectedTriggerForInvariantMass", true, "Require at least one selected trigger track before filling resonance invariant-mass spectra"}; struct : ConfigurableGroup { - Configurable phi1020PeakLow{"phi1020PeakLow", 1.013f, "Phi(1020) peak lower mass"}; - Configurable phi1020PeakUp{"phi1020PeakUp", 1.026f, "Phi(1020) peak upper mass"}; - Configurable phi1020LSBLow{"phi1020LSBLow", 0.995f, "Phi(1020) LSB lower mass"}; - Configurable phi1020LSBUp{"phi1020LSBUp", 1.005f, "Phi(1020) LSB upper mass"}; - Configurable phi1020RSBLow{"phi1020RSBLow", 1.040f, "Phi(1020) RSB lower mass"}; - Configurable phi1020RSBUp{"phi1020RSBUp", 1.060f, "Phi(1020) RSB upper mass"}; + Configurable c1114phi1020PeakLow{"c1114phi1020PeakLow", 1.013f, "Phi(1020) peak lower mass"}; + Configurable c1115phi1020PeakUp{"c1115phi1020PeakUp", 1.026f, "Phi(1020) peak upper mass"}; + Configurable c1116phi1020LSBLow{"c1116phi1020LSBLow", 0.995f, "Phi(1020) LSB lower mass"}; + Configurable c1117phi1020LSBUp{"c1117phi1020LSBUp", 1.005f, "Phi(1020) LSB upper mass"}; + Configurable c1118phi1020RSBLow{"c1118phi1020RSBLow", 1.040f, "Phi(1020) RSB lower mass"}; + Configurable c1119phi1020RSBUp{"c1119phi1020RSBUp", 1.060f, "Phi(1020) RSB upper mass"}; } cfgPhi1020CorrMass; struct : ConfigurableGroup { - Configurable kStar892PeakLow{"kStar892PeakLow", 0.846f, "K*(892)0 correlation peak lower mass"}; - Configurable kStar892PeakUp{"kStar892PeakUp", 0.946f, "K*(892)0 correlation peak upper mass"}; - Configurable kStar892LSBLow{"kStar892LSBLow", 0.700f, "K*(892)0 correlation LSB lower mass"}; - Configurable kStar892LSBUp{"kStar892LSBUp", 0.780f, "K*(892)0 correlation LSB upper mass"}; - Configurable kStar892RSBLow{"kStar892RSBLow", 1.010f, "K*(892)0 correlation RSB lower mass"}; - Configurable kStar892RSBUp{"kStar892RSBUp", 1.090f, "K*(892)0 correlation RSB upper mass"}; + Configurable c1120kStar892PeakLow{"c1120kStar892PeakLow", 0.846f, "K*(892)0 correlation peak lower mass"}; + Configurable c1121kStar892PeakUp{"c1121kStar892PeakUp", 0.946f, "K*(892)0 correlation peak upper mass"}; + Configurable c1122kStar892LSBLow{"c1122kStar892LSBLow", 0.700f, "K*(892)0 correlation LSB lower mass"}; + Configurable c1123kStar892LSBUp{"c1123kStar892LSBUp", 0.780f, "K*(892)0 correlation LSB upper mass"}; + Configurable c1124kStar892RSBLow{"c1124kStar892RSBLow", 1.010f, "K*(892)0 correlation RSB lower mass"}; + Configurable c1125kStar892RSBUp{"c1125kStar892RSBUp", 1.090f, "K*(892)0 correlation RSB upper mass"}; } cfgKStar892CorrMass; struct : ConfigurableGroup { - Configurable lambda1520PeakLow{"lambda1520PeakLow", 1.500f, "Lambda(1520) correlation peak lower mass"}; - Configurable lambda1520PeakUp{"lambda1520PeakUp", 1.540f, "Lambda(1520) correlation peak upper mass"}; - Configurable lambda1520LSBLow{"lambda1520LSBLow", 1.440f, "Lambda(1520) correlation LSB lower mass"}; - Configurable lambda1520LSBUp{"lambda1520LSBUp", 1.480f, "Lambda(1520) correlation LSB upper mass"}; - Configurable lambda1520RSBLow{"lambda1520RSBLow", 1.560f, "Lambda(1520) correlation RSB lower mass"}; - Configurable lambda1520RSBUp{"lambda1520RSBUp", 1.600f, "Lambda(1520) correlation RSB upper mass"}; + Configurable c1126lambda1520PeakLow{"c1126lambda1520PeakLow", 1.500f, "Lambda(1520) correlation peak lower mass"}; + Configurable c1127lambda1520PeakUp{"c1127lambda1520PeakUp", 1.540f, "Lambda(1520) correlation peak upper mass"}; + Configurable c1128lambda1520LSBLow{"c1128lambda1520LSBLow", 1.440f, "Lambda(1520) correlation LSB lower mass"}; + Configurable c1129lambda1520LSBUp{"c1129lambda1520LSBUp", 1.480f, "Lambda(1520) correlation LSB upper mass"}; + Configurable c1130lambda1520RSBLow{"c1130lambda1520RSBLow", 1.560f, "Lambda(1520) correlation RSB lower mass"}; + Configurable c1131lambda1520RSBUp{"c1131lambda1520RSBUp", 1.600f, "Lambda(1520) correlation RSB upper mass"}; } cfgLambda1520CorrMass; struct : ConfigurableGroup { - Configurable pairMask{"pairMask", 0ULL, "Correlation mask to store; 0 = any non-zero correlation"}; - Configurable mixingBin{"mixingBin", -1, "Mixing bin to store; -1 = all valid mixing bins"}; - Configurable requireAllPairBits{"requireAllPairBits", false, "Require all requested pair-mask bits instead of any requested bit"}; - Configurable resetGlobalCountersPerDF{"resetGlobalCountersPerDF", false, "Reset derived-data global counters at the beginning of every dataframe"}; + Configurable c1132pairMask{"c1132pairMask", 0ULL, "Correlation mask to store; 0 = any non-zero correlation"}; + Configurable c1133mixingBin{"c1133mixingBin", -1, "Mixing bin to store; -1 = all valid mixing bins"}; + Configurable c1134requireAllPairBits{"c1134requireAllPairBits", false, "Require all requested pair-mask bits instead of any requested bit"}; + Configurable c1135resetGlobalCountersPerDF{"c1135resetGlobalCountersPerDF", false, "Reset derived-data global counters at the beginning of every dataframe"}; } cfgDerivedData; struct : ConfigurableGroup { - Configurable nEvtMixing{"nEvtMixing", 5, "Number of events to mix"}; - Configurable mixingEstimator{"mixingEstimator", kMixCentFT0C, "Mixing estimator: 0=FT0C, 1=FT0M, 2=FT0A, 3=FV0A"}; - ConfigurableAxis axisVtxMixing{"axisVtxMixing", {VARIABLE_WIDTH, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0}, "Mixing bins - z vertex"}; - ConfigurableAxis axisCentMixing{"axisCentMixing", {VARIABLE_WIDTH, -1.0, 20.0, 50.0, 80.0, 101.0}, "Mixing bins - centrality"}; - ConfigurableAxis axisMixingOccupancy{"axisMixingOccupancy", {101, -0.5, 100.5}, "Number of collisions in mixing pool"}; + Configurable c1136nEvtMixing{"c1136nEvtMixing", 5, "Number of events to mix"}; + Configurable c1137mixingEstimator{"c1137mixingEstimator", kMixCentFT0C, "Mixing estimator: 0=FT0C, 1=FT0M, 2=FT0A, 3=FV0A"}; + ConfigurableAxis c1138axisVtxMixing{"c1138axisVtxMixing", {VARIABLE_WIDTH, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0}, "Mixing bins - z vertex"}; + ConfigurableAxis c1139axisCentMixing{"c1139axisCentMixing", {VARIABLE_WIDTH, -1.0, 20.0, 50.0, 80.0, 101.0}, "Mixing bins - centrality"}; + ConfigurableAxis c1140axisMixingOccupancy{"c1140axisMixingOccupancy", {101, -0.5, 100.5}, "Number of collisions in mixing pool"}; } cfgMixing; using BinningTypeVtxZFT0C = ColumnBinningPolicy; @@ -1730,17 +1730,17 @@ struct HParticleCorrelationSameEvent { using BinningTypeVtxZFT0A = ColumnBinningPolicy; using BinningTypeVtxZFV0A = ColumnBinningPolicy; - BinningTypeVtxZFT0C colBinningFT0C{{cfgMixing.axisVtxMixing, cfgMixing.axisCentMixing}, true}; - BinningTypeVtxZFT0M colBinningFT0M{{cfgMixing.axisVtxMixing, cfgMixing.axisCentMixing}, true}; - BinningTypeVtxZFT0A colBinningFT0A{{cfgMixing.axisVtxMixing, cfgMixing.axisCentMixing}, true}; - BinningTypeVtxZFV0A colBinningFV0A{{cfgMixing.axisVtxMixing, cfgMixing.axisCentMixing}, true}; + BinningTypeVtxZFT0C colBinningFT0C{{cfgMixing.c1138axisVtxMixing, cfgMixing.c1139axisCentMixing}, true}; + BinningTypeVtxZFT0M colBinningFT0M{{cfgMixing.c1138axisVtxMixing, cfgMixing.c1139axisCentMixing}, true}; + BinningTypeVtxZFT0A colBinningFT0A{{cfgMixing.c1138axisVtxMixing, cfgMixing.c1139axisCentMixing}, true}; + BinningTypeVtxZFV0A colBinningFV0A{{cfgMixing.c1138axisVtxMixing, cfgMixing.c1139axisCentMixing}, true}; int nMixBins = 0; template int getMixingBin(const C& collision) { - switch (cfgMixing.mixingEstimator) { + switch (cfgMixing.c1137mixingEstimator) { case kMixCentFT0C: return colBinningFT0C.getBin({collision.posZ(), collision.centFT0C()}); case kMixCentFT0M: @@ -1757,7 +1757,7 @@ struct HParticleCorrelationSameEvent { template float getMixingEstimatorValue(const C& collision) { - switch (cfgMixing.mixingEstimator) { + switch (cfgMixing.c1137mixingEstimator) { case kMixCentFT0C: return collision.centFT0C(); case kMixCentFT0M: @@ -1772,14 +1772,14 @@ struct HParticleCorrelationSameEvent { } struct : ConfigurableGroup { - Configurable> pidConfigSetting{"pidConfigSetting", {DefaultPIDcheckValues[0].data(), kNPid, kNCutSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"ThrPforTOF", "IdCutTypeLowP", "NSigmaTPCLowP", "NSigmaTOFLowP", "NSigmaRadLowP", "IdCutTypeHighP", "NSigmaTPCHighP", "NSigmaTOFHighP", "NSigmaRadHighP", "doVetoOthers", "doRelativeTPCCheck", "doRelativeTOFcheck", "doRelativeTPCTOFcheck"}}, "Cut values for particle identification"}; - Configurable> pidVetoSetting{"pidVetoSetting", {DefaultPidVetoValues[0].data(), kNPid, kNVetoSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"doVetoTPC", "doVetoTOF", "vetoTPC", "vetoTOF"}}, "Veto cuts for particle identification"}; - Configurable cfgId07CheckTofBeta{"cfgId07CheckTofBeta", false, "Require beta > 0 for reliable TOF"}; + Configurable> c1141pidConfigSetting{"c1141pidConfigSetting", {DefaultPIDcheckValues[0].data(), kNPid, kNCutSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"ThrPforTOF", "IdCutTypeLowP", "NSigmaTPCLowP", "NSigmaTOFLowP", "NSigmaRadLowP", "IdCutTypeHighP", "NSigmaTPCHighP", "NSigmaTOFHighP", "NSigmaRadHighP", "doVetoOthers", "doRelativeTPCCheck", "doRelativeTOFcheck", "doRelativeTPCTOFcheck"}}, "Cut values for particle identification"}; + Configurable> c1142pidVetoSetting{"c1142pidVetoSetting", {DefaultPidVetoValues[0].data(), kNPid, kNVetoSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"doVetoTPC", "doVetoTOF", "vetoTPC", "vetoTOF"}}, "Veto cuts for particle identification"}; + Configurable c1143cfgId07CheckTofBeta{"c1143cfgId07CheckTofBeta", false, "Require beta > 0 for reliable TOF"}; } cfgIdCut; void init(InitContext const&) { - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c1001printDebugMessages) { LOGF(info, "Starting init"); } // Axes @@ -1815,22 +1815,22 @@ struct HParticleCorrelationSameEvent { const AxisSpec axisTOFNSigma = {200, -10.0f, 10.0f, "n#sigma_{TOF}"}; const AxisSpec axisIdMethod = {2, -0.5f, 1.5f, "ID method (0=TPC, 1=TPC+TOF)"}; - AxisSpec axisDeltaPhiSpec{cfgAxis.axisDeltaPhi, "#Delta#varphi"}; - AxisSpec axisDeltaEtaSpec{cfgAxis.axisDeltaEta, "#Delta#eta"}; + AxisSpec axisDeltaPhiSpec{cfgAxis.c1105axisDeltaPhi, "#Delta#varphi"}; + AxisSpec axisDeltaEtaSpec{cfgAxis.c1106axisDeltaEta, "#Delta#eta"}; - AxisSpec axisCorrSparseTriggerPt{cfgAxis.axisCorrSparseTriggerPt, "#it{p}_{T}^{trig} (GeV/#it{c})"}; - AxisSpec axisCorrSparseAssocPt{cfgAxis.axisCorrSparseAssocPt, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; - AxisSpec axisCorrSparseDeltaPhi{cfgAxis.axisCorrSparseDeltaPhi, "#Delta#varphi"}; - AxisSpec axisCorrSparseDeltaEta{cfgAxis.axisCorrSparseDeltaEta, "#Delta#eta"}; + AxisSpec axisCorrSparseTriggerPt{cfgAxis.c1107axisCorrSparseTriggerPt, "#it{p}_{T}^{trig} (GeV/#it{c})"}; + AxisSpec axisCorrSparseAssocPt{cfgAxis.c1108axisCorrSparseAssocPt, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; + AxisSpec axisCorrSparseDeltaPhi{cfgAxis.c1109axisCorrSparseDeltaPhi, "#Delta#varphi"}; + AxisSpec axisCorrSparseDeltaEta{cfgAxis.c1110axisCorrSparseDeltaEta, "#Delta#eta"}; const AxisSpec axisPhi1020Mass = {300, 0.98f, 1.08f, "m_{K^{+}K^{-}} (GeV/#it{c}^{2})"}; const AxisSpec axisKStar892Mass = {300, 0.65f, 1.15f, "m_{K#pi} (GeV/#it{c}^{2})"}; const AxisSpec axisLambda1520Mass = {300, 1.40f, 1.65f, "m_{pK} (GeV/#it{c}^{2})"}; const AxisSpec axisResoMassCent = {102, -1.0f, 101.0f, "Centrality (%)"}; - AxisSpec axisVtxMixSpec{cfgMixing.axisVtxMixing, "z_{vtx} (cm)"}; - AxisSpec axisCentMixSpec{cfgMixing.axisCentMixing, "Centrality (%)"}; - AxisSpec axisPoolOccupancy{cfgMixing.axisMixingOccupancy, "N eligible collisions"}; + AxisSpec axisVtxMixSpec{cfgMixing.c1138axisVtxMixing, "z_{vtx} (cm)"}; + AxisSpec axisCentMixSpec{cfgMixing.c1139axisCentMixing, "Centrality (%)"}; + AxisSpec axisPoolOccupancy{cfgMixing.c1140axisMixingOccupancy, "N eligible collisions"}; nMixBins = axisVtxMixSpec.getNbins() * axisCentMixSpec.getNbins(); const AxisSpec axisMixBin{nMixBins, -0.5, static_cast(nMixBins) - 0.5, "Mixing bin"}; const AxisSpec axisCorrChannel{NCorrCountChannels, -0.5, static_cast(NCorrCountChannels) - 0.5, "Correlation channel"}; @@ -2123,7 +2123,7 @@ struct HParticleCorrelationSameEvent { setCorrChannelLabels(mixingQA.get(HIST("Mixing/PerDF/ReadyPoolMap"))->GetYaxis()); setCorrChannelLabels(mixingQA.get(HIST("Mixing/PerDF/NReadyMixBins"))->GetXaxis()); - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c1001printDebugMessages) { LOGF(info, "Finishing init"); } } // Init function is over. @@ -2141,20 +2141,20 @@ struct HParticleCorrelationSameEvent { { // Static is only run once, ever. static const std::array doVetoTPC = { - getCfg(cfgIdCut.pidVetoSetting, kPi, kDoVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kKa, kDoVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kPr, kDoVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kEl, kDoVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kMu, kDoVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kDe, kDoVetoTPC)}; + getCfg(cfgIdCut.c1142pidVetoSetting, kPi, kDoVetoTPC), + getCfg(cfgIdCut.c1142pidVetoSetting, kKa, kDoVetoTPC), + getCfg(cfgIdCut.c1142pidVetoSetting, kPr, kDoVetoTPC), + getCfg(cfgIdCut.c1142pidVetoSetting, kEl, kDoVetoTPC), + getCfg(cfgIdCut.c1142pidVetoSetting, kMu, kDoVetoTPC), + getCfg(cfgIdCut.c1142pidVetoSetting, kDe, kDoVetoTPC)}; static const std::array vetoTPC = { - getCfg(cfgIdCut.pidVetoSetting, kPi, kVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kKa, kVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kPr, kVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kEl, kVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kMu, kVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kDe, kVetoTPC)}; + getCfg(cfgIdCut.c1142pidVetoSetting, kPi, kVetoTPC), + getCfg(cfgIdCut.c1142pidVetoSetting, kKa, kVetoTPC), + getCfg(cfgIdCut.c1142pidVetoSetting, kPr, kVetoTPC), + getCfg(cfgIdCut.c1142pidVetoSetting, kEl, kVetoTPC), + getCfg(cfgIdCut.c1142pidVetoSetting, kMu, kVetoTPC), + getCfg(cfgIdCut.c1142pidVetoSetting, kDe, kVetoTPC)}; return applyVetoOthersTPC(track, doVetoTPC, vetoTPC); } @@ -2164,20 +2164,20 @@ struct HParticleCorrelationSameEvent { { // Only computed once static const std::array doVetoTOF = { - getCfg(cfgIdCut.pidVetoSetting, kPi, kDoVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kKa, kDoVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kPr, kDoVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kEl, kDoVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kMu, kDoVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kDe, kDoVetoTOF)}; + getCfg(cfgIdCut.c1142pidVetoSetting, kPi, kDoVetoTOF), + getCfg(cfgIdCut.c1142pidVetoSetting, kKa, kDoVetoTOF), + getCfg(cfgIdCut.c1142pidVetoSetting, kPr, kDoVetoTOF), + getCfg(cfgIdCut.c1142pidVetoSetting, kEl, kDoVetoTOF), + getCfg(cfgIdCut.c1142pidVetoSetting, kMu, kDoVetoTOF), + getCfg(cfgIdCut.c1142pidVetoSetting, kDe, kDoVetoTOF)}; static const std::array vetoTOF = { - getCfg(cfgIdCut.pidVetoSetting, kPi, kVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kKa, kVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kPr, kVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kEl, kVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kMu, kVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kDe, kVetoTOF)}; + getCfg(cfgIdCut.c1142pidVetoSetting, kPi, kVetoTOF), + getCfg(cfgIdCut.c1142pidVetoSetting, kKa, kVetoTOF), + getCfg(cfgIdCut.c1142pidVetoSetting, kPr, kVetoTOF), + getCfg(cfgIdCut.c1142pidVetoSetting, kEl, kVetoTOF), + getCfg(cfgIdCut.c1142pidVetoSetting, kMu, kVetoTOF), + getCfg(cfgIdCut.c1142pidVetoSetting, kDe, kVetoTOF)}; return applyVetoOthersTOF(track, doVetoTOF, vetoTOF); } @@ -2194,7 +2194,7 @@ struct HParticleCorrelationSameEvent { inline bool checkReliableTOF(const T& track) { // which check makes the information of TOF relaiable? should track.beta() be checked? e.g.: - if (cfgIdCut.cfgId07CheckTofBeta) { + if (cfgIdCut.c1143cfgId07CheckTofBeta) { return (track.hasTOF() && track.beta() > 0.0f); } return track.hasTOF(); @@ -2219,7 +2219,7 @@ struct HParticleCorrelationSameEvent { nSigmaIdDistSq = 1000000; } - static const bool doVetoOthers = getCfg(cfgIdCut.pidConfigSetting, pidMode, kDoVetoOthers); + static const bool doVetoOthers = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kDoVetoOthers); if (doVetoOthers) { if (!vetoIdOthersTPC(track)) { // If vetoIdOthers = true; it passed all veto checks @@ -2228,7 +2228,7 @@ struct HParticleCorrelationSameEvent { } } - static const bool doRelativeTPCcheck = getCfg(cfgIdCut.pidConfigSetting, pidMode, kDoRelativeTPCcheck); + static const bool doRelativeTPCcheck = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kDoRelativeTPCcheck); if (doRelativeTPCcheck) { if (!relativeIdOthersTPC(track)) { // If relativeIdOthersTPC = true; particle has stronger nSigma compared to others @@ -2272,7 +2272,7 @@ struct HParticleCorrelationSameEvent { } else { nSigmaIdDistSq = 1000000; } - static const bool doVetoOthers = getCfg(cfgIdCut.pidConfigSetting, pidMode, kDoVetoOthers); + static const bool doVetoOthers = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kDoVetoOthers); if (doVetoOthers) { if (!vetoIdOthersTPCTOF(track)) { // If vetoIdOthers = true; it passed all veto checks @@ -2281,7 +2281,7 @@ struct HParticleCorrelationSameEvent { } } - static const bool doRelativeTOFcheck = getCfg(cfgIdCut.pidConfigSetting, pidMode, kDoRelativeTOFcheck); + static const bool doRelativeTOFcheck = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kDoRelativeTOFcheck); if (doRelativeTOFcheck) { if (!relativeIdOthersTOF(track)) { // If relativeIdOthersTOF = true; particle has stronger nSigma compared to others @@ -2290,7 +2290,7 @@ struct HParticleCorrelationSameEvent { } } - static const bool doRelativeTPCTOFcheck = getCfg(cfgIdCut.pidConfigSetting, pidMode, kDoRelativeTPCTOFcheck); + static const bool doRelativeTPCTOFcheck = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kDoRelativeTPCTOFcheck); if (doRelativeTPCTOFcheck) { if (!relativeIdOthersTPCTOF(track)) { // If relativeIdOthersTPCTOF = true; particle has stronger nSigma compared to others @@ -2315,15 +2315,15 @@ struct HParticleCorrelationSameEvent { bool selPdependent(const T& track, int& IdMethod, float& nSigmaIdDistSq) { // Static cache inside function - initialized once on first call - static const auto thrPforTOF = getCfg(cfgIdCut.pidConfigSetting, pidMode, kThrPforTOF); - static const auto idCutTypeLowP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kIdCutTypeLowP); - static const auto nSigmaTPCLowP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaTPCLowP); - static const auto nSigmaTOFLowP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaTOFLowP); - static const auto nSigmaRadLowP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaRadLowP); - static const auto idCutTypeHighP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kIdCutTypeHighP); - static const auto nSigmaTPCHighP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaTPCHighP); - static const auto nSigmaTOFHighP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaTOFHighP); - static const auto nSigmaRadHighP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaRadHighP); + static const auto thrPforTOF = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kThrPforTOF); + static const auto idCutTypeLowP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kIdCutTypeLowP); + static const auto nSigmaTPCLowP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaTPCLowP); + static const auto nSigmaTOFLowP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaTOFLowP); + static const auto nSigmaRadLowP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaRadLowP); + static const auto idCutTypeHighP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kIdCutTypeHighP); + static const auto nSigmaTPCHighP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaTPCHighP); + static const auto nSigmaTOFHighP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaTOFHighP); + static const auto nSigmaRadHighP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaRadHighP); if (track.p() < thrPforTOF) { if (checkReliableTOF(track)) { @@ -2439,83 +2439,83 @@ struct HParticleCorrelationSameEvent { CollisionRejectionTag selCollision(T const& collision) { // Basic event selection - if (cfgEvent.requireSel8 && !collision.sel8()) { + if (cfgEvent.c1003requireSel8 && !collision.sel8()) { return kCollRejectSel8; } - if (std::abs(collision.posZ()) >= cfgEvent.cutZvertex) { + if (std::abs(collision.posZ()) >= cfgEvent.c1002cutZvertex) { return kCollRejectVertexZ; } - if (cfgEvent.requireTriggerTVX && !collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (cfgEvent.c1004requireTriggerTVX && !collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { return kCollRejectTriggerTVX; } // TF / ITS-ROF borders - if (cfgEvent.requireNoITSROFrameBorder && !collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (cfgEvent.c1007requireNoITSROFrameBorder && !collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { return kCollRejectITSROFrameBorder; } - if (cfgEvent.requireNoTimeFrameBorder && !collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (cfgEvent.c1008requireNoTimeFrameBorder && !collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { return kCollRejectTimeFrameBorder; } // Vertex quality - if (cfgEvent.requireVertexITSTPC && !collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + if (cfgEvent.c1009requireVertexITSTPC && !collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { return kCollRejectVertexITSTPC; } - if (cfgEvent.requireGoodZvtxFT0vsPV && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + if (cfgEvent.c1010requireGoodZvtxFT0vsPV && !collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { return kCollRejectGoodZvtxFT0vsPV; } - if (cfgEvent.requireVertexTOFmatched && !collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { + if (cfgEvent.c1011requireVertexTOFmatched && !collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { return kCollRejectVertexTOFmatched; } - if (cfgEvent.requireVertexTRDmatched && !collision.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { + if (cfgEvent.c1012requireVertexTRDmatched && !collision.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { return kCollRejectVertexTRDmatched; } - if (cfgEvent.requireGoodITSLayersAll && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + if (cfgEvent.c1013requireGoodITSLayersAll && !collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { return kCollRejectGoodITSLayersAll; } // Pileup / neighbouring-collision rejection - if (cfgEvent.requireNoSameBunchPileup && !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + if (cfgEvent.c1014requireNoSameBunchPileup && !collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { return kCollRejectSameBunchPileup; } - if (cfgEvent.requireNoCollInTimeRangeStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (cfgEvent.c1015requireNoCollInTimeRangeStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { return kCollRejectCollInTimeRangeStandard; } - if (cfgEvent.requireNoCollInTimeRangeStrict && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + if (cfgEvent.c1016requireNoCollInTimeRangeStrict && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { return kCollRejectCollInTimeRangeStrict; } - if (cfgEvent.requireNoCollInTimeRangeNarrow && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeNarrow)) { + if (cfgEvent.c1017requireNoCollInTimeRangeNarrow && !collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeNarrow)) { return kCollRejectCollInTimeRangeNarrow; } - if (cfgEvent.requireNoCollInRofStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + if (cfgEvent.c1018requireNoCollInRofStandard && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { return kCollRejectCollInRofStandard; } - if (cfgEvent.requireNoCollInRofStrict && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + if (cfgEvent.c1019requireNoCollInRofStrict && !collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { return kCollRejectCollInRofStrict; } - if (cfgEvent.requireNoHighMultCollInPrevRof && !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (cfgEvent.c1020requireNoHighMultCollInPrevRof && !collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { return kCollRejectHighMultCollInPrevRof; } // INEL classes - if (cfgEvent.requireINELgt0 && !collision.isInelGt0()) { + if (cfgEvent.c1021requireINELgt0 && !collision.isInelGt0()) { return kCollRejectINELgt0; } - if (cfgEvent.requireINELgt1 && !collision.isInelGt1()) { + if (cfgEvent.c1022requireINELgt1 && !collision.isInelGt1()) { return kCollRejectINELgt1; } @@ -2526,83 +2526,83 @@ struct HParticleCorrelationSameEvent { TrackRejectionTag selectionTrack(T const& track) { // Standard O2 flags - if (cfgTrackCuts.requireGlobalTrack && !track.isGlobalTrack()) { + if (cfgTrackCuts.c1046requireGlobalTrack && !track.isGlobalTrack()) { return kTrackRejectGlobalTrack; } - if (cfgTrackCuts.requireGlobalTrackWoDCA && !track.isGlobalTrackWoDCA()) { + if (cfgTrackCuts.c1047requireGlobalTrackWoDCA && !track.isGlobalTrackWoDCA()) { return kTrackRejectGlobalTrackWoDCA; } - if (cfgTrackCuts.requirePVContributor && !track.isPVContributor()) { + if (cfgTrackCuts.c1048requirePVContributor && !track.isPVContributor()) { return kTrackRejectPVContributor; } // Detector presence - if (cfgTrackCuts.requireITS && !track.hasITS()) { + if (cfgTrackCuts.c1049requireITS && !track.hasITS()) { return kTrackRejectITS; } - if (cfgTrackCuts.requireTPC && !track.hasTPC()) { + if (cfgTrackCuts.c1050requireTPC && !track.hasTPC()) { return kTrackRejectTPC; } - if (cfgTrackCuts.requireTOF && !track.hasTOF()) { + if (cfgTrackCuts.c1051requireTOF && !track.hasTOF()) { return kTrackRejectTOF; } - if (cfgTrackCuts.requireTRD && !track.hasTRD()) { + if (cfgTrackCuts.c1052requireTRD && !track.hasTRD()) { return kTrackRejectTRD; } // TPC quality - if (track.tpcNClsFound() < cfgTrackCuts.tpcNClsFoundMin) { + if (track.tpcNClsFound() < cfgTrackCuts.c1053tpcNClsFoundMin) { return kTrackRejectTPCNClsFound; } - if (track.tpcNClsCrossedRows() < cfgTrackCuts.tpcNClsCrossedRowsMin) { + if (track.tpcNClsCrossedRows() < cfgTrackCuts.c1054tpcNClsCrossedRowsMin) { return kTrackRejectTPCCrossedRows; } - if (track.tpcCrossedRowsOverFindableCls() < cfgTrackCuts.tpcCrossedRowsOverFindableMin) { + if (track.tpcCrossedRowsOverFindableCls() < cfgTrackCuts.c1055tpcCrossedRowsOverFindableMin) { return kTrackRejectTPCCrossedRowsOverFindable; } - if (track.tpcFoundOverFindableCls() < cfgTrackCuts.tpcFoundOverFindableMin) { + if (track.tpcFoundOverFindableCls() < cfgTrackCuts.c1056tpcFoundOverFindableMin) { return kTrackRejectTPCFoundOverFindable; } - if (track.tpcFractionSharedCls() > cfgTrackCuts.tpcFractionSharedMax) { + if (track.tpcFractionSharedCls() > cfgTrackCuts.c1057tpcFractionSharedMax) { return kTrackRejectTPCFractionShared; } - if (track.tpcChi2NCl() < cfgTrackCuts.tpcChi2NClMin || track.tpcChi2NCl() > cfgTrackCuts.tpcChi2NClMax) { + if (track.tpcChi2NCl() < cfgTrackCuts.c1058tpcChi2NClMin || track.tpcChi2NCl() > cfgTrackCuts.c1059tpcChi2NClMax) { return kTrackRejectTPCChi2; } // ITS quality - if (track.itsNCls() < cfgTrackCuts.itsNClsMin || track.itsNCls() > cfgTrackCuts.itsNClsMax) { + if (track.itsNCls() < cfgTrackCuts.c1060itsNClsMin || track.itsNCls() > cfgTrackCuts.c1061itsNClsMax) { return kTrackRejectITSNCls; } - if (track.itsNClsInnerBarrel() < cfgTrackCuts.itsNClsInnerBarrelMin) { + if (track.itsNClsInnerBarrel() < cfgTrackCuts.c1062itsNClsInnerBarrelMin) { return kTrackRejectITSNClsInnerBarrel; } - if (track.itsChi2NCl() < cfgTrackCuts.itsChi2NClMin || track.itsChi2NCl() > cfgTrackCuts.itsChi2NClMax) { + if (track.itsChi2NCl() < cfgTrackCuts.c1063itsChi2NClMin || track.itsChi2NCl() > cfgTrackCuts.c1064itsChi2NClMax) { return kTrackRejectITSChi2; } // pT-dependent DCA - if (cfgTrackCuts.usePtDependentDCAxy) { - const float dcaXYMax = cfgTrackCuts.dcaXYPtA + cfgTrackCuts.dcaXYPtB / std::pow(track.pt(), cfgTrackCuts.dcaXYPtC); + if (cfgTrackCuts.c1069usePtDependentDCAxy) { + const float dcaXYMax = cfgTrackCuts.c1070dcaXYPtA + cfgTrackCuts.c1071dcaXYPtB / std::pow(track.pt(), cfgTrackCuts.c1072dcaXYPtC); if (std::abs(track.dcaXY()) > dcaXYMax) { return kTrackRejectPtDependentDCAxy; } } - if (cfgTrackCuts.usePtDependentDCAz) { - const float dcaZMax = cfgTrackCuts.dcaZPtA; + if (cfgTrackCuts.c1073usePtDependentDCAz) { + const float dcaZMax = cfgTrackCuts.c1074dcaZPtA; if (std::abs(track.dcaZ()) > dcaZMax) { return kTrackRejectPtDependentDCAz; } @@ -2931,19 +2931,19 @@ struct HParticleCorrelationSameEvent { { if constexpr (pairType == kHPhi) { invMass = associate.mPhi1020(); - return getMassRegionTag(invMass, cfgPhi1020CorrMass.phi1020LSBLow, cfgPhi1020CorrMass.phi1020LSBUp, cfgPhi1020CorrMass.phi1020PeakLow, cfgPhi1020CorrMass.phi1020PeakUp, cfgPhi1020CorrMass.phi1020RSBLow, cfgPhi1020CorrMass.phi1020RSBUp); + return getMassRegionTag(invMass, cfgPhi1020CorrMass.c1116phi1020LSBLow, cfgPhi1020CorrMass.c1117phi1020LSBUp, cfgPhi1020CorrMass.c1114phi1020PeakLow, cfgPhi1020CorrMass.c1115phi1020PeakUp, cfgPhi1020CorrMass.c1118phi1020RSBLow, cfgPhi1020CorrMass.c1119phi1020RSBUp); } else if constexpr (pairType == kHKStar) { invMass = associate.mKStar892(); - return getMassRegionTag(invMass, cfgKStar892CorrMass.kStar892LSBLow, cfgKStar892CorrMass.kStar892LSBUp, cfgKStar892CorrMass.kStar892PeakLow, cfgKStar892CorrMass.kStar892PeakUp, cfgKStar892CorrMass.kStar892RSBLow, cfgKStar892CorrMass.kStar892RSBUp); + return getMassRegionTag(invMass, cfgKStar892CorrMass.c1122kStar892LSBLow, cfgKStar892CorrMass.c1123kStar892LSBUp, cfgKStar892CorrMass.c1120kStar892PeakLow, cfgKStar892CorrMass.c1121kStar892PeakUp, cfgKStar892CorrMass.c1124kStar892RSBLow, cfgKStar892CorrMass.c1125kStar892RSBUp); } else if constexpr (pairType == kHKStarBar) { invMass = associate.mKStar892Bar(); - return getMassRegionTag(invMass, cfgKStar892CorrMass.kStar892LSBLow, cfgKStar892CorrMass.kStar892LSBUp, cfgKStar892CorrMass.kStar892PeakLow, cfgKStar892CorrMass.kStar892PeakUp, cfgKStar892CorrMass.kStar892RSBLow, cfgKStar892CorrMass.kStar892RSBUp); + return getMassRegionTag(invMass, cfgKStar892CorrMass.c1122kStar892LSBLow, cfgKStar892CorrMass.c1123kStar892LSBUp, cfgKStar892CorrMass.c1120kStar892PeakLow, cfgKStar892CorrMass.c1121kStar892PeakUp, cfgKStar892CorrMass.c1124kStar892RSBLow, cfgKStar892CorrMass.c1125kStar892RSBUp); } else if constexpr (pairType == kHLambda) { invMass = associate.mLambda1520(); - return getMassRegionTag(invMass, cfgLambda1520CorrMass.lambda1520LSBLow, cfgLambda1520CorrMass.lambda1520LSBUp, cfgLambda1520CorrMass.lambda1520PeakLow, cfgLambda1520CorrMass.lambda1520PeakUp, cfgLambda1520CorrMass.lambda1520RSBLow, cfgLambda1520CorrMass.lambda1520RSBUp); + return getMassRegionTag(invMass, cfgLambda1520CorrMass.c1128lambda1520LSBLow, cfgLambda1520CorrMass.c1129lambda1520LSBUp, cfgLambda1520CorrMass.c1126lambda1520PeakLow, cfgLambda1520CorrMass.c1127lambda1520PeakUp, cfgLambda1520CorrMass.c1130lambda1520RSBLow, cfgLambda1520CorrMass.c1131lambda1520RSBUp); } else if constexpr (pairType == kHLambdaBar) { invMass = associate.mLambda1520Bar(); - return getMassRegionTag(invMass, cfgLambda1520CorrMass.lambda1520LSBLow, cfgLambda1520CorrMass.lambda1520LSBUp, cfgLambda1520CorrMass.lambda1520PeakLow, cfgLambda1520CorrMass.lambda1520PeakUp, cfgLambda1520CorrMass.lambda1520RSBLow, cfgLambda1520CorrMass.lambda1520RSBUp); + return getMassRegionTag(invMass, cfgLambda1520CorrMass.c1128lambda1520LSBLow, cfgLambda1520CorrMass.c1129lambda1520LSBUp, cfgLambda1520CorrMass.c1126lambda1520PeakLow, cfgLambda1520CorrMass.c1127lambda1520PeakUp, cfgLambda1520CorrMass.c1130lambda1520RSBLow, cfgLambda1520CorrMass.c1131lambda1520RSBUp); } invMass = -1.0f; @@ -3033,12 +3033,12 @@ struct HParticleCorrelationSameEvent { const float pz = dau1.pz() + dau2.pz(); const float energy = RecoDecay::e(dau1.px() + dau2.px(), dau1.py() + dau2.py(), pz, mass); const float rapidity = 0.5f * std::log((energy + pz) / (energy - pz)); - if (rapidity < cfgResPartitions.resoRapidityMin || rapidity > cfgResPartitions.resoRapidityMax) { + if (rapidity < cfgResPartitions.c1083resoRapidityMin || rapidity > cfgResPartitions.c1084resoRapidityMax) { return false; } float centrality = -1.0f; - switch (cfgEvent.centralityEstimator) { + switch (cfgEvent.c1028centralityEstimator) { case 0: centrality = collision.centFT0C(); break; @@ -3145,17 +3145,17 @@ struct HParticleCorrelationSameEvent { return false; } - if (cfgDerivedData.mixingBin >= 0 && mixingBin != cfgDerivedData.mixingBin) { + if (cfgDerivedData.c1133mixingBin >= 0 && mixingBin != cfgDerivedData.c1133mixingBin) { return false; } - const uint64_t requestedMask = cfgDerivedData.pairMask; + const uint64_t requestedMask = cfgDerivedData.c1132pairMask; if (requestedMask == 0ULL) { return corrMask != 0ULL; } - if (cfgDerivedData.requireAllPairBits) { + if (cfgDerivedData.c1134requireAllPairBits) { return (corrMask & requestedMask) == requestedMask; } @@ -3234,12 +3234,12 @@ struct HParticleCorrelationSameEvent { float invMass = -1.0f; const uint8_t massRegion = getResonanceMassRegion(associate, invMass); const float rapidity = computeRapidity(associate, invMass); - if (rapidity < cfgResPartitions.resoRapidityMin || rapidity > cfgResPartitions.resoRapidityMax) { + if (rapidity < cfgResPartitions.c1083resoRapidityMin || rapidity > cfgResPartitions.c1084resoRapidityMax) { continue; } // Trigger-resonance daughter overlap -----expensive check ---- - if (rejectResoWithAnyTriggerDaughter) { + if (c1112rejectResoWithAnyTriggerDaughter) { // Strict mode: reject the whole resonance if either daughter belongs to the event trigger population. if (checkTrackInList(posDauTrack, triggerGIList) || checkTrackInList(negDauTrack, triggerGIList)) { continue; @@ -3294,7 +3294,7 @@ struct HParticleCorrelationSameEvent { std::vector posDauGIListRSSB; std::vector negDauGIListRSSB; - if (rejectResoWithAnyTriggerDaughter) { + if (c1112rejectResoWithAnyTriggerDaughter) { for (const auto& trigger : triggers) { if (selectionTrack(trigger) != kTrackAccepted) { continue; @@ -3319,14 +3319,14 @@ struct HParticleCorrelationSameEvent { } // execute Correlation Function is over // Event Filter - Filter eventFilter = (!cfgEvent.requireSel8) || (o2::aod::evsel::sel8 == true); - Filter posZFilter = (nabs(o2::aod::collision::posZ) < cfgEvent.cutZvertex); + Filter eventFilter = (!cfgEvent.c1003requireSel8) || (o2::aod::evsel::sel8 == true); + Filter posZFilter = (nabs(o2::aod::collision::posZ) < cfgEvent.c1002cutZvertex); // Track Filter - Filter ptFilter = (o2::aod::track::pt > cfgTrackCuts.ptMin) && (o2::aod::track::pt < cfgTrackCuts.ptMax); - Filter etaFilter = (nabs(o2::aod::track::eta) < cfgTrackCuts.etaMax); - Filter dcaFilter = ((!cfgTrackCuts.useFixedDCAxy) || (nabs(o2::aod::track::dcaXY) < cfgTrackCuts.dcaXYMax)) && - ((!cfgTrackCuts.useFixedDCAz) || (nabs(o2::aod::track::dcaZ) < cfgTrackCuts.dcaZMax)); + Filter ptFilter = (o2::aod::track::pt > cfgTrackCuts.c1043ptMin) && (o2::aod::track::pt < cfgTrackCuts.c1044ptMax); + Filter etaFilter = (nabs(o2::aod::track::eta) < cfgTrackCuts.c1045etaMax); + Filter dcaFilter = ((!cfgTrackCuts.c1065useFixedDCAxy) || (nabs(o2::aod::track::dcaXY) < cfgTrackCuts.c1066dcaXYMax)) && + ((!cfgTrackCuts.c1067useFixedDCAz) || (nabs(o2::aod::track::dcaZ) < cfgTrackCuts.c1068dcaZMax)); using MyFilteredCollisions = soa::Filtered>; // , // using MyFilteredTracks = soa::Filtered>; using MyFilteredTracks = soa::Filtered>; @@ -3336,27 +3336,27 @@ struct HParticleCorrelationSameEvent { // // definition of partitions SliceCache cache; - Partition triggerTracks = cfgPartitions.triggerPtLow < aod::track::pt && aod::track::pt < cfgPartitions.triggerPtHigh; + Partition triggerTracks = cfgPartitions.c1077triggerPtLow < aod::track::pt && aod::track::pt < cfgPartitions.c1078triggerPtHigh; Partition posTracks = aod::track::signed1Pt > 0.0f; Partition negTracks = aod::track::signed1Pt < 0.0f; - Partition assocTracksLowPt = cfgPartitions.assocPtLowMin < aod::track::pt && aod::track::pt < cfgPartitions.assocPtLowMax; - Partition assocTracksHighPt = cfgPartitions.assocPtHighMin < aod::track::pt && aod::track::pt < cfgPartitions.assocPtHighMax; + Partition assocTracksLowPt = cfgPartitions.c1079assocPtLowMin < aod::track::pt && aod::track::pt < cfgPartitions.c1080assocPtLowMax; + Partition assocTracksHighPt = cfgPartitions.c1081assocPtHighMin < aod::track::pt && aod::track::pt < cfgPartitions.c1082assocPtHighMax; - Partition assocPhiLowPt = (cfgResPartitions.phiPtLowMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.phiPtLowMax) && (aod::resonancecndt::phi1020Tag != static_cast(kMassOutside)); - Partition assocPhiHighPt = (cfgResPartitions.phiPtHighMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.phiPtHighMax) && (aod::resonancecndt::phi1020Tag != static_cast(kMassOutside)); + Partition assocPhiLowPt = (cfgResPartitions.c1085phiPtLowMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.c1086phiPtLowMax) && (aod::resonancecndt::phi1020Tag != static_cast(kMassOutside)); + Partition assocPhiHighPt = (cfgResPartitions.c1087phiPtHighMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.c1088phiPtHighMax) && (aod::resonancecndt::phi1020Tag != static_cast(kMassOutside)); - Partition assocKStarLowPt = (cfgResPartitions.kstarPtLowMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.kstarPtLowMax) && (aod::resonancecndt::kStar892Tag != static_cast(kMassOutside)); - Partition assocKStarHighPt = (cfgResPartitions.kstarPtHighMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.kstarPtHighMax) && (aod::resonancecndt::kStar892Tag != static_cast(kMassOutside)); + Partition assocKStarLowPt = (cfgResPartitions.c1089kstarPtLowMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.c1090kstarPtLowMax) && (aod::resonancecndt::kStar892Tag != static_cast(kMassOutside)); + Partition assocKStarHighPt = (cfgResPartitions.c1091kstarPtHighMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.c1092kstarPtHighMax) && (aod::resonancecndt::kStar892Tag != static_cast(kMassOutside)); - Partition assocKStarBarLowPt = (cfgResPartitions.kstarBarPtLowMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.kstarBarPtLowMax) && (aod::resonancecndt::kStar892BarTag != static_cast(kMassOutside)); - Partition assocKStarBarHighPt = (cfgResPartitions.kstarBarPtHighMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.kstarBarPtHighMax) && (aod::resonancecndt::kStar892BarTag != static_cast(kMassOutside)); + Partition assocKStarBarLowPt = (cfgResPartitions.c1093kstarBarPtLowMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.c1094kstarBarPtLowMax) && (aod::resonancecndt::kStar892BarTag != static_cast(kMassOutside)); + Partition assocKStarBarHighPt = (cfgResPartitions.c1095kstarBarPtHighMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.c1096kstarBarPtHighMax) && (aod::resonancecndt::kStar892BarTag != static_cast(kMassOutside)); - Partition assocLambda1520LowPt = (cfgResPartitions.lambda1520PtLowMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.lambda1520PtLowMax) && (aod::resonancecndt::lambda1520Tag != static_cast(kMassOutside)); - Partition assocLambda1520HighPt = (cfgResPartitions.lambda1520PtHighMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.lambda1520PtHighMax) && (aod::resonancecndt::lambda1520Tag != static_cast(kMassOutside)); + Partition assocLambda1520LowPt = (cfgResPartitions.c1097lambda1520PtLowMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.c1098lambda1520PtLowMax) && (aod::resonancecndt::lambda1520Tag != static_cast(kMassOutside)); + Partition assocLambda1520HighPt = (cfgResPartitions.c1099lambda1520PtHighMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.c1100lambda1520PtHighMax) && (aod::resonancecndt::lambda1520Tag != static_cast(kMassOutside)); - Partition assocLambda1520BarLowPt = (cfgResPartitions.lambda1520BarPtLowMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.lambda1520BarPtLowMax) && (aod::resonancecndt::lambda1520BarTag != static_cast(kMassOutside)); - Partition assocLambda1520BarHighPt = (cfgResPartitions.lambda1520BarPtHighMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.lambda1520BarPtHighMax) && (aod::resonancecndt::lambda1520BarTag != static_cast(kMassOutside)); + Partition assocLambda1520BarLowPt = (cfgResPartitions.c1101lambda1520BarPtLowMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.c1102lambda1520BarPtLowMax) && (aod::resonancecndt::lambda1520BarTag != static_cast(kMassOutside)); + Partition assocLambda1520BarHighPt = (cfgResPartitions.c1103lambda1520BarPtHighMin < aod::resonancecndt::pt) && (aod::resonancecndt::pt < cfgResPartitions.c1104lambda1520BarPtHighMax) && (aod::resonancecndt::lambda1520BarTag != static_cast(kMassOutside)); int dfNumber = 0; int64_t iCollGlobalCount = -1; @@ -3368,13 +3368,13 @@ struct HParticleCorrelationSameEvent { void processNothing(aod::Origins const& origins) { - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c1001printDebugMessages) { LOG(info) << "DEBUG :: Process Nothing :: df_" << dfNumber << " :: origins = " << origins.size(); } // Intentionally empty. // Keeps the task alive when running purely on derived data. } - PROCESS_SWITCH(HParticleCorrelationSameEvent, processNothing, "Dummy process for derived-data analysis", true); + PROCESS_SWITCH(HParticleCorrelation2SameEvent, processNothing, "Dummy process for derived-data analysis", true); void processSameEvent(MyFilteredCollisions const& collisions, MyFilteredTracks const& fullTracks, aod::ResonanceCndts const& resonanceCndts, o2::aod::Origins const& Origins, aod::BCsWithTimestamps const&) { @@ -3384,7 +3384,7 @@ struct HParticleCorrelationSameEvent { // LOG(info)<<"DEBUG :: Origins :: "<(); int currentRunNumber = bc.runNumber(); @@ -3441,7 +3441,7 @@ struct HParticleCorrelationSameEvent { seEventQA.fill(HIST("SE/Events/EventSelection"), static_cast(kEventPassedSelCollision)); const auto tracksPerCollision = fullTracks.sliceBy(tracksPerCollisionPreslice, collision.globalIndex()); - if (tracksPerCollision.size() < cfgEvent.minNFilteredTracks) { + if (tracksPerCollision.size() < cfgEvent.c1005minNFilteredTracks) { continue; } seEventQA.fill(HIST("SE/Events/EventSelection"), static_cast(kEventPassedMinFilteredTracks)); @@ -3463,7 +3463,7 @@ struct HParticleCorrelationSameEvent { nTrack++; } // track loop is over. - if (nTrack < cfgEvent.minNSelectedTracks) { + if (nTrack < cfgEvent.c1006minNSelectedTracks) { continue; } @@ -3508,7 +3508,7 @@ struct HParticleCorrelationSameEvent { // Unlike Sign Signal // LikeSign Signal bool hasSelectedTrigger = false; - if (requireSelectedTriggerForInvariantMass) { + if (c1113requireSelectedTriggerForInvariantMass) { for (const auto& trigger : triggerTracksPerColl) { if (selectionTrack(trigger) == kTrackAccepted) { hasSelectedTrigger = true; @@ -3517,7 +3517,7 @@ struct HParticleCorrelationSameEvent { } } - if (!requireSelectedTriggerForInvariantMass || hasSelectedTrigger) { + if (!c1113requireSelectedTriggerForInvariantMass || hasSelectedTrigger) { auto posTracksPerColl = posTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); auto negTracksPerColl = negTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); @@ -3579,7 +3579,7 @@ struct HParticleCorrelationSameEvent { collision.centFT0M(), collision.centFT0A(), collision.centFV0A(), - static_cast(cfgMixing.mixingEstimator), + static_cast(cfgMixing.c1137mixingEstimator), mixingBin, corrPresenceMask); @@ -3709,7 +3709,7 @@ struct HParticleCorrelationSameEvent { mixingQA.fill(HIST("Mixing/PerDF/EligiblePoolOccupancy"), iMixBin, corrChannel, nEligibleCollisions); mixingQA.fill(HIST("Mixing/PerDF/PoolOccupancyDistribution"), corrChannel, nEligibleCollisions); - if (nEligibleCollisions >= static_cast(cfgMixing.nEvtMixing)) { + if (nEligibleCollisions >= static_cast(cfgMixing.c1136nEvtMixing)) { ++nReadyMixBins[corrChannel]; mixingQA.fill(HIST("Mixing/PerDF/ReadyPoolMap"), iMixBin, corrChannel); } @@ -3721,10 +3721,10 @@ struct HParticleCorrelationSameEvent { mixingQA.fill(HIST("Mixing/PerDF/NReadyMixBins"), corrChannel, nReadyMixBins[corrChannel]); } } - PROCESS_SWITCH(HParticleCorrelationSameEvent, processSameEvent, "Process Same event", true); + PROCESS_SWITCH(HParticleCorrelation2SameEvent, processSameEvent, "Process Same event", true); }; -struct HParticleCorrelationMixedEvent { +struct HParticleCorrelation3MixedEvent { HistogramRegistry hhCorrelation{"hhCorrelation", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; HistogramRegistry hIdCorrelation{"hIdCorrelation", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; @@ -3809,101 +3809,101 @@ struct HParticleCorrelationMixedEvent { } struct : ConfigurableGroup { - Configurable printDebugMessages{"printDebugMessages", false, "Print debug messages"}; + Configurable c2001printDebugMessages{"c2001printDebugMessages", false, "Print debug messages"}; } cfgDebug; struct : ConfigurableGroup { - ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", {80, -2.0f, 6.0f}, "#Delta#varphi"}; - ConfigurableAxis axisDeltaEta{"axisDeltaEta", {84, -2.1f, 2.1f}, "#Delta#eta"}; - ConfigurableAxis axisCorrSparseTriggerPt{"axisCorrSparseTriggerPt", {8, 4.0f, 8.0f}, "#it{p}_{T}^{trig} (GeV/#it{c})"}; - ConfigurableAxis axisCorrSparseAssocPt{"axisCorrSparseAssocPt", {8, 0.0f, 4.0f}, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; - ConfigurableAxis axisCorrSparseDeltaPhi{"axisCorrSparseDeltaPhi", {32, -2.0f, 6.0f}, "#Delta#varphi"}; - ConfigurableAxis axisCorrSparseDeltaEta{"axisCorrSparseDeltaEta", {24, -2.1f, 2.1f}, "#Delta#eta"}; + ConfigurableAxis c2002axisDeltaPhi{"c2002axisDeltaPhi", {80, -2.0f, 6.0f}, "#Delta#varphi"}; + ConfigurableAxis c2003axisDeltaEta{"c2003axisDeltaEta", {84, -2.1f, 2.1f}, "#Delta#eta"}; + ConfigurableAxis c2004axisCorrSparseTriggerPt{"c2004axisCorrSparseTriggerPt", {8, 4.0f, 8.0f}, "#it{p}_{T}^{trig} (GeV/#it{c})"}; + ConfigurableAxis c2005axisCorrSparseAssocPt{"c2005axisCorrSparseAssocPt", {8, 0.0f, 4.0f}, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; + ConfigurableAxis c2006axisCorrSparseDeltaPhi{"c2006axisCorrSparseDeltaPhi", {32, -2.0f, 6.0f}, "#Delta#varphi"}; + ConfigurableAxis c2007axisCorrSparseDeltaEta{"c2007axisCorrSparseDeltaEta", {24, -2.1f, 2.1f}, "#Delta#eta"}; } cfgAxis; struct : ConfigurableGroup { - Configurable nEvtMixing{"nEvtMixing", 5, "Number of events to mix"}; - Configurable mixingEstimator{"mixingEstimator", kMixCentFT0C, "Mixing estimator: 0=FT0C, 1=FT0M, 2=FT0A, 3=FV0A"}; - ConfigurableAxis axisVtxMixing{"axisVtxMixing", {VARIABLE_WIDTH, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0}, "Mixing bins - z vertex"}; - ConfigurableAxis axisCentMixing{"axisCentMixing", {VARIABLE_WIDTH, -1.0, 20.0, 50.0, 80.0, 101.0}, "Mixing bins - centrality"}; + Configurable c2008nEvtMixing{"c2008nEvtMixing", 5, "Number of events to mix"}; + Configurable c2009mixingEstimator{"c2009mixingEstimator", kMixCentFT0C, "Mixing estimator: 0=FT0C, 1=FT0M, 2=FT0A, 3=FV0A"}; + ConfigurableAxis c2010axisVtxMixing{"c2010axisVtxMixing", {VARIABLE_WIDTH, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0}, "Mixing bins - z vertex"}; + ConfigurableAxis c2011axisCentMixing{"c2011axisCentMixing", {VARIABLE_WIDTH, -1.0, 20.0, 50.0, 80.0, 101.0}, "Mixing bins - centrality"}; } cfgMixing; struct : ConfigurableGroup { - Configurable triggerPtLow{"triggerPtLow", 4.0f, "Minimum pT for trigger tracks"}; - Configurable triggerPtHigh{"triggerPtHigh", 8.0f, "Maximum pT for trigger tracks"}; - Configurable assocPtLowMin{"assocPtLowMin", 0.0f, "Minimum pT for low-pT associated tracks"}; - Configurable assocPtLowMax{"assocPtLowMax", 2.0f, "Maximum pT for low-pT associated tracks"}; - Configurable assocPtHighMin{"assocPtHighMin", 2.0f, "Minimum pT for high-pT associated tracks"}; - Configurable assocPtHighMax{"assocPtHighMax", 4.0f, "Maximum pT for high-pT associated tracks"}; + Configurable c2012triggerPtLow{"c2012triggerPtLow", 4.0f, "Minimum pT for trigger tracks"}; + Configurable c2013triggerPtHigh{"c2013triggerPtHigh", 8.0f, "Maximum pT for trigger tracks"}; + Configurable c2014assocPtLowMin{"c2014assocPtLowMin", 0.0f, "Minimum pT for low-pT associated tracks"}; + Configurable c2015assocPtLowMax{"c2015assocPtLowMax", 2.0f, "Maximum pT for low-pT associated tracks"}; + Configurable c2016assocPtHighMin{"c2016assocPtHighMin", 2.0f, "Minimum pT for high-pT associated tracks"}; + Configurable c2017assocPtHighMax{"c2017assocPtHighMax", 4.0f, "Maximum pT for high-pT associated tracks"}; } cfgPartitions; struct : ConfigurableGroup { - Configurable resoRapidityMin{"resoRapidityMin", -0.5f, "Minimum rapidity for resonance candidates"}; - Configurable resoRapidityMax{"resoRapidityMax", 0.5f, "Maximum rapidity for resonance candidates"}; - - Configurable phiPtLowMin{"phiPtLowMin", 0.0f, "Minimum pT for low-pT Phi(1020)"}; - Configurable phiPtLowMax{"phiPtLowMax", 2.0f, "Maximum pT for low-pT Phi(1020)"}; - Configurable phiPtHighMin{"phiPtHighMin", 2.0f, "Minimum pT for high-pT Phi(1020)"}; - Configurable phiPtHighMax{"phiPtHighMax", 4.0f, "Maximum pT for high-pT Phi(1020)"}; - - Configurable kstarPtLowMin{"kstarPtLowMin", 0.0f, "Minimum pT for low-pT K*(892)0"}; - Configurable kstarPtLowMax{"kstarPtLowMax", 2.0f, "Maximum pT for low-pT K*(892)0"}; - Configurable kstarPtHighMin{"kstarPtHighMin", 2.0f, "Minimum pT for high-pT K*(892)0"}; - Configurable kstarPtHighMax{"kstarPtHighMax", 4.0f, "Maximum pT for high-pT K*(892)0"}; - - Configurable kstarBarPtLowMin{"kstarBarPtLowMin", 0.0f, "Minimum pT for low-pT anti-K*(892)0"}; - Configurable kstarBarPtLowMax{"kstarBarPtLowMax", 2.0f, "Maximum pT for low-pT anti-K*(892)0"}; - Configurable kstarBarPtHighMin{"kstarBarPtHighMin", 2.0f, "Minimum pT for high-pT anti-K*(892)0"}; - Configurable kstarBarPtHighMax{"kstarBarPtHighMax", 4.0f, "Maximum pT for high-pT anti-K*(892)0"}; - - Configurable lambda1520PtLowMin{"lambda1520PtLowMin", 0.0f, "Minimum pT for low-pT Lambda(1520)"}; - Configurable lambda1520PtLowMax{"lambda1520PtLowMax", 2.0f, "Maximum pT for low-pT Lambda(1520)"}; - Configurable lambda1520PtHighMin{"lambda1520PtHighMin", 2.0f, "Minimum pT for high-pT Lambda(1520)"}; - Configurable lambda1520PtHighMax{"lambda1520PtHighMax", 4.0f, "Maximum pT for high-pT Lambda(1520)"}; - - Configurable lambda1520BarPtLowMin{"lambda1520BarPtLowMin", 0.0f, "Minimum pT for low-pT anti-Lambda(1520)"}; - Configurable lambda1520BarPtLowMax{"lambda1520BarPtLowMax", 2.0f, "Maximum pT for low-pT anti-Lambda(1520)"}; - Configurable lambda1520BarPtHighMin{"lambda1520BarPtHighMin", 2.0f, "Minimum pT for high-pT anti-Lambda(1520)"}; - Configurable lambda1520BarPtHighMax{"lambda1520BarPtHighMax", 4.0f, "Maximum pT for high-pT anti-Lambda(1520)"}; + Configurable c2018resoRapidityMin{"c2018resoRapidityMin", -0.5f, "Minimum rapidity for resonance candidates"}; + Configurable c2019resoRapidityMax{"c2019resoRapidityMax", 0.5f, "Maximum rapidity for resonance candidates"}; + + Configurable c2020phiPtLowMin{"c2020phiPtLowMin", 0.0f, "Minimum pT for low-pT Phi(1020)"}; + Configurable c2021phiPtLowMax{"c2021phiPtLowMax", 2.0f, "Maximum pT for low-pT Phi(1020)"}; + Configurable c2022phiPtHighMin{"c2022phiPtHighMin", 2.0f, "Minimum pT for high-pT Phi(1020)"}; + Configurable c2023phiPtHighMax{"c2023phiPtHighMax", 4.0f, "Maximum pT for high-pT Phi(1020)"}; + + Configurable c2024kstarPtLowMin{"c2024kstarPtLowMin", 0.0f, "Minimum pT for low-pT K*(892)0"}; + Configurable c2025kstarPtLowMax{"c2025kstarPtLowMax", 2.0f, "Maximum pT for low-pT K*(892)0"}; + Configurable c2026kstarPtHighMin{"c2026kstarPtHighMin", 2.0f, "Minimum pT for high-pT K*(892)0"}; + Configurable c2027kstarPtHighMax{"c2027kstarPtHighMax", 4.0f, "Maximum pT for high-pT K*(892)0"}; + + Configurable c2028kstarBarPtLowMin{"c2028kstarBarPtLowMin", 0.0f, "Minimum pT for low-pT anti-K*(892)0"}; + Configurable c2029kstarBarPtLowMax{"c2029kstarBarPtLowMax", 2.0f, "Maximum pT for low-pT anti-K*(892)0"}; + Configurable c2030kstarBarPtHighMin{"c2030kstarBarPtHighMin", 2.0f, "Minimum pT for high-pT anti-K*(892)0"}; + Configurable c2031kstarBarPtHighMax{"c2031kstarBarPtHighMax", 4.0f, "Maximum pT for high-pT anti-K*(892)0"}; + + Configurable c2032lambda1520PtLowMin{"c2032lambda1520PtLowMin", 0.0f, "Minimum pT for low-pT Lambda(1520)"}; + Configurable c2033lambda1520PtLowMax{"c2033lambda1520PtLowMax", 2.0f, "Maximum pT for low-pT Lambda(1520)"}; + Configurable c2034lambda1520PtHighMin{"c2034lambda1520PtHighMin", 2.0f, "Minimum pT for high-pT Lambda(1520)"}; + Configurable c2035lambda1520PtHighMax{"c2035lambda1520PtHighMax", 4.0f, "Maximum pT for high-pT Lambda(1520)"}; + + Configurable c2036lambda1520BarPtLowMin{"c2036lambda1520BarPtLowMin", 0.0f, "Minimum pT for low-pT anti-Lambda(1520)"}; + Configurable c2037lambda1520BarPtLowMax{"c2037lambda1520BarPtLowMax", 2.0f, "Maximum pT for low-pT anti-Lambda(1520)"}; + Configurable c2038lambda1520BarPtHighMin{"c2038lambda1520BarPtHighMin", 2.0f, "Minimum pT for high-pT anti-Lambda(1520)"}; + Configurable c2039lambda1520BarPtHighMax{"c2039lambda1520BarPtHighMax", 4.0f, "Maximum pT for high-pT anti-Lambda(1520)"}; } cfgResPartitions; struct : ConfigurableGroup { - Configurable phi1020PeakLow{"phi1020PeakLow", 1.013f, "Phi(1020) peak lower mass"}; - Configurable phi1020PeakUp{"phi1020PeakUp", 1.026f, "Phi(1020) peak upper mass"}; - Configurable phi1020LSBLow{"phi1020LSBLow", 0.995f, "Phi(1020) LSB lower mass"}; - Configurable phi1020LSBUp{"phi1020LSBUp", 1.005f, "Phi(1020) LSB upper mass"}; - Configurable phi1020RSBLow{"phi1020RSBLow", 1.040f, "Phi(1020) RSB lower mass"}; - Configurable phi1020RSBUp{"phi1020RSBUp", 1.060f, "Phi(1020) RSB upper mass"}; + Configurable c2040phi1020PeakLow{"c2040phi1020PeakLow", 1.013f, "Phi(1020) peak lower mass"}; + Configurable c2041phi1020PeakUp{"c2041phi1020PeakUp", 1.026f, "Phi(1020) peak upper mass"}; + Configurable c2042phi1020LSBLow{"c2042phi1020LSBLow", 0.995f, "Phi(1020) LSB lower mass"}; + Configurable c2043phi1020LSBUp{"c2043phi1020LSBUp", 1.005f, "Phi(1020) LSB upper mass"}; + Configurable c2044phi1020RSBLow{"c2044phi1020RSBLow", 1.040f, "Phi(1020) RSB lower mass"}; + Configurable c2045phi1020RSBUp{"c2045phi1020RSBUp", 1.060f, "Phi(1020) RSB upper mass"}; } cfgPhi1020CorrMass; struct : ConfigurableGroup { - Configurable kStar892PeakLow{"kStar892PeakLow", 0.846f, "K*(892)0 correlation peak lower mass"}; - Configurable kStar892PeakUp{"kStar892PeakUp", 0.946f, "K*(892)0 correlation peak upper mass"}; - Configurable kStar892LSBLow{"kStar892LSBLow", 0.700f, "K*(892)0 correlation LSB lower mass"}; - Configurable kStar892LSBUp{"kStar892LSBUp", 0.780f, "K*(892)0 correlation LSB upper mass"}; - Configurable kStar892RSBLow{"kStar892RSBLow", 1.010f, "K*(892)0 correlation RSB lower mass"}; - Configurable kStar892RSBUp{"kStar892RSBUp", 1.090f, "K*(892)0 correlation RSB upper mass"}; + Configurable c2046kStar892PeakLow{"c2046kStar892PeakLow", 0.846f, "K*(892)0 correlation peak lower mass"}; + Configurable c2047kStar892PeakUp{"c2047kStar892PeakUp", 0.946f, "K*(892)0 correlation peak upper mass"}; + Configurable c2048kStar892LSBLow{"c2048kStar892LSBLow", 0.700f, "K*(892)0 correlation LSB lower mass"}; + Configurable c2049kStar892LSBUp{"c2049kStar892LSBUp", 0.780f, "K*(892)0 correlation LSB upper mass"}; + Configurable c2050kStar892RSBLow{"c2050kStar892RSBLow", 1.010f, "K*(892)0 correlation RSB lower mass"}; + Configurable c2051kStar892RSBUp{"c2051kStar892RSBUp", 1.090f, "K*(892)0 correlation RSB upper mass"}; } cfgKStar892CorrMass; struct : ConfigurableGroup { - Configurable lambda1520PeakLow{"lambda1520PeakLow", 1.500f, "Lambda(1520) correlation peak lower mass"}; - Configurable lambda1520PeakUp{"lambda1520PeakUp", 1.540f, "Lambda(1520) correlation peak upper mass"}; - Configurable lambda1520LSBLow{"lambda1520LSBLow", 1.440f, "Lambda(1520) correlation LSB lower mass"}; - Configurable lambda1520LSBUp{"lambda1520LSBUp", 1.480f, "Lambda(1520) correlation LSB upper mass"}; - Configurable lambda1520RSBLow{"lambda1520RSBLow", 1.560f, "Lambda(1520) correlation RSB lower mass"}; - Configurable lambda1520RSBUp{"lambda1520RSBUp", 1.600f, "Lambda(1520) correlation RSB upper mass"}; + Configurable c2052lambda1520PeakLow{"c2052lambda1520PeakLow", 1.500f, "Lambda(1520) correlation peak lower mass"}; + Configurable c2053lambda1520PeakUp{"c2053lambda1520PeakUp", 1.540f, "Lambda(1520) correlation peak upper mass"}; + Configurable c2054lambda1520LSBLow{"c2054lambda1520LSBLow", 1.440f, "Lambda(1520) correlation LSB lower mass"}; + Configurable c2055lambda1520LSBUp{"c2055lambda1520LSBUp", 1.480f, "Lambda(1520) correlation LSB upper mass"}; + Configurable c2056lambda1520RSBLow{"c2056lambda1520RSBLow", 1.560f, "Lambda(1520) correlation RSB lower mass"}; + Configurable c2057lambda1520RSBUp{"c2057lambda1520RSBUp", 1.600f, "Lambda(1520) correlation RSB upper mass"}; } cfgLambda1520CorrMass; struct : ConfigurableGroup { - Configurable> pidConfigSetting{"pidConfigSetting", {DefaultPIDcheckValues[0].data(), kNPid, kNCutSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"ThrPforTOF", "IdCutTypeLowP", "NSigmaTPCLowP", "NSigmaTOFLowP", "NSigmaRadLowP", "IdCutTypeHighP", "NSigmaTPCHighP", "NSigmaTOFHighP", "NSigmaRadHighP", "doVetoOthers", "doRelativeTPCCheck", "doRelativeTOFcheck", "doRelativeTPCTOFcheck"}}, "Cut values for particle identification"}; - Configurable> pidVetoSetting{"pidVetoSetting", {DefaultPidVetoValues[0].data(), kNPid, kNVetoSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"doVetoTPC", "doVetoTOF", "vetoTPC", "vetoTOF"}}, "Veto cuts for particle identification"}; - Configurable cfgId07CheckTofBeta{"cfgId07CheckTofBeta", false, "Require beta > 0 for reliable TOF"}; + Configurable> c2058pidConfigSetting{"c2058pidConfigSetting", {DefaultPIDcheckValues[0].data(), kNPid, kNCutSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"ThrPforTOF", "IdCutTypeLowP", "NSigmaTPCLowP", "NSigmaTOFLowP", "NSigmaRadLowP", "IdCutTypeHighP", "NSigmaTPCHighP", "NSigmaTOFHighP", "NSigmaRadHighP", "doVetoOthers", "doRelativeTPCCheck", "doRelativeTOFcheck", "doRelativeTPCTOFcheck"}}, "Cut values for particle identification"}; + Configurable> c2059pidVetoSetting{"c2059pidVetoSetting", {DefaultPidVetoValues[0].data(), kNPid, kNVetoSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"doVetoTPC", "doVetoTOF", "vetoTPC", "vetoTOF"}}, "Veto cuts for particle identification"}; + Configurable c2060cfgId07CheckTofBeta{"c2060cfgId07CheckTofBeta", false, "Require beta > 0 for reliable TOF"}; } cfgIdCut; void init(InitContext const&) { - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c2001printDebugMessages) { LOGF(info, "Starting init"); } @@ -3926,25 +3926,25 @@ struct HParticleCorrelationMixedEvent { const AxisSpec axisTOFNSigma = {200, -10.0f, 10.0f, "n#sigma_{TOF}"}; const AxisSpec axisIdMethod = {2, -0.5f, 1.5f, "ID method (0=TPC, 1=TPC+TOF)"}; - AxisSpec axisDeltaPhiSpec{cfgAxis.axisDeltaPhi, "#Delta#varphi"}; - AxisSpec axisDeltaEtaSpec{cfgAxis.axisDeltaEta, "#Delta#eta"}; - AxisSpec axisCorrSparseTriggerPt{cfgAxis.axisCorrSparseTriggerPt, "#it{p}_{T}^{trig} (GeV/#it{c})"}; - AxisSpec axisCorrSparseAssocPt{cfgAxis.axisCorrSparseAssocPt, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; - AxisSpec axisCorrSparseDeltaPhi{cfgAxis.axisCorrSparseDeltaPhi, "#Delta#varphi"}; - AxisSpec axisCorrSparseDeltaEta{cfgAxis.axisCorrSparseDeltaEta, "#Delta#eta"}; + AxisSpec axisDeltaPhiSpec{cfgAxis.c2002axisDeltaPhi, "#Delta#varphi"}; + AxisSpec axisDeltaEtaSpec{cfgAxis.c2003axisDeltaEta, "#Delta#eta"}; + AxisSpec axisCorrSparseTriggerPt{cfgAxis.c2004axisCorrSparseTriggerPt, "#it{p}_{T}^{trig} (GeV/#it{c})"}; + AxisSpec axisCorrSparseAssocPt{cfgAxis.c2005axisCorrSparseAssocPt, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; + AxisSpec axisCorrSparseDeltaPhi{cfgAxis.c2006axisCorrSparseDeltaPhi, "#Delta#varphi"}; + AxisSpec axisCorrSparseDeltaEta{cfgAxis.c2007axisCorrSparseDeltaEta, "#Delta#eta"}; const AxisSpec axisPhi1020Mass = {300, 0.98f, 1.08f, "m_{K^{+}K^{-}} (GeV/#it{c}^{2})"}; const AxisSpec axisKStar892Mass = {300, 0.65f, 1.15f, "m_{K#pi} (GeV/#it{c}^{2})"}; const AxisSpec axisLambda1520Mass = {300, 1.40f, 1.65f, "m_{pK} (GeV/#it{c}^{2})"}; - AxisSpec axisVtxMixOperation{cfgMixing.axisVtxMixing, "z_{vtx} (cm)"}; - AxisSpec axisCentMixOperation{cfgMixing.axisCentMixing, "Centrality (%)"}; + AxisSpec axisVtxMixOperation{cfgMixing.c2010axisVtxMixing, "z_{vtx} (cm)"}; + AxisSpec axisCentMixOperation{cfgMixing.c2011axisCentMixing, "Centrality (%)"}; const int nMixOperationBins = axisVtxMixOperation.getNbins() * axisCentMixOperation.getNbins(); const AxisSpec axisMixOperationBin = {nMixOperationBins, -0.5, static_cast(nMixOperationBins) - 0.5, "Mixing bin"}; const AxisSpec axisMixOperationChannel = {NMixOperationChannels, -0.5, static_cast(NMixOperationChannels) - 0.5, "Mixing channel"}; - const AxisSpec axisMixPartners = {static_cast(cfgMixing.nEvtMixing) + 1, -0.5, static_cast(cfgMixing.nEvtMixing) + 0.5, "N mixed partner events"}; + const AxisSpec axisMixPartners = {static_cast(cfgMixing.c2008nEvtMixing) + 1, -0.5, static_cast(cfgMixing.c2008nEvtMixing) + 0.5, "N mixed partner events"}; const AxisSpec axisMixVtxZQA = {100, -10.0f, 10.0f, "z_{vtx} (cm)"}; const AxisSpec axisMixDeltaVtxZQA = {100, -20.0f, 20.0f, "#Delta z_{vtx} (cm)"}; @@ -4076,15 +4076,15 @@ struct HParticleCorrelationMixedEvent { using BinningTypeVtxZFT0A = ColumnBinningPolicy; using BinningTypeVtxZFV0A = ColumnBinningPolicy; - BinningTypeVtxZFT0C colBinningFT0C{{cfgMixing.axisVtxMixing, cfgMixing.axisCentMixing}, true}; - BinningTypeVtxZFT0M colBinningFT0M{{cfgMixing.axisVtxMixing, cfgMixing.axisCentMixing}, true}; - BinningTypeVtxZFT0A colBinningFT0A{{cfgMixing.axisVtxMixing, cfgMixing.axisCentMixing}, true}; - BinningTypeVtxZFV0A colBinningFV0A{{cfgMixing.axisVtxMixing, cfgMixing.axisCentMixing}, true}; + BinningTypeVtxZFT0C colBinningFT0C{{cfgMixing.c2010axisVtxMixing, cfgMixing.c2011axisCentMixing}, true}; + BinningTypeVtxZFT0M colBinningFT0M{{cfgMixing.c2010axisVtxMixing, cfgMixing.c2011axisCentMixing}, true}; + BinningTypeVtxZFT0A colBinningFT0A{{cfgMixing.c2010axisVtxMixing, cfgMixing.c2011axisCentMixing}, true}; + BinningTypeVtxZFV0A colBinningFV0A{{cfgMixing.c2010axisVtxMixing, cfgMixing.c2011axisCentMixing}, true}; template int getDerivedMixingBin(const C& collision) { - switch (cfgMixing.mixingEstimator) { + switch (cfgMixing.c2009mixingEstimator) { case kMixCentFT0C: return colBinningFT0C.getBin({collision.posZ(), collision.centFT0C()}); case kMixCentFT0M: @@ -4101,7 +4101,7 @@ struct HParticleCorrelationMixedEvent { template float getDerivedMixingEstimatorValue(const C& collision) { - switch (cfgMixing.mixingEstimator) { + switch (cfgMixing.c2009mixingEstimator) { case kMixCentFT0C: return collision.centFT0C(); case kMixCentFT0M: @@ -4128,20 +4128,20 @@ struct HParticleCorrelationMixedEvent { { // Static is only run once, ever. static const std::array doVetoTPC = { - getCfg(cfgIdCut.pidVetoSetting, kPi, kDoVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kKa, kDoVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kPr, kDoVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kEl, kDoVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kMu, kDoVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kDe, kDoVetoTPC)}; + getCfg(cfgIdCut.c2059pidVetoSetting, kPi, kDoVetoTPC), + getCfg(cfgIdCut.c2059pidVetoSetting, kKa, kDoVetoTPC), + getCfg(cfgIdCut.c2059pidVetoSetting, kPr, kDoVetoTPC), + getCfg(cfgIdCut.c2059pidVetoSetting, kEl, kDoVetoTPC), + getCfg(cfgIdCut.c2059pidVetoSetting, kMu, kDoVetoTPC), + getCfg(cfgIdCut.c2059pidVetoSetting, kDe, kDoVetoTPC)}; static const std::array vetoTPC = { - getCfg(cfgIdCut.pidVetoSetting, kPi, kVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kKa, kVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kPr, kVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kEl, kVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kMu, kVetoTPC), - getCfg(cfgIdCut.pidVetoSetting, kDe, kVetoTPC)}; + getCfg(cfgIdCut.c2059pidVetoSetting, kPi, kVetoTPC), + getCfg(cfgIdCut.c2059pidVetoSetting, kKa, kVetoTPC), + getCfg(cfgIdCut.c2059pidVetoSetting, kPr, kVetoTPC), + getCfg(cfgIdCut.c2059pidVetoSetting, kEl, kVetoTPC), + getCfg(cfgIdCut.c2059pidVetoSetting, kMu, kVetoTPC), + getCfg(cfgIdCut.c2059pidVetoSetting, kDe, kVetoTPC)}; return applyVetoOthersTPC(track, doVetoTPC, vetoTPC); } @@ -4151,20 +4151,20 @@ struct HParticleCorrelationMixedEvent { { // Only computed once static const std::array doVetoTOF = { - getCfg(cfgIdCut.pidVetoSetting, kPi, kDoVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kKa, kDoVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kPr, kDoVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kEl, kDoVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kMu, kDoVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kDe, kDoVetoTOF)}; + getCfg(cfgIdCut.c2059pidVetoSetting, kPi, kDoVetoTOF), + getCfg(cfgIdCut.c2059pidVetoSetting, kKa, kDoVetoTOF), + getCfg(cfgIdCut.c2059pidVetoSetting, kPr, kDoVetoTOF), + getCfg(cfgIdCut.c2059pidVetoSetting, kEl, kDoVetoTOF), + getCfg(cfgIdCut.c2059pidVetoSetting, kMu, kDoVetoTOF), + getCfg(cfgIdCut.c2059pidVetoSetting, kDe, kDoVetoTOF)}; static const std::array vetoTOF = { - getCfg(cfgIdCut.pidVetoSetting, kPi, kVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kKa, kVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kPr, kVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kEl, kVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kMu, kVetoTOF), - getCfg(cfgIdCut.pidVetoSetting, kDe, kVetoTOF)}; + getCfg(cfgIdCut.c2059pidVetoSetting, kPi, kVetoTOF), + getCfg(cfgIdCut.c2059pidVetoSetting, kKa, kVetoTOF), + getCfg(cfgIdCut.c2059pidVetoSetting, kPr, kVetoTOF), + getCfg(cfgIdCut.c2059pidVetoSetting, kEl, kVetoTOF), + getCfg(cfgIdCut.c2059pidVetoSetting, kMu, kVetoTOF), + getCfg(cfgIdCut.c2059pidVetoSetting, kDe, kVetoTOF)}; return applyVetoOthersTOF(track, doVetoTOF, vetoTOF); } @@ -4181,7 +4181,7 @@ struct HParticleCorrelationMixedEvent { inline bool checkReliableTOF(const T& track) { // which check makes the information of TOF relaiable? should track.beta() be checked? e.g.: - if (cfgIdCut.cfgId07CheckTofBeta) { + if (cfgIdCut.c2060cfgId07CheckTofBeta) { return (track.hasTOF() && track.beta() > 0.0f); } return track.hasTOF(); @@ -4206,7 +4206,7 @@ struct HParticleCorrelationMixedEvent { nSigmaIdDistSq = 1000000; } - static const bool doVetoOthers = getCfg(cfgIdCut.pidConfigSetting, pidMode, kDoVetoOthers); + static const bool doVetoOthers = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kDoVetoOthers); if (doVetoOthers) { if (!vetoIdOthersTPC(track)) { // If vetoIdOthers = true; it passed all veto checks @@ -4215,7 +4215,7 @@ struct HParticleCorrelationMixedEvent { } } - static const bool doRelativeTPCcheck = getCfg(cfgIdCut.pidConfigSetting, pidMode, kDoRelativeTPCcheck); + static const bool doRelativeTPCcheck = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kDoRelativeTPCcheck); if (doRelativeTPCcheck) { if (!relativeIdOthersTPC(track)) { // If relativeIdOthersTPC = true; particle has stronger nSigma compared to others @@ -4259,7 +4259,7 @@ struct HParticleCorrelationMixedEvent { } else { nSigmaIdDistSq = 1000000; } - static const bool doVetoOthers = getCfg(cfgIdCut.pidConfigSetting, pidMode, kDoVetoOthers); + static const bool doVetoOthers = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kDoVetoOthers); if (doVetoOthers) { if (!vetoIdOthersTPCTOF(track)) { // If vetoIdOthers = true; it passed all veto checks @@ -4268,7 +4268,7 @@ struct HParticleCorrelationMixedEvent { } } - static const bool doRelativeTOFcheck = getCfg(cfgIdCut.pidConfigSetting, pidMode, kDoRelativeTOFcheck); + static const bool doRelativeTOFcheck = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kDoRelativeTOFcheck); if (doRelativeTOFcheck) { if (!relativeIdOthersTOF(track)) { // If relativeIdOthersTOF = true; particle has stronger nSigma compared to others @@ -4277,7 +4277,7 @@ struct HParticleCorrelationMixedEvent { } } - static const bool doRelativeTPCTOFcheck = getCfg(cfgIdCut.pidConfigSetting, pidMode, kDoRelativeTPCTOFcheck); + static const bool doRelativeTPCTOFcheck = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kDoRelativeTPCTOFcheck); if (doRelativeTPCTOFcheck) { if (!relativeIdOthersTPCTOF(track)) { // If relativeIdOthersTPCTOF = true; particle has stronger nSigma compared to others @@ -4302,15 +4302,15 @@ struct HParticleCorrelationMixedEvent { bool selPdependent(const T& track, int& IdMethod, float& nSigmaIdDistSq) { // Static cache inside function - initialized once on first call - static const auto thrPforTOF = getCfg(cfgIdCut.pidConfigSetting, pidMode, kThrPforTOF); - static const auto idCutTypeLowP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kIdCutTypeLowP); - static const auto nSigmaTPCLowP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaTPCLowP); - static const auto nSigmaTOFLowP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaTOFLowP); - static const auto nSigmaRadLowP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaRadLowP); - static const auto idCutTypeHighP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kIdCutTypeHighP); - static const auto nSigmaTPCHighP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaTPCHighP); - static const auto nSigmaTOFHighP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaTOFHighP); - static const auto nSigmaRadHighP = getCfg(cfgIdCut.pidConfigSetting, pidMode, kNSigmaRadHighP); + static const auto thrPforTOF = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kThrPforTOF); + static const auto idCutTypeLowP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kIdCutTypeLowP); + static const auto nSigmaTPCLowP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaTPCLowP); + static const auto nSigmaTOFLowP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaTOFLowP); + static const auto nSigmaRadLowP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaRadLowP); + static const auto idCutTypeHighP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kIdCutTypeHighP); + static const auto nSigmaTPCHighP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaTPCHighP); + static const auto nSigmaTOFHighP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaTOFHighP); + static const auto nSigmaRadHighP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaRadHighP); if (track.p() < thrPforTOF) { if (checkReliableTOF(track)) { @@ -4626,19 +4626,19 @@ struct HParticleCorrelationMixedEvent { { if constexpr (pairType == kHPhi) { invMass = associate.mPhi1020(); - return getMassRegionTag(invMass, cfgPhi1020CorrMass.phi1020LSBLow, cfgPhi1020CorrMass.phi1020LSBUp, cfgPhi1020CorrMass.phi1020PeakLow, cfgPhi1020CorrMass.phi1020PeakUp, cfgPhi1020CorrMass.phi1020RSBLow, cfgPhi1020CorrMass.phi1020RSBUp); + return getMassRegionTag(invMass, cfgPhi1020CorrMass.c2042phi1020LSBLow, cfgPhi1020CorrMass.c2043phi1020LSBUp, cfgPhi1020CorrMass.c2040phi1020PeakLow, cfgPhi1020CorrMass.c2041phi1020PeakUp, cfgPhi1020CorrMass.c2044phi1020RSBLow, cfgPhi1020CorrMass.c2045phi1020RSBUp); } else if constexpr (pairType == kHKStar) { invMass = associate.mKStar892(); - return getMassRegionTag(invMass, cfgKStar892CorrMass.kStar892LSBLow, cfgKStar892CorrMass.kStar892LSBUp, cfgKStar892CorrMass.kStar892PeakLow, cfgKStar892CorrMass.kStar892PeakUp, cfgKStar892CorrMass.kStar892RSBLow, cfgKStar892CorrMass.kStar892RSBUp); + return getMassRegionTag(invMass, cfgKStar892CorrMass.c2048kStar892LSBLow, cfgKStar892CorrMass.c2049kStar892LSBUp, cfgKStar892CorrMass.c2046kStar892PeakLow, cfgKStar892CorrMass.c2047kStar892PeakUp, cfgKStar892CorrMass.c2050kStar892RSBLow, cfgKStar892CorrMass.c2051kStar892RSBUp); } else if constexpr (pairType == kHKStarBar) { invMass = associate.mKStar892Bar(); - return getMassRegionTag(invMass, cfgKStar892CorrMass.kStar892LSBLow, cfgKStar892CorrMass.kStar892LSBUp, cfgKStar892CorrMass.kStar892PeakLow, cfgKStar892CorrMass.kStar892PeakUp, cfgKStar892CorrMass.kStar892RSBLow, cfgKStar892CorrMass.kStar892RSBUp); + return getMassRegionTag(invMass, cfgKStar892CorrMass.c2048kStar892LSBLow, cfgKStar892CorrMass.c2049kStar892LSBUp, cfgKStar892CorrMass.c2046kStar892PeakLow, cfgKStar892CorrMass.c2047kStar892PeakUp, cfgKStar892CorrMass.c2050kStar892RSBLow, cfgKStar892CorrMass.c2051kStar892RSBUp); } else if constexpr (pairType == kHLambda) { invMass = associate.mLambda1520(); - return getMassRegionTag(invMass, cfgLambda1520CorrMass.lambda1520LSBLow, cfgLambda1520CorrMass.lambda1520LSBUp, cfgLambda1520CorrMass.lambda1520PeakLow, cfgLambda1520CorrMass.lambda1520PeakUp, cfgLambda1520CorrMass.lambda1520RSBLow, cfgLambda1520CorrMass.lambda1520RSBUp); + return getMassRegionTag(invMass, cfgLambda1520CorrMass.c2054lambda1520LSBLow, cfgLambda1520CorrMass.c2055lambda1520LSBUp, cfgLambda1520CorrMass.c2052lambda1520PeakLow, cfgLambda1520CorrMass.c2053lambda1520PeakUp, cfgLambda1520CorrMass.c2056lambda1520RSBLow, cfgLambda1520CorrMass.c2057lambda1520RSBUp); } else if constexpr (pairType == kHLambdaBar) { invMass = associate.mLambda1520Bar(); - return getMassRegionTag(invMass, cfgLambda1520CorrMass.lambda1520LSBLow, cfgLambda1520CorrMass.lambda1520LSBUp, cfgLambda1520CorrMass.lambda1520PeakLow, cfgLambda1520CorrMass.lambda1520PeakUp, cfgLambda1520CorrMass.lambda1520RSBLow, cfgLambda1520CorrMass.lambda1520RSBUp); + return getMassRegionTag(invMass, cfgLambda1520CorrMass.c2054lambda1520LSBLow, cfgLambda1520CorrMass.c2055lambda1520LSBUp, cfgLambda1520CorrMass.c2052lambda1520PeakLow, cfgLambda1520CorrMass.c2053lambda1520PeakUp, cfgLambda1520CorrMass.c2056lambda1520RSBLow, cfgLambda1520CorrMass.c2057lambda1520RSBUp); } invMass = -1.0f; @@ -4777,7 +4777,7 @@ struct HParticleCorrelationMixedEvent { continue; } const float rapidity = computeDerivedRapidity(associate, invMass); - if (rapidity < cfgResPartitions.resoRapidityMin || rapidity > cfgResPartitions.resoRapidityMax) { + if (rapidity < cfgResPartitions.c2018resoRapidityMin || rapidity > cfgResPartitions.c2019resoRapidityMax) { continue; } if (requiredMassRegion != kMassNone && massRegion != requiredMassRegion) { @@ -4818,94 +4818,94 @@ struct HParticleCorrelationMixedEvent { } } - Preslice drTracksPerCollisionPreslice = aod::hpcorrtrack::hpCorrCollisionId; - Preslice drResoPerCollisionPreslice = aod::hpcorrresonance::hpCorrCollisionId; + Preslice drTracksPerCollisionPreslice = aod::hpcorrtrack::hpCorrCollId; + Preslice drResoPerCollisionPreslice = aod::hpcorrresonance::hpCorrCollId; // definition of partitions SliceCache cache; - Partition drMixHHLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHHLowPt)) != static_cast(0ULL); - Partition drMixHHHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHHHighPt)) != static_cast(0ULL); + Partition drMixHHLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHHLowPt)) != static_cast(0ULL); + Partition drMixHHHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHHHighPt)) != static_cast(0ULL); - Partition drMixHPiLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPiLowPt)) != static_cast(0ULL); - Partition drMixHPiHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPiHighPt)) != static_cast(0ULL); - Partition drMixHKaLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKaLowPt)) != static_cast(0ULL); - Partition drMixHKaHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKaHighPt)) != static_cast(0ULL); - Partition drMixHPrLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPrLowPt)) != static_cast(0ULL); - Partition drMixHPrHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPrHighPt)) != static_cast(0ULL); + Partition drMixHPiLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPiLowPt)) != static_cast(0ULL); + Partition drMixHPiHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPiHighPt)) != static_cast(0ULL); + Partition drMixHKaLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKaLowPt)) != static_cast(0ULL); + Partition drMixHKaHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKaHighPt)) != static_cast(0ULL); + Partition drMixHPrLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPrLowPt)) != static_cast(0ULL); + Partition drMixHPrHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPrHighPt)) != static_cast(0ULL); - Partition drMixHPhiLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiLowPtPeak)) != static_cast(0ULL); - Partition drMixHPhiLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiLowPtLSB)) != static_cast(0ULL); - Partition drMixHPhiLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiLowPtRSB)) != static_cast(0ULL); + Partition drMixHPhiLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiLowPtPeak)) != static_cast(0ULL); + Partition drMixHPhiLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiLowPtLSB)) != static_cast(0ULL); + Partition drMixHPhiLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiLowPtRSB)) != static_cast(0ULL); - Partition drMixHPhiHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiHighPtPeak)) != static_cast(0ULL); - Partition drMixHPhiHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiHighPtLSB)) != static_cast(0ULL); - Partition drMixHPhiHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiHighPtRSB)) != static_cast(0ULL); + Partition drMixHPhiHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiHighPtPeak)) != static_cast(0ULL); + Partition drMixHPhiHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiHighPtLSB)) != static_cast(0ULL); + Partition drMixHPhiHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiHighPtRSB)) != static_cast(0ULL); - Partition drMixHKStarLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarLowPtPeak)) != static_cast(0ULL); - Partition drMixHKStarLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarLowPtLSB)) != static_cast(0ULL); - Partition drMixHKStarLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarLowPtRSB)) != static_cast(0ULL); + Partition drMixHKStarLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarLowPtPeak)) != static_cast(0ULL); + Partition drMixHKStarLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarLowPtLSB)) != static_cast(0ULL); + Partition drMixHKStarLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarLowPtRSB)) != static_cast(0ULL); - Partition drMixHKStarHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarHighPtPeak)) != static_cast(0ULL); - Partition drMixHKStarHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarHighPtLSB)) != static_cast(0ULL); - Partition drMixHKStarHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarHighPtRSB)) != static_cast(0ULL); + Partition drMixHKStarHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarHighPtPeak)) != static_cast(0ULL); + Partition drMixHKStarHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarHighPtLSB)) != static_cast(0ULL); + Partition drMixHKStarHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarHighPtRSB)) != static_cast(0ULL); - Partition drMixHKStarBarLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarLowPtPeak)) != static_cast(0ULL); - Partition drMixHKStarBarLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarLowPtLSB)) != static_cast(0ULL); - Partition drMixHKStarBarLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarLowPtRSB)) != static_cast(0ULL); + Partition drMixHKStarBarLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarLowPtPeak)) != static_cast(0ULL); + Partition drMixHKStarBarLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarLowPtLSB)) != static_cast(0ULL); + Partition drMixHKStarBarLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarLowPtRSB)) != static_cast(0ULL); - Partition drMixHKStarBarHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarHighPtPeak)) != static_cast(0ULL); - Partition drMixHKStarBarHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarHighPtLSB)) != static_cast(0ULL); - Partition drMixHKStarBarHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarHighPtRSB)) != static_cast(0ULL); + Partition drMixHKStarBarHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarHighPtPeak)) != static_cast(0ULL); + Partition drMixHKStarBarHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarHighPtLSB)) != static_cast(0ULL); + Partition drMixHKStarBarHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarHighPtRSB)) != static_cast(0ULL); - Partition drMixHLambdaLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaLowPtPeak)) != static_cast(0ULL); - Partition drMixHLambdaLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaLowPtLSB)) != static_cast(0ULL); - Partition drMixHLambdaLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaLowPtRSB)) != static_cast(0ULL); + Partition drMixHLambdaLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaLowPtPeak)) != static_cast(0ULL); + Partition drMixHLambdaLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaLowPtLSB)) != static_cast(0ULL); + Partition drMixHLambdaLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaLowPtRSB)) != static_cast(0ULL); - Partition drMixHLambdaHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaHighPtPeak)) != static_cast(0ULL); - Partition drMixHLambdaHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaHighPtLSB)) != static_cast(0ULL); - Partition drMixHLambdaHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaHighPtRSB)) != static_cast(0ULL); + Partition drMixHLambdaHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaHighPtPeak)) != static_cast(0ULL); + Partition drMixHLambdaHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaHighPtLSB)) != static_cast(0ULL); + Partition drMixHLambdaHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaHighPtRSB)) != static_cast(0ULL); - Partition drMixHLambdaBarLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarLowPtPeak)) != static_cast(0ULL); - Partition drMixHLambdaBarLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarLowPtLSB)) != static_cast(0ULL); - Partition drMixHLambdaBarLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarLowPtRSB)) != static_cast(0ULL); + Partition drMixHLambdaBarLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarLowPtPeak)) != static_cast(0ULL); + Partition drMixHLambdaBarLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarLowPtLSB)) != static_cast(0ULL); + Partition drMixHLambdaBarLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarLowPtRSB)) != static_cast(0ULL); - Partition drMixHLambdaBarHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarHighPtPeak)) != static_cast(0ULL); - Partition drMixHLambdaBarHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarHighPtLSB)) != static_cast(0ULL); - Partition drMixHLambdaBarHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarHighPtRSB)) != static_cast(0ULL); + Partition drMixHLambdaBarHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarHighPtPeak)) != static_cast(0ULL); + Partition drMixHLambdaBarHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarHighPtLSB)) != static_cast(0ULL); + Partition drMixHLambdaBarHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarHighPtRSB)) != static_cast(0ULL); - Partition drTriggerTracks = cfgPartitions.triggerPtLow < aod::hpcorrtrack::pt && aod::hpcorrtrack::pt < cfgPartitions.triggerPtHigh; + Partition drTriggerTracks = cfgPartitions.c2012triggerPtLow < aod::hpcorrtrack::pt && aod::hpcorrtrack::pt < cfgPartitions.c2013triggerPtHigh; Partition drPosTracks = aod::hpcorrtrack::sign > static_cast(0); Partition drNegTracks = aod::hpcorrtrack::sign < static_cast(0); - Partition drAssocTracksLowPt = cfgPartitions.assocPtLowMin < aod::hpcorrtrack::pt && aod::hpcorrtrack::pt < cfgPartitions.assocPtLowMax; - Partition drAssocTracksHighPt = cfgPartitions.assocPtHighMin < aod::hpcorrtrack::pt && aod::hpcorrtrack::pt < cfgPartitions.assocPtHighMax; - - Partition drAssocPhiLowPt = cfgResPartitions.phiPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.phiPtLowMax && aod::hpcorrresonance::phi1020Tag != static_cast(kMassOutside); - Partition drAssocPhiHighPt = cfgResPartitions.phiPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.phiPtHighMax && aod::hpcorrresonance::phi1020Tag != static_cast(kMassOutside); - Partition drAssocKStarLowPt = cfgResPartitions.kstarPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.kstarPtLowMax && aod::hpcorrresonance::kStar892Tag != static_cast(kMassOutside); - Partition drAssocKStarHighPt = cfgResPartitions.kstarPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.kstarPtHighMax && aod::hpcorrresonance::kStar892Tag != static_cast(kMassOutside); - Partition drAssocKStarBarLowPt = cfgResPartitions.kstarBarPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.kstarBarPtLowMax && aod::hpcorrresonance::kStar892BarTag != static_cast(kMassOutside); - Partition drAssocKStarBarHighPt = cfgResPartitions.kstarBarPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.kstarBarPtHighMax && aod::hpcorrresonance::kStar892BarTag != static_cast(kMassOutside); - Partition drAssocLambda1520LowPt = cfgResPartitions.lambda1520PtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.lambda1520PtLowMax && aod::hpcorrresonance::lambda1520Tag != static_cast(kMassOutside); - Partition drAssocLambda1520HighPt = cfgResPartitions.lambda1520PtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.lambda1520PtHighMax && aod::hpcorrresonance::lambda1520Tag != static_cast(kMassOutside); - Partition drAssocLambda1520BarLowPt = cfgResPartitions.lambda1520BarPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.lambda1520BarPtLowMax && aod::hpcorrresonance::lambda1520BarTag != static_cast(kMassOutside); - Partition drAssocLambda1520BarHighPt = cfgResPartitions.lambda1520BarPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.lambda1520BarPtHighMax && aod::hpcorrresonance::lambda1520BarTag != static_cast(kMassOutside); + Partition drAssocTracksLowPt = cfgPartitions.c2014assocPtLowMin < aod::hpcorrtrack::pt && aod::hpcorrtrack::pt < cfgPartitions.c2015assocPtLowMax; + Partition drAssocTracksHighPt = cfgPartitions.c2016assocPtHighMin < aod::hpcorrtrack::pt && aod::hpcorrtrack::pt < cfgPartitions.c2017assocPtHighMax; + + Partition drAssocPhiLowPt = cfgResPartitions.c2020phiPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2021phiPtLowMax && aod::hpcorrresonance::phi1020Tag != static_cast(kMassOutside); + Partition drAssocPhiHighPt = cfgResPartitions.c2022phiPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2023phiPtHighMax && aod::hpcorrresonance::phi1020Tag != static_cast(kMassOutside); + Partition drAssocKStarLowPt = cfgResPartitions.c2024kstarPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2025kstarPtLowMax && aod::hpcorrresonance::kStar892Tag != static_cast(kMassOutside); + Partition drAssocKStarHighPt = cfgResPartitions.c2026kstarPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2027kstarPtHighMax && aod::hpcorrresonance::kStar892Tag != static_cast(kMassOutside); + Partition drAssocKStarBarLowPt = cfgResPartitions.c2028kstarBarPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2029kstarBarPtLowMax && aod::hpcorrresonance::kStar892BarTag != static_cast(kMassOutside); + Partition drAssocKStarBarHighPt = cfgResPartitions.c2030kstarBarPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2031kstarBarPtHighMax && aod::hpcorrresonance::kStar892BarTag != static_cast(kMassOutside); + Partition drAssocLambda1520LowPt = cfgResPartitions.c2032lambda1520PtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2033lambda1520PtLowMax && aod::hpcorrresonance::lambda1520Tag != static_cast(kMassOutside); + Partition drAssocLambda1520HighPt = cfgResPartitions.c2034lambda1520PtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2035lambda1520PtHighMax && aod::hpcorrresonance::lambda1520Tag != static_cast(kMassOutside); + Partition drAssocLambda1520BarLowPt = cfgResPartitions.c2036lambda1520BarPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2037lambda1520BarPtLowMax && aod::hpcorrresonance::lambda1520BarTag != static_cast(kMassOutside); + Partition drAssocLambda1520BarHighPt = cfgResPartitions.c2038lambda1520BarPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2039lambda1520BarPtHighMax && aod::hpcorrresonance::lambda1520BarTag != static_cast(kMassOutside); int dfNumber = 0; void processNothing(aod::Origins const& origins) { - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c2001printDebugMessages) { LOG(info) << "DEBUG :: Process Nothing :: df_" << dfNumber << " :: origins = " << origins.size(); } // Intentionally empty. // Keeps the task alive when running purely on derived data. } - PROCESS_SWITCH(HParticleCorrelationMixedEvent, processNothing, "Dummy process for analysis", true); + PROCESS_SWITCH(HParticleCorrelation3MixedEvent, processNothing, "Dummy process for analysis", true); int nColl = 0; - void processMixEventInDeriveData(aod::Origins const& origins, aod::HPCorrCollisions const& drCollisions, aod::HPCorrTracks const& drFullTracks, aod::HPCorrResonances const& drResonanceCndts /*, o2::aod::Origins const& Origins, aod::BCsWithTimestamps const&*/) + void processMixEventInDeriveData(aod::Origins const& origins, aod::HPCorrColls const& drCollisions, aod::HPCorrTracks const& drFullTracks, aod::HPCorrResonances const& drResonanceCndts /*, o2::aod::Origins const& Origins, aod::BCsWithTimestamps const&*/) { dfNumber++; - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c2001printDebugMessages) { LOG(info) << "DEBUG :: df_" << dfNumber << " :: origins = " << origins.size() << " :: drCollisions = " << drCollisions.size() << " :: drFullTracks = " << drFullTracks.size() << " :: drResonanceCndts = " << drResonanceCndts.size(); } @@ -4916,15 +4916,15 @@ struct HParticleCorrelationMixedEvent { int64_t nBadResonanceCollision = 0; int64_t nBadResonanceDaughters = 0; for (const auto& coll : drCollisions) { - auto drTracksPerColl = drFullTracks.sliceByCached(aod::hpcorrtrack::hpCorrCollisionId, coll.globalIndex(), cache); - auto drResonancesPerColl = drResonanceCndts.sliceByCached(aod::hpcorrresonance::hpCorrCollisionId, coll.globalIndex(), cache); - auto drTriggerTracksPerColl = drTriggerTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollisionId, coll.globalIndex(), cache); - auto drPosTracksPerColl = drPosTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollisionId, coll.globalIndex(), cache); - auto drNegTracksPerColl = drNegTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollisionId, coll.globalIndex(), cache); - auto drAssocTracksLowPtPerColl = drAssocTracksLowPt->sliceByCached(aod::hpcorrtrack::hpCorrCollisionId, coll.globalIndex(), cache); - auto drAssocTracksHighPtPerColl = drAssocTracksHighPt->sliceByCached(aod::hpcorrtrack::hpCorrCollisionId, coll.globalIndex(), cache); - auto drAssocPhiLowPtPerColl = drAssocPhiLowPt->sliceByCached(aod::hpcorrresonance::hpCorrCollisionId, coll.globalIndex(), cache); - auto drAssocPhiHighPtPerColl = drAssocPhiHighPt->sliceByCached(aod::hpcorrresonance::hpCorrCollisionId, coll.globalIndex(), cache); + auto drTracksPerColl = drFullTracks.sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); + auto drResonancesPerColl = drResonanceCndts.sliceByCached(aod::hpcorrresonance::hpCorrCollId, coll.globalIndex(), cache); + auto drTriggerTracksPerColl = drTriggerTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); + auto drPosTracksPerColl = drPosTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); + auto drNegTracksPerColl = drNegTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); + auto drAssocTracksLowPtPerColl = drAssocTracksLowPt->sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); + auto drAssocTracksHighPtPerColl = drAssocTracksHighPt->sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); + auto drAssocPhiLowPtPerColl = drAssocPhiLowPt->sliceByCached(aod::hpcorrresonance::hpCorrCollId, coll.globalIndex(), cache); + auto drAssocPhiHighPtPerColl = drAssocPhiHighPt->sliceByCached(aod::hpcorrresonance::hpCorrCollId, coll.globalIndex(), cache); if (coll.globalIndex() != coll.globalCollisionId()) { nBadCollisionIndex++; @@ -4933,9 +4933,9 @@ struct HParticleCorrelationMixedEvent { for (const auto& track : drTracksPerColl) { nTrackChecks++; - if (track.hpCorrCollisionId() != coll.globalIndex()) { + if (track.hpCorrCollId() != coll.globalIndex()) { nBadTrackCollision++; - LOG(error) << "TRACK CHECK :: hpCorrCollisionId mismatch :: " << track.hpCorrCollisionId() << " != " << coll.globalIndex(); + LOG(error) << "TRACK CHECK :: hpCorrCollId mismatch :: " << track.hpCorrCollId() << " != " << coll.globalIndex(); } if (track.globalColRefId() != coll.globalCollisionId()) { nBadTrackCollision++; @@ -4958,9 +4958,9 @@ struct HParticleCorrelationMixedEvent { for (const auto& resonance : drResonancesPerColl) { nResonanceChecks++; - if (resonance.hpCorrCollisionId() != coll.globalIndex()) { + if (resonance.hpCorrCollId() != coll.globalIndex()) { nBadResonanceCollision++; - LOG(error) << "RESONANCE CHECK :: hpCorrCollisionId mismatch :: " << resonance.hpCorrCollisionId() << " != " << coll.globalIndex(); + LOG(error) << "RESONANCE CHECK :: hpCorrCollId mismatch :: " << resonance.hpCorrCollId() << " != " << coll.globalIndex(); } if (resonance.globalColRefId() != coll.globalCollisionId()) { nBadResonanceCollision++; @@ -5018,13 +5018,13 @@ struct HParticleCorrelationMixedEvent { LOG(error) << "DAUGHTER CHECK :: resonance/negTrack dataframeID mismatch :: " << resonance.dataframeID() << " != " << negTrack.dataframeID(); } - if (posTrack.hpCorrCollisionId() != coll.globalIndex()) { + if (posTrack.hpCorrCollId() != coll.globalIndex()) { nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: positive daughter belongs to wrong collision :: " << posTrack.hpCorrCollisionId() << " != " << coll.globalIndex(); + LOG(error) << "DAUGHTER CHECK :: positive daughter belongs to wrong collision :: " << posTrack.hpCorrCollId() << " != " << coll.globalIndex(); } - if (negTrack.hpCorrCollisionId() != coll.globalIndex()) { + if (negTrack.hpCorrCollId() != coll.globalIndex()) { nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: negative daughter belongs to wrong collision :: " << negTrack.hpCorrCollisionId() << " != " << coll.globalIndex(); + LOG(error) << "DAUGHTER CHECK :: negative daughter belongs to wrong collision :: " << negTrack.hpCorrCollId() << " != " << coll.globalIndex(); } if (posTrack.originalColRefId() != coll.originalCollisionId()) { @@ -5057,11 +5057,11 @@ struct HParticleCorrelationMixedEvent { nColl++; } // Collision loop is over - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c2001printDebugMessages) { LOG(info) << "DEBUG :: SANITY CHECK SUMMARY :: bad collision indices = " << nBadCollisionIndex << " :: tracks checked = " << nTrackChecks << " :: bad track references = " << nBadTrackCollision << " :: resonances checked = " << nResonanceChecks << " :: bad resonance collision references = " << nBadResonanceCollision << " :: bad resonance daughter references = " << nBadResonanceDaughters; } if (nBadCollisionIndex == 0 && nBadTrackCollision == 0 && nBadResonanceCollision == 0 && nBadResonanceDaughters == 0) { - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c2001printDebugMessages) { LOG(info) << "DEBUG :: SANITY CHECK PASSED"; } } else { @@ -5077,7 +5077,7 @@ struct HParticleCorrelationMixedEvent { partnerCountPerTriggerEvent[collision.globalIndex()] = 0; } - for (const auto& [collision1, collision2] : selfCombinations(colBinning, cfgMixing.nEvtMixing, -1, collisionPool, collisionPool)) { + for (const auto& [collision1, collision2] : selfCombinations(colBinning, cfgMixing.c2008nEvtMixing, -1, collisionPool, collisionPool)) { nMixedEventPairs++; if (collision1.dataframeID() == collision2.dataframeID() && collision1.originalCollisionId() == collision2.originalCollisionId()) { @@ -5139,8 +5139,8 @@ struct HParticleCorrelationMixedEvent { static_assert(MixChannel >= 0, "Invalid track mixing-operation channel"); runRestrictedMixing(colBinning, collisionPool, MixChannel, [&](const auto& collision1, const auto& collision2) { - auto triggerTracks1 = drTriggerTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollisionId, collision1.globalIndex(), cache); - auto associates2 = assocPartition->sliceByCached(aod::hpcorrtrack::hpCorrCollisionId, collision2.globalIndex(), cache); + auto triggerTracks1 = drTriggerTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollId, collision1.globalIndex(), cache); + auto associates2 = assocPartition->sliceByCached(aod::hpcorrtrack::hpCorrCollId, collision2.globalIndex(), cache); executeDerivedCorrelationRole(histReg, triggerTracks1, associates2); }); @@ -5165,8 +5165,8 @@ struct HParticleCorrelationMixedEvent { static_assert(MixChannel >= 0, "Invalid resonance mixing-operation channel"); runRestrictedMixing(colBinning, collisionPool, MixChannel, [&](const auto& collision1, const auto& collision2) { - auto triggerTracks1 = drTriggerTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollisionId, collision1.globalIndex(), cache); - auto associates2 = assocPartition->sliceByCached(aod::hpcorrresonance::hpCorrCollisionId, collision2.globalIndex(), cache); + auto triggerTracks1 = drTriggerTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollId, collision1.globalIndex(), cache); + auto associates2 = assocPartition->sliceByCached(aod::hpcorrresonance::hpCorrCollId, collision2.globalIndex(), cache); associates2.bindExternalIndices(&drFullTracks); @@ -5211,7 +5211,7 @@ struct HParticleCorrelationMixedEvent { runResoRegionMixing.template operator()(colBinning, drMixHLambdaBarHighPtRSB, drAssocLambda1520BarHighPt, hLambdaBarCorrelation); }; - switch (cfgMixing.mixingEstimator) { + switch (cfgMixing.c2009mixingEstimator) { case kMixCentFT0C: runAllTrackMixing(colBinningFT0C); runAllResoMixing(colBinningFT0C); @@ -5233,20 +5233,20 @@ struct HParticleCorrelationMixedEvent { break; default: - LOG(fatal) << "DEBUG :: Invalid mixingEstimator = " << static_cast(cfgMixing.mixingEstimator); + LOG(fatal) << "DEBUG :: Invalid mixingEstimator = " << static_cast(cfgMixing.c2009mixingEstimator); break; } - if (cfgDebug.printDebugMessages) { + if (cfgDebug.c2001printDebugMessages) { LOG(info) << "DEBUG :: EVENT MIXING SUMMARY :: mixed collision pairs = " << nMixedEventPairs; } } - PROCESS_SWITCH(HParticleCorrelationMixedEvent, processMixEventInDeriveData, "Process Mix event in derive data", true); + PROCESS_SWITCH(HParticleCorrelation3MixedEvent, processMixEventInDeriveData, "Process Mix event in derive data", true); }; WorkflowSpec defineDataProcessing(ConfigContext const& context) { return WorkflowSpec{ - adaptAnalysisTask(context), - adaptAnalysisTask(context), - adaptAnalysisTask(context)}; + adaptAnalysisTask(context), + adaptAnalysisTask(context), + adaptAnalysisTask(context)}; } From 782edd5ed28e1faaacae057f09770b7b7cf0314f Mon Sep 17 00:00:00 2001 From: Rahul Verma <110929992+rahulverma012@users.noreply.github.com> Date: Mon, 12 Oct 2026 09:15:15 +0530 Subject: [PATCH 2/3] Update hParticleCorrelation.cxx --- .../Tasks/hParticleCorrelation.cxx | 2469 +++++------------ 1 file changed, 658 insertions(+), 1811 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx b/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx index fe1e9b042fa..7e166cada9f 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx @@ -118,204 +118,54 @@ DECLARE_SOA_TABLE(ResonanceCndts, "AOD", "RESONCNDTS", o2::soa::Index<>, //______________________________________________________________________________ // Derived correlation tables +//______________________________________________________________________________ namespace hpcorrcollision { -DECLARE_SOA_COLUMN(GlobalCollisionId, globalCollisionId, int64_t); -DECLARE_SOA_COLUMN(OriginalCollisionId, originalCollisionId, int64_t); -DECLARE_SOA_COLUMN(MixingEstimator, mixingEstimator, uint8_t); -DECLARE_SOA_COLUMN(MixingBin, mixingBin, int32_t); -DECLARE_SOA_COLUMN(CorrMask, corrMask, uint64_t); +DECLARE_SOA_COLUMN(Centrality, centrality, float); //! Value of the mixing estimator chosen in the same-event task +DECLARE_SOA_COLUMN(CorrMask, corrMask, uint64_t); //! Mixing pools this collision belongs to (CorrPresenceMask bits) } // namespace hpcorrcollision DECLARE_SOA_TABLE(HPCorrColls, "AOD", "HPCORRCOLL", o2::soa::Index<>, - hpcorrcollision::GlobalCollisionId, - hpcorrcollision::OriginalCollisionId, - o2::aod::origins::DataframeID, o2::aod::collision::PosZ, - o2::aod::cent::CentFT0C, - o2::aod::cent::CentFT0M, - o2::aod::cent::CentFT0A, - o2::aod::cent::CentFV0A, - hpcorrcollision::MixingEstimator, - hpcorrcollision::MixingBin, + hpcorrcollision::Centrality, hpcorrcollision::CorrMask); -//______________________________________________________________________________ -namespace hpcorrtrack +//______________________________________________________________________________ +// Trigger tracks +namespace hpcorrtrigger { -DECLARE_SOA_INDEX_COLUMN(HPCorrColl, hpCorrColl); // o2-linter: disable=name/o2-column (Keep HPCorrColl naming consistent with the existing derived collision table) - -DECLARE_SOA_COLUMN(GlobalColRefId, globalColRefId, int64_t); -DECLARE_SOA_COLUMN(OriginalColRefId, originalColRefId, int64_t); - -DECLARE_SOA_COLUMN(GlobalTrackId, globalTrackId, int64_t); -DECLARE_SOA_COLUMN(OriginalTrackId, originalTrackId, int64_t); - -// Kinematics +DECLARE_SOA_INDEX_COLUMN(HPCorrColl, hpCorrColl); // o2-linter: disable=name/o2-column (Keep the derived collision-table relation) DECLARE_SOA_COLUMN(Pt, pt, float); -DECLARE_SOA_COLUMN(P, p, float); -DECLARE_SOA_COLUMN(TpcInnerParam, tpcInnerParam, float); -DECLARE_SOA_COLUMN(TofExpMom, tofExpMom, float); DECLARE_SOA_COLUMN(Eta, eta, float); DECLARE_SOA_COLUMN(Phi, phi, float); -DECLARE_SOA_COLUMN(Sign, sign, int8_t); - -// Track quantities -DECLARE_SOA_COLUMN(DcaXY, dcaXY, float); -DECLARE_SOA_COLUMN(DcaZ, dcaZ, float); -DECLARE_SOA_COLUMN(TpcSignal, tpcSignal, float); - -// TOF information -DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool); -DECLARE_SOA_COLUMN(Beta, beta, float); - -// TPC PID -DECLARE_SOA_COLUMN(TpcNSigmaEl, tpcNSigmaEl, float); -DECLARE_SOA_COLUMN(TpcNSigmaMu, tpcNSigmaMu, float); -DECLARE_SOA_COLUMN(TpcNSigmaPi, tpcNSigmaPi, float); -DECLARE_SOA_COLUMN(TpcNSigmaKa, tpcNSigmaKa, float); -DECLARE_SOA_COLUMN(TpcNSigmaPr, tpcNSigmaPr, float); -DECLARE_SOA_COLUMN(TpcNSigmaDe, tpcNSigmaDe, float); - -// TOF PID -DECLARE_SOA_COLUMN(TofNSigmaEl, tofNSigmaEl, float); -DECLARE_SOA_COLUMN(TofNSigmaMu, tofNSigmaMu, float); -DECLARE_SOA_COLUMN(TofNSigmaPi, tofNSigmaPi, float); -DECLARE_SOA_COLUMN(TofNSigmaKa, tofNSigmaKa, float); -DECLARE_SOA_COLUMN(TofNSigmaPr, tofNSigmaPr, float); -DECLARE_SOA_COLUMN(TofNSigmaDe, tofNSigmaDe, float); - -} // namespace hpcorrtrack - -DECLARE_SOA_TABLE(HPCorrTracks, "AOD", "HPCORRTRACK", o2::soa::Index<>, - hpcorrtrack::HPCorrCollId, - - hpcorrtrack::GlobalColRefId, - hpcorrtrack::OriginalColRefId, - - hpcorrtrack::GlobalTrackId, - hpcorrtrack::OriginalTrackId, - - o2::aod::origins::DataframeID, - - hpcorrtrack::Pt, - hpcorrtrack::P, - hpcorrtrack::TpcInnerParam, - hpcorrtrack::TofExpMom, - hpcorrtrack::Eta, - hpcorrtrack::Phi, - hpcorrtrack::Sign, - - hpcorrtrack::DcaXY, - hpcorrtrack::DcaZ, - hpcorrtrack::TpcSignal, - - hpcorrtrack::HasTOF, - hpcorrtrack::Beta, - - hpcorrtrack::TpcNSigmaEl, - hpcorrtrack::TpcNSigmaMu, - hpcorrtrack::TpcNSigmaPi, - hpcorrtrack::TpcNSigmaKa, - hpcorrtrack::TpcNSigmaPr, - hpcorrtrack::TpcNSigmaDe, - - hpcorrtrack::TofNSigmaEl, - hpcorrtrack::TofNSigmaMu, - hpcorrtrack::TofNSigmaPi, - hpcorrtrack::TofNSigmaKa, - hpcorrtrack::TofNSigmaPr, - hpcorrtrack::TofNSigmaDe); +} // namespace hpcorrtrigger + +DECLARE_SOA_TABLE(HPCorrTriggers, "AOD", "HPCORRTRIG", o2::soa::Index<>, + hpcorrtrigger::HPCorrCollId, + hpcorrtrigger::Pt, + hpcorrtrigger::Eta, + hpcorrtrigger::Phi); //______________________________________________________________________________ -namespace hpcorrresonance +// Associated particles: tracks, identified hadrons and resonance candidates +namespace hpcorrassoc { -DECLARE_SOA_INDEX_COLUMN(HPCorrColl, hpCorrColl); // o2-linter: disable=name/o2-column (Keep HPCorrColl naming consistent with the existing derived collision table) -DECLARE_SOA_INDEX_COLUMN_FULL(PosTrack, posTrack, int, HPCorrTracks, "_Pos"); -DECLARE_SOA_INDEX_COLUMN_FULL(NegTrack, negTrack, int, HPCorrTracks, "_Neg"); - -// Collision references -DECLARE_SOA_COLUMN(GlobalColRefId, globalColRefId, int64_t); -DECLARE_SOA_COLUMN(OriginalColRefId, originalColRefId, int64_t); - -// Positive-daughter track references -DECLARE_SOA_COLUMN(GlobalPosTrackRefId, globalPosTrackRefId, int64_t); -DECLARE_SOA_COLUMN(OriginalPosTrackRefId, originalPosTrackRefId, int64_t); - -// Negative-daughter track references -DECLARE_SOA_COLUMN(GlobalNegTrackRefId, globalNegTrackRefId, int64_t); -DECLARE_SOA_COLUMN(OriginalNegTrackRefId, originalNegTrackRefId, int64_t); - -// Resonance references -DECLARE_SOA_COLUMN(GlobalResonanceId, globalResonanceId, int64_t); -DECLARE_SOA_COLUMN(OriginalResonanceId, originalResonanceId, int64_t); - -// Resonance kinematics +DECLARE_SOA_INDEX_COLUMN(HPCorrColl, hpCorrColl); // o2-linter: disable=name/o2-column (Keep the derived collision-table relation) DECLARE_SOA_COLUMN(Pt, pt, float); DECLARE_SOA_COLUMN(Eta, eta, float); DECLARE_SOA_COLUMN(Phi, phi, float); - -// Invariant masses -DECLARE_SOA_COLUMN(MPhi1020, mPhi1020, float); -DECLARE_SOA_COLUMN(MKStar892, mKStar892, float); -DECLARE_SOA_COLUMN(MKStar892Bar, mKStar892Bar, float); -DECLARE_SOA_COLUMN(MLambda1520, mLambda1520, float); -DECLARE_SOA_COLUMN(MLambda1520Bar, mLambda1520Bar, float); - -// Mass-region / resonance tags -DECLARE_SOA_COLUMN(Phi1020Tag, phi1020Tag, uint8_t); -DECLARE_SOA_COLUMN(KStar892Tag, kStar892Tag, uint8_t); -DECLARE_SOA_COLUMN(KStar892BarTag, kStar892BarTag, uint8_t); -DECLARE_SOA_COLUMN(Lambda1520Tag, lambda1520Tag, uint8_t); -DECLARE_SOA_COLUMN(Lambda1520BarTag, lambda1520BarTag, uint8_t); - -} // namespace hpcorrresonance - -DECLARE_SOA_TABLE(HPCorrResonances, "AOD", "HPCORRRESO", o2::soa::Index<>, - - // Derived-table relations - hpcorrresonance::HPCorrCollId, - hpcorrresonance::PosTrackId, - hpcorrresonance::NegTrackId, - - // Collision bookkeeping - hpcorrresonance::GlobalColRefId, - hpcorrresonance::OriginalColRefId, - - // Positive-track bookkeeping - hpcorrresonance::GlobalPosTrackRefId, - hpcorrresonance::OriginalPosTrackRefId, - - // Negative-track bookkeeping - hpcorrresonance::GlobalNegTrackRefId, - hpcorrresonance::OriginalNegTrackRefId, - - // Resonance bookkeeping - hpcorrresonance::GlobalResonanceId, - hpcorrresonance::OriginalResonanceId, - - // Source dataframe - o2::aod::origins::DataframeID, - - // Resonance kinematics - hpcorrresonance::Pt, - hpcorrresonance::Eta, - hpcorrresonance::Phi, - - // Invariant masses - hpcorrresonance::MPhi1020, - hpcorrresonance::MKStar892, - hpcorrresonance::MKStar892Bar, - hpcorrresonance::MLambda1520, - hpcorrresonance::MLambda1520Bar, - - // Resonance tags - hpcorrresonance::Phi1020Tag, - hpcorrresonance::KStar892Tag, - hpcorrresonance::KStar892BarTag, - hpcorrresonance::Lambda1520Tag, - hpcorrresonance::Lambda1520BarTag); +DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Tracks: +1 (h+, pi+, K+, p) / -1 (h-, pi-, K-, pbar). Resonances: 0 (species, incl. anti-K*0 / anti-Lambda(1520), is in UsedMask) +DECLARE_SOA_COLUMN(UsedMask, usedMask, uint64_t); //! CorrPresenceMask bits of every correlation this particle was used in: 0-7 tracks (h, pi, K, p x low/high pT), 18-47 resonances (species x pT x mass window) +} // namespace hpcorrassoc + +DECLARE_SOA_TABLE(HPCorrAssocs, "AOD", "HPCORRASSOC", o2::soa::Index<>, + hpcorrassoc::HPCorrCollId, + hpcorrassoc::Pt, + hpcorrassoc::Eta, + hpcorrassoc::Phi, + hpcorrassoc::Sign, + hpcorrassoc::UsedMask); } // namespace o2::aod // Delta phi in [-pi/2, 3pi/2) @@ -483,12 +333,14 @@ enum TrackRejectionTag { enum QAStageEnum { kBeforeSelection = 0, + kAfterSelFunction, kAfterSelection, kNQAStages }; static constexpr std::array QAStageDire = { "BeforeSelection/", + "AfterSelFunction/", "AfterSelection/"}; enum EventQABin { @@ -791,6 +643,9 @@ constexpr uint64_t getResoRegionMaskBit(int resoType, int ptType, int massRegion return 1ULL << (18 + resoType * 6 + ptType * 3 + (massRegion - kMassPeak)); } +// Bits 18-47 (kMaskHPhiLowPtPeak ... kMaskHLambdaBarHighPtRSB): resonance (species x pT x mass-window) pools +static constexpr uint64_t MaskResoRegions = static_cast(kMaskAll) & ~((1ULL << 18) - 1ULL); + static constexpr std::array, kNPid> DefaultPIDcheckValues = {{ {0.7, 0, 3.0, 3.0, 9.0, 0, 3.0, 3.0, 9.0, 0, 1, 0, 1}, // Pi {0.5, 0, 3.0, 3.0, 9.0, 0, 3.0, 3.0, 9.0, 0, 1, 0, 1}, // Ka @@ -1492,8 +1347,8 @@ struct HParticleCorrelation1ResonanceProducer { struct HParticleCorrelation2SameEvent { Produces derivedCollisions; - Produces derivedTracks; - Produces derivedResonances; + Produces derivedTriggers; + Produces derivedAssocs; // Hisogram redistry: HistogramRegistry seEventQA{"seEventQA", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; @@ -1677,52 +1532,53 @@ struct HParticleCorrelation2SameEvent { ConfigurableAxis c1108axisCorrSparseAssocPt{"c1108axisCorrSparseAssocPt", {8, 0.0f, 4.0f}, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; ConfigurableAxis c1109axisCorrSparseDeltaPhi{"c1109axisCorrSparseDeltaPhi", {32, -2.0f, 6.0f}, "#Delta#varphi"}; ConfigurableAxis c1110axisCorrSparseDeltaEta{"c1110axisCorrSparseDeltaEta", {24, -2.1f, 2.1f}, "#Delta#eta"}; + ConfigurableAxis c1111axisCorrCentrality{"c1111axisCorrCentrality", {VARIABLE_WIDTH, 0.0, 1.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 70.0, 100.0}, "Centrality (%) axis of the correlation histograms (estimator chosen by c1138mixingEstimator); keep equal to c2008"}; } cfgAxis; - Configurable c1111fillDauQAOnce{"c1111fillDauQAOnce", false, "Fill each resonance daughter in QA only once per event"}; - Configurable c1112rejectResoWithAnyTriggerDaughter{"c1112rejectResoWithAnyTriggerDaughter", false, "Reject resonance if either daughter belongs to the event trigger population"}; - Configurable c1113requireSelectedTriggerForInvariantMass{"c1113requireSelectedTriggerForInvariantMass", true, "Require at least one selected trigger track before filling resonance invariant-mass spectra"}; + Configurable c1112fillDauQAOnce{"c1112fillDauQAOnce", false, "Fill each resonance daughter in QA only once per event"}; + Configurable c1113rejectResoWithAnyTriggerDaughter{"c1113rejectResoWithAnyTriggerDaughter", false, "Reject resonance if either daughter belongs to the event trigger population"}; + Configurable c1114requireSelectedTriggerForInvariantMass{"c1114requireSelectedTriggerForInvariantMass", true, "Require at least one selected trigger track before filling resonance invariant-mass spectra"}; struct : ConfigurableGroup { - Configurable c1114phi1020PeakLow{"c1114phi1020PeakLow", 1.013f, "Phi(1020) peak lower mass"}; - Configurable c1115phi1020PeakUp{"c1115phi1020PeakUp", 1.026f, "Phi(1020) peak upper mass"}; - Configurable c1116phi1020LSBLow{"c1116phi1020LSBLow", 0.995f, "Phi(1020) LSB lower mass"}; - Configurable c1117phi1020LSBUp{"c1117phi1020LSBUp", 1.005f, "Phi(1020) LSB upper mass"}; - Configurable c1118phi1020RSBLow{"c1118phi1020RSBLow", 1.040f, "Phi(1020) RSB lower mass"}; - Configurable c1119phi1020RSBUp{"c1119phi1020RSBUp", 1.060f, "Phi(1020) RSB upper mass"}; + Configurable c1115phi1020PeakLow{"c1115phi1020PeakLow", 1.013f, "Phi(1020) peak lower mass"}; + Configurable c1116phi1020PeakUp{"c1116phi1020PeakUp", 1.026f, "Phi(1020) peak upper mass"}; + Configurable c1117phi1020LSBLow{"c1117phi1020LSBLow", 0.995f, "Phi(1020) LSB lower mass"}; + Configurable c1118phi1020LSBUp{"c1118phi1020LSBUp", 1.005f, "Phi(1020) LSB upper mass"}; + Configurable c1119phi1020RSBLow{"c1119phi1020RSBLow", 1.040f, "Phi(1020) RSB lower mass"}; + Configurable c1120phi1020RSBUp{"c1120phi1020RSBUp", 1.060f, "Phi(1020) RSB upper mass"}; } cfgPhi1020CorrMass; struct : ConfigurableGroup { - Configurable c1120kStar892PeakLow{"c1120kStar892PeakLow", 0.846f, "K*(892)0 correlation peak lower mass"}; - Configurable c1121kStar892PeakUp{"c1121kStar892PeakUp", 0.946f, "K*(892)0 correlation peak upper mass"}; - Configurable c1122kStar892LSBLow{"c1122kStar892LSBLow", 0.700f, "K*(892)0 correlation LSB lower mass"}; - Configurable c1123kStar892LSBUp{"c1123kStar892LSBUp", 0.780f, "K*(892)0 correlation LSB upper mass"}; - Configurable c1124kStar892RSBLow{"c1124kStar892RSBLow", 1.010f, "K*(892)0 correlation RSB lower mass"}; - Configurable c1125kStar892RSBUp{"c1125kStar892RSBUp", 1.090f, "K*(892)0 correlation RSB upper mass"}; + Configurable c1121kStar892PeakLow{"c1121kStar892PeakLow", 0.846f, "K*(892)0 correlation peak lower mass"}; + Configurable c1122kStar892PeakUp{"c1122kStar892PeakUp", 0.946f, "K*(892)0 correlation peak upper mass"}; + Configurable c1123kStar892LSBLow{"c1123kStar892LSBLow", 0.700f, "K*(892)0 correlation LSB lower mass"}; + Configurable c1124kStar892LSBUp{"c1124kStar892LSBUp", 0.780f, "K*(892)0 correlation LSB upper mass"}; + Configurable c1125kStar892RSBLow{"c1125kStar892RSBLow", 1.010f, "K*(892)0 correlation RSB lower mass"}; + Configurable c1126kStar892RSBUp{"c1126kStar892RSBUp", 1.090f, "K*(892)0 correlation RSB upper mass"}; } cfgKStar892CorrMass; struct : ConfigurableGroup { - Configurable c1126lambda1520PeakLow{"c1126lambda1520PeakLow", 1.500f, "Lambda(1520) correlation peak lower mass"}; - Configurable c1127lambda1520PeakUp{"c1127lambda1520PeakUp", 1.540f, "Lambda(1520) correlation peak upper mass"}; - Configurable c1128lambda1520LSBLow{"c1128lambda1520LSBLow", 1.440f, "Lambda(1520) correlation LSB lower mass"}; - Configurable c1129lambda1520LSBUp{"c1129lambda1520LSBUp", 1.480f, "Lambda(1520) correlation LSB upper mass"}; - Configurable c1130lambda1520RSBLow{"c1130lambda1520RSBLow", 1.560f, "Lambda(1520) correlation RSB lower mass"}; - Configurable c1131lambda1520RSBUp{"c1131lambda1520RSBUp", 1.600f, "Lambda(1520) correlation RSB upper mass"}; + Configurable c1127lambda1520PeakLow{"c1127lambda1520PeakLow", 1.500f, "Lambda(1520) correlation peak lower mass"}; + Configurable c1128lambda1520PeakUp{"c1128lambda1520PeakUp", 1.540f, "Lambda(1520) correlation peak upper mass"}; + Configurable c1129lambda1520LSBLow{"c1129lambda1520LSBLow", 1.440f, "Lambda(1520) correlation LSB lower mass"}; + Configurable c1130lambda1520LSBUp{"c1130lambda1520LSBUp", 1.480f, "Lambda(1520) correlation LSB upper mass"}; + Configurable c1131lambda1520RSBLow{"c1131lambda1520RSBLow", 1.560f, "Lambda(1520) correlation RSB lower mass"}; + Configurable c1132lambda1520RSBUp{"c1132lambda1520RSBUp", 1.600f, "Lambda(1520) correlation RSB upper mass"}; } cfgLambda1520CorrMass; struct : ConfigurableGroup { - Configurable c1132pairMask{"c1132pairMask", 0ULL, "Correlation mask to store; 0 = any non-zero correlation"}; - Configurable c1133mixingBin{"c1133mixingBin", -1, "Mixing bin to store; -1 = all valid mixing bins"}; - Configurable c1134requireAllPairBits{"c1134requireAllPairBits", false, "Require all requested pair-mask bits instead of any requested bit"}; - Configurable c1135resetGlobalCountersPerDF{"c1135resetGlobalCountersPerDF", false, "Reset derived-data global counters at the beginning of every dataframe"}; + Configurable c1133pairMask{"c1133pairMask", 0ULL, "Correlation mask to store; 0 = any non-zero correlation"}; + Configurable c1134mixingBin{"c1134mixingBin", -1, "Mixing bin to store; -1 = all valid mixing bins"}; + Configurable c1135requireAllPairBits{"c1135requireAllPairBits", false, "Require all requested pair-mask bits instead of any requested bit"}; + Configurable c1136resetGlobalCountersPerDF{"c1136resetGlobalCountersPerDF", false, "Reset derived-data global counters at the beginning of every dataframe"}; } cfgDerivedData; struct : ConfigurableGroup { - Configurable c1136nEvtMixing{"c1136nEvtMixing", 5, "Number of events to mix"}; - Configurable c1137mixingEstimator{"c1137mixingEstimator", kMixCentFT0C, "Mixing estimator: 0=FT0C, 1=FT0M, 2=FT0A, 3=FV0A"}; - ConfigurableAxis c1138axisVtxMixing{"c1138axisVtxMixing", {VARIABLE_WIDTH, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0}, "Mixing bins - z vertex"}; - ConfigurableAxis c1139axisCentMixing{"c1139axisCentMixing", {VARIABLE_WIDTH, -1.0, 20.0, 50.0, 80.0, 101.0}, "Mixing bins - centrality"}; - ConfigurableAxis c1140axisMixingOccupancy{"c1140axisMixingOccupancy", {101, -0.5, 100.5}, "Number of collisions in mixing pool"}; + Configurable c1137nEvtMixing{"c1137nEvtMixing", 5, "Number of events to mix"}; + Configurable c1138mixingEstimator{"c1138mixingEstimator", kMixCentFT0C, "Mixing estimator: 0=FT0C, 1=FT0M, 2=FT0A, 3=FV0A"}; + ConfigurableAxis c1139axisVtxMixing{"c1139axisVtxMixing", {VARIABLE_WIDTH, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0}, "Mixing bins - z vertex"}; + ConfigurableAxis c1140axisCentMixing{"c1140axisCentMixing", {VARIABLE_WIDTH, -1.0, 20.0, 50.0, 80.0, 101.0}, "Mixing bins - centrality"}; + ConfigurableAxis c1141axisMixingOccupancy{"c1141axisMixingOccupancy", {101, -0.5, 100.5}, "Number of collisions in mixing pool"}; } cfgMixing; using BinningTypeVtxZFT0C = ColumnBinningPolicy; @@ -1730,17 +1586,17 @@ struct HParticleCorrelation2SameEvent { using BinningTypeVtxZFT0A = ColumnBinningPolicy; using BinningTypeVtxZFV0A = ColumnBinningPolicy; - BinningTypeVtxZFT0C colBinningFT0C{{cfgMixing.c1138axisVtxMixing, cfgMixing.c1139axisCentMixing}}; - BinningTypeVtxZFT0M colBinningFT0M{{cfgMixing.c1138axisVtxMixing, cfgMixing.c1139axisCentMixing}}; - BinningTypeVtxZFT0A colBinningFT0A{{cfgMixing.c1138axisVtxMixing, cfgMixing.c1139axisCentMixing}}; - BinningTypeVtxZFV0A colBinningFV0A{{cfgMixing.c1138axisVtxMixing, cfgMixing.c1139axisCentMixing}}; + BinningTypeVtxZFT0C colBinningFT0C{{cfgMixing.c1139axisVtxMixing, cfgMixing.c1140axisCentMixing}, true}; + BinningTypeVtxZFT0M colBinningFT0M{{cfgMixing.c1139axisVtxMixing, cfgMixing.c1140axisCentMixing}, true}; + BinningTypeVtxZFT0A colBinningFT0A{{cfgMixing.c1139axisVtxMixing, cfgMixing.c1140axisCentMixing}, true}; + BinningTypeVtxZFV0A colBinningFV0A{{cfgMixing.c1139axisVtxMixing, cfgMixing.c1140axisCentMixing}, true}; int nMixBins = 0; template int getMixingBin(const C& collision) { - switch (cfgMixing.c1137mixingEstimator) { + switch (cfgMixing.c1138mixingEstimator) { case kMixCentFT0C: return colBinningFT0C.getBin({collision.posZ(), collision.centFT0C()}); case kMixCentFT0M: @@ -1757,7 +1613,7 @@ struct HParticleCorrelation2SameEvent { template float getMixingEstimatorValue(const C& collision) { - switch (cfgMixing.c1137mixingEstimator) { + switch (cfgMixing.c1138mixingEstimator) { case kMixCentFT0C: return collision.centFT0C(); case kMixCentFT0M: @@ -1772,9 +1628,9 @@ struct HParticleCorrelation2SameEvent { } struct : ConfigurableGroup { - Configurable> c1141pidConfigSetting{"c1141pidConfigSetting", {DefaultPIDcheckValues[0].data(), kNPid, kNCutSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"ThrPforTOF", "IdCutTypeLowP", "NSigmaTPCLowP", "NSigmaTOFLowP", "NSigmaRadLowP", "IdCutTypeHighP", "NSigmaTPCHighP", "NSigmaTOFHighP", "NSigmaRadHighP", "doVetoOthers", "doRelativeTPCCheck", "doRelativeTOFcheck", "doRelativeTPCTOFcheck"}}, "Cut values for particle identification"}; - Configurable> c1142pidVetoSetting{"c1142pidVetoSetting", {DefaultPidVetoValues[0].data(), kNPid, kNVetoSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"doVetoTPC", "doVetoTOF", "vetoTPC", "vetoTOF"}}, "Veto cuts for particle identification"}; - Configurable c1143cfgId07CheckTofBeta{"c1143cfgId07CheckTofBeta", false, "Require beta > 0 for reliable TOF"}; + Configurable> c1142pidConfigSetting{"c1142pidConfigSetting", {DefaultPIDcheckValues[0].data(), kNPid, kNCutSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"ThrPforTOF", "IdCutTypeLowP", "NSigmaTPCLowP", "NSigmaTOFLowP", "NSigmaRadLowP", "IdCutTypeHighP", "NSigmaTPCHighP", "NSigmaTOFHighP", "NSigmaRadHighP", "doVetoOthers", "doRelativeTPCCheck", "doRelativeTOFcheck", "doRelativeTPCTOFcheck"}}, "Cut values for particle identification"}; + Configurable> c1143pidVetoSetting{"c1143pidVetoSetting", {DefaultPidVetoValues[0].data(), kNPid, kNVetoSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"doVetoTPC", "doVetoTOF", "vetoTPC", "vetoTOF"}}, "Veto cuts for particle identification"}; + Configurable c1144cfgId07CheckTofBeta{"c1144cfgId07CheckTofBeta", false, "Require beta > 0 for reliable TOF"}; } cfgIdCut; void init(InitContext const&) @@ -1782,6 +1638,10 @@ struct HParticleCorrelation2SameEvent { if (cfgDebug.c1001printDebugMessages) { LOGF(info, "Starting init"); } + + if ((static_cast(cfgDerivedData.c1133pairMask) & ~(0xFFULL | MaskResoRegions)) != 0ULL) { + LOG(fatal) << "c1133pairMask = " << static_cast(cfgDerivedData.c1133pairMask) << " contains bits that are not mixing pools; allowed are bits 0-7 (h-h, h-pi, h-K, h-p) and 18-47 (resonance Peak/LSB/RSB)"; + } // Axes AxisSpec axisVertexZ = {30, -15., 15., "vrtx_{Z} [cm]"}; AxisSpec axisCentFT0C = {1200, -10.0, 110.0, "centFT0C(percentile)"}; @@ -1822,16 +1682,24 @@ struct HParticleCorrelation2SameEvent { AxisSpec axisCorrSparseAssocPt{cfgAxis.c1108axisCorrSparseAssocPt, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; AxisSpec axisCorrSparseDeltaPhi{cfgAxis.c1109axisCorrSparseDeltaPhi, "#Delta#varphi"}; AxisSpec axisCorrSparseDeltaEta{cfgAxis.c1110axisCorrSparseDeltaEta, "#Delta#eta"}; + AxisSpec axisCorrCentrality{cfgAxis.c1111axisCorrCentrality, "Centrality (%)"}; const AxisSpec axisPhi1020Mass = {300, 0.98f, 1.08f, "m_{K^{+}K^{-}} (GeV/#it{c}^{2})"}; const AxisSpec axisKStar892Mass = {300, 0.65f, 1.15f, "m_{K#pi} (GeV/#it{c}^{2})"}; const AxisSpec axisLambda1520Mass = {300, 1.40f, 1.65f, "m_{pK} (GeV/#it{c}^{2})"}; const AxisSpec axisResoMassCent = {102, -1.0f, 101.0f, "Centrality (%)"}; - AxisSpec axisVtxMixSpec{cfgMixing.c1138axisVtxMixing, "z_{vtx} (cm)"}; - AxisSpec axisCentMixSpec{cfgMixing.c1139axisCentMixing, "Centrality (%)"}; - AxisSpec axisPoolOccupancy{cfgMixing.c1140axisMixingOccupancy, "N eligible collisions"}; + AxisSpec axisVtxMixSpec{cfgMixing.c1139axisVtxMixing, "z_{vtx} (cm)"}; + AxisSpec axisCentMixSpec{cfgMixing.c1140axisCentMixing, "Centrality (%)"}; + AxisSpec axisPoolOccupancy{cfgMixing.c1141axisMixingOccupancy, "N eligible collisions"}; nMixBins = axisVtxMixSpec.getNbins() * axisCentMixSpec.getNbins(); + + // Re-build the binnings now that the configurables are set (as data members they hold the default axes) + colBinningFT0C = BinningTypeVtxZFT0C{{cfgMixing.c1139axisVtxMixing, cfgMixing.c1140axisCentMixing}, true}; + colBinningFT0M = BinningTypeVtxZFT0M{{cfgMixing.c1139axisVtxMixing, cfgMixing.c1140axisCentMixing}, true}; + colBinningFT0A = BinningTypeVtxZFT0A{{cfgMixing.c1139axisVtxMixing, cfgMixing.c1140axisCentMixing}, true}; + colBinningFV0A = BinningTypeVtxZFV0A{{cfgMixing.c1139axisVtxMixing, cfgMixing.c1140axisCentMixing}, true}; + const AxisSpec axisMixBin{nMixBins, -0.5, static_cast(nMixBins) - 0.5, "Mixing bin"}; const AxisSpec axisCorrChannel{NCorrCountChannels, -0.5, static_cast(NCorrCountChannels) - 0.5, "Correlation channel"}; const AxisSpec axisReadyBins{nMixBins + 1, -0.5, static_cast(nMixBins) + 0.5, "N ready mixing bins"}; @@ -1870,6 +1738,7 @@ struct HParticleCorrelation2SameEvent { }; addEventQAHistos(seEventQA, "SE/Events/BeforeSelection/"); + seEventQA.addClone("SE/Events/BeforeSelection/", "SE/Events/AfterSelFunction/"); seEventQA.addClone("SE/Events/BeforeSelection/", "SE/Events/AfterSelection/"); auto hMixStatusBefore = seEventQA.get(HIST("SE/Events/BeforeSelection/MixingBinStatus")); @@ -2007,13 +1876,13 @@ struct HParticleCorrelation2SameEvent { auto addCorrHistos = [&](auto& histReg, const std::string& basePath) { histReg.add((basePath + "DeltaPhi").c_str(), "Trigger-associate;#Delta#varphi;Pairs", HistType::kTH1F, {axisDeltaPhiSpec}); histReg.add((basePath + "DeltaEta").c_str(), "Trigger-associate;#Delta#eta;Pairs", HistType::kTH1F, {axisDeltaEtaSpec}); - histReg.add((basePath + "DeltaPhiDeltaEta").c_str(), "Trigger-associate;#Delta#varphi;#Delta#eta", HistType::kTH2F, {axisDeltaPhiSpec, axisDeltaEtaSpec}); - histReg.add((basePath + "CorrSparse").c_str(), "Correlation sparse;p_{T}^{trig};p_{T}^{assoc};#Delta#varphi;#Delta#eta", HistType::kTHnSparseF, {axisCorrSparseTriggerPt, axisCorrSparseAssocPt, axisCorrSparseDeltaPhi, axisCorrSparseDeltaEta}); + histReg.add((basePath + "DeltaPhiDeltaEta").c_str(), "Trigger-associate;#Delta#varphi;#Delta#eta;Centrality (%)", HistType::kTH3F, {axisDeltaPhiSpec, axisDeltaEtaSpec, axisCorrCentrality}); + histReg.add((basePath + "CorrSparse").c_str(), "Correlation sparse;p_{T}^{trig};p_{T}^{assoc};#Delta#varphi;#Delta#eta;Centrality (%)", HistType::kTHnSparseF, {axisCorrSparseTriggerPt, axisCorrSparseAssocPt, axisCorrSparseDeltaPhi, axisCorrSparseDeltaEta, axisCorrCentrality}); }; auto addResoMassCorrHistos = [&](auto& histReg, const std::string& basePath, const AxisSpec& massAxis) { - histReg.add((basePath + "DeltaPhiVsInvMass").c_str(), "#Delta#varphi vs invariant mass;Invariant mass (GeV/c^{2});#Delta#varphi", HistType::kTH2F, {massAxis, axisDeltaPhiSpec}); - histReg.add((basePath + "DeltaEtaVsInvMass").c_str(), "#Delta#eta vs invariant mass;Invariant mass (GeV/c^{2});#Delta#eta", HistType::kTH2F, {massAxis, axisDeltaEtaSpec}); + histReg.add((basePath + "DeltaPhiVsInvMass").c_str(), "#Delta#varphi vs invariant mass;Invariant mass (GeV/c^{2});#Delta#varphi;Centrality (%)", HistType::kTH3F, {massAxis, axisDeltaPhiSpec, axisCorrCentrality}); + histReg.add((basePath + "DeltaEtaVsInvMass").c_str(), "#Delta#eta vs invariant mass;Invariant mass (GeV/c^{2});#Delta#eta;Centrality (%)", HistType::kTH3F, {massAxis, axisDeltaEtaSpec, axisCorrCentrality}); }; auto addResoAssocQAHistos = [&](auto& histReg, const std::string& basePath, const AxisSpec& massAxis, const std::string& massHistTitle) { @@ -2123,6 +1992,12 @@ struct HParticleCorrelation2SameEvent { setCorrChannelLabels(mixingQA.get(HIST("Mixing/PerDF/ReadyPoolMap"))->GetYaxis()); setCorrChannelLabels(mixingQA.get(HIST("Mixing/PerDF/NReadyMixBins"))->GetXaxis()); + mixingQA.add("DerivedData/RowsWritten", "Rows written to the derived tables;Table;Rows", HistType::kTH1D, {{4, -0.5, 3.5}}); + mixingQA.get(HIST("DerivedData/RowsWritten"))->GetXaxis()->SetBinLabel(1, "Collisions"); + mixingQA.get(HIST("DerivedData/RowsWritten"))->GetXaxis()->SetBinLabel(2, "Triggers"); + mixingQA.get(HIST("DerivedData/RowsWritten"))->GetXaxis()->SetBinLabel(3, "TrackAssocs"); + mixingQA.get(HIST("DerivedData/RowsWritten"))->GetXaxis()->SetBinLabel(4, "ResoAssocs"); + if (cfgDebug.c1001printDebugMessages) { LOGF(info, "Finishing init"); } @@ -2141,20 +2016,20 @@ struct HParticleCorrelation2SameEvent { { // Static is only run once, ever. static const std::array doVetoTPC = { - getCfg(cfgIdCut.c1142pidVetoSetting, kPi, kDoVetoTPC), - getCfg(cfgIdCut.c1142pidVetoSetting, kKa, kDoVetoTPC), - getCfg(cfgIdCut.c1142pidVetoSetting, kPr, kDoVetoTPC), - getCfg(cfgIdCut.c1142pidVetoSetting, kEl, kDoVetoTPC), - getCfg(cfgIdCut.c1142pidVetoSetting, kMu, kDoVetoTPC), - getCfg(cfgIdCut.c1142pidVetoSetting, kDe, kDoVetoTPC)}; + getCfg(cfgIdCut.c1143pidVetoSetting, kPi, kDoVetoTPC), + getCfg(cfgIdCut.c1143pidVetoSetting, kKa, kDoVetoTPC), + getCfg(cfgIdCut.c1143pidVetoSetting, kPr, kDoVetoTPC), + getCfg(cfgIdCut.c1143pidVetoSetting, kEl, kDoVetoTPC), + getCfg(cfgIdCut.c1143pidVetoSetting, kMu, kDoVetoTPC), + getCfg(cfgIdCut.c1143pidVetoSetting, kDe, kDoVetoTPC)}; static const std::array vetoTPC = { - getCfg(cfgIdCut.c1142pidVetoSetting, kPi, kVetoTPC), - getCfg(cfgIdCut.c1142pidVetoSetting, kKa, kVetoTPC), - getCfg(cfgIdCut.c1142pidVetoSetting, kPr, kVetoTPC), - getCfg(cfgIdCut.c1142pidVetoSetting, kEl, kVetoTPC), - getCfg(cfgIdCut.c1142pidVetoSetting, kMu, kVetoTPC), - getCfg(cfgIdCut.c1142pidVetoSetting, kDe, kVetoTPC)}; + getCfg(cfgIdCut.c1143pidVetoSetting, kPi, kVetoTPC), + getCfg(cfgIdCut.c1143pidVetoSetting, kKa, kVetoTPC), + getCfg(cfgIdCut.c1143pidVetoSetting, kPr, kVetoTPC), + getCfg(cfgIdCut.c1143pidVetoSetting, kEl, kVetoTPC), + getCfg(cfgIdCut.c1143pidVetoSetting, kMu, kVetoTPC), + getCfg(cfgIdCut.c1143pidVetoSetting, kDe, kVetoTPC)}; return applyVetoOthersTPC(track, doVetoTPC, vetoTPC); } @@ -2164,20 +2039,20 @@ struct HParticleCorrelation2SameEvent { { // Only computed once static const std::array doVetoTOF = { - getCfg(cfgIdCut.c1142pidVetoSetting, kPi, kDoVetoTOF), - getCfg(cfgIdCut.c1142pidVetoSetting, kKa, kDoVetoTOF), - getCfg(cfgIdCut.c1142pidVetoSetting, kPr, kDoVetoTOF), - getCfg(cfgIdCut.c1142pidVetoSetting, kEl, kDoVetoTOF), - getCfg(cfgIdCut.c1142pidVetoSetting, kMu, kDoVetoTOF), - getCfg(cfgIdCut.c1142pidVetoSetting, kDe, kDoVetoTOF)}; + getCfg(cfgIdCut.c1143pidVetoSetting, kPi, kDoVetoTOF), + getCfg(cfgIdCut.c1143pidVetoSetting, kKa, kDoVetoTOF), + getCfg(cfgIdCut.c1143pidVetoSetting, kPr, kDoVetoTOF), + getCfg(cfgIdCut.c1143pidVetoSetting, kEl, kDoVetoTOF), + getCfg(cfgIdCut.c1143pidVetoSetting, kMu, kDoVetoTOF), + getCfg(cfgIdCut.c1143pidVetoSetting, kDe, kDoVetoTOF)}; static const std::array vetoTOF = { - getCfg(cfgIdCut.c1142pidVetoSetting, kPi, kVetoTOF), - getCfg(cfgIdCut.c1142pidVetoSetting, kKa, kVetoTOF), - getCfg(cfgIdCut.c1142pidVetoSetting, kPr, kVetoTOF), - getCfg(cfgIdCut.c1142pidVetoSetting, kEl, kVetoTOF), - getCfg(cfgIdCut.c1142pidVetoSetting, kMu, kVetoTOF), - getCfg(cfgIdCut.c1142pidVetoSetting, kDe, kVetoTOF)}; + getCfg(cfgIdCut.c1143pidVetoSetting, kPi, kVetoTOF), + getCfg(cfgIdCut.c1143pidVetoSetting, kKa, kVetoTOF), + getCfg(cfgIdCut.c1143pidVetoSetting, kPr, kVetoTOF), + getCfg(cfgIdCut.c1143pidVetoSetting, kEl, kVetoTOF), + getCfg(cfgIdCut.c1143pidVetoSetting, kMu, kVetoTOF), + getCfg(cfgIdCut.c1143pidVetoSetting, kDe, kVetoTOF)}; return applyVetoOthersTOF(track, doVetoTOF, vetoTOF); } @@ -2194,7 +2069,7 @@ struct HParticleCorrelation2SameEvent { inline bool checkReliableTOF(const T& track) { // which check makes the information of TOF relaiable? should track.beta() be checked? e.g.: - if (cfgIdCut.c1143cfgId07CheckTofBeta) { + if (cfgIdCut.c1144cfgId07CheckTofBeta) { return (track.hasTOF() && track.beta() > 0.0f); } return track.hasTOF(); @@ -2219,7 +2094,7 @@ struct HParticleCorrelation2SameEvent { nSigmaIdDistSq = 1000000; } - static const bool doVetoOthers = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kDoVetoOthers); + static const bool doVetoOthers = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kDoVetoOthers); if (doVetoOthers) { if (!vetoIdOthersTPC(track)) { // If vetoIdOthers = true; it passed all veto checks @@ -2228,7 +2103,7 @@ struct HParticleCorrelation2SameEvent { } } - static const bool doRelativeTPCcheck = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kDoRelativeTPCcheck); + static const bool doRelativeTPCcheck = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kDoRelativeTPCcheck); if (doRelativeTPCcheck) { if (!relativeIdOthersTPC(track)) { // If relativeIdOthersTPC = true; particle has stronger nSigma compared to others @@ -2272,7 +2147,7 @@ struct HParticleCorrelation2SameEvent { } else { nSigmaIdDistSq = 1000000; } - static const bool doVetoOthers = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kDoVetoOthers); + static const bool doVetoOthers = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kDoVetoOthers); if (doVetoOthers) { if (!vetoIdOthersTPCTOF(track)) { // If vetoIdOthers = true; it passed all veto checks @@ -2281,7 +2156,7 @@ struct HParticleCorrelation2SameEvent { } } - static const bool doRelativeTOFcheck = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kDoRelativeTOFcheck); + static const bool doRelativeTOFcheck = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kDoRelativeTOFcheck); if (doRelativeTOFcheck) { if (!relativeIdOthersTOF(track)) { // If relativeIdOthersTOF = true; particle has stronger nSigma compared to others @@ -2290,7 +2165,7 @@ struct HParticleCorrelation2SameEvent { } } - static const bool doRelativeTPCTOFcheck = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kDoRelativeTPCTOFcheck); + static const bool doRelativeTPCTOFcheck = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kDoRelativeTPCTOFcheck); if (doRelativeTPCTOFcheck) { if (!relativeIdOthersTPCTOF(track)) { // If relativeIdOthersTPCTOF = true; particle has stronger nSigma compared to others @@ -2315,15 +2190,15 @@ struct HParticleCorrelation2SameEvent { bool selPdependent(const T& track, int& IdMethod, float& nSigmaIdDistSq) { // Static cache inside function - initialized once on first call - static const auto thrPforTOF = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kThrPforTOF); - static const auto idCutTypeLowP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kIdCutTypeLowP); - static const auto nSigmaTPCLowP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaTPCLowP); - static const auto nSigmaTOFLowP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaTOFLowP); - static const auto nSigmaRadLowP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaRadLowP); - static const auto idCutTypeHighP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kIdCutTypeHighP); - static const auto nSigmaTPCHighP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaTPCHighP); - static const auto nSigmaTOFHighP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaTOFHighP); - static const auto nSigmaRadHighP = getCfg(cfgIdCut.c1141pidConfigSetting, pidMode, kNSigmaRadHighP); + static const auto thrPforTOF = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kThrPforTOF); + static const auto idCutTypeLowP = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kIdCutTypeLowP); + static const auto nSigmaTPCLowP = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kNSigmaTPCLowP); + static const auto nSigmaTOFLowP = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kNSigmaTOFLowP); + static const auto nSigmaRadLowP = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kNSigmaRadLowP); + static const auto idCutTypeHighP = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kIdCutTypeHighP); + static const auto nSigmaTPCHighP = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kNSigmaTPCHighP); + static const auto nSigmaTOFHighP = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kNSigmaTOFHighP); + static const auto nSigmaRadHighP = getCfg(cfgIdCut.c1142pidConfigSetting, pidMode, kNSigmaRadHighP); if (track.p() < thrPforTOF) { if (checkReliableTOF(track)) { @@ -2525,6 +2400,23 @@ struct HParticleCorrelation2SameEvent { template TrackRejectionTag selectionTrack(T const& track) { + + // Filter cuts again: resonance daughters are reached through an index into the full track table, + // which does not re-apply the Filter (the resonance producer uses looser cuts). + if (track.pt() <= cfgTrackCuts.c1043ptMin || track.pt() >= cfgTrackCuts.c1044ptMax) { + return kTrackRejectPt; + } + if (std::abs(track.eta()) >= cfgTrackCuts.c1045etaMax) { + return kTrackRejectEta; + } + if (cfgTrackCuts.c1065useFixedDCAxy && std::abs(track.dcaXY()) >= cfgTrackCuts.c1066dcaXYMax) { + return kTrackRejectFixedDCAxy; + } + if (cfgTrackCuts.c1067useFixedDCAz && std::abs(track.dcaZ()) >= cfgTrackCuts.c1068dcaZMax) { + return kTrackRejectFixedDCAz; + } + // Filter cuts are over + // Standard O2 flags if (cfgTrackCuts.c1046requireGlobalTrack && !track.isGlobalTrack()) { return kTrackRejectGlobalTrack; @@ -2786,8 +2678,8 @@ struct HParticleCorrelation2SameEvent { histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DeltaPhi"), dPhi); histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DeltaEta"), dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta); + histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta, currentCentrality); + histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta, currentCentrality); } //______________________________________________________________________________ @@ -2863,8 +2755,8 @@ struct HParticleCorrelation2SameEvent { histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DeltaPhi"), dPhi); histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DeltaEta"), dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta); + histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta, currentCentrality); + histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta, currentCentrality); } //______________________________________________________________________________ @@ -2877,8 +2769,8 @@ struct HParticleCorrelation2SameEvent { histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("DeltaPhi"), dPhi); histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("DeltaEta"), dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta); + histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta, currentCentrality); + histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta, currentCentrality); } // Resonance correlation as a function of invariant mass @@ -2888,8 +2780,8 @@ struct HParticleCorrelation2SameEvent { const float dPhi = computeDeltaPhi(associate.phi(), trigger.phi()); const float dEta = associate.eta() - trigger.eta(); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST("MassDependent/") + HIST("DeltaPhiVsInvMass"), invMass, dPhi); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST("MassDependent/") + HIST("DeltaEtaVsInvMass"), invMass, dEta); + histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST("MassDependent/") + HIST("DeltaPhiVsInvMass"), invMass, dPhi, currentCentrality); + histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST("MassDependent/") + HIST("DeltaEtaVsInvMass"), invMass, dEta, currentCentrality); } template @@ -2931,19 +2823,19 @@ struct HParticleCorrelation2SameEvent { { if constexpr (pairType == kHPhi) { invMass = associate.mPhi1020(); - return getMassRegionTag(invMass, cfgPhi1020CorrMass.c1116phi1020LSBLow, cfgPhi1020CorrMass.c1117phi1020LSBUp, cfgPhi1020CorrMass.c1114phi1020PeakLow, cfgPhi1020CorrMass.c1115phi1020PeakUp, cfgPhi1020CorrMass.c1118phi1020RSBLow, cfgPhi1020CorrMass.c1119phi1020RSBUp); + return getMassRegionTag(invMass, cfgPhi1020CorrMass.c1117phi1020LSBLow, cfgPhi1020CorrMass.c1118phi1020LSBUp, cfgPhi1020CorrMass.c1115phi1020PeakLow, cfgPhi1020CorrMass.c1116phi1020PeakUp, cfgPhi1020CorrMass.c1119phi1020RSBLow, cfgPhi1020CorrMass.c1120phi1020RSBUp); } else if constexpr (pairType == kHKStar) { invMass = associate.mKStar892(); - return getMassRegionTag(invMass, cfgKStar892CorrMass.c1122kStar892LSBLow, cfgKStar892CorrMass.c1123kStar892LSBUp, cfgKStar892CorrMass.c1120kStar892PeakLow, cfgKStar892CorrMass.c1121kStar892PeakUp, cfgKStar892CorrMass.c1124kStar892RSBLow, cfgKStar892CorrMass.c1125kStar892RSBUp); + return getMassRegionTag(invMass, cfgKStar892CorrMass.c1123kStar892LSBLow, cfgKStar892CorrMass.c1124kStar892LSBUp, cfgKStar892CorrMass.c1121kStar892PeakLow, cfgKStar892CorrMass.c1122kStar892PeakUp, cfgKStar892CorrMass.c1125kStar892RSBLow, cfgKStar892CorrMass.c1126kStar892RSBUp); } else if constexpr (pairType == kHKStarBar) { invMass = associate.mKStar892Bar(); - return getMassRegionTag(invMass, cfgKStar892CorrMass.c1122kStar892LSBLow, cfgKStar892CorrMass.c1123kStar892LSBUp, cfgKStar892CorrMass.c1120kStar892PeakLow, cfgKStar892CorrMass.c1121kStar892PeakUp, cfgKStar892CorrMass.c1124kStar892RSBLow, cfgKStar892CorrMass.c1125kStar892RSBUp); + return getMassRegionTag(invMass, cfgKStar892CorrMass.c1123kStar892LSBLow, cfgKStar892CorrMass.c1124kStar892LSBUp, cfgKStar892CorrMass.c1121kStar892PeakLow, cfgKStar892CorrMass.c1122kStar892PeakUp, cfgKStar892CorrMass.c1125kStar892RSBLow, cfgKStar892CorrMass.c1126kStar892RSBUp); } else if constexpr (pairType == kHLambda) { invMass = associate.mLambda1520(); - return getMassRegionTag(invMass, cfgLambda1520CorrMass.c1128lambda1520LSBLow, cfgLambda1520CorrMass.c1129lambda1520LSBUp, cfgLambda1520CorrMass.c1126lambda1520PeakLow, cfgLambda1520CorrMass.c1127lambda1520PeakUp, cfgLambda1520CorrMass.c1130lambda1520RSBLow, cfgLambda1520CorrMass.c1131lambda1520RSBUp); + return getMassRegionTag(invMass, cfgLambda1520CorrMass.c1129lambda1520LSBLow, cfgLambda1520CorrMass.c1130lambda1520LSBUp, cfgLambda1520CorrMass.c1127lambda1520PeakLow, cfgLambda1520CorrMass.c1128lambda1520PeakUp, cfgLambda1520CorrMass.c1131lambda1520RSBLow, cfgLambda1520CorrMass.c1132lambda1520RSBUp); } else if constexpr (pairType == kHLambdaBar) { invMass = associate.mLambda1520Bar(); - return getMassRegionTag(invMass, cfgLambda1520CorrMass.c1128lambda1520LSBLow, cfgLambda1520CorrMass.c1129lambda1520LSBUp, cfgLambda1520CorrMass.c1126lambda1520PeakLow, cfgLambda1520CorrMass.c1127lambda1520PeakUp, cfgLambda1520CorrMass.c1130lambda1520RSBLow, cfgLambda1520CorrMass.c1131lambda1520RSBUp); + return getMassRegionTag(invMass, cfgLambda1520CorrMass.c1129lambda1520LSBLow, cfgLambda1520CorrMass.c1130lambda1520LSBUp, cfgLambda1520CorrMass.c1127lambda1520PeakLow, cfgLambda1520CorrMass.c1128lambda1520PeakUp, cfgLambda1520CorrMass.c1131lambda1520RSBLow, cfgLambda1520CorrMass.c1132lambda1520RSBUp); } invMass = -1.0f; @@ -3139,33 +3031,78 @@ struct HParticleCorrelation2SameEvent { } } - inline bool shouldStoreDerivedCollision(uint64_t corrMask, int mixingBin) + uint64_t getStoredCorrMask(uint64_t corrMask, int mixingBin) { if (mixingBin < 0 || mixingBin >= nMixBins) { - return false; + return 0ULL; } - if (cfgDerivedData.c1133mixingBin >= 0 && mixingBin != cfgDerivedData.c1133mixingBin) { - return false; + if (cfgDerivedData.c1134mixingBin >= 0 && mixingBin != cfgDerivedData.c1134mixingBin) { + return 0ULL; } - const uint64_t requestedMask = cfgDerivedData.c1132pairMask; - + const uint64_t requestedMask = cfgDerivedData.c1133pairMask; if (requestedMask == 0ULL) { - return corrMask != 0ULL; + return corrMask; + } + + if (cfgDerivedData.c1135requireAllPairBits && (corrMask & requestedMask) != requestedMask) { + return 0ULL; + } + + // Keeping only the requested pools, so tracks / resonances of other channels are not written. + // Resonance pools are the Peak/LSB/RSB bits (kMaskHPhiLowPtPeak ... kMaskHLambdaBarHighPtRSB). + return corrMask & requestedMask; + } + + //______________________________________________________________________________ + // Tracks : bit 0-7 = pools h, pi, K, p x low/high pT (same bit numbers as CorrPresenceMask), + // bit 15 = used as trigger + // Resonances : bit r = CorrPresenceMask pool bit (18 + r), r = species * 6 + pT class * 3 + (mass window - 1) + // Setting a bit again (e.g. for another trigger) changes nothing, so there are no duplicates, + // and no sorting or searching is needed. Re-sized per collision; the vectors keep their capacity. + static constexpr uint16_t TriggerUsedFlag = 1 << 15; + std::vector trackUsedFlags; + std::vector resoUsedFlags; + int64_t firstTrackGI = 0; + int64_t firstResoGI = 0; + float currentCentrality = -1.0f; // mixing-estimator value of the current collision, used as centrality axis of the correlation histograms + + template + void markTrackUsed(const T& track, const uint16_t flag) + { + const int64_t i = track.globalIndex() - firstTrackGI; + if (i >= 0 && i < static_cast(trackUsedFlags.size())) { + trackUsedFlags[i] |= flag; } + } - if (cfgDerivedData.c1134requireAllPairBits) { - return (corrMask & requestedMask) == requestedMask; + template + void markResoUsed(const R& resonance, const uint32_t flag) + { + const int64_t i = resonance.globalIndex() - firstResoGI; + if (i >= 0 && i < static_cast(resoUsedFlags.size())) { + resoUsedFlags[i] |= flag; } + } - return (corrMask & requestedMask) != 0u; + // Particle (+1) / antiparticle (-1) / self-conjugate (0) flag from the associate type + static int8_t getResoSign(const int assocType) + { + if (assocType == kCountHKStar || assocType == kCountHLambda) { + return 1; + } + if (assocType == kCountHKStarBar || assocType == kCountHLambdaBar) { + return -1; + } + return 0; // phi(1020) } // 01-Start-obtaining trigger-LowPtAssociates correlation template void executeTrigAssocCorrelation(H& histReg, const T& trigger, const A& associates, const auto& triggerGIList, CorrCountArray& corrCountPerColl, ResoRegionCountArray& resoRegionCountsPerColl) { + constexpr int PtType = roleType == kAssocLowPt ? kCountLowPt : kCountHighPt; int associateSelTag = kTrackAccepted; int assocPosDauSelTag = kTrackAccepted; int assocNegDauSelTag = kTrackAccepted; @@ -3188,6 +3125,7 @@ struct HParticleCorrelation2SameEvent { fillCorrParticleQA(histReg, associate); fillTrigAssociateCorrelation(histReg, trigger, associate); incrementCorrCount(corrCountPerColl); + markTrackUsed(associate, static_cast(getCorrMaskBit(kCountHH, PtType))); } if constexpr (pairType == kHId) { @@ -3198,14 +3136,17 @@ struct HParticleCorrelation2SameEvent { if (selPion(associate, pionIdMethod)) { fillIdentifiedCorrelation(histReg, trigger, associate, pionIdMethod); incrementCorrCount(corrCountPerColl); + markTrackUsed(associate, static_cast(getCorrMaskBit(kCountHPi, PtType))); } if (selKaon(associate, kaonIdMethod)) { fillIdentifiedCorrelation(histReg, trigger, associate, kaonIdMethod); incrementCorrCount(corrCountPerColl); + markTrackUsed(associate, static_cast(getCorrMaskBit(kCountHKa, PtType))); } if (selProton(associate, protonIdMethod)) { fillIdentifiedCorrelation(histReg, trigger, associate, protonIdMethod); incrementCorrCount(corrCountPerColl); + markTrackUsed(associate, static_cast(getCorrMaskBit(kCountHPr, PtType))); } } } @@ -3239,7 +3180,7 @@ struct HParticleCorrelation2SameEvent { } // Trigger-resonance daughter overlap -----expensive check ---- - if (c1112rejectResoWithAnyTriggerDaughter) { + if (c1113rejectResoWithAnyTriggerDaughter) { // Strict mode: reject the whole resonance if either daughter belongs to the event trigger population. if (checkTrackInList(posDauTrack, triggerGIList) || checkTrackInList(negDauTrack, triggerGIList)) { continue; @@ -3273,6 +3214,7 @@ struct HParticleCorrelation2SameEvent { incrementCorrCount(corrCountPerColl); incrementResoRegionCount(resoRegionCountsPerColl, massRegion); + markResoUsed(associate, static_cast(getResoRegionMaskBit(pairType - kHPhi, PtType, massRegion) >> 18)); } } // associate particle loop is over } // function definition is over @@ -3294,7 +3236,7 @@ struct HParticleCorrelation2SameEvent { std::vector posDauGIListRSSB; std::vector negDauGIListRSSB; - if (c1112rejectResoWithAnyTriggerDaughter) { + if (c1113rejectResoWithAnyTriggerDaughter) { for (const auto& trigger : triggers) { if (selectionTrack(trigger) != kTrackAccepted) { continue; @@ -3310,6 +3252,7 @@ struct HParticleCorrelation2SameEvent { } // fillTrigQA fillCorrParticleQA(histReg, trigger); + markTrackUsed(trigger, TriggerUsedFlag); // ++nTrigger; // triggerTrackIndexList.push_back(triggerTrack.globalIndex()); @@ -3360,11 +3303,6 @@ struct HParticleCorrelation2SameEvent { int dfNumber = 0; int64_t iCollGlobalCount = -1; - int64_t iTrackGlobalCount = -1; - int64_t iResonanceGlobalCount = -1; - struct DerivedTrackRef { - int64_t globalTrackId; - }; void processNothing(aod::Origins const& origins) { @@ -3381,13 +3319,10 @@ struct HParticleCorrelation2SameEvent { dfNumber++; mixingQA.fill(HIST("Mixing/DataFramesProcessed"), 0.0); std::vector mixingBinStatusPerDF(nMixBins); - // LOG(info)<<"DEBUG :: Origins :: "<(kEventAllFiltered)); @@ -3439,7 +3375,7 @@ struct HParticleCorrelation2SameEvent { continue; } seEventQA.fill(HIST("SE/Events/EventSelection"), static_cast(kEventPassedSelCollision)); - + fillEventQA(collision); const auto tracksPerCollision = fullTracks.sliceBy(tracksPerCollisionPreslice, collision.globalIndex()); if (tracksPerCollision.size() < cfgEvent.c1005minNFilteredTracks) { continue; @@ -3467,9 +3403,18 @@ struct HParticleCorrelation2SameEvent { continue; } - dauGIListPeak.assign(tracksPerCollision.size(), 0); - dauGIListLSB.assign(tracksPerCollision.size(), 0); - dauGIListRSB.assign(tracksPerCollision.size(), 0); + const auto resonancesPerCollision = resonanceCndts.sliceBy(resoPerCollisionPreslice, collision.globalIndex()); + trackUsedFlags.clear(); + resoUsedFlags.clear(); + if (tracksPerCollision.size() > 0) { + firstTrackGI = tracksPerCollision.begin().globalIndex(); + trackUsedFlags.assign(tracksPerCollision.iteratorAt(tracksPerCollision.size() - 1).globalIndex() - firstTrackGI + 1, 0); + } + if (resonancesPerCollision.size() > 0) { + firstResoGI = resonancesPerCollision.begin().globalIndex(); + resoUsedFlags.assign(resonancesPerCollision.iteratorAt(resonancesPerCollision.size() - 1).globalIndex() - firstResoGI + 1, 0); + } + fillEventQA(collision); CorrCountArray corrCountsPerColl{}; ResoRegionCountArray resoRegionCountsPerColl{}; @@ -3497,6 +3442,7 @@ struct HParticleCorrelation2SameEvent { auto assocLambdaBarPerCollLowPt = assocLambda1520BarLowPt->sliceByCached(aod::resonancecndt::collisionId, collision.globalIndex(), cache); auto assocLambdaBarPerCollHighPt = assocLambda1520BarHighPt->sliceByCached(aod::resonancecndt::collisionId, collision.globalIndex(), cache); + currentCentrality = getMixingEstimatorValue(collision); executeCorrelation(hhCorrelation, triggerTracksPerColl, assocTrksPerCollLowPt, assocTrksPerCollHighPt, corrCountsPerColl, resoRegionCountsPerColl); executeCorrelation(hIdCorrelation, triggerTracksPerColl, assocTrksPerCollLowPt, assocTrksPerCollHighPt, corrCountsPerColl, resoRegionCountsPerColl); executeCorrelation(hPhiCorrelation, triggerTracksPerColl, assocPhiPerCollLowPt, assocPhiPerCollHighPt, corrCountsPerColl, resoRegionCountsPerColl); @@ -3508,7 +3454,7 @@ struct HParticleCorrelation2SameEvent { // Unlike Sign Signal // LikeSign Signal bool hasSelectedTrigger = false; - if (c1113requireSelectedTriggerForInvariantMass) { + if (c1114requireSelectedTriggerForInvariantMass) { for (const auto& trigger : triggerTracksPerColl) { if (selectionTrack(trigger) == kTrackAccepted) { hasSelectedTrigger = true; @@ -3517,7 +3463,7 @@ struct HParticleCorrelation2SameEvent { } } - if (!c1113requireSelectedTriggerForInvariantMass || hasSelectedTrigger) { + if (!c1114requireSelectedTriggerForInvariantMass || hasSelectedTrigger) { auto posTracksPerColl = posTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); auto negTracksPerColl = negTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache); @@ -3567,129 +3513,52 @@ struct HParticleCorrelation2SameEvent { } } + int nTriggersWritten = 0; + int nTrackAssocsWritten = 0; + int nResoAssocsWritten = 0; //______________________________________________________________________________ - // Derived tables - if (shouldStoreDerivedCollision(corrPresenceMask, mixingBin)) { + // Derived tables: only the triggers and associates marked as used, and only for the stored pools. + // Every particle is written once; its UsedMask holds all correlations it was used in. + const uint64_t storedMask = getStoredCorrMask(corrPresenceMask, mixingBin); + if (storedMask != 0ULL) { + derivedCollisions(collision.posZ(), mixingEstimatorValue, storedMask); iCollGlobalCount++; - derivedCollisions(iCollGlobalCount, - collision.globalIndex(), - dataframeID, - collision.posZ(), - collision.centFT0C(), - collision.centFT0M(), - collision.centFT0A(), - collision.centFV0A(), - static_cast(cfgMixing.c1137mixingEstimator), - mixingBin, - corrPresenceMask); - - std::map derivedTrackIndex; + + // Tracks: triggers, and h / pi / K / p associates (track pools = CorrPresenceMask bits 0-7) for (const auto& track : tracksPerCollision) { - if (selectionTrack(track) != kTrackAccepted) { - continue; // Store only selected tracks to reduce the size. + const int64_t i = track.globalIndex() - firstTrackGI; + if (i < 0 || i >= static_cast(trackUsedFlags.size()) || trackUsedFlags[i] == 0) { + continue; + } + const uint16_t flags = trackUsedFlags[i]; + if (flags & TriggerUsedFlag) { + nTriggersWritten++; + derivedTriggers(iCollGlobalCount, track.pt(), track.eta(), track.phi()); + } + const uint64_t usedMask = static_cast(flags & 0xFFu) & storedMask; + if (usedMask != 0ULL) { + nTrackAssocsWritten++; + derivedAssocs(iCollGlobalCount, track.pt(), track.eta(), track.phi(), static_cast(track.sign() > 0 ? 1 : -1), usedMask); } - - iTrackGlobalCount++; - derivedTracks(iCollGlobalCount, // derivedCollisionId, individual will create issues in mereged dataframes - iCollGlobalCount, - collision.globalIndex(), - iTrackGlobalCount, - track.globalIndex(), - dataframeID, - - track.pt(), - track.p(), - track.tpcInnerParam(), - track.tofExpMom(), - track.eta(), - track.phi(), - static_cast(track.sign()), - - track.dcaXY(), - track.dcaZ(), - track.tpcSignal(), - - static_cast(track.hasTOF()), - track.beta(), - - track.tpcNSigmaEl(), - track.tpcNSigmaMu(), - track.tpcNSigmaPi(), - track.tpcNSigmaKa(), - track.tpcNSigmaPr(), - track.tpcNSigmaDe(), - - track.tofNSigmaEl(), - track.tofNSigmaMu(), - track.tofNSigmaPi(), - track.tofNSigmaKa(), - track.tofNSigmaPr(), - track.tofNSigmaDe()); - derivedTrackIndex.emplace(track.globalIndex(), DerivedTrackRef{iTrackGlobalCount}); } - const auto resonancesPerCollision = resonanceCndts.sliceBy(resoPerCollisionPreslice, collision.globalIndex()); + // Resonance candidates (resonance pools = CorrPresenceMask bits 18-47; flag bit r = pool bit 18 + r) for (const auto& resonance : resonancesPerCollision) { - const auto originalPosTrackId = static_cast(resonance.posTrackId()); - const auto originalNegTrackId = static_cast(resonance.negTrackId()); - - // Positive daughter must have been stored in HPCorrTracks - const auto posIt = derivedTrackIndex.find(originalPosTrackId); - if (posIt == derivedTrackIndex.end()) { + const int64_t i = resonance.globalIndex() - firstResoGI; + if (i < 0 || i >= static_cast(resoUsedFlags.size()) || resoUsedFlags[i] == 0) { continue; } - - // Negative daughter must have been stored in HPCorrTracks - const auto negIt = derivedTrackIndex.find(originalNegTrackId); - if (negIt == derivedTrackIndex.end()) { - continue; + const uint64_t usedMask = (static_cast(resoUsedFlags[i]) << 18) & storedMask; + if (usedMask != 0ULL) { + nResoAssocsWritten++; + derivedAssocs(iCollGlobalCount, resonance.pt(), resonance.eta(), resonance.phi(), static_cast(0), usedMask); } - - iResonanceGlobalCount++; - derivedResonances( - // Relations to derived tables - iCollGlobalCount, // derivedCollisionId, - posIt->second.globalTrackId, - negIt->second.globalTrackId, - - // Collision references - iCollGlobalCount, - collision.globalIndex(), - - // Positive daughter references - posIt->second.globalTrackId, - originalPosTrackId, - - // Negative daughter references - negIt->second.globalTrackId, - originalNegTrackId, - - // Resonance references - iResonanceGlobalCount, - resonance.globalIndex(), - - // Source dataframe - dataframeID, - - // Resonance kinematics - resonance.pt(), - resonance.eta(), - resonance.phi(), - - // Invariant masses - resonance.mPhi1020(), - resonance.mKStar892(), - resonance.mKStar892Bar(), - resonance.mLambda1520(), - resonance.mLambda1520Bar(), - - // Resonance tags - resonance.phi1020Tag(), - resonance.kStar892Tag(), - resonance.kStar892BarTag(), - resonance.lambda1520Tag(), - resonance.lambda1520BarTag()); } + + mixingQA.fill(HIST("DerivedData/RowsWritten"), 0.0); + mixingQA.fill(HIST("DerivedData/RowsWritten"), 1.0, nTriggersWritten); + mixingQA.fill(HIST("DerivedData/RowsWritten"), 2.0, nTrackAssocsWritten); + mixingQA.fill(HIST("DerivedData/RowsWritten"), 3.0, nResoAssocsWritten); } // Derived data creation block is over. } // collision loop - Over. @@ -3709,7 +3578,7 @@ struct HParticleCorrelation2SameEvent { mixingQA.fill(HIST("Mixing/PerDF/EligiblePoolOccupancy"), iMixBin, corrChannel, nEligibleCollisions); mixingQA.fill(HIST("Mixing/PerDF/PoolOccupancyDistribution"), corrChannel, nEligibleCollisions); - if (nEligibleCollisions >= static_cast(cfgMixing.c1136nEvtMixing)) { + if (nEligibleCollisions >= static_cast(cfgMixing.c1137nEvtMixing)) { ++nReadyMixBins[corrChannel]; mixingQA.fill(HIST("Mixing/PerDF/ReadyPoolMap"), iMixBin, corrChannel); } @@ -3735,78 +3604,19 @@ struct HParticleCorrelation3MixedEvent { HistogramRegistry hLambdaBarCorrelation{"hLambdaBarCorrelation", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; HistogramRegistry mixingOperationQA{"mixingOperationQA", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - static constexpr int NMixOperationChannels = 38; + // Mixing channels: 8 track channels (h-h, h-pi, h-K, h-p x low/high pT) followed by + // 30 resonance channels (5 species x low/high pT x Peak/LSB/RSB) + static constexpr int NMassWindows = 3; + static constexpr int NTrackMixChannels = static_cast(kCountHPr + 1) * static_cast(kNCorrCountPt); + static constexpr int NMixOperationChannels = NTrackMixChannels + static_cast(kNResoCorrCountTypes) * static_cast(kNCorrCountPt) * NMassWindows; static constexpr std::array MixOperationChannelName = { - "hh_LowPt", - "hh_HighPt", - "hPi_LowPt", - "hPi_HighPt", - "hKa_LowPt", - "hKa_HighPt", - "hPr_LowPt", - "hPr_HighPt", - - "hPhi_LowPt_Peak", - "hPhi_LowPt_LSB", - "hPhi_LowPt_RSB", - "hPhi_HighPt_Peak", - "hPhi_HighPt_LSB", - "hPhi_HighPt_RSB", - - "hKStar_LowPt_Peak", - "hKStar_LowPt_LSB", - "hKStar_LowPt_RSB", - "hKStar_HighPt_Peak", - "hKStar_HighPt_LSB", - "hKStar_HighPt_RSB", - - "hKStarBar_LowPt_Peak", - "hKStarBar_LowPt_LSB", - "hKStarBar_LowPt_RSB", - "hKStarBar_HighPt_Peak", - "hKStarBar_HighPt_LSB", - "hKStarBar_HighPt_RSB", - - "hLambda_LowPt_Peak", - "hLambda_LowPt_LSB", - "hLambda_LowPt_RSB", - "hLambda_HighPt_Peak", - "hLambda_HighPt_LSB", - "hLambda_HighPt_RSB", - - "hLambdaBar_LowPt_Peak", - "hLambdaBar_LowPt_LSB", - "hLambdaBar_LowPt_RSB", - "hLambdaBar_HighPt_Peak", - "hLambdaBar_HighPt_LSB", - "hLambdaBar_HighPt_RSB"}; - - static constexpr int getMixOperationChannel(const uint64_t mask) - { - constexpr int TrackMixMaskEndBit = 8; - constexpr int ResonanceMixMaskFirstBit = 18; - constexpr int ResonanceMixMaskEndBit = 48; - constexpr int ResonanceMixChannelOffset = ResonanceMixMaskFirstBit - TrackMixMaskEndBit; - - int bit = 0; - uint64_t value = mask; - - while (value > 1ULL) { - value >>= 1ULL; - ++bit; - } - - if (bit < TrackMixMaskEndBit) { - return bit; - } - - if (bit >= ResonanceMixMaskFirstBit && bit < ResonanceMixMaskEndBit) { - return bit - ResonanceMixChannelOffset; - } - - return -1; - } + "hh_LowPt", "hh_HighPt", "hPi_LowPt", "hPi_HighPt", "hKa_LowPt", "hKa_HighPt", "hPr_LowPt", "hPr_HighPt", + "hPhi_LowPt_Peak", "hPhi_LowPt_LSB", "hPhi_LowPt_RSB", "hPhi_HighPt_Peak", "hPhi_HighPt_LSB", "hPhi_HighPt_RSB", + "hKStar_LowPt_Peak", "hKStar_LowPt_LSB", "hKStar_LowPt_RSB", "hKStar_HighPt_Peak", "hKStar_HighPt_LSB", "hKStar_HighPt_RSB", + "hKStarBar_LowPt_Peak", "hKStarBar_LowPt_LSB", "hKStarBar_LowPt_RSB", "hKStarBar_HighPt_Peak", "hKStarBar_HighPt_LSB", "hKStarBar_HighPt_RSB", + "hLambda_LowPt_Peak", "hLambda_LowPt_LSB", "hLambda_LowPt_RSB", "hLambda_HighPt_Peak", "hLambda_HighPt_LSB", "hLambda_HighPt_RSB", + "hLambdaBar_LowPt_Peak", "hLambdaBar_LowPt_LSB", "hLambdaBar_LowPt_RSB", "hLambdaBar_HighPt_Peak", "hLambdaBar_HighPt_LSB", "hLambdaBar_HighPt_RSB"}; struct : ConfigurableGroup { Configurable c2001printDebugMessages{"c2001printDebugMessages", false, "Print debug messages"}; @@ -3819,112 +3629,32 @@ struct HParticleCorrelation3MixedEvent { ConfigurableAxis c2005axisCorrSparseAssocPt{"c2005axisCorrSparseAssocPt", {8, 0.0f, 4.0f}, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; ConfigurableAxis c2006axisCorrSparseDeltaPhi{"c2006axisCorrSparseDeltaPhi", {32, -2.0f, 6.0f}, "#Delta#varphi"}; ConfigurableAxis c2007axisCorrSparseDeltaEta{"c2007axisCorrSparseDeltaEta", {24, -2.1f, 2.1f}, "#Delta#eta"}; + ConfigurableAxis c2008axisCorrCentrality{"c2008axisCorrCentrality", {VARIABLE_WIDTH, 0.0, 1.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 70.0, 100.0}, "Centrality (%) axis of the correlation histograms (estimator chosen by c1138mixingEstimator)"}; } cfgAxis; + // Selections (track cuts, PID, pT classes, mass windows, rapidity, estimator) are applied in the same-event + // task and stored as tags. Only the mixing itself is configured here; keep these axes equal to c1139/c1140. struct : ConfigurableGroup { - Configurable c2008nEvtMixing{"c2008nEvtMixing", 5, "Number of events to mix"}; - Configurable c2009mixingEstimator{"c2009mixingEstimator", kMixCentFT0C, "Mixing estimator: 0=FT0C, 1=FT0M, 2=FT0A, 3=FV0A"}; + Configurable c2009nEvtMixing{"c2009nEvtMixing", 5, "Number of partner events mixed with each trigger event"}; ConfigurableAxis c2010axisVtxMixing{"c2010axisVtxMixing", {VARIABLE_WIDTH, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0}, "Mixing bins - z vertex"}; - ConfigurableAxis c2011axisCentMixing{"c2011axisCentMixing", {VARIABLE_WIDTH, -1.0, 20.0, 50.0, 80.0, 101.0}, "Mixing bins - centrality"}; + ConfigurableAxis c2011axisCentMixing{"c2011axisCentMixing", {VARIABLE_WIDTH, -1.0, 20.0, 50.0, 80.0, 101.0}, "Mixing bins - centrality (estimator chosen by c1138mixingEstimator in the same-event task)"}; } cfgMixing; - struct : ConfigurableGroup { - Configurable c2012triggerPtLow{"c2012triggerPtLow", 4.0f, "Minimum pT for trigger tracks"}; - Configurable c2013triggerPtHigh{"c2013triggerPtHigh", 8.0f, "Maximum pT for trigger tracks"}; - Configurable c2014assocPtLowMin{"c2014assocPtLowMin", 0.0f, "Minimum pT for low-pT associated tracks"}; - Configurable c2015assocPtLowMax{"c2015assocPtLowMax", 2.0f, "Maximum pT for low-pT associated tracks"}; - Configurable c2016assocPtHighMin{"c2016assocPtHighMin", 2.0f, "Minimum pT for high-pT associated tracks"}; - Configurable c2017assocPtHighMax{"c2017assocPtHighMax", 4.0f, "Maximum pT for high-pT associated tracks"}; - } cfgPartitions; - - struct : ConfigurableGroup { - Configurable c2018resoRapidityMin{"c2018resoRapidityMin", -0.5f, "Minimum rapidity for resonance candidates"}; - Configurable c2019resoRapidityMax{"c2019resoRapidityMax", 0.5f, "Maximum rapidity for resonance candidates"}; - - Configurable c2020phiPtLowMin{"c2020phiPtLowMin", 0.0f, "Minimum pT for low-pT Phi(1020)"}; - Configurable c2021phiPtLowMax{"c2021phiPtLowMax", 2.0f, "Maximum pT for low-pT Phi(1020)"}; - Configurable c2022phiPtHighMin{"c2022phiPtHighMin", 2.0f, "Minimum pT for high-pT Phi(1020)"}; - Configurable c2023phiPtHighMax{"c2023phiPtHighMax", 4.0f, "Maximum pT for high-pT Phi(1020)"}; - - Configurable c2024kstarPtLowMin{"c2024kstarPtLowMin", 0.0f, "Minimum pT for low-pT K*(892)0"}; - Configurable c2025kstarPtLowMax{"c2025kstarPtLowMax", 2.0f, "Maximum pT for low-pT K*(892)0"}; - Configurable c2026kstarPtHighMin{"c2026kstarPtHighMin", 2.0f, "Minimum pT for high-pT K*(892)0"}; - Configurable c2027kstarPtHighMax{"c2027kstarPtHighMax", 4.0f, "Maximum pT for high-pT K*(892)0"}; - - Configurable c2028kstarBarPtLowMin{"c2028kstarBarPtLowMin", 0.0f, "Minimum pT for low-pT anti-K*(892)0"}; - Configurable c2029kstarBarPtLowMax{"c2029kstarBarPtLowMax", 2.0f, "Maximum pT for low-pT anti-K*(892)0"}; - Configurable c2030kstarBarPtHighMin{"c2030kstarBarPtHighMin", 2.0f, "Minimum pT for high-pT anti-K*(892)0"}; - Configurable c2031kstarBarPtHighMax{"c2031kstarBarPtHighMax", 4.0f, "Maximum pT for high-pT anti-K*(892)0"}; - - Configurable c2032lambda1520PtLowMin{"c2032lambda1520PtLowMin", 0.0f, "Minimum pT for low-pT Lambda(1520)"}; - Configurable c2033lambda1520PtLowMax{"c2033lambda1520PtLowMax", 2.0f, "Maximum pT for low-pT Lambda(1520)"}; - Configurable c2034lambda1520PtHighMin{"c2034lambda1520PtHighMin", 2.0f, "Minimum pT for high-pT Lambda(1520)"}; - Configurable c2035lambda1520PtHighMax{"c2035lambda1520PtHighMax", 4.0f, "Maximum pT for high-pT Lambda(1520)"}; - - Configurable c2036lambda1520BarPtLowMin{"c2036lambda1520BarPtLowMin", 0.0f, "Minimum pT for low-pT anti-Lambda(1520)"}; - Configurable c2037lambda1520BarPtLowMax{"c2037lambda1520BarPtLowMax", 2.0f, "Maximum pT for low-pT anti-Lambda(1520)"}; - Configurable c2038lambda1520BarPtHighMin{"c2038lambda1520BarPtHighMin", 2.0f, "Minimum pT for high-pT anti-Lambda(1520)"}; - Configurable c2039lambda1520BarPtHighMax{"c2039lambda1520BarPtHighMax", 4.0f, "Maximum pT for high-pT anti-Lambda(1520)"}; - } cfgResPartitions; - - struct : ConfigurableGroup { - Configurable c2040phi1020PeakLow{"c2040phi1020PeakLow", 1.013f, "Phi(1020) peak lower mass"}; - Configurable c2041phi1020PeakUp{"c2041phi1020PeakUp", 1.026f, "Phi(1020) peak upper mass"}; - Configurable c2042phi1020LSBLow{"c2042phi1020LSBLow", 0.995f, "Phi(1020) LSB lower mass"}; - Configurable c2043phi1020LSBUp{"c2043phi1020LSBUp", 1.005f, "Phi(1020) LSB upper mass"}; - Configurable c2044phi1020RSBLow{"c2044phi1020RSBLow", 1.040f, "Phi(1020) RSB lower mass"}; - Configurable c2045phi1020RSBUp{"c2045phi1020RSBUp", 1.060f, "Phi(1020) RSB upper mass"}; - } cfgPhi1020CorrMass; - - struct : ConfigurableGroup { - Configurable c2046kStar892PeakLow{"c2046kStar892PeakLow", 0.846f, "K*(892)0 correlation peak lower mass"}; - Configurable c2047kStar892PeakUp{"c2047kStar892PeakUp", 0.946f, "K*(892)0 correlation peak upper mass"}; - Configurable c2048kStar892LSBLow{"c2048kStar892LSBLow", 0.700f, "K*(892)0 correlation LSB lower mass"}; - Configurable c2049kStar892LSBUp{"c2049kStar892LSBUp", 0.780f, "K*(892)0 correlation LSB upper mass"}; - Configurable c2050kStar892RSBLow{"c2050kStar892RSBLow", 1.010f, "K*(892)0 correlation RSB lower mass"}; - Configurable c2051kStar892RSBUp{"c2051kStar892RSBUp", 1.090f, "K*(892)0 correlation RSB upper mass"}; - } cfgKStar892CorrMass; - - struct : ConfigurableGroup { - Configurable c2052lambda1520PeakLow{"c2052lambda1520PeakLow", 1.500f, "Lambda(1520) correlation peak lower mass"}; - Configurable c2053lambda1520PeakUp{"c2053lambda1520PeakUp", 1.540f, "Lambda(1520) correlation peak upper mass"}; - Configurable c2054lambda1520LSBLow{"c2054lambda1520LSBLow", 1.440f, "Lambda(1520) correlation LSB lower mass"}; - Configurable c2055lambda1520LSBUp{"c2055lambda1520LSBUp", 1.480f, "Lambda(1520) correlation LSB upper mass"}; - Configurable c2056lambda1520RSBLow{"c2056lambda1520RSBLow", 1.560f, "Lambda(1520) correlation RSB lower mass"}; - Configurable c2057lambda1520RSBUp{"c2057lambda1520RSBUp", 1.600f, "Lambda(1520) correlation RSB upper mass"}; - } cfgLambda1520CorrMass; - - struct : ConfigurableGroup { - Configurable> c2058pidConfigSetting{"c2058pidConfigSetting", {DefaultPIDcheckValues[0].data(), kNPid, kNCutSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"ThrPforTOF", "IdCutTypeLowP", "NSigmaTPCLowP", "NSigmaTOFLowP", "NSigmaRadLowP", "IdCutTypeHighP", "NSigmaTPCHighP", "NSigmaTOFHighP", "NSigmaRadHighP", "doVetoOthers", "doRelativeTPCCheck", "doRelativeTOFcheck", "doRelativeTPCTOFcheck"}}, "Cut values for particle identification"}; - Configurable> c2059pidVetoSetting{"c2059pidVetoSetting", {DefaultPidVetoValues[0].data(), kNPid, kNVetoSettings, {"Pi", "Ka", "Pr", "El", "Mu", "De"}, {"doVetoTPC", "doVetoTOF", "vetoTPC", "vetoTOF"}}, "Veto cuts for particle identification"}; - Configurable c2060cfgId07CheckTofBeta{"c2060cfgId07CheckTofBeta", false, "Require beta > 0 for reliable TOF"}; - } cfgIdCut; + // Re-built in init() with the configured axes (as a data member it holds the default axes) + using BinningTypeMixing = ColumnBinningPolicy; + BinningTypeMixing colBinning{{cfgMixing.c2010axisVtxMixing, cfgMixing.c2011axisCentMixing}, true}; + int nMixBins = 0; void init(InitContext const&) { - if (cfgDebug.c2001printDebugMessages) { LOGF(info, "Starting init"); } - const AxisSpec axisP = {200, 0.0f, 10.0f, "#it{p} (GeV/#it{c})"}; const AxisSpec axisPt = {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/#it{c})"}; - const AxisSpec axisTPCInnerParam = {200, 0.0f, 10.0f, "#it{p}_{tpcInnerParam} (GeV/#it{c})"}; - const AxisSpec axisTOFExpMom = {200, 0.0f, 10.0f, "#it{p}_{tofExpMom} (GeV/#it{c})"}; - const AxisSpec axisEta = {100, -5.0f, 5.0f, "#eta"}; const AxisSpec axisPhi = {110, -1.0f, 10.0f, "#phi (radians)"}; - const AxisSpec axisRapidity = {200, -5.0f, 5.0f, "Rapidity (y)"}; - const AxisSpec axisDcaXY = {100, -5.0f, 5.0f, "dcaXY"}; - const AxisSpec axisDcaZ = {100, -5.0f, 5.0f, "dcaZ"}; - const AxisSpec axisSign = {10, -5.0f, 5.0f, "track.sign"}; - - const AxisSpec axisTPCSignal = {100, -1.0f, 1000.0f, "tpcSignal"}; - const AxisSpec axisTOFBeta = {40, -2.0f, 2.0f, "tofBeta"}; - - const AxisSpec axisTPCNSigma = {200, -10.0f, 10.0f, "n#sigma_{TPC}"}; - const AxisSpec axisTOFNSigma = {200, -10.0f, 10.0f, "n#sigma_{TOF}"}; - const AxisSpec axisIdMethod = {2, -0.5f, 1.5f, "ID method (0=TPC, 1=TPC+TOF)"}; + const AxisSpec axisSign = {3, -1.5f, 1.5f, "Sign (tracks: charge, resonances: 0)"}; AxisSpec axisDeltaPhiSpec{cfgAxis.c2002axisDeltaPhi, "#Delta#varphi"}; AxisSpec axisDeltaEtaSpec{cfgAxis.c2003axisDeltaEta, "#Delta#eta"}; @@ -3932,1315 +3662,432 @@ struct HParticleCorrelation3MixedEvent { AxisSpec axisCorrSparseAssocPt{cfgAxis.c2005axisCorrSparseAssocPt, "#it{p}_{T}^{assoc} (GeV/#it{c})"}; AxisSpec axisCorrSparseDeltaPhi{cfgAxis.c2006axisCorrSparseDeltaPhi, "#Delta#varphi"}; AxisSpec axisCorrSparseDeltaEta{cfgAxis.c2007axisCorrSparseDeltaEta, "#Delta#eta"}; + AxisSpec axisCorrCentrality{cfgAxis.c2008axisCorrCentrality, "Centrality (%)"}; - const AxisSpec axisPhi1020Mass = {300, 0.98f, 1.08f, "m_{K^{+}K^{-}} (GeV/#it{c}^{2})"}; - const AxisSpec axisKStar892Mass = {300, 0.65f, 1.15f, "m_{K#pi} (GeV/#it{c}^{2})"}; - const AxisSpec axisLambda1520Mass = {300, 1.40f, 1.65f, "m_{pK} (GeV/#it{c}^{2})"}; - - AxisSpec axisVtxMixOperation{cfgMixing.c2010axisVtxMixing, "z_{vtx} (cm)"}; - AxisSpec axisCentMixOperation{cfgMixing.c2011axisCentMixing, "Centrality (%)"}; - - const int nMixOperationBins = axisVtxMixOperation.getNbins() * axisCentMixOperation.getNbins(); - - const AxisSpec axisMixOperationBin = {nMixOperationBins, -0.5, static_cast(nMixOperationBins) - 0.5, "Mixing bin"}; - const AxisSpec axisMixOperationChannel = {NMixOperationChannels, -0.5, static_cast(NMixOperationChannels) - 0.5, "Mixing channel"}; - const AxisSpec axisMixPartners = {static_cast(cfgMixing.c2008nEvtMixing) + 1, -0.5, static_cast(cfgMixing.c2008nEvtMixing) + 0.5, "N mixed partner events"}; - - const AxisSpec axisMixVtxZQA = {100, -10.0f, 10.0f, "z_{vtx} (cm)"}; - const AxisSpec axisMixDeltaVtxZQA = {100, -20.0f, 20.0f, "#Delta z_{vtx} (cm)"}; - const AxisSpec axisMixCentralityQA = {102, -1.0f, 101.0f, "Centrality (%)"}; - const AxisSpec axisMixDeltaCentralityQA = {204, -102.0f, 102.0f, "#Delta Centrality (%)"}; - - auto addTrackQAHistos = [&](auto& histReg, const std::string& basePath) { - addBasicTrackQAHistos(histReg, basePath, axisP, axisPt, axisEta, axisPhi, axisDcaXY, axisDcaZ, axisSign); - histReg.add((basePath + "TPCSignalVsTPCInnerParam").c_str(), "TPC signal vs p_{TPC inner};p_{TPC inner} (GeV/c);TPC signal", kTH2F, {axisTPCInnerParam, axisTPCSignal}); - histReg.add((basePath + "TPCSignalVsP").c_str(), "TPC signal vs p;p (GeV/c);TPC signal", kTH2F, {axisP, axisTPCSignal}); - histReg.add((basePath + "TOFBetaVsTOFExpMom").c_str(), "TOF #beta vs p_{TOF};p_{TOF} (GeV/c);#beta", kTH2F, {axisTOFExpMom, axisTOFBeta}); - histReg.add((basePath + "TOFBetaVsP").c_str(), "TOF #beta vs p;p (GeV/c);#beta", kTH2F, {axisP, axisTOFBeta}); + auto addAssocQAHistos = [&](auto& histReg, const std::string& basePath) { + histReg.add((basePath + "Pt").c_str(), "Associate;p_{T} (GeV/c);Counts", HistType::kTH1F, {axisPt}); + histReg.add((basePath + "Eta").c_str(), "Associate;#eta;Counts", HistType::kTH1F, {axisEta}); + histReg.add((basePath + "Phi").c_str(), "Associate;#varphi;Counts", HistType::kTH1F, {axisPhi}); + histReg.add((basePath + "Sign").c_str(), "Associate;Sign;Counts", HistType::kTH1F, {axisSign}); }; auto addCorrHistos = [&](auto& histReg, const std::string& basePath) { histReg.add((basePath + "DeltaPhi").c_str(), "Trigger-associate;#Delta#varphi;Pairs", HistType::kTH1F, {axisDeltaPhiSpec}); histReg.add((basePath + "DeltaEta").c_str(), "Trigger-associate;#Delta#eta;Pairs", HistType::kTH1F, {axisDeltaEtaSpec}); - histReg.add((basePath + "DeltaPhiDeltaEta").c_str(), "Trigger-associate;#Delta#varphi;#Delta#eta", HistType::kTH2F, {axisDeltaPhiSpec, axisDeltaEtaSpec}); - histReg.add((basePath + "CorrSparse").c_str(), "Correlation sparse;p_{T}^{trig};p_{T}^{assoc};#Delta#varphi;#Delta#eta", HistType::kTHnSparseF, {axisCorrSparseTriggerPt, axisCorrSparseAssocPt, axisCorrSparseDeltaPhi, axisCorrSparseDeltaEta}); - }; - - auto addResoMassCorrHistos = [&](auto& histReg, const std::string& basePath, const AxisSpec& massAxis) { - histReg.add((basePath + "DeltaPhiVsInvMass").c_str(), "#Delta#varphi vs invariant mass;Invariant mass (GeV/c^{2});#Delta#varphi", HistType::kTH2F, {massAxis, axisDeltaPhiSpec}); - histReg.add((basePath + "DeltaEtaVsInvMass").c_str(), "#Delta#eta vs invariant mass;Invariant mass (GeV/c^{2});#Delta#eta", HistType::kTH2F, {massAxis, axisDeltaEtaSpec}); - }; - - auto addResoAssocQAHistos = [&](auto& histReg, const std::string& basePath, const AxisSpec& massAxis, const std::string& massHistTitle) { - histReg.add((basePath + "P").c_str(), "Resonance;p (GeV/c);Counts", HistType::kTH1F, {axisP}); - histReg.add((basePath + "Pt").c_str(), "Resonance;p_{T} (GeV/c);Counts", HistType::kTH1F, {axisPt}); - histReg.add((basePath + "Eta").c_str(), "Resonance;#eta;Counts", HistType::kTH1F, {axisEta}); - histReg.add((basePath + "Phi").c_str(), "Resonance;#varphi;Counts", HistType::kTH1F, {axisPhi}); - histReg.add((basePath + "Rapidity").c_str(), "Resonance;y;Counts", HistType::kTH1F, {axisRapidity}); - histReg.add((basePath + "InvMass").c_str(), massHistTitle.c_str(), HistType::kTH1F, {massAxis}); - histReg.add((basePath + "InvMassVsPt").c_str(), "Invariant mass vs p_{T};p_{T} (GeV/c);Invariant mass (GeV/c^{2})", HistType::kTH2F, {axisPt, massAxis}); - }; - - auto addResoDauQAHistos = [&](auto& histReg, const std::string& basePath) { - addBasicTrackQAHistos(histReg, basePath, axisP, axisPt, axisEta, axisPhi, axisDcaXY, axisDcaZ, axisSign); - addIdentifiedQAHistos(histReg, basePath, axisP, axisRapidity, axisTPCSignal, axisTOFBeta, axisTPCNSigma, axisTOFNSigma, axisIdMethod); + histReg.add((basePath + "DeltaPhiDeltaEta").c_str(), "Trigger-associate;#Delta#varphi;#Delta#eta;Centrality (%)", HistType::kTH3F, {axisDeltaPhiSpec, axisDeltaEtaSpec, axisCorrCentrality}); + histReg.add((basePath + "CorrSparse").c_str(), "Correlation sparse;p_{T}^{trig};p_{T}^{assoc};#Delta#varphi;#Delta#eta;Centrality (%)", HistType::kTHnSparseF, {axisCorrSparseTriggerPt, axisCorrSparseAssocPt, axisCorrSparseDeltaPhi, axisCorrSparseDeltaEta, axisCorrCentrality}); }; - addTrackQAHistos(hhCorrelation, "ME/hh/QA/Trigger/"); - hhCorrelation.addClone("ME/hh/QA/Trigger/", "ME/hh/QA/AssocLowPt/"); - hhCorrelation.addClone("ME/hh/QA/Trigger/", "ME/hh/QA/AssocHighPt/"); + // Histogram paths mirror the same-event task (SE/... -> ME/...) + // h-h + addAssocQAHistos(hhCorrelation, "ME/hh/QA/AssocLowPt/"); + hhCorrelation.addClone("ME/hh/QA/AssocLowPt/", "ME/hh/QA/AssocHighPt/"); addCorrHistos(hhCorrelation, "ME/hh/Corr/AssocLowPt/"); hhCorrelation.addClone("ME/hh/Corr/AssocLowPt/", "ME/hh/Corr/AssocHighPt/"); - auto registerIdentifiedHistograms = [&](auto& histReg, const std::string& pairName) { - const std::string base = "ME/" + pairName + "/"; - - addTrackQAHistos(histReg, base + "QA/Trigger/"); - - addBasicTrackQAHistos(histReg, base + "QA/AssocLowPt/Pi/", axisP, axisPt, axisEta, axisPhi, axisDcaXY, axisDcaZ, axisSign); - addIdentifiedQAHistos(histReg, base + "QA/AssocLowPt/Pi/", axisP, axisRapidity, axisTPCSignal, axisTOFBeta, axisTPCNSigma, axisTOFNSigma, axisIdMethod); - histReg.addClone(base + "QA/AssocLowPt/Pi/", base + "QA/AssocLowPt/Ka/"); - histReg.addClone(base + "QA/AssocLowPt/Pi/", base + "QA/AssocLowPt/Pr/"); - histReg.addClone(base + "QA/AssocLowPt/", base + "QA/AssocHighPt/"); - - addCorrHistos(histReg, base + "Corr/AssocLowPt/Pi/"); - histReg.addClone(base + "Corr/AssocLowPt/Pi/", base + "Corr/AssocLowPt/Ka/"); - histReg.addClone(base + "Corr/AssocLowPt/Pi/", base + "Corr/AssocLowPt/Pr/"); - histReg.addClone(base + "Corr/AssocLowPt/", base + "Corr/AssocHighPt/"); - }; - registerIdentifiedHistograms(hIdCorrelation, "hIdentified"); - - auto registerResonanceHistograms = [&](auto& histReg, const std::string& pairName, const AxisSpec& massAxis, const std::string& massHistTitle) { + // h-identified + addAssocQAHistos(hIdCorrelation, "ME/hIdentified/QA/AssocLowPt/Pi/"); + hIdCorrelation.addClone("ME/hIdentified/QA/AssocLowPt/Pi/", "ME/hIdentified/QA/AssocLowPt/Ka/"); + hIdCorrelation.addClone("ME/hIdentified/QA/AssocLowPt/Pi/", "ME/hIdentified/QA/AssocLowPt/Pr/"); + hIdCorrelation.addClone("ME/hIdentified/QA/AssocLowPt/", "ME/hIdentified/QA/AssocHighPt/"); + addCorrHistos(hIdCorrelation, "ME/hIdentified/Corr/AssocLowPt/Pi/"); + hIdCorrelation.addClone("ME/hIdentified/Corr/AssocLowPt/Pi/", "ME/hIdentified/Corr/AssocLowPt/Ka/"); + hIdCorrelation.addClone("ME/hIdentified/Corr/AssocLowPt/Pi/", "ME/hIdentified/Corr/AssocLowPt/Pr/"); + hIdCorrelation.addClone("ME/hIdentified/Corr/AssocLowPt/", "ME/hIdentified/Corr/AssocHighPt/"); + + // h-resonance + auto registerResonanceHistograms = [&](auto& histReg, const std::string& pairName) { const std::string base = "ME/" + pairName + "/"; - const std::string qaPeak = base + "QA/AssocLowPt/Peak/"; - addTrackQAHistos(histReg, base + "QA/Trigger/"); - addResoAssocQAHistos(histReg, qaPeak + "Reso/", massAxis, massHistTitle); - addResoDauQAHistos(histReg, qaPeak + "PosDau/"); - histReg.addClone(qaPeak + "PosDau/", qaPeak + "NegDau/"); + addAssocQAHistos(histReg, base + "QA/AssocLowPt/Peak/Reso/"); histReg.addClone(base + "QA/AssocLowPt/Peak/", base + "QA/AssocLowPt/LSB/"); histReg.addClone(base + "QA/AssocLowPt/Peak/", base + "QA/AssocLowPt/RSB/"); histReg.addClone(base + "QA/AssocLowPt/", base + "QA/AssocHighPt/"); addCorrHistos(histReg, base + "Corr/AssocLowPt/Peak/"); histReg.addClone(base + "Corr/AssocLowPt/Peak/", base + "Corr/AssocLowPt/LSB/"); histReg.addClone(base + "Corr/AssocLowPt/Peak/", base + "Corr/AssocLowPt/RSB/"); - addResoMassCorrHistos(histReg, base + "Corr/AssocLowPt/MassDependent/", massAxis); histReg.addClone(base + "Corr/AssocLowPt/", base + "Corr/AssocHighPt/"); }; + registerResonanceHistograms(hPhiCorrelation, "hPhi"); + registerResonanceHistograms(hKStarCorrelation, "hKStar"); + registerResonanceHistograms(hKStarBarCorrelation, "hKStarBar"); + registerResonanceHistograms(hLambdaCorrelation, "hLambda"); + registerResonanceHistograms(hLambdaBarCorrelation, "hLambdaBar"); - registerResonanceHistograms(hPhiCorrelation, "hPhi", axisPhi1020Mass, "#phi(1020);m_{K^{+}K^{-}} (GeV/#it{c}^{2});Counts"); - registerResonanceHistograms(hKStarCorrelation, "hKStar", axisKStar892Mass, "K^{*}(892)^{0};m_{K^{+}#pi^{-}} (GeV/#it{c}^{2});Counts"); - registerResonanceHistograms(hKStarBarCorrelation, "hKStarBar", axisKStar892Mass, "#bar{K}^{*}(892)^{0};m_{#pi^{+}K^{-}} (GeV/#it{c}^{2});Counts"); - registerResonanceHistograms(hLambdaCorrelation, "hLambda", axisLambda1520Mass, "#Lambda(1520);m_{pK^{-}} (GeV/#it{c}^{2});Counts"); - registerResonanceHistograms(hLambdaBarCorrelation, "hLambdaBar", axisLambda1520Mass, "#bar{#Lambda}(1520);m_{K^{+}#bar{p}} (GeV/#it{c}^{2});Counts"); - - mixingOperationQA.add("ME/Mixing/CollisionPairsPerChannel", "Actual mixed collision pairs;Mixing channel;Mixed collision pairs", HistType::kTH1D, {axisMixOperationChannel}); - mixingOperationQA.add("ME/Mixing/CollisionPairsPerBinChannel", "Actual mixed collision pairs;Mixing bin;Mixing channel", HistType::kTH2D, {axisMixOperationBin, axisMixOperationChannel}); - mixingOperationQA.add("ME/Mixing/PartnersPerTriggerEvent", "Actual mixed partners per trigger event;Mixing channel;N partner events", HistType::kTH2D, {axisMixOperationChannel, axisMixPartners}); - mixingOperationQA.add("ME/Mixing/PartnersPerTriggerEventVsBin", "Actual mixed partners per trigger event;Mixing bin;Mixing channel;N partner events", HistType::kTH3D, {axisMixOperationBin, axisMixOperationChannel, axisMixPartners}); - - mixingOperationQA.add("ME/Mixing/VtxZ1VsVtxZ2", "Mixed-event vertex positions;z_{vtx}^{1} (cm);z_{vtx}^{2} (cm)", HistType::kTH2F, {axisMixVtxZQA, axisMixVtxZQA}); - mixingOperationQA.add("ME/Mixing/DeltaVtxZVsChannel", "Mixed-event #Delta z_{vtx};Mixing channel;z_{vtx}^{1}-z_{vtx}^{2} (cm)", HistType::kTH2F, {axisMixOperationChannel, axisMixDeltaVtxZQA}); - - mixingOperationQA.add("ME/Mixing/CentFT0C1VsCentFT0C2", "FT0C centrality of mixed events;FT0C_{1} (%);FT0C_{2} (%)", HistType::kTH2F, {axisMixCentralityQA, axisMixCentralityQA}); - mixingOperationQA.add("ME/Mixing/CentFT0M1VsCentFT0M2", "FT0M centrality of mixed events;FT0M_{1} (%);FT0M_{2} (%)", HistType::kTH2F, {axisMixCentralityQA, axisMixCentralityQA}); - mixingOperationQA.add("ME/Mixing/CentFT0A1VsCentFT0A2", "FT0A centrality of mixed events;FT0A_{1} (%);FT0A_{2} (%)", HistType::kTH2F, {axisMixCentralityQA, axisMixCentralityQA}); - mixingOperationQA.add("ME/Mixing/CentFV0A1VsCentFV0A2", "FV0A centrality of mixed events;FV0A_{1} (%);FV0A_{2} (%)", HistType::kTH2F, {axisMixCentralityQA, axisMixCentralityQA}); - - mixingOperationQA.add("ME/Mixing/DeltaCentFT0CVsChannel", "Mixed-event #Delta FT0C;Mixing channel;FT0C_{1}-FT0C_{2} (%)", HistType::kTH2F, {axisMixOperationChannel, axisMixDeltaCentralityQA}); - mixingOperationQA.add("ME/Mixing/DeltaCentFT0MVsChannel", "Mixed-event #Delta FT0M;Mixing channel;FT0M_{1}-FT0M_{2} (%)", HistType::kTH2F, {axisMixOperationChannel, axisMixDeltaCentralityQA}); - mixingOperationQA.add("ME/Mixing/DeltaCentFT0AVsChannel", "Mixed-event #Delta FT0A;Mixing channel;FT0A_{1}-FT0A_{2} (%)", HistType::kTH2F, {axisMixOperationChannel, axisMixDeltaCentralityQA}); - mixingOperationQA.add("ME/Mixing/DeltaCentFV0AVsChannel", "Mixed-event #Delta FV0A;Mixing channel;FV0A_{1}-FV0A_{2} (%)", HistType::kTH2F, {axisMixOperationChannel, axisMixDeltaCentralityQA}); + //______________________________________________________________________________ + // Mixing binning (re-built here with the configured axes) and mixing QA + AxisSpec axisVtxMix{cfgMixing.c2010axisVtxMixing, "z_{vtx} (cm)"}; + AxisSpec axisCentMix{cfgMixing.c2011axisCentMixing, "Centrality (%)"}; + nMixBins = axisVtxMix.getNbins() * axisCentMix.getNbins(); + colBinning = BinningTypeMixing{{cfgMixing.c2010axisVtxMixing, cfgMixing.c2011axisCentMixing}, true}; + + const AxisSpec axisMixBin = {nMixBins, -0.5, static_cast(nMixBins) - 0.5, "Mixing bin"}; + const AxisSpec axisMixChannel = {NMixOperationChannels, -0.5, static_cast(NMixOperationChannels) - 0.5, "Mixing channel"}; + const AxisSpec axisMixPartners = {static_cast(cfgMixing.c2009nEvtMixing) + 1, -0.5, static_cast(cfgMixing.c2009nEvtMixing) + 0.5, "N mixed partner events"}; + const AxisSpec axisCollPerDF = {200, 0.0, 20000.0, "Derived collisions per dataframe"}; + const AxisSpec axisMixVtxZQA = {100, -10.0f, 10.0f, "z_{vtx} (cm)"}; + const AxisSpec axisMixDeltaVtxZQA = {100, -20.0f, 20.0f, "#Delta z_{vtx} (cm)"}; + const AxisSpec axisMixCentralityQA = {102, -1.0f, 101.0f, "Centrality (%)"}; + const AxisSpec axisMixDeltaCentralityQA = {204, -102.0f, 102.0f, "#Delta Centrality (%)"}; - mixingOperationQA.add("ME/Mixing/MixingEstimator1Vs2", "Configured mixing estimator;Estimator_{1} (%);Estimator_{2} (%)", HistType::kTH2F, {axisMixCentralityQA, axisMixCentralityQA}); - mixingOperationQA.add("ME/Mixing/DeltaMixingEstimatorVsChannel", "Configured mixing estimator difference;Mixing channel;Estimator_{1}-Estimator_{2} (%)", HistType::kTH2F, {axisMixOperationChannel, axisMixDeltaCentralityQA}); + mixingOperationQA.add("ME/Mixing/DataFramesProcessed", "Processed dataframes;Dataframe;Count", HistType::kTH1D, {{1, -0.5, 0.5}}); + mixingOperationQA.add("ME/Mixing/CollisionsPerDF", "Derived collisions per (merged) dataframe;N collisions;Dataframes", HistType::kTH1D, {axisCollPerDF}); + mixingOperationQA.add("ME/Mixing/CollisionsPerBinChannel", "Collisions in mixing pools;Mixing bin;Mixing channel", HistType::kTH2D, {axisMixBin, axisMixChannel}); + mixingOperationQA.add("ME/Mixing/CollisionPairsPerChannel", "Mixed collision pairs;Mixing channel;Mixed collision pairs", HistType::kTH1D, {axisMixChannel}); + mixingOperationQA.add("ME/Mixing/CollisionPairsPerBinChannel", "Mixed collision pairs;Mixing bin;Mixing channel", HistType::kTH2D, {axisMixBin, axisMixChannel}); + mixingOperationQA.add("ME/Mixing/PartnersPerTriggerEvent", "Mixed partners per trigger event;Mixing channel;N partner events", HistType::kTH2D, {axisMixChannel, axisMixPartners}); + mixingOperationQA.add("ME/Mixing/PartnersPerTriggerEventVsBin", "Mixed partners per trigger event;Mixing bin;Mixing channel;N partner events", HistType::kTH3D, {axisMixBin, axisMixChannel, axisMixPartners}); + mixingOperationQA.add("ME/Mixing/VtxZ1VsVtxZ2", "Mixed-event vertex positions;z_{vtx}^{trig} (cm);z_{vtx}^{assoc} (cm)", HistType::kTH2F, {axisMixVtxZQA, axisMixVtxZQA}); + mixingOperationQA.add("ME/Mixing/DeltaVtxZVsChannel", "Mixed-event #Delta z_{vtx};Mixing channel;z_{vtx}^{trig}-z_{vtx}^{assoc} (cm)", HistType::kTH2F, {axisMixChannel, axisMixDeltaVtxZQA}); + mixingOperationQA.add("ME/Mixing/Centrality1VsCentrality2", "Mixing estimator of mixed events;Estimator^{trig} (%);Estimator^{assoc} (%)", HistType::kTH2F, {axisMixCentralityQA, axisMixCentralityQA}); + mixingOperationQA.add("ME/Mixing/DeltaCentralityVsChannel", "Mixing-estimator difference;Mixing channel;Estimator^{trig}-Estimator^{assoc} (%)", HistType::kTH2F, {axisMixChannel, axisMixDeltaCentralityQA}); auto setMixOperationChannelLabels = [](TAxis* axis) { for (int iChannel = 0; iChannel < NMixOperationChannels; ++iChannel) { axis->SetBinLabel(iChannel + 1, MixOperationChannelName[iChannel].data()); } }; + setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/CollisionsPerBinChannel"))->GetYaxis()); setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/CollisionPairsPerChannel"))->GetXaxis()); setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/CollisionPairsPerBinChannel"))->GetYaxis()); setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/PartnersPerTriggerEvent"))->GetXaxis()); setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/PartnersPerTriggerEventVsBin"))->GetYaxis()); setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/DeltaVtxZVsChannel"))->GetXaxis()); - setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/DeltaCentFT0CVsChannel"))->GetXaxis()); - setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/DeltaCentFT0MVsChannel"))->GetXaxis()); - setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/DeltaCentFT0AVsChannel"))->GetXaxis()); - setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/DeltaCentFV0AVsChannel"))->GetXaxis()); - setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/DeltaMixingEstimatorVsChannel"))->GetXaxis()); + setMixOperationChannelLabels(mixingOperationQA.get(HIST("ME/Mixing/DeltaCentralityVsChannel"))->GetXaxis()); + + if (cfgDebug.c2001printDebugMessages) { + LOGF(info, "Finishing init"); + } } - using BinningTypeVtxZFT0C = ColumnBinningPolicy; - using BinningTypeVtxZFT0M = ColumnBinningPolicy; - using BinningTypeVtxZFT0A = ColumnBinningPolicy; - using BinningTypeVtxZFV0A = ColumnBinningPolicy; + SliceCache cache; + Preslice triggersPerCollPreslice = aod::hpcorrtrigger::hpCorrCollId; + Preslice assocsPerCollPreslice = aod::hpcorrassoc::hpCorrCollId; // registers HPCORRASSOC/fIndexHPCorrColls in the SliceCache - BinningTypeVtxZFT0C colBinningFT0C{{cfgMixing.c2010axisVtxMixing, cfgMixing.c2011axisCentMixing}}; - BinningTypeVtxZFT0M colBinningFT0M{{cfgMixing.c2010axisVtxMixing, cfgMixing.c2011axisCentMixing}}; - BinningTypeVtxZFT0A colBinningFT0A{{cfgMixing.c2010axisVtxMixing, cfgMixing.c2011axisCentMixing}}; - BinningTypeVtxZFV0A colBinningFV0A{{cfgMixing.c2010axisVtxMixing, cfgMixing.c2011axisCentMixing}}; + //______________________________________________________________________________ + // Associate partitions: one per mixing channel. Every stored particle carries UsedMask = all correlations + // h-h, h-pi, h-K, h-p + Partition assocHHLowPt = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHHLowPt)); + Partition assocHHHighPt = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHHHighPt)); + Partition assocHPiLowPt = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHPiLowPt)); + Partition assocHPiHighPt = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHPiHighPt)); + Partition assocHKaLowPt = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKaLowPt)); + Partition assocHKaHighPt = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKaHighPt)); + Partition assocHPrLowPt = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHPrLowPt)); + Partition assocHPrHighPt = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHPrHighPt)); + + // h-Phi + Partition assocHPhiLowPtPeak = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHPhiLowPtPeak)); + Partition assocHPhiLowPtLSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHPhiLowPtLSB)); + Partition assocHPhiLowPtRSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHPhiLowPtRSB)); + Partition assocHPhiHighPtPeak = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHPhiHighPtPeak)); + Partition assocHPhiHighPtLSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHPhiHighPtLSB)); + Partition assocHPhiHighPtRSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHPhiHighPtRSB)); + + // h-KStar + Partition assocHKStarLowPtPeak = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarLowPtPeak)); + Partition assocHKStarLowPtLSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarLowPtLSB)); + Partition assocHKStarLowPtRSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarLowPtRSB)); + Partition assocHKStarHighPtPeak = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarHighPtPeak)); + Partition assocHKStarHighPtLSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarHighPtLSB)); + Partition assocHKStarHighPtRSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarHighPtRSB)); + + // h-KStarBar + Partition assocHKStarBarLowPtPeak = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarBarLowPtPeak)); + Partition assocHKStarBarLowPtLSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarBarLowPtLSB)); + Partition assocHKStarBarLowPtRSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarBarLowPtRSB)); + Partition assocHKStarBarHighPtPeak = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarBarHighPtPeak)); + Partition assocHKStarBarHighPtLSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarBarHighPtLSB)); + Partition assocHKStarBarHighPtRSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHKStarBarHighPtRSB)); + + // h-Lambda + Partition assocHLambdaLowPtPeak = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaLowPtPeak)); + Partition assocHLambdaLowPtLSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaLowPtLSB)); + Partition assocHLambdaLowPtRSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaLowPtRSB)); + Partition assocHLambdaHighPtPeak = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaHighPtPeak)); + Partition assocHLambdaHighPtLSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaHighPtLSB)); + Partition assocHLambdaHighPtRSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaHighPtRSB)); + + // h-LambdaBar + Partition assocHLambdaBarLowPtPeak = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaBarLowPtPeak)); + Partition assocHLambdaBarLowPtLSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaBarLowPtLSB)); + Partition assocHLambdaBarLowPtRSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaBarLowPtRSB)); + Partition assocHLambdaBarHighPtPeak = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaBarHighPtPeak)); + Partition assocHLambdaBarHighPtLSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaBarHighPtLSB)); + Partition assocHLambdaBarHighPtRSB = ncheckbit(aod::hpcorrassoc::usedMask, static_cast(kMaskHLambdaBarHighPtRSB)); - template - int getDerivedMixingBin(const C& collision) + //______________________________________________________________________________ + // Collision pools: one per mixing channel. A collision is in the pool of a channel if its CorrMask has the + // channel bit, i.e. it had at least one trigger-associate pair of this channel in the same event. + // h-h, h-pi, h-K, h-p + Partition collHHLowPt = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHHLowPt)); + Partition collHHHighPt = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHHHighPt)); + Partition collHPiLowPt = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHPiLowPt)); + Partition collHPiHighPt = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHPiHighPt)); + Partition collHKaLowPt = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKaLowPt)); + Partition collHKaHighPt = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKaHighPt)); + Partition collHPrLowPt = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHPrLowPt)); + Partition collHPrHighPt = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHPrHighPt)); + + // h-Phi + Partition collHPhiLowPtPeak = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHPhiLowPtPeak)); + Partition collHPhiLowPtLSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHPhiLowPtLSB)); + Partition collHPhiLowPtRSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHPhiLowPtRSB)); + Partition collHPhiHighPtPeak = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHPhiHighPtPeak)); + Partition collHPhiHighPtLSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHPhiHighPtLSB)); + Partition collHPhiHighPtRSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHPhiHighPtRSB)); + + // h-KStar + Partition collHKStarLowPtPeak = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarLowPtPeak)); + Partition collHKStarLowPtLSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarLowPtLSB)); + Partition collHKStarLowPtRSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarLowPtRSB)); + Partition collHKStarHighPtPeak = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarHighPtPeak)); + Partition collHKStarHighPtLSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarHighPtLSB)); + Partition collHKStarHighPtRSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarHighPtRSB)); + + // h-KStarBar + Partition collHKStarBarLowPtPeak = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarBarLowPtPeak)); + Partition collHKStarBarLowPtLSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarBarLowPtLSB)); + Partition collHKStarBarLowPtRSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarBarLowPtRSB)); + Partition collHKStarBarHighPtPeak = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarBarHighPtPeak)); + Partition collHKStarBarHighPtLSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarBarHighPtLSB)); + Partition collHKStarBarHighPtRSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHKStarBarHighPtRSB)); + + // h-Lambda + Partition collHLambdaLowPtPeak = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaLowPtPeak)); + Partition collHLambdaLowPtLSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaLowPtLSB)); + Partition collHLambdaLowPtRSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaLowPtRSB)); + Partition collHLambdaHighPtPeak = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaHighPtPeak)); + Partition collHLambdaHighPtLSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaHighPtLSB)); + Partition collHLambdaHighPtRSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaHighPtRSB)); + + // h-LambdaBar + Partition collHLambdaBarLowPtPeak = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaBarLowPtPeak)); + Partition collHLambdaBarLowPtLSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaBarLowPtLSB)); + Partition collHLambdaBarLowPtRSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaBarLowPtRSB)); + Partition collHLambdaBarHighPtPeak = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaBarHighPtPeak)); + Partition collHLambdaBarHighPtLSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaBarHighPtLSB)); + Partition collHLambdaBarHighPtRSB = ncheckbit(aod::hpcorrcollision::corrMask, static_cast(kMaskHLambdaBarHighPtRSB)); + + // Number of mixed partners of every collision as trigger event (QA only, re-used by all channels) + std::vector nPartnersPerColl; + + //______________________________________________________________________________ + // Channel bookkeeping: PairTypeEnum (+ PidEnum for identified hadrons) -> CorrCountTypeEnum, + // which gives the CorrPresenceMask bit and the mixing-QA channel number + template + static constexpr int getCorrType() { - switch (cfgMixing.c2009mixingEstimator) { - case kMixCentFT0C: - return colBinningFT0C.getBin({collision.posZ(), collision.centFT0C()}); - case kMixCentFT0M: - return colBinningFT0M.getBin({collision.posZ(), collision.centFT0M()}); - case kMixCentFT0A: - return colBinningFT0A.getBin({collision.posZ(), collision.centFT0A()}); - case kMixCentFV0A: - return colBinningFV0A.getBin({collision.posZ(), collision.centFV0A()}); - default: - return -1; + if constexpr (pairType == kHH) { + return kCountHH; + } else if constexpr (pairType == kHId) { + return pidType == kPi ? kCountHPi : (pidType == kKa ? kCountHKa : kCountHPr); + } else if constexpr (pairType == kHPhi) { + return kCountHPhi; + } else if constexpr (pairType == kHKStar) { + return kCountHKStar; + } else if constexpr (pairType == kHKStarBar) { + return kCountHKStarBar; + } else if constexpr (pairType == kHLambda) { + return kCountHLambda; + } else { + return kCountHLambdaBar; } } - template - float getDerivedMixingEstimatorValue(const C& collision) + //______________________________________________________________________________ + // Histogram filling for one mixed trigger-associate pair + template + void fillMixedPair(H& histReg, const T& trigger, const A& associate, const float centrality) { - switch (cfgMixing.c2009mixingEstimator) { - case kMixCentFT0C: - return collision.centFT0C(); - case kMixCentFT0M: - return collision.centFT0M(); - case kMixCentFT0A: - return collision.centFT0A(); - case kMixCentFV0A: - return collision.centFV0A(); - default: - return -1.0f; + const float dPhi = computeDeltaPhi(associate.phi(), trigger.phi()); + const float dEta = associate.eta() - trigger.eta(); + + if constexpr (pairType == kHH) { + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHH]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST("Pt"), associate.pt()); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHH]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST("Eta"), associate.eta()); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHH]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST("Phi"), associate.phi()); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHH]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST("Sign"), associate.sign()); + + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHH]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST("DeltaPhi"), dPhi); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHH]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST("DeltaEta"), dEta); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHH]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta, centrality); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHH]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta, centrality); + } else if constexpr (pairType == kHId) { + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Pt"), associate.pt()); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Eta"), associate.eta()); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Phi"), associate.phi()); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Sign"), associate.sign()); + + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DeltaPhi"), dPhi); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DeltaEta"), dEta); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta, centrality); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta, centrality); + } else { + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/Pt"), associate.pt()); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/Eta"), associate.eta()); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/Phi"), associate.phi()); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/Sign"), associate.sign()); + + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("DeltaPhi"), dPhi); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("DeltaEta"), dEta); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta, centrality); + histReg.fill(HIST(EventTypeDire[kMixedEvent]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta, centrality); } } - //_______________________________ Particle Identification _______________________________ - // p-dependent identification - // p < ThrPforTOF : TPC+TOF (circular cut) if TOF is reliable, otherwise TPC only - // p >= ThrPforTOF : TPC+TOF (circular cut), TOF is required - // Default cuts are 3 sigma (see DefaultPIDcheckValues). - - // If vetoIdOthers = true; it passed all veto checks - // If vetoIdOthers = false; it failed veto check with some other particle - template - bool vetoIdOthersTPC(const T& track) - { - // Static is only run once, ever. - static const std::array doVetoTPC = { - getCfg(cfgIdCut.c2059pidVetoSetting, kPi, kDoVetoTPC), - getCfg(cfgIdCut.c2059pidVetoSetting, kKa, kDoVetoTPC), - getCfg(cfgIdCut.c2059pidVetoSetting, kPr, kDoVetoTPC), - getCfg(cfgIdCut.c2059pidVetoSetting, kEl, kDoVetoTPC), - getCfg(cfgIdCut.c2059pidVetoSetting, kMu, kDoVetoTPC), - getCfg(cfgIdCut.c2059pidVetoSetting, kDe, kDoVetoTPC)}; - - static const std::array vetoTPC = { - getCfg(cfgIdCut.c2059pidVetoSetting, kPi, kVetoTPC), - getCfg(cfgIdCut.c2059pidVetoSetting, kKa, kVetoTPC), - getCfg(cfgIdCut.c2059pidVetoSetting, kPr, kVetoTPC), - getCfg(cfgIdCut.c2059pidVetoSetting, kEl, kVetoTPC), - getCfg(cfgIdCut.c2059pidVetoSetting, kMu, kVetoTPC), - getCfg(cfgIdCut.c2059pidVetoSetting, kDe, kVetoTPC)}; - - return applyVetoOthersTPC(track, doVetoTPC, vetoTPC); - } - - template - bool vetoIdOthersTOF(const T& track) - { - // Only computed once - static const std::array doVetoTOF = { - getCfg(cfgIdCut.c2059pidVetoSetting, kPi, kDoVetoTOF), - getCfg(cfgIdCut.c2059pidVetoSetting, kKa, kDoVetoTOF), - getCfg(cfgIdCut.c2059pidVetoSetting, kPr, kDoVetoTOF), - getCfg(cfgIdCut.c2059pidVetoSetting, kEl, kDoVetoTOF), - getCfg(cfgIdCut.c2059pidVetoSetting, kMu, kDoVetoTOF), - getCfg(cfgIdCut.c2059pidVetoSetting, kDe, kDoVetoTOF)}; - - static const std::array vetoTOF = { - getCfg(cfgIdCut.c2059pidVetoSetting, kPi, kVetoTOF), - getCfg(cfgIdCut.c2059pidVetoSetting, kKa, kVetoTOF), - getCfg(cfgIdCut.c2059pidVetoSetting, kPr, kVetoTOF), - getCfg(cfgIdCut.c2059pidVetoSetting, kEl, kVetoTOF), - getCfg(cfgIdCut.c2059pidVetoSetting, kMu, kVetoTOF), - getCfg(cfgIdCut.c2059pidVetoSetting, kDe, kVetoTOF)}; - - return applyVetoOthersTOF(track, doVetoTOF, vetoTOF); - } - - template - bool vetoIdOthersTPCTOF(const T& track) - { - // If either veto fails, reject - return vetoIdOthersTPC(track) && vetoIdOthersTOF(track); - } - - // Check if TOF is reliable - template - inline bool checkReliableTOF(const T& track) - { - // which check makes the information of TOF relaiable? should track.beta() be checked? e.g.: - if (cfgIdCut.c2060cfgId07CheckTofBeta) { - return (track.hasTOF() && track.beta() > 0.0f); - } - return track.hasTOF(); - } - - template - bool idTPC(const T& track, const float& nSigmaTPC, float& nSigmaIdDistSq) - { - if constexpr (pidMode == kPi) { - nSigmaIdDistSq = track.tpcNSigmaPi() * track.tpcNSigmaPi(); - } else if constexpr (pidMode == kKa) { - nSigmaIdDistSq = track.tpcNSigmaKa() * track.tpcNSigmaKa(); - } else if constexpr (pidMode == kPr) { - nSigmaIdDistSq = track.tpcNSigmaPr() * track.tpcNSigmaPr(); - } else if constexpr (pidMode == kEl) { - nSigmaIdDistSq = track.tpcNSigmaEl() * track.tpcNSigmaEl(); - } else if constexpr (pidMode == kMu) { - nSigmaIdDistSq = track.tpcNSigmaMu() * track.tpcNSigmaMu(); - } else if constexpr (pidMode == kDe) { - nSigmaIdDistSq = track.tpcNSigmaDe() * track.tpcNSigmaDe(); - } else { - nSigmaIdDistSq = 1000000; - } - - static const bool doVetoOthers = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kDoVetoOthers); - if (doVetoOthers) { - if (!vetoIdOthersTPC(track)) { - // If vetoIdOthers = true; it passed all veto checks - // If vetoIdOthers = false; it failed veto check with some other particle - return false; - } - } - - static const bool doRelativeTPCcheck = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kDoRelativeTPCcheck); - if (doRelativeTPCcheck) { - if (!relativeIdOthersTPC(track)) { - // If relativeIdOthersTPC = true; particle has stronger nSigma compared to others - // If relativeIdOthersTPC = false; some particle has stronger nSigma compared to it - return false; - } - } - - if constexpr (pidMode == kPi) { - return std::fabs(track.tpcNSigmaPi()) < nSigmaTPC; - } else if constexpr (pidMode == kKa) { - return std::fabs(track.tpcNSigmaKa()) < nSigmaTPC; - } else if constexpr (pidMode == kPr) { - return std::fabs(track.tpcNSigmaPr()) < nSigmaTPC; - } else if constexpr (pidMode == kEl) { - return std::fabs(track.tpcNSigmaEl()) < nSigmaTPC; - } else if constexpr (pidMode == kMu) { - return std::fabs(track.tpcNSigmaMu()) < nSigmaTPC; - } else if constexpr (pidMode == kDe) { - return std::fabs(track.tpcNSigmaDe()) < nSigmaTPC; - } else { - return false; - } - } - - template - bool idTPCTOF(const T& track, const int& pidCutType, const float& nSigmaTPC, const float& nSigmaTOF, const float& nSigmaSquaredRad, float& nSigmaIdDistSq) - { - if constexpr (pidMode == kPi) { - nSigmaIdDistSq = track.tpcNSigmaPi() * track.tpcNSigmaPi() + track.tofNSigmaPi() * track.tofNSigmaPi(); - } else if constexpr (pidMode == kKa) { - nSigmaIdDistSq = track.tpcNSigmaKa() * track.tpcNSigmaKa() + track.tofNSigmaKa() * track.tofNSigmaKa(); - } else if constexpr (pidMode == kPr) { - nSigmaIdDistSq = track.tpcNSigmaPr() * track.tpcNSigmaPr() + track.tofNSigmaPr() * track.tofNSigmaPr(); - } else if constexpr (pidMode == kEl) { - nSigmaIdDistSq = track.tpcNSigmaEl() * track.tpcNSigmaEl() + track.tofNSigmaEl() * track.tofNSigmaEl(); - } else if constexpr (pidMode == kMu) { - nSigmaIdDistSq = track.tpcNSigmaMu() * track.tpcNSigmaMu() + track.tofNSigmaMu() * track.tofNSigmaMu(); - } else if constexpr (pidMode == kDe) { - nSigmaIdDistSq = track.tpcNSigmaDe() * track.tpcNSigmaDe() + track.tofNSigmaDe() * track.tofNSigmaDe(); - } else { - nSigmaIdDistSq = 1000000; - } - static const bool doVetoOthers = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kDoVetoOthers); - if (doVetoOthers) { - if (!vetoIdOthersTPCTOF(track)) { - // If vetoIdOthers = true; it passed all veto checks - // If vetoIdOthers = false; it failed veto check with some other particle - return false; - } - } - - static const bool doRelativeTOFcheck = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kDoRelativeTOFcheck); - if (doRelativeTOFcheck) { - if (!relativeIdOthersTOF(track)) { - // If relativeIdOthersTOF = true; particle has stronger nSigma compared to others - // If relativeIdOthersTOF = false; some particle has stronger nSigma compared to it - return false; - } - } - - static const bool doRelativeTPCTOFcheck = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kDoRelativeTPCTOFcheck); - if (doRelativeTPCTOFcheck) { - if (!relativeIdOthersTPCTOF(track)) { - // If relativeIdOthersTPCTOF = true; particle has stronger nSigma compared to others - // If relativeIdOthersTPCTOF = false; some particle has stronger nSigma compared to it - return false; - } - } - - switch (pidCutType) { - case kCircularCut: - return selIdCircularCut(track, nSigmaSquaredRad); - case kRectangularCut: - return selIdRectangularCut(track, nSigmaTPC, nSigmaTOF); - case kEllipsoidalCut: - return selIdEllipsoidalCut(track, nSigmaTPC, nSigmaTOF); - default: - return false; - } - } - - template - bool selPdependent(const T& track, int& IdMethod, float& nSigmaIdDistSq) - { - // Static cache inside function - initialized once on first call - static const auto thrPforTOF = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kThrPforTOF); - static const auto idCutTypeLowP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kIdCutTypeLowP); - static const auto nSigmaTPCLowP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaTPCLowP); - static const auto nSigmaTOFLowP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaTOFLowP); - static const auto nSigmaRadLowP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaRadLowP); - static const auto idCutTypeHighP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kIdCutTypeHighP); - static const auto nSigmaTPCHighP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaTPCHighP); - static const auto nSigmaTOFHighP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaTOFHighP); - static const auto nSigmaRadHighP = getCfg(cfgIdCut.c2058pidConfigSetting, pidMode, kNSigmaRadHighP); - - if (track.p() < thrPforTOF) { - if (checkReliableTOF(track)) { - if (idTPCTOF(track, idCutTypeLowP, nSigmaTPCLowP, nSigmaTOFLowP, nSigmaRadLowP, nSigmaIdDistSq)) { - IdMethod = kTPCTOFidentified; - return true; - } - } else { - if (idTPC(track, nSigmaTPCLowP, nSigmaIdDistSq)) { - IdMethod = kTPCidentified; - return true; - } - } - } else { - if (checkReliableTOF(track)) { - if (idTPCTOF(track, idCutTypeHighP, nSigmaTPCHighP, nSigmaTOFHighP, nSigmaRadHighP, nSigmaIdDistSq)) { - IdMethod = kTPCTOFidentified; - return true; - } - } - } - return false; - } - - //______________________________Identification Functions________________________________________________________________ - // Pion - template - bool selPion(const T& track, int& IdMethod, float& nSigmaIdDistSq) - { - return selPdependent(track, IdMethod, nSigmaIdDistSq); - } - - // Kaon - template - bool selKaon(const T& track, int& IdMethod, float& nSigmaIdDistSq) - { - return selPdependent(track, IdMethod, nSigmaIdDistSq); - } - - // Proton - template - bool selProton(const T& track, int& IdMethod, float& nSigmaIdDistSq) - { - return selPdependent(track, IdMethod, nSigmaIdDistSq); - } - - // Electron - template - bool selElectron(const T& track, int& IdMethod, float& nSigmaIdDistSq) - { - return selPdependent(track, IdMethod, nSigmaIdDistSq); - } - - // Muon - template - bool selMuon(const T& track, int& IdMethod, float& nSigmaIdDistSq) - { - return selPdependent(track, IdMethod, nSigmaIdDistSq); - } - - // Deuteron - template - bool selDeuteron(const T& track, int& IdMethod, float& nSigmaIdDistSq) - { - return selPdependent(track, IdMethod, nSigmaIdDistSq); - } - - // Two-argument versions - template - bool selPion(const T& track, int& IdMethod) - { - float nSigmaIdDistSq = -1.0f; - return selPion(track, IdMethod, nSigmaIdDistSq); - } - - template - bool selKaon(const T& track, int& IdMethod) - { - float nSigmaIdDistSq = -1.0f; - return selKaon(track, IdMethod, nSigmaIdDistSq); - } - - template - bool selProton(const T& track, int& IdMethod) - { - float nSigmaIdDistSq = -1.0f; - return selProton(track, IdMethod, nSigmaIdDistSq); - } - - template - bool selElectron(const T& track, int& IdMethod) - { - float nSigmaIdDistSq = -1.0f; - return selElectron(track, IdMethod, nSigmaIdDistSq); - } - - template - bool selMuon(const T& track, int& IdMethod) - { - float nSigmaIdDistSq = -1.0f; - return selMuon(track, IdMethod, nSigmaIdDistSq); - } - - template - bool selDeuteron(const T& track, int& IdMethod) - { - float nSigmaIdDistSq = -1.0f; - return selDeuteron(track, IdMethod, nSigmaIdDistSq); - } - // - - template - float computeDerivedRapidity(const T& particle, const float mass) - { - const float pz = particle.pt() * std::sinh(particle.eta()); - const float p = particle.pt() * std::cosh(particle.eta()); - const float energy = std::sqrt(p * p + mass * mass); - return 0.5f * std::log((energy + pz) / (energy - pz)); - } - - template - void fillCorrParticleQA(H& histReg, const T& track) - { - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("P"), track.p()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("Pt"), track.pt()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("Eta"), track.eta()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("Phi"), track.phi()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DCAxy"), track.dcaXY()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DCAz"), track.dcaZ()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("Sign"), track.sign()); - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DCAxyVsPt"), track.pt(), track.dcaXY()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DCAzVsPt"), track.pt(), track.dcaZ()); - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("TPCSignalVsTPCInnerParam"), track.tpcInnerParam(), track.tpcSignal()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("TPCSignalVsP"), track.p(), track.tpcSignal()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("TOFBetaVsTOFExpMom"), track.tofExpMom(), track.beta()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("TOFBetaVsP"), track.p(), track.beta()); - } - - template - void fillIdentifiedCorrelation(H& histReg, const T& trigger, const A& associate, const int idMethod) - { - const float dPhi = computeDeltaPhi(associate.phi(), trigger.phi()); - const float dEta = associate.eta() - trigger.eta(); - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("P"), associate.p()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Pt"), associate.pt()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Eta"), associate.eta()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Phi"), associate.phi()); - - if constexpr (pidType == kPi) { - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Rapidity"), computeDerivedRapidity(associate, MassPiPlus)); - } else if constexpr (pidType == kKa) { - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Rapidity"), computeDerivedRapidity(associate, MassKPlus)); - } else if constexpr (pidType == kPr) { - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Rapidity"), computeDerivedRapidity(associate, MassProton)); - } - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DCAxy"), associate.dcaXY()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DCAz"), associate.dcaZ()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("Sign"), associate.sign()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DCAxyVsPt"), associate.pt(), associate.dcaXY()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DCAzVsPt"), associate.pt(), associate.dcaZ()); - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TPCSignalVsP"), associate.p(), associate.tpcSignal()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TOFBetaVsP"), associate.p(), associate.beta()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("IdMethodVsP"), associate.p(), idMethod); - - if constexpr (pidType == kPi) { - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TPCNSigmaVsP"), associate.p(), associate.tpcNSigmaPi()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TOFNSigmaVsP"), associate.p(), associate.tofNSigmaPi()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TPCNSigmaVsTOFNSigma"), associate.tpcNSigmaPi(), associate.tofNSigmaPi()); - } else if constexpr (pidType == kKa) { - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TPCNSigmaVsP"), associate.p(), associate.tpcNSigmaKa()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TOFNSigmaVsP"), associate.p(), associate.tofNSigmaKa()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TPCNSigmaVsTOFNSigma"), associate.tpcNSigmaKa(), associate.tofNSigmaKa()); - } else if constexpr (pidType == kPr) { - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TPCNSigmaVsP"), associate.p(), associate.tpcNSigmaPr()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TOFNSigmaVsP"), associate.p(), associate.tofNSigmaPr()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("TPCNSigmaVsTOFNSigma"), associate.tpcNSigmaPr(), associate.tofNSigmaPr()); - } - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DeltaPhi"), dPhi); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DeltaEta"), dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[kHId]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(PidTypeDire[pidType]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta); - } - - template - void fillResoAssocQA(H& histReg, const A& associate, const float invMass) - { - const float p = associate.pt() * std::cosh(associate.eta()); - const float rapidity = computeDerivedRapidity(associate, invMass); - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/") + HIST("P"), p); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/") + HIST("Pt"), associate.pt()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/") + HIST("Eta"), associate.eta()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/") + HIST("Phi"), associate.phi()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/") + HIST("Rapidity"), rapidity); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/") + HIST("InvMass"), invMass); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("Reso/") + HIST("InvMassVsPt"), associate.pt(), invMass); - } - - template - void fillResoDauQA(H& histReg, const T& track, const int idMethod) - { - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("P"), track.p()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("Pt"), track.pt()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("Eta"), track.eta()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("Phi"), track.phi()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("DCAxy"), track.dcaXY()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("DCAz"), track.dcaZ()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("Sign"), track.sign()); - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("DCAxyVsPt"), track.pt(), track.dcaXY()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("DCAzVsPt"), track.pt(), track.dcaZ()); - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("TPCSignalVsP"), track.p(), track.tpcSignal()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("TOFBetaVsP"), track.p(), track.beta()); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("IdMethodVsP"), track.p(), idMethod); - - float tpcNSigma = 0.0f; - float tofNSigma = 0.0f; - float massHypothesis = 0.0f; - - if constexpr (pairType == kHPhi || (pairType == kHKStar && dauType == kPosDau) || (pairType == kHKStarBar && dauType == kNegDau) || - (pairType == kHLambda && dauType == kNegDau) || (pairType == kHLambdaBar && dauType == kPosDau)) { - tpcNSigma = track.tpcNSigmaKa(); - tofNSigma = track.tofNSigmaKa(); - massHypothesis = MassKPlus; - } else if constexpr ((pairType == kHKStar && dauType == kNegDau) || (pairType == kHKStarBar && dauType == kPosDau)) { - tpcNSigma = track.tpcNSigmaPi(); - tofNSigma = track.tofNSigmaPi(); - massHypothesis = MassPiPlus; - } else if constexpr ((pairType == kHLambda && dauType == kPosDau) || (pairType == kHLambdaBar && dauType == kNegDau)) { - tpcNSigma = track.tpcNSigmaPr(); - tofNSigma = track.tofNSigmaPr(); - massHypothesis = MassProton; - } - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("Rapidity"), computeDerivedRapidity(track, massHypothesis)); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("TPCNSigmaVsP"), track.p(), tpcNSigma); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("TOFNSigmaVsP"), track.p(), tofNSigma); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kQA]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST(DauTypeDire[dauType]) + HIST("TPCNSigmaVsTOFNSigma"), tpcNSigma, tofNSigma); - } - - template - void fillTrigAssociateCorrelation(H& histReg, const T& trigger, const A& associate) - { - const float dPhi = computeDeltaPhi(associate.phi(), trigger.phi()); - const float dEta = associate.eta() - trigger.eta(); - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DeltaPhi"), dPhi); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DeltaEta"), dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[analysisType]) + HIST(CorrRoleDire[roleType]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta); - } - - template - void fillResoCorrelation(H& histReg, const T& trigger, const A& associate) - { - const float dPhi = computeDeltaPhi(associate.phi(), trigger.phi()); - const float dEta = associate.eta() - trigger.eta(); - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("DeltaPhi"), dPhi); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("DeltaEta"), dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("DeltaPhiDeltaEta"), dPhi, dEta); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST(MassRegionDire[massRegion]) + HIST("CorrSparse"), trigger.pt(), associate.pt(), dPhi, dEta); - } - - template - void fillResoMassCorrelation(H& histReg, const T& trigger, const A& associate, const float invMass) - { - const float dPhi = computeDeltaPhi(associate.phi(), trigger.phi()); - const float dEta = associate.eta() - trigger.eta(); - - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST("MassDependent/") + HIST("DeltaPhiVsInvMass"), invMass, dPhi); - histReg.fill(HIST(EventTypeDire[eventType]) + HIST(PairTypeDire[pairType]) + HIST(AnalysisTypeDire[kCorr]) + HIST(CorrRoleDire[roleType]) + HIST("MassDependent/") + HIST("DeltaEtaVsInvMass"), invMass, dEta); - } - - template - void fillResoRegion(H& histReg, const T& trigger, const A& associate, const P& posDauTrack, const N& negDauTrack, const float invMass, const int posDauIdMethod, const int negDauIdMethod) - { - fillResoAssocQA(histReg, associate, invMass); - fillResoDauQA(histReg, posDauTrack, posDauIdMethod); - fillResoDauQA(histReg, negDauTrack, negDauIdMethod); - fillResoCorrelation(histReg, trigger, associate); - fillResoMassCorrelation(histReg, trigger, associate, invMass); - } - - template - bool selectResonanceDaughters(const P& posDauTrack, const N& negDauTrack, int& posDauIdMethod, int& negDauIdMethod) - { - posDauIdMethod = kUnidentified; - negDauIdMethod = kUnidentified; - if constexpr (pairType == kHPhi) { - return selKaon(posDauTrack, posDauIdMethod) && selKaon(negDauTrack, negDauIdMethod); - } else if constexpr (pairType == kHKStar) { - return selKaon(posDauTrack, posDauIdMethod) && selPion(negDauTrack, negDauIdMethod); - } else if constexpr (pairType == kHKStarBar) { - return selPion(posDauTrack, posDauIdMethod) && selKaon(negDauTrack, negDauIdMethod); - } else if constexpr (pairType == kHLambda) { - return selProton(posDauTrack, posDauIdMethod) && selKaon(negDauTrack, negDauIdMethod); - } else if constexpr (pairType == kHLambdaBar) { - return selKaon(posDauTrack, posDauIdMethod) && selProton(negDauTrack, negDauIdMethod); - } - return false; - } - - template - uint8_t getResonanceMassRegion(const A& associate, float& invMass) + template + void fillMixingPairQA(const int mixChannel, const int mixBin, const C& collision1, const C& collision2) { - if constexpr (pairType == kHPhi) { - invMass = associate.mPhi1020(); - return getMassRegionTag(invMass, cfgPhi1020CorrMass.c2042phi1020LSBLow, cfgPhi1020CorrMass.c2043phi1020LSBUp, cfgPhi1020CorrMass.c2040phi1020PeakLow, cfgPhi1020CorrMass.c2041phi1020PeakUp, cfgPhi1020CorrMass.c2044phi1020RSBLow, cfgPhi1020CorrMass.c2045phi1020RSBUp); - } else if constexpr (pairType == kHKStar) { - invMass = associate.mKStar892(); - return getMassRegionTag(invMass, cfgKStar892CorrMass.c2048kStar892LSBLow, cfgKStar892CorrMass.c2049kStar892LSBUp, cfgKStar892CorrMass.c2046kStar892PeakLow, cfgKStar892CorrMass.c2047kStar892PeakUp, cfgKStar892CorrMass.c2050kStar892RSBLow, cfgKStar892CorrMass.c2051kStar892RSBUp); - } else if constexpr (pairType == kHKStarBar) { - invMass = associate.mKStar892Bar(); - return getMassRegionTag(invMass, cfgKStar892CorrMass.c2048kStar892LSBLow, cfgKStar892CorrMass.c2049kStar892LSBUp, cfgKStar892CorrMass.c2046kStar892PeakLow, cfgKStar892CorrMass.c2047kStar892PeakUp, cfgKStar892CorrMass.c2050kStar892RSBLow, cfgKStar892CorrMass.c2051kStar892RSBUp); - } else if constexpr (pairType == kHLambda) { - invMass = associate.mLambda1520(); - return getMassRegionTag(invMass, cfgLambda1520CorrMass.c2054lambda1520LSBLow, cfgLambda1520CorrMass.c2055lambda1520LSBUp, cfgLambda1520CorrMass.c2052lambda1520PeakLow, cfgLambda1520CorrMass.c2053lambda1520PeakUp, cfgLambda1520CorrMass.c2056lambda1520RSBLow, cfgLambda1520CorrMass.c2057lambda1520RSBUp); - } else if constexpr (pairType == kHLambdaBar) { - invMass = associate.mLambda1520Bar(); - return getMassRegionTag(invMass, cfgLambda1520CorrMass.c2054lambda1520LSBLow, cfgLambda1520CorrMass.c2055lambda1520LSBUp, cfgLambda1520CorrMass.c2052lambda1520PeakLow, cfgLambda1520CorrMass.c2053lambda1520PeakUp, cfgLambda1520CorrMass.c2056lambda1520RSBLow, cfgLambda1520CorrMass.c2057lambda1520RSBUp); - } - - invMass = -1.0f; - return kMassOutside; + mixingOperationQA.fill(HIST("ME/Mixing/CollisionPairsPerChannel"), mixChannel); + mixingOperationQA.fill(HIST("ME/Mixing/CollisionPairsPerBinChannel"), mixBin, mixChannel); + mixingOperationQA.fill(HIST("ME/Mixing/VtxZ1VsVtxZ2"), collision1.posZ(), collision2.posZ()); + mixingOperationQA.fill(HIST("ME/Mixing/DeltaVtxZVsChannel"), mixChannel, collision1.posZ() - collision2.posZ()); + mixingOperationQA.fill(HIST("ME/Mixing/Centrality1VsCentrality2"), collision1.centrality(), collision2.centrality()); + mixingOperationQA.fill(HIST("ME/Mixing/DeltaCentralityVsChannel"), mixChannel, collision1.centrality() - collision2.centrality()); } - template - constexpr uint64_t getDerivedResoRegionMask() + //______________________________________________________________________________ + // Mix one channel with selfCombinations. + // collisionPool : collisions whose CorrMask has the channel bit (partition on HPCorrColls) + // assocPartition : associates whose UsedMask has the channel bit (partition on HPCorrAssocs) + // selfCombinations groups the pool by mixing bin (z-vertex x centrality) and pairs every collision with the + // next c2009nEvtMixing collisions of the same bin. Each pair comes once, collision1 before collision2: + // the triggers are taken from collision1 and the associates from collision2. + template + void mixChannel(H& histReg, P& collisionPool, A& assocPartition, aod::HPCorrTriggers const& triggers, const int64_t nCollisions) { constexpr int PtType = roleType == kAssocLowPt ? kCountLowPt : kCountHighPt; - - if constexpr (pairType == kHPhi) { - return getResoRegionMaskBit(kResoCountHPhi, PtType, massRegion); - } else if constexpr (pairType == kHKStar) { - return getResoRegionMaskBit(kResoCountHKStar, PtType, massRegion); - } else if constexpr (pairType == kHKStarBar) { - return getResoRegionMaskBit(kResoCountHKStarBar, PtType, massRegion); - } else if constexpr (pairType == kHLambda) { - return getResoRegionMaskBit(kResoCountHLambda, PtType, massRegion); - } else if constexpr (pairType == kHLambdaBar) { - return getResoRegionMaskBit(kResoCountHLambdaBar, PtType, massRegion); - } - - return 0ULL; - } - - template - bool derivedChannelEnabled(uint64_t mask) - { - constexpr bool LowPt = roleType == kAssocLowPt; - if constexpr (pairType == kHH) { - return mask & (LowPt ? kMaskHHLowPt : kMaskHHHighPt); - } - if constexpr (pairType == kHId && pidType == kPi) { - return mask & (LowPt ? kMaskHPiLowPt : kMaskHPiHighPt); - } - if constexpr (pairType == kHId && pidType == kKa) { - return mask & (LowPt ? kMaskHKaLowPt : kMaskHKaHighPt); - } - if constexpr (pairType == kHId && pidType == kPr) { - return mask & (LowPt ? kMaskHPrLowPt : kMaskHPrHighPt); - } - if constexpr (pairType == kHPhi) { - return mask & (LowPt ? kMaskHPhiLowPt : kMaskHPhiHighPt); - } - if constexpr (pairType == kHKStar) { - return mask & (LowPt ? kMaskHKStarLowPt : kMaskHKStarHighPt); - } - if constexpr (pairType == kHKStarBar) { - return mask & (LowPt ? kMaskHKStarBarLowPt : kMaskHKStarBarHighPt); - } - if constexpr (pairType == kHLambda) { - return mask & (LowPt ? kMaskHLambdaLowPt : kMaskHLambdaHighPt); - } - if constexpr (pairType == kHLambdaBar) { - return mask & (LowPt ? kMaskHLambdaBarLowPt : kMaskHLambdaBarHighPt); - } - return false; - } - - template - bool derivedPairEnabled(uint64_t mask) - { - if constexpr (pairType == kHH) { - return mask & (kMaskHHLowPt | kMaskHHHighPt); - } - if constexpr (pairType == kHId) { - return mask & (kMaskHPiLowPt | kMaskHPiHighPt | kMaskHKaLowPt | kMaskHKaHighPt | kMaskHPrLowPt | kMaskHPrHighPt); - } - if constexpr (pairType == kHPhi) { - return mask & (kMaskHPhiLowPt | kMaskHPhiHighPt); - } - if constexpr (pairType == kHKStar) { - return mask & (kMaskHKStarLowPt | kMaskHKStarHighPt); - } - if constexpr (pairType == kHKStarBar) { - return mask & (kMaskHKStarBarLowPt | kMaskHKStarBarHighPt); - } - if constexpr (pairType == kHLambda) { - return mask & (kMaskHLambdaLowPt | kMaskHLambdaHighPt); - } - if constexpr (pairType == kHLambdaBar) { - return mask & (kMaskHLambdaBarLowPt | kMaskHLambdaBarHighPt); - } - return false; - } - - template - void executeDerivedTrigAssocCorrelation(H& histReg, const T& trigger, const A& associates, uint64_t commonCorrMask, uint8_t requiredMassRegion = kMassNone) - { - for (const auto& associate : associates) { - - if constexpr (pairType == kHH) { - if (!derivedChannelEnabled(commonCorrMask)) { - continue; - } - fillCorrParticleQA(histReg, associate); - fillTrigAssociateCorrelation(histReg, trigger, associate); - } - - if constexpr (pairType == kHId) { - int pionIdMethod = kUnidentified; - int kaonIdMethod = kUnidentified; - int protonIdMethod = kUnidentified; - if (derivedChannelEnabled(commonCorrMask) && selPion(associate, pionIdMethod)) { - fillIdentifiedCorrelation(histReg, trigger, associate, pionIdMethod); - } - if (derivedChannelEnabled(commonCorrMask) && selKaon(associate, kaonIdMethod)) { - fillIdentifiedCorrelation(histReg, trigger, associate, kaonIdMethod); - } - if (derivedChannelEnabled(commonCorrMask) && selProton(associate, protonIdMethod)) { - fillIdentifiedCorrelation(histReg, trigger, associate, protonIdMethod); - } + constexpr int CorrType = getCorrType(); + constexpr bool IsReso = CorrType >= kCountHPhi; + constexpr int MixChannel = IsReso ? NTrackMixChannels + (CorrType - kCountHPhi) * kNCorrCountPt * NMassWindows + PtType * NMassWindows + (massRegion - kMassPeak) + : CorrType * kNCorrCountPt + PtType; + static_assert(MixChannel >= 0 && MixChannel < NMixOperationChannels, "Invalid mixing channel"); + + nPartnersPerColl.assign(nCollisions, 0); + + for (const auto& [collision1, collision2] : selfCombinations(colBinning, cfgMixing.c2009nEvtMixing, -1, collisionPool, collisionPool)) { + const int mixBin1 = colBinning.getBin({collision1.posZ(), collision1.centrality()}); + const int mixBin2 = colBinning.getBin({collision2.posZ(), collision2.centrality()}); + if (mixBin1 != mixBin2) { + LOG(fatal) << "EVENT MIXING ERROR :: collisions from different mixing bins :: " << mixBin1 << " :: " << mixBin2; } - if constexpr (pairType == kHPhi || pairType == kHKStar || pairType == kHKStarBar || pairType == kHLambda || pairType == kHLambdaBar) { - if (requiredMassRegion == kMassNone && !derivedChannelEnabled(commonCorrMask)) { - continue; - } - if (requiredMassRegion != kMassNone && commonCorrMask == 0ULL) { - continue; - } - - const auto& posDauTrack = associate.template posTrack_as(); - const auto& negDauTrack = associate.template negTrack_as(); - - int posDauIdMethod = kUnidentified; - int negDauIdMethod = kUnidentified; - if (!selectResonanceDaughters(posDauTrack, negDauTrack, posDauIdMethod, negDauIdMethod)) { - continue; - } + nPartnersPerColl[collision1.globalIndex()]++; + fillMixingPairQA(MixChannel, mixBin1, collision1, collision2); - float invMass = -1.0f; - const uint8_t massRegion = getResonanceMassRegion(associate, invMass); - if (massRegion == kMassOutside) { - continue; - } - const float rapidity = computeDerivedRapidity(associate, invMass); - if (rapidity < cfgResPartitions.c2018resoRapidityMin || rapidity > cfgResPartitions.c2019resoRapidityMax) { - continue; - } - if (requiredMassRegion != kMassNone && massRegion != requiredMassRegion) { - continue; - } + const auto triggers1 = triggers.sliceBy(triggersPerCollPreslice, collision1.globalIndex()); + const auto associates2 = assocPartition->sliceByCached(aod::hpcorrassoc::hpCorrCollId, collision2.globalIndex(), cache); - if (massRegion == kMassPeak) { - fillResoRegion(histReg, trigger, associate, posDauTrack, negDauTrack, invMass, posDauIdMethod, negDauIdMethod); - } else if (massRegion == kMassLSB) { - fillResoRegion(histReg, trigger, associate, posDauTrack, negDauTrack, invMass, posDauIdMethod, negDauIdMethod); - } else if (massRegion == kMassRSB) { - fillResoRegion(histReg, trigger, associate, posDauTrack, negDauTrack, invMass, posDauIdMethod, negDauIdMethod); + for (const auto& trigger : triggers1) { + for (const auto& associate : associates2) { + fillMixedPair(histReg, trigger, associate, collision1.centrality()); } } } - } - - template - void executeDerivedCorrelation(H& histReg, const T& triggers, const A& associatesLowPt, const B& associatesHighPt, uint64_t commonCorrMask) - { - if (!derivedPairEnabled(commonCorrMask)) { - return; - } - - for (const auto& trigger : triggers) { - fillCorrParticleQA(histReg, trigger); - executeDerivedTrigAssocCorrelation(histReg, trigger, associatesLowPt, commonCorrMask); - executeDerivedTrigAssocCorrelation(histReg, trigger, associatesHighPt, commonCorrMask); - } - } - template - void executeDerivedCorrelationRole(H& histReg, const T& triggers, const A& associates, uint8_t requiredMassRegion = kMassNone) - { - for (const auto& trigger : triggers) { - fillCorrParticleQA(histReg, trigger); - executeDerivedTrigAssocCorrelation(histReg, trigger, associates, requiredMask, requiredMassRegion); + // Pool QA: every collision of the pool and the number of partners it was mixed with as trigger event + for (const auto& collision : collisionPool) { + const int mixBin = colBinning.getBin({collision.posZ(), collision.centrality()}); + if (mixBin < 0) { + continue; + } + const int nPartners = nPartnersPerColl[collision.globalIndex()]; + mixingOperationQA.fill(HIST("ME/Mixing/CollisionsPerBinChannel"), mixBin, MixChannel); + mixingOperationQA.fill(HIST("ME/Mixing/PartnersPerTriggerEvent"), MixChannel, nPartners); + mixingOperationQA.fill(HIST("ME/Mixing/PartnersPerTriggerEventVsBin"), mixBin, MixChannel, nPartners); } } - Preslice drTracksPerCollisionPreslice = aod::hpcorrtrack::hpCorrCollId; - Preslice drResoPerCollisionPreslice = aod::hpcorrresonance::hpCorrCollId; - - // definition of partitions - SliceCache cache; - Partition drMixHHLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHHLowPt)) != static_cast(0ULL); - Partition drMixHHHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHHHighPt)) != static_cast(0ULL); - - Partition drMixHPiLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPiLowPt)) != static_cast(0ULL); - Partition drMixHPiHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPiHighPt)) != static_cast(0ULL); - Partition drMixHKaLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKaLowPt)) != static_cast(0ULL); - Partition drMixHKaHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKaHighPt)) != static_cast(0ULL); - Partition drMixHPrLowPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPrLowPt)) != static_cast(0ULL); - Partition drMixHPrHighPt = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPrHighPt)) != static_cast(0ULL); - - Partition drMixHPhiLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiLowPtPeak)) != static_cast(0ULL); - Partition drMixHPhiLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiLowPtLSB)) != static_cast(0ULL); - Partition drMixHPhiLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiLowPtRSB)) != static_cast(0ULL); - - Partition drMixHPhiHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiHighPtPeak)) != static_cast(0ULL); - Partition drMixHPhiHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiHighPtLSB)) != static_cast(0ULL); - Partition drMixHPhiHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHPhiHighPtRSB)) != static_cast(0ULL); - - Partition drMixHKStarLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarLowPtPeak)) != static_cast(0ULL); - Partition drMixHKStarLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarLowPtLSB)) != static_cast(0ULL); - Partition drMixHKStarLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarLowPtRSB)) != static_cast(0ULL); - - Partition drMixHKStarHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarHighPtPeak)) != static_cast(0ULL); - Partition drMixHKStarHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarHighPtLSB)) != static_cast(0ULL); - Partition drMixHKStarHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarHighPtRSB)) != static_cast(0ULL); - - Partition drMixHKStarBarLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarLowPtPeak)) != static_cast(0ULL); - Partition drMixHKStarBarLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarLowPtLSB)) != static_cast(0ULL); - Partition drMixHKStarBarLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarLowPtRSB)) != static_cast(0ULL); - - Partition drMixHKStarBarHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarHighPtPeak)) != static_cast(0ULL); - Partition drMixHKStarBarHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarHighPtLSB)) != static_cast(0ULL); - Partition drMixHKStarBarHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHKStarBarHighPtRSB)) != static_cast(0ULL); - - Partition drMixHLambdaLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaLowPtPeak)) != static_cast(0ULL); - Partition drMixHLambdaLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaLowPtLSB)) != static_cast(0ULL); - Partition drMixHLambdaLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaLowPtRSB)) != static_cast(0ULL); - - Partition drMixHLambdaHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaHighPtPeak)) != static_cast(0ULL); - Partition drMixHLambdaHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaHighPtLSB)) != static_cast(0ULL); - Partition drMixHLambdaHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaHighPtRSB)) != static_cast(0ULL); - - Partition drMixHLambdaBarLowPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarLowPtPeak)) != static_cast(0ULL); - Partition drMixHLambdaBarLowPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarLowPtLSB)) != static_cast(0ULL); - Partition drMixHLambdaBarLowPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarLowPtRSB)) != static_cast(0ULL); - - Partition drMixHLambdaBarHighPtPeak = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarHighPtPeak)) != static_cast(0ULL); - Partition drMixHLambdaBarHighPtLSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarHighPtLSB)) != static_cast(0ULL); - Partition drMixHLambdaBarHighPtRSB = (aod::hpcorrcollision::corrMask & static_cast(kMaskHLambdaBarHighPtRSB)) != static_cast(0ULL); - - Partition drTriggerTracks = cfgPartitions.c2012triggerPtLow < aod::hpcorrtrack::pt && aod::hpcorrtrack::pt < cfgPartitions.c2013triggerPtHigh; - Partition drPosTracks = aod::hpcorrtrack::sign > static_cast(0); - Partition drNegTracks = aod::hpcorrtrack::sign < static_cast(0); - Partition drAssocTracksLowPt = cfgPartitions.c2014assocPtLowMin < aod::hpcorrtrack::pt && aod::hpcorrtrack::pt < cfgPartitions.c2015assocPtLowMax; - Partition drAssocTracksHighPt = cfgPartitions.c2016assocPtHighMin < aod::hpcorrtrack::pt && aod::hpcorrtrack::pt < cfgPartitions.c2017assocPtHighMax; - - Partition drAssocPhiLowPt = cfgResPartitions.c2020phiPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2021phiPtLowMax && aod::hpcorrresonance::phi1020Tag != static_cast(kMassOutside); - Partition drAssocPhiHighPt = cfgResPartitions.c2022phiPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2023phiPtHighMax && aod::hpcorrresonance::phi1020Tag != static_cast(kMassOutside); - Partition drAssocKStarLowPt = cfgResPartitions.c2024kstarPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2025kstarPtLowMax && aod::hpcorrresonance::kStar892Tag != static_cast(kMassOutside); - Partition drAssocKStarHighPt = cfgResPartitions.c2026kstarPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2027kstarPtHighMax && aod::hpcorrresonance::kStar892Tag != static_cast(kMassOutside); - Partition drAssocKStarBarLowPt = cfgResPartitions.c2028kstarBarPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2029kstarBarPtLowMax && aod::hpcorrresonance::kStar892BarTag != static_cast(kMassOutside); - Partition drAssocKStarBarHighPt = cfgResPartitions.c2030kstarBarPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2031kstarBarPtHighMax && aod::hpcorrresonance::kStar892BarTag != static_cast(kMassOutside); - Partition drAssocLambda1520LowPt = cfgResPartitions.c2032lambda1520PtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2033lambda1520PtLowMax && aod::hpcorrresonance::lambda1520Tag != static_cast(kMassOutside); - Partition drAssocLambda1520HighPt = cfgResPartitions.c2034lambda1520PtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2035lambda1520PtHighMax && aod::hpcorrresonance::lambda1520Tag != static_cast(kMassOutside); - Partition drAssocLambda1520BarLowPt = cfgResPartitions.c2036lambda1520BarPtLowMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2037lambda1520BarPtLowMax && aod::hpcorrresonance::lambda1520BarTag != static_cast(kMassOutside); - Partition drAssocLambda1520BarHighPt = cfgResPartitions.c2038lambda1520BarPtHighMin < aod::hpcorrresonance::pt && aod::hpcorrresonance::pt < cfgResPartitions.c2039lambda1520BarPtHighMax && aod::hpcorrresonance::lambda1520BarTag != static_cast(kMassOutside); - int dfNumber = 0; void processNothing(aod::Origins const& origins) { if (cfgDebug.c2001printDebugMessages) { LOG(info) << "DEBUG :: Process Nothing :: df_" << dfNumber << " :: origins = " << origins.size(); } - // Intentionally empty. - // Keeps the task alive when running purely on derived data. + // Intentionally empty. Keeps the task alive when the mixing is not run. } PROCESS_SWITCH(HParticleCorrelation3MixedEvent, processNothing, "Dummy process for analysis", true); - int nColl = 0; - void processMixEventInDeriveData(aod::Origins const& origins, aod::HPCorrColls const& drCollisions, aod::HPCorrTracks const& drFullTracks, aod::HPCorrResonances const& drResonanceCndts /*, o2::aod::Origins const& Origins, aod::BCsWithTimestamps const&*/) + void processMixEventInDeriveData(aod::HPCorrColls const& collisions, aod::HPCorrTriggers const& triggers, aod::HPCorrAssocs const& assocs) { dfNumber++; - if (cfgDebug.c2001printDebugMessages) { - LOG(info) << "DEBUG :: df_" << dfNumber << " :: origins = " << origins.size() << " :: drCollisions = " << drCollisions.size() << " :: drFullTracks = " << drFullTracks.size() << " :: drResonanceCndts = " << drResonanceCndts.size(); - } - - int64_t nTrackChecks = 0; - int64_t nBadCollisionIndex = 0; - int64_t nBadTrackCollision = 0; - int64_t nResonanceChecks = 0; - int64_t nBadResonanceCollision = 0; - int64_t nBadResonanceDaughters = 0; - for (const auto& coll : drCollisions) { - auto drTracksPerColl = drFullTracks.sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); - auto drResonancesPerColl = drResonanceCndts.sliceByCached(aod::hpcorrresonance::hpCorrCollId, coll.globalIndex(), cache); - auto drTriggerTracksPerColl = drTriggerTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); - auto drPosTracksPerColl = drPosTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); - auto drNegTracksPerColl = drNegTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); - auto drAssocTracksLowPtPerColl = drAssocTracksLowPt->sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); - auto drAssocTracksHighPtPerColl = drAssocTracksHighPt->sliceByCached(aod::hpcorrtrack::hpCorrCollId, coll.globalIndex(), cache); - auto drAssocPhiLowPtPerColl = drAssocPhiLowPt->sliceByCached(aod::hpcorrresonance::hpCorrCollId, coll.globalIndex(), cache); - auto drAssocPhiHighPtPerColl = drAssocPhiHighPt->sliceByCached(aod::hpcorrresonance::hpCorrCollId, coll.globalIndex(), cache); - - if (coll.globalIndex() != coll.globalCollisionId()) { - nBadCollisionIndex++; - LOG(error) << "DEBUG :: nColl = " << nColl << " :: coll.globalIndex() != coll.globalCollisionId() i.e " << coll.globalIndex() << " != " << coll.globalCollisionId(); - } - - for (const auto& track : drTracksPerColl) { - nTrackChecks++; - if (track.hpCorrCollId() != coll.globalIndex()) { - nBadTrackCollision++; - LOG(error) << "TRACK CHECK :: hpCorrCollId mismatch :: " << track.hpCorrCollId() << " != " << coll.globalIndex(); - } - if (track.globalColRefId() != coll.globalCollisionId()) { - nBadTrackCollision++; - LOG(error) << "TRACK CHECK :: globalColRefId mismatch :: " << track.globalColRefId() << " != " << coll.globalCollisionId(); - } - if (track.originalColRefId() != coll.originalCollisionId()) { - nBadTrackCollision++; - LOG(error) << "TRACK CHECK :: originalColRefId mismatch :: " << track.originalColRefId() << " != " << coll.originalCollisionId(); - } - if (track.dataframeID() != coll.dataframeID()) { - nBadTrackCollision++; - LOG(error) << "TRACK CHECK :: dataframeID mismatch :: " << track.dataframeID() << " != " << coll.dataframeID(); - } - if (track.globalTrackId() != track.globalIndex()) { - nBadTrackCollision++; - LOG(error) << "TRACK CHECK :: globalTrackId mismatch :: " << track.globalTrackId() << " != " << track.globalIndex(); - } - } - - for (const auto& resonance : drResonancesPerColl) { - nResonanceChecks++; - - if (resonance.hpCorrCollId() != coll.globalIndex()) { - nBadResonanceCollision++; - LOG(error) << "RESONANCE CHECK :: hpCorrCollId mismatch :: " << resonance.hpCorrCollId() << " != " << coll.globalIndex(); - } - if (resonance.globalColRefId() != coll.globalCollisionId()) { - nBadResonanceCollision++; - LOG(error) << "RESONANCE CHECK :: globalColRefId mismatch :: " << resonance.globalColRefId() << " != " << coll.globalCollisionId(); - } - if (resonance.originalColRefId() != coll.originalCollisionId()) { - nBadResonanceCollision++; - LOG(error) << "RESONANCE CHECK :: originalColRefId mismatch :: " << resonance.originalColRefId() << " != " << coll.originalCollisionId(); - } - if (resonance.dataframeID() != coll.dataframeID()) { - nBadResonanceCollision++; - LOG(error) << "RESONANCE CHECK :: dataframeID mismatch :: " << resonance.dataframeID() << " != " << coll.dataframeID(); - } - if (resonance.globalResonanceId() != resonance.globalIndex()) { - nBadResonanceCollision++; - LOG(error) << "RESONANCE CHECK :: globalResonanceId mismatch :: " << resonance.globalResonanceId() << " != " << resonance.globalIndex(); - } - - const auto& posTrack = resonance.posTrack_as(); - const auto& negTrack = resonance.negTrack_as(); - - if (resonance.posTrackId() != posTrack.globalIndex()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: posTrackId mismatch :: " << resonance.posTrackId() << " != " << posTrack.globalIndex(); - } - if (resonance.negTrackId() != negTrack.globalIndex()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: negTrackId mismatch :: " << resonance.negTrackId() << " != " << negTrack.globalIndex(); - } - - if (resonance.globalPosTrackRefId() != posTrack.globalTrackId()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: globalPosTrackRefId mismatch :: " << resonance.globalPosTrackRefId() << " != " << posTrack.globalTrackId(); - } - if (resonance.globalNegTrackRefId() != negTrack.globalTrackId()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: globalNegTrackRefId mismatch :: " << resonance.globalNegTrackRefId() << " != " << negTrack.globalTrackId(); - } - - if (resonance.originalPosTrackRefId() != posTrack.originalTrackId()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: originalPosTrackRefId mismatch :: " << resonance.originalPosTrackRefId() << " != " << posTrack.originalTrackId(); - } - if (resonance.originalNegTrackRefId() != negTrack.originalTrackId()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: originalNegTrackRefId mismatch :: " << resonance.originalNegTrackRefId() << " != " << negTrack.originalTrackId(); - } - - if (resonance.dataframeID() != posTrack.dataframeID()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: resonance/posTrack dataframeID mismatch :: " << resonance.dataframeID() << " != " << posTrack.dataframeID(); - } - if (resonance.dataframeID() != negTrack.dataframeID()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: resonance/negTrack dataframeID mismatch :: " << resonance.dataframeID() << " != " << negTrack.dataframeID(); - } - - if (posTrack.hpCorrCollId() != coll.globalIndex()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: positive daughter belongs to wrong collision :: " << posTrack.hpCorrCollId() << " != " << coll.globalIndex(); - } - if (negTrack.hpCorrCollId() != coll.globalIndex()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: negative daughter belongs to wrong collision :: " << negTrack.hpCorrCollId() << " != " << coll.globalIndex(); - } - - if (posTrack.originalColRefId() != coll.originalCollisionId()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: positive daughter original collision mismatch :: " << posTrack.originalColRefId() << " != " << coll.originalCollisionId(); - } - if (negTrack.originalColRefId() != coll.originalCollisionId()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: negative daughter original collision mismatch :: " << negTrack.originalColRefId() << " != " << coll.originalCollisionId(); - } - - if (posTrack.dataframeID() != coll.dataframeID()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: positive daughter dataframe mismatch :: " << posTrack.dataframeID() << " != " << coll.dataframeID(); - } - if (negTrack.dataframeID() != coll.dataframeID()) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: negative daughter dataframe mismatch :: " << negTrack.dataframeID() << " != " << coll.dataframeID(); - } - - if (posTrack.sign() <= 0) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: positive daughter has wrong sign :: " << static_cast(posTrack.sign()); - } - if (negTrack.sign() >= 0) { - nBadResonanceDaughters++; - LOG(error) << "DAUGHTER CHECK :: negative daughter has wrong sign :: " << static_cast(negTrack.sign()); - } - } - nColl++; - } // Collision loop is over + const int64_t nCollisions = collisions.size(); + mixingOperationQA.fill(HIST("ME/Mixing/DataFramesProcessed"), 0.0); + mixingOperationQA.fill(HIST("ME/Mixing/CollisionsPerDF"), nCollisions); if (cfgDebug.c2001printDebugMessages) { - LOG(info) << "DEBUG :: SANITY CHECK SUMMARY :: bad collision indices = " << nBadCollisionIndex << " :: tracks checked = " << nTrackChecks << " :: bad track references = " << nBadTrackCollision << " :: resonances checked = " << nResonanceChecks << " :: bad resonance collision references = " << nBadResonanceCollision << " :: bad resonance daughter references = " << nBadResonanceDaughters; - } - if (nBadCollisionIndex == 0 && nBadTrackCollision == 0 && nBadResonanceCollision == 0 && nBadResonanceDaughters == 0) { - if (cfgDebug.c2001printDebugMessages) { - LOG(info) << "DEBUG :: SANITY CHECK PASSED"; - } - } else { - LOG(fatal) << "DEBUG :: SANITY CHECK FAILED"; + LOG(info) << "DEBUG :: df_" << dfNumber << " :: collisions = " << nCollisions << " :: triggers = " << triggers.size() << " :: assocs = " << assocs.size(); } - int64_t nMixedEventPairs = 0; - - auto runRestrictedMixing = [&](auto& colBinning, auto& collisionPool, const int mixChannel, auto&& processPair) { - collisionPool.bindTable(drCollisions); - std::vector partnerCountPerTriggerEvent(drCollisions.size(), -1); - for (const auto& collision : collisionPool) { - partnerCountPerTriggerEvent[collision.globalIndex()] = 0; - } - - for (const auto& [collision1, collision2] : selfCombinations(colBinning, cfgMixing.c2008nEvtMixing, -1, collisionPool, collisionPool)) { - nMixedEventPairs++; - - if (collision1.dataframeID() == collision2.dataframeID() && collision1.originalCollisionId() == collision2.originalCollisionId()) { - LOG(fatal) << "EVENT MIXING ERROR :: same original collision mixed with itself"; - } - - const int mixingBin1 = getDerivedMixingBin(collision1); - const int mixingBin2 = getDerivedMixingBin(collision2); - - if (mixingBin1 < 0 || mixingBin2 < 0) { - LOG(fatal) << "EVENT MIXING ERROR :: invalid mixing bin :: " << mixingBin1 << " :: " << mixingBin2; - } - - if (mixingBin1 != mixingBin2) { - LOG(fatal) << "EVENT MIXING ERROR :: collisions from different mixing bins :: " << mixingBin1 << " :: " << mixingBin2; - } - - partnerCountPerTriggerEvent[collision1.globalIndex()]++; - - mixingOperationQA.fill(HIST("ME/Mixing/CollisionPairsPerChannel"), mixChannel); - mixingOperationQA.fill(HIST("ME/Mixing/CollisionPairsPerBinChannel"), mixingBin1, mixChannel); - - mixingOperationQA.fill(HIST("ME/Mixing/VtxZ1VsVtxZ2"), collision1.posZ(), collision2.posZ()); - mixingOperationQA.fill(HIST("ME/Mixing/DeltaVtxZVsChannel"), mixChannel, collision1.posZ() - collision2.posZ()); - - mixingOperationQA.fill(HIST("ME/Mixing/CentFT0C1VsCentFT0C2"), collision1.centFT0C(), collision2.centFT0C()); - mixingOperationQA.fill(HIST("ME/Mixing/CentFT0M1VsCentFT0M2"), collision1.centFT0M(), collision2.centFT0M()); - mixingOperationQA.fill(HIST("ME/Mixing/CentFT0A1VsCentFT0A2"), collision1.centFT0A(), collision2.centFT0A()); - mixingOperationQA.fill(HIST("ME/Mixing/CentFV0A1VsCentFV0A2"), collision1.centFV0A(), collision2.centFV0A()); - - mixingOperationQA.fill(HIST("ME/Mixing/DeltaCentFT0CVsChannel"), mixChannel, collision1.centFT0C() - collision2.centFT0C()); - mixingOperationQA.fill(HIST("ME/Mixing/DeltaCentFT0MVsChannel"), mixChannel, collision1.centFT0M() - collision2.centFT0M()); - mixingOperationQA.fill(HIST("ME/Mixing/DeltaCentFT0AVsChannel"), mixChannel, collision1.centFT0A() - collision2.centFT0A()); - mixingOperationQA.fill(HIST("ME/Mixing/DeltaCentFV0AVsChannel"), mixChannel, collision1.centFV0A() - collision2.centFV0A()); - - const float mixingEstimator1 = getDerivedMixingEstimatorValue(collision1); - const float mixingEstimator2 = getDerivedMixingEstimatorValue(collision2); - - mixingOperationQA.fill(HIST("ME/Mixing/MixingEstimator1Vs2"), mixingEstimator1, mixingEstimator2); - mixingOperationQA.fill(HIST("ME/Mixing/DeltaMixingEstimatorVsChannel"), mixChannel, mixingEstimator1 - mixingEstimator2); - - processPair(collision1, collision2); - } - - for (const auto& collision : collisionPool) { - const int nPartners = partnerCountPerTriggerEvent[collision.globalIndex()]; - const int mixingBin = getDerivedMixingBin(collision); - - mixingOperationQA.fill(HIST("ME/Mixing/PartnersPerTriggerEvent"), mixChannel, nPartners); - - if (mixingBin >= 0) { - mixingOperationQA.fill(HIST("ME/Mixing/PartnersPerTriggerEventVsBin"), mixingBin, mixChannel, nPartners); - } + // Index sanity check: every trigger / associate must point to a collision of this (merged) dataframe + int64_t nBadIndex = 0; + for (const auto& trigger : triggers) { + if (trigger.hpCorrCollId() < 0 || trigger.hpCorrCollId() >= nCollisions) { + ++nBadIndex; } - }; - - auto runTrackChannelMixing = [&](auto& colBinning, auto& collisionPool, auto& assocPartition, auto& histReg) { - constexpr int MixChannel = getMixOperationChannel(requiredMask); - static_assert(MixChannel >= 0, "Invalid track mixing-operation channel"); - - runRestrictedMixing(colBinning, collisionPool, MixChannel, [&](const auto& collision1, const auto& collision2) { - auto triggerTracks1 = drTriggerTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollId, collision1.globalIndex(), cache); - auto associates2 = assocPartition->sliceByCached(aod::hpcorrtrack::hpCorrCollId, collision2.globalIndex(), cache); - - executeDerivedCorrelationRole(histReg, triggerTracks1, associates2); - }); - }; // NOLINT(readability/braces) - - auto runAllTrackMixing = [&](auto& colBinning) { - runTrackChannelMixing.template operator()(colBinning, drMixHHLowPt, drAssocTracksLowPt, hhCorrelation); - runTrackChannelMixing.template operator()(colBinning, drMixHHHighPt, drAssocTracksHighPt, hhCorrelation); - - runTrackChannelMixing.template operator()(colBinning, drMixHPiLowPt, drAssocTracksLowPt, hIdCorrelation); - runTrackChannelMixing.template operator()(colBinning, drMixHPiHighPt, drAssocTracksHighPt, hIdCorrelation); - - runTrackChannelMixing.template operator()(colBinning, drMixHKaLowPt, drAssocTracksLowPt, hIdCorrelation); - runTrackChannelMixing.template operator()(colBinning, drMixHKaHighPt, drAssocTracksHighPt, hIdCorrelation); - - runTrackChannelMixing.template operator()(colBinning, drMixHPrLowPt, drAssocTracksLowPt, hIdCorrelation); - runTrackChannelMixing.template operator()(colBinning, drMixHPrHighPt, drAssocTracksHighPt, hIdCorrelation); - }; - - auto runResoRegionMixing = [&](auto& colBinning, auto& collisionPool, auto& assocPartition, auto& histReg) { - constexpr int MixChannel = getMixOperationChannel(requiredMask); - static_assert(MixChannel >= 0, "Invalid resonance mixing-operation channel"); - - runRestrictedMixing(colBinning, collisionPool, MixChannel, [&](const auto& collision1, const auto& collision2) { - auto triggerTracks1 = drTriggerTracks->sliceByCached(aod::hpcorrtrack::hpCorrCollId, collision1.globalIndex(), cache); - auto associates2 = assocPartition->sliceByCached(aod::hpcorrresonance::hpCorrCollId, collision2.globalIndex(), cache); - - associates2.bindExternalIndices(&drFullTracks); - - executeDerivedCorrelationRole(histReg, triggerTracks1, associates2, requiredMassRegion); - }); - }; // NOLINT(readability/braces) - - auto runAllResoMixing = [&](auto& colBinning) { - runResoRegionMixing.template operator()(colBinning, drMixHPhiLowPtPeak, drAssocPhiLowPt, hPhiCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHPhiLowPtLSB, drAssocPhiLowPt, hPhiCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHPhiLowPtRSB, drAssocPhiLowPt, hPhiCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHPhiHighPtPeak, drAssocPhiHighPt, hPhiCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHPhiHighPtLSB, drAssocPhiHighPt, hPhiCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHPhiHighPtRSB, drAssocPhiHighPt, hPhiCorrelation); - - runResoRegionMixing.template operator()(colBinning, drMixHKStarLowPtPeak, drAssocKStarLowPt, hKStarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHKStarLowPtLSB, drAssocKStarLowPt, hKStarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHKStarLowPtRSB, drAssocKStarLowPt, hKStarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHKStarHighPtPeak, drAssocKStarHighPt, hKStarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHKStarHighPtLSB, drAssocKStarHighPt, hKStarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHKStarHighPtRSB, drAssocKStarHighPt, hKStarCorrelation); - - runResoRegionMixing.template operator()(colBinning, drMixHKStarBarLowPtPeak, drAssocKStarBarLowPt, hKStarBarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHKStarBarLowPtLSB, drAssocKStarBarLowPt, hKStarBarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHKStarBarLowPtRSB, drAssocKStarBarLowPt, hKStarBarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHKStarBarHighPtPeak, drAssocKStarBarHighPt, hKStarBarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHKStarBarHighPtLSB, drAssocKStarBarHighPt, hKStarBarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHKStarBarHighPtRSB, drAssocKStarBarHighPt, hKStarBarCorrelation); - - runResoRegionMixing.template operator()(colBinning, drMixHLambdaLowPtPeak, drAssocLambda1520LowPt, hLambdaCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHLambdaLowPtLSB, drAssocLambda1520LowPt, hLambdaCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHLambdaLowPtRSB, drAssocLambda1520LowPt, hLambdaCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHLambdaHighPtPeak, drAssocLambda1520HighPt, hLambdaCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHLambdaHighPtLSB, drAssocLambda1520HighPt, hLambdaCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHLambdaHighPtRSB, drAssocLambda1520HighPt, hLambdaCorrelation); - - runResoRegionMixing.template operator()(colBinning, drMixHLambdaBarLowPtPeak, drAssocLambda1520BarLowPt, hLambdaBarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHLambdaBarLowPtLSB, drAssocLambda1520BarLowPt, hLambdaBarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHLambdaBarLowPtRSB, drAssocLambda1520BarLowPt, hLambdaBarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHLambdaBarHighPtPeak, drAssocLambda1520BarHighPt, hLambdaBarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHLambdaBarHighPtLSB, drAssocLambda1520BarHighPt, hLambdaBarCorrelation); - runResoRegionMixing.template operator()(colBinning, drMixHLambdaBarHighPtRSB, drAssocLambda1520BarHighPt, hLambdaBarCorrelation); - }; - - switch (cfgMixing.c2009mixingEstimator) { - case kMixCentFT0C: - runAllTrackMixing(colBinningFT0C); - runAllResoMixing(colBinningFT0C); - break; - - case kMixCentFT0M: - runAllTrackMixing(colBinningFT0M); - runAllResoMixing(colBinningFT0M); - break; - - case kMixCentFT0A: - runAllTrackMixing(colBinningFT0A); - runAllResoMixing(colBinningFT0A); - break; - - case kMixCentFV0A: - runAllTrackMixing(colBinningFV0A); - runAllResoMixing(colBinningFV0A); - break; - - default: - LOG(fatal) << "DEBUG :: Invalid mixingEstimator = " << static_cast(cfgMixing.c2009mixingEstimator); - break; } - if (cfgDebug.c2001printDebugMessages) { - LOG(info) << "DEBUG :: EVENT MIXING SUMMARY :: mixed collision pairs = " << nMixedEventPairs; + for (const auto& assoc : assocs) { + if (assoc.hpCorrCollId() < 0 || assoc.hpCorrCollId() >= nCollisions) { + ++nBadIndex; + } } + if (nBadIndex > 0) { + LOG(fatal) << "DERIVED DATA ERROR :: df_" << dfNumber << " :: " << nBadIndex << " trigger/associate rows point outside the collision table"; + } + + // h-h + mixChannel(hhCorrelation, collHHLowPt, assocHHLowPt, triggers, nCollisions); + mixChannel(hhCorrelation, collHHHighPt, assocHHHighPt, triggers, nCollisions); + + // h-pi, h-K, h-p + mixChannel(hIdCorrelation, collHPiLowPt, assocHPiLowPt, triggers, nCollisions); + mixChannel(hIdCorrelation, collHPiHighPt, assocHPiHighPt, triggers, nCollisions); + mixChannel(hIdCorrelation, collHKaLowPt, assocHKaLowPt, triggers, nCollisions); + mixChannel(hIdCorrelation, collHKaHighPt, assocHKaHighPt, triggers, nCollisions); + mixChannel(hIdCorrelation, collHPrLowPt, assocHPrLowPt, triggers, nCollisions); + mixChannel(hIdCorrelation, collHPrHighPt, assocHPrHighPt, triggers, nCollisions); + + // h-Phi + mixChannel(hPhiCorrelation, collHPhiLowPtPeak, assocHPhiLowPtPeak, triggers, nCollisions); + mixChannel(hPhiCorrelation, collHPhiLowPtLSB, assocHPhiLowPtLSB, triggers, nCollisions); + mixChannel(hPhiCorrelation, collHPhiLowPtRSB, assocHPhiLowPtRSB, triggers, nCollisions); + mixChannel(hPhiCorrelation, collHPhiHighPtPeak, assocHPhiHighPtPeak, triggers, nCollisions); + mixChannel(hPhiCorrelation, collHPhiHighPtLSB, assocHPhiHighPtLSB, triggers, nCollisions); + mixChannel(hPhiCorrelation, collHPhiHighPtRSB, assocHPhiHighPtRSB, triggers, nCollisions); + + // h-KStar + mixChannel(hKStarCorrelation, collHKStarLowPtPeak, assocHKStarLowPtPeak, triggers, nCollisions); + mixChannel(hKStarCorrelation, collHKStarLowPtLSB, assocHKStarLowPtLSB, triggers, nCollisions); + mixChannel(hKStarCorrelation, collHKStarLowPtRSB, assocHKStarLowPtRSB, triggers, nCollisions); + mixChannel(hKStarCorrelation, collHKStarHighPtPeak, assocHKStarHighPtPeak, triggers, nCollisions); + mixChannel(hKStarCorrelation, collHKStarHighPtLSB, assocHKStarHighPtLSB, triggers, nCollisions); + mixChannel(hKStarCorrelation, collHKStarHighPtRSB, assocHKStarHighPtRSB, triggers, nCollisions); + + // h-KStarBar + mixChannel(hKStarBarCorrelation, collHKStarBarLowPtPeak, assocHKStarBarLowPtPeak, triggers, nCollisions); + mixChannel(hKStarBarCorrelation, collHKStarBarLowPtLSB, assocHKStarBarLowPtLSB, triggers, nCollisions); + mixChannel(hKStarBarCorrelation, collHKStarBarLowPtRSB, assocHKStarBarLowPtRSB, triggers, nCollisions); + mixChannel(hKStarBarCorrelation, collHKStarBarHighPtPeak, assocHKStarBarHighPtPeak, triggers, nCollisions); + mixChannel(hKStarBarCorrelation, collHKStarBarHighPtLSB, assocHKStarBarHighPtLSB, triggers, nCollisions); + mixChannel(hKStarBarCorrelation, collHKStarBarHighPtRSB, assocHKStarBarHighPtRSB, triggers, nCollisions); + + // h-Lambda + mixChannel(hLambdaCorrelation, collHLambdaLowPtPeak, assocHLambdaLowPtPeak, triggers, nCollisions); + mixChannel(hLambdaCorrelation, collHLambdaLowPtLSB, assocHLambdaLowPtLSB, triggers, nCollisions); + mixChannel(hLambdaCorrelation, collHLambdaLowPtRSB, assocHLambdaLowPtRSB, triggers, nCollisions); + mixChannel(hLambdaCorrelation, collHLambdaHighPtPeak, assocHLambdaHighPtPeak, triggers, nCollisions); + mixChannel(hLambdaCorrelation, collHLambdaHighPtLSB, assocHLambdaHighPtLSB, triggers, nCollisions); + mixChannel(hLambdaCorrelation, collHLambdaHighPtRSB, assocHLambdaHighPtRSB, triggers, nCollisions); + + // h-LambdaBar + mixChannel(hLambdaBarCorrelation, collHLambdaBarLowPtPeak, assocHLambdaBarLowPtPeak, triggers, nCollisions); + mixChannel(hLambdaBarCorrelation, collHLambdaBarLowPtLSB, assocHLambdaBarLowPtLSB, triggers, nCollisions); + mixChannel(hLambdaBarCorrelation, collHLambdaBarLowPtRSB, assocHLambdaBarLowPtRSB, triggers, nCollisions); + mixChannel(hLambdaBarCorrelation, collHLambdaBarHighPtPeak, assocHLambdaBarHighPtPeak, triggers, nCollisions); + mixChannel(hLambdaBarCorrelation, collHLambdaBarHighPtLSB, assocHLambdaBarHighPtLSB, triggers, nCollisions); + mixChannel(hLambdaBarCorrelation, collHLambdaBarHighPtRSB, assocHLambdaBarHighPtRSB, triggers, nCollisions); } - PROCESS_SWITCH(HParticleCorrelation3MixedEvent, processMixEventInDeriveData, "Process Mix event in derive data", true); + PROCESS_SWITCH(HParticleCorrelation3MixedEvent, processMixEventInDeriveData, "Mixed-event correlations from the minimal derived data", true); }; WorkflowSpec defineDataProcessing(ConfigContext const& context) From 33624f60639e9985f9d25d6f50b96b48c362e895 Mon Sep 17 00:00:00 2001 From: Rahul Verma <110929992+rahulverma012@users.noreply.github.com> Date: Mon, 12 Oct 2026 10:55:43 +0530 Subject: [PATCH 3/3] Update hParticleCorrelation.cxx --- PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx b/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx index 7e166cada9f..032a5e988f9 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/hParticleCorrelation.cxx @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -3531,7 +3530,7 @@ struct HParticleCorrelation2SameEvent { continue; } const uint16_t flags = trackUsedFlags[i]; - if (flags & TriggerUsedFlag) { + if ((flags & TriggerUsedFlag) != 0u) { nTriggersWritten++; derivedTriggers(iCollGlobalCount, track.pt(), track.eta(), track.phi()); }