From bc3ee90e49923b38a2d15c418a357054bf5e8d68 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 09:01:12 +0100 Subject: [PATCH 01/11] Fix: fix SE and ME filling for collision and particle histograms --- PWGCF/Femto/Core/collisionHistManager.h | 69 ++-- PWGCF/Femto/Core/pairBuilder.h | 323 +++++++++-------- PWGCF/Femto/Core/pairProcessHelpers.h | 187 ++++++---- PWGCF/Femto/Core/tripletBuilder.h | 177 +++++----- PWGCF/Femto/Core/tripletProcessHelpers.h | 326 +++++++++++------- PWGCF/Femto/Tasks/femtoCascadeQa.cxx | 2 +- PWGCF/Femto/Tasks/femtoCharmHadronQa.cxx | 2 +- PWGCF/Femto/Tasks/femtoKinkQa.cxx | 2 +- PWGCF/Femto/Tasks/femtoMcParticleQa.cxx | 2 +- .../Tasks/femtoPairMcParticleMcParticle.cxx | 2 +- PWGCF/Femto/Tasks/femtoPhotonQa.cxx | 2 +- PWGCF/Femto/Tasks/femtoTrackQa.cxx | 2 +- .../femtoTrackTrackTwoPhotonResonanceQa.cxx | 2 +- .../Femto/Tasks/femtoTwoPhotonResonanceQa.cxx | 2 +- .../Femto/Tasks/femtoTwotrackresonanceQa.cxx | 2 +- PWGCF/Femto/Tasks/femtoV0Qa.cxx | 2 +- 16 files changed, 619 insertions(+), 485 deletions(-) diff --git a/PWGCF/Femto/Core/collisionHistManager.h b/PWGCF/Femto/Core/collisionHistManager.h index 2c77591e0c4..56856d3a778 100644 --- a/PWGCF/Femto/Core/collisionHistManager.h +++ b/PWGCF/Femto/Core/collisionHistManager.h @@ -65,9 +65,17 @@ enum ColHist { kColHistLast }; -constexpr std::string_view AnalysisDir = "Collisions/Analysis/"; -constexpr std::string_view QaDir = "Collisions/QA/"; -constexpr std::string_view McDir = "Collisions/MC/"; +constexpr std::string_view AnalysisDir = "Analysis/"; +constexpr std::string_view QaDir = "QA/"; +constexpr std::string_view McDir = "MC/"; + +// prefixes: dedicated to the collision histograms, independent of whatever pair/triplet-type +// prefix the enclosing builder uses for its other managers -- keeps every collision histogram +// under one shared "Collision/" directory regardless of which pair/triplet type produced it. +// Standalone QA tasks have no SE/ME split, so they use PrefixQa directly. +constexpr char PrefixQa[] = "Collision/"; +constexpr char PrefixSe[] = "Collision/SE/"; +constexpr char PrefixMe[] = "Collision/ME/"; constexpr std::array, kColHistLast> HistTable = { { @@ -192,6 +200,7 @@ struct ConfCollisionQaBinning : o2::framework::ConfigurableGroup { o2::framework::ConfigurableAxis occupancy{"occupancy", {500, 0.f, 5000.f}, "Occupancy Binning"}; }; +template class CollisionHistManager { public: @@ -270,7 +279,7 @@ class CollisionHistManager private: void initAnalysis(std::map> const& Specs) { - std::string analysisDir = std::string(AnalysisDir); + std::string analysisDir = std::string(prefix) + std::string(AnalysisDir); mHistogramRegistry->add(analysisDir + getHistNameV2(kPosZ, HistTable), getHistDesc(kPosZ, HistTable), getHistType(kPosZ, HistTable), {Specs.at(kPosZ)}); mHistogramRegistry->add(analysisDir + getHistNameV2(kMult, HistTable), getHistDesc(kMult, HistTable), getHistType(kMult, HistTable), {Specs.at(kMult)}); mHistogramRegistry->add(analysisDir + getHistNameV2(kCent, HistTable), getHistDesc(kCent, HistTable), getHistType(kCent, HistTable), {Specs.at(kCent)}); @@ -284,7 +293,7 @@ class CollisionHistManager void initQa(std::map> const& Specs) { - std::string qaDir = std::string(QaDir); + std::string qaDir = std::string(prefix) + std::string(QaDir); mHistogramRegistry->add(qaDir + getHistNameV2(kPosX, HistTable), getHistDesc(kPosX, HistTable), getHistType(kPosX, HistTable), {Specs.at(kPosX)}); mHistogramRegistry->add(qaDir + getHistNameV2(kPosY, HistTable), getHistDesc(kPosY, HistTable), getHistType(kPosY, HistTable), {Specs.at(kPosY)}); mHistogramRegistry->add(qaDir + getHistNameV2(kPos, HistTable), getHistDesc(kPos, HistTable), getHistType(kPos, HistTable), {Specs.at(kPos)}); @@ -303,7 +312,7 @@ class CollisionHistManager // reco-vs-truth correlation histograms (kReco and kMc both set) void initMc(std::map> const& Specs) { - std::string mcDir = std::string(McDir); + std::string mcDir = std::string(prefix) + std::string(McDir); mHistogramRegistry->add(mcDir + getHistNameV2(kTruePosZVsPosZ, HistTable), getHistDesc(kTruePosZVsPosZ, HistTable), getHistType(kTruePosZVsPosZ, HistTable), {Specs.at(kTruePosZVsPosZ)}); mHistogramRegistry->add(mcDir + getHistNameV2(kTrueCentVsCent, HistTable), getHistDesc(kTrueCentVsCent, HistTable), getHistType(kTrueCentVsCent, HistTable), {Specs.at(kTrueCentVsCent)}); mHistogramRegistry->add(mcDir + getHistNameV2(kTrueMultVsMult, HistTable), getHistDesc(kTrueMultVsMult, HistTable), getHistType(kTrueMultVsMult, HistTable), {Specs.at(kTrueMultVsMult)}); @@ -312,7 +321,7 @@ class CollisionHistManager // pure mc-truth collision: 1D only, no reco collision exists (kMc without kReco) void initMcTruth(std::map> const& Specs) { - std::string mcDir = std::string(McDir); + std::string mcDir = std::string(prefix) + std::string(McDir); mHistogramRegistry->add(mcDir + getHistNameV2(kTruePosZ, HistTable), getHistDesc(kTruePosZ, HistTable), getHistType(kTruePosZ, HistTable), {Specs.at(kTruePosZ)}); mHistogramRegistry->add(mcDir + getHistNameV2(kTrueCent, HistTable), getHistDesc(kTrueCent, HistTable), getHistType(kTrueCent, HistTable), {Specs.at(kTrueCent)}); mHistogramRegistry->add(mcDir + getHistNameV2(kTrueMult, HistTable), getHistDesc(kTrueMult, HistTable), getHistType(kTrueMult, HistTable), {Specs.at(kTrueMult)}); @@ -321,15 +330,15 @@ class CollisionHistManager template void fillAnalysis(T const& col) { - mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kPosZ, HistTable)), col.posZ()); - mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kMult, HistTable)), col.mult()); - mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kCent, HistTable)), col.cent()); - mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kMagField, HistTable)), col.magField()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kPosZ, HistTable)), col.posZ()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kMult, HistTable)), col.mult()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kCent, HistTable)), col.cent()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kMagField, HistTable)), col.magField()); if (mPlotEventShape) { if constexpr (utils::HasEventShape) { - mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kQvector, HistTable)), col.qvec()); - mHistogramRegistry->fill(HIST(AnalysisDir) + HIST(getHistName(kEventPlaneAngle, HistTable)), col.eventPlaneAngle()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kQvector, HistTable)), col.qvec()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kEventPlaneAngle, HistTable)), col.eventPlaneAngle()); } } } @@ -337,18 +346,18 @@ class CollisionHistManager template void fillQa(T const& col) { - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kPosX, HistTable)), col.posX()); - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kPosY, HistTable)), col.posY()); - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kPos, HistTable)), std::hypot(col.posX(), col.posY(), col.posZ())); - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kSphericity, HistTable)), col.sphericity()); - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kOccupancy, HistTable)), col.trackOccupancyInTimeRange()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPosX, HistTable)), col.posX()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPosY, HistTable)), col.posY()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPos, HistTable)), std::hypot(col.posX(), col.posY(), col.posZ())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kSphericity, HistTable)), col.sphericity()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kOccupancy, HistTable)), col.trackOccupancyInTimeRange()); if (mPlot2d) { - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kPoszVsMult, HistTable)), col.posZ(), col.mult()); - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kPoszVsCent, HistTable)), col.posZ(), col.cent()); - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kCentVsMult, HistTable)), col.cent(), col.mult()); - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kMultVsSphericity, HistTable)), col.mult(), col.sphericity()); - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kCentVsSphericity, HistTable)), col.cent(), col.sphericity()); - mHistogramRegistry->fill(HIST(QaDir) + HIST(getHistName(kFT0AvsFT0C, HistTable)), col.centFT0A(), col.centFT0C()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPoszVsMult, HistTable)), col.posZ(), col.mult()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPoszVsCent, HistTable)), col.posZ(), col.cent()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kCentVsMult, HistTable)), col.cent(), col.mult()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kMultVsSphericity, HistTable)), col.mult(), col.sphericity()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kCentVsSphericity, HistTable)), col.cent(), col.sphericity()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kFT0AvsFT0C, HistTable)), col.centFT0A(), col.centFT0C()); } } @@ -360,18 +369,18 @@ class CollisionHistManager return; } auto mcCol = col.template fMcCol_as(); - mHistogramRegistry->fill(HIST(McDir) + HIST(getHistName(kTruePosZVsPosZ, HistTable)), mcCol.posZ(), col.posZ()); - mHistogramRegistry->fill(HIST(McDir) + HIST(getHistName(kTrueCentVsCent, HistTable)), mcCol.cent(), col.cent()); - mHistogramRegistry->fill(HIST(McDir) + HIST(getHistName(kTrueMultVsMult, HistTable)), mcCol.mult(), col.mult()); + mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kTruePosZVsPosZ, HistTable)), mcCol.posZ(), col.posZ()); + mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kTrueCentVsCent, HistTable)), mcCol.cent(), col.cent()); + mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kTrueMultVsMult, HistTable)), mcCol.mult(), col.mult()); } // pure mc-truth collision: 'col' here IS the truth collision, no reco object exists template void fillMc(T const& col) { - mHistogramRegistry->fill(HIST(McDir) + HIST(getHistName(kTruePosZ, HistTable)), col.posZ()); - mHistogramRegistry->fill(HIST(McDir) + HIST(getHistName(kTrueCent, HistTable)), col.cent()); - mHistogramRegistry->fill(HIST(McDir) + HIST(getHistName(kTrueMult, HistTable)), col.mult()); + mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kTruePosZ, HistTable)), col.posZ()); + mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kTrueCent, HistTable)), col.cent()); + mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kTrueMult, HistTable)), col.mult()); } o2::framework::HistogramRegistry* mHistogramRegistry = nullptr; diff --git a/PWGCF/Femto/Core/pairBuilder.h b/PWGCF/Femto/Core/pairBuilder.h index dd157bbb0ae..9df1db7d79b 100644 --- a/PWGCF/Femto/Core/pairBuilder.h +++ b/PWGCF/Femto/Core/pairBuilder.h @@ -97,7 +97,8 @@ class PairTrackTrackBuilder // check if correlate the same tracks or not mSameSpecies = confMixing.sameSpecies.value; - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mPairHistManagerSe.template init(registry, pairHistSpec, confPairBinning, confPairCuts, confMixing); mPairHistManagerMe.template init(registry, pairHistSpec, confPairBinning, confPairCuts, confMixing); mPcSe.template init(registry, pairCleanerHistSpec, confPairCuts); @@ -162,13 +163,12 @@ class PairTrackTrackBuilder if (trackSlice1.size() < nLimitPartitionIdenticalParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); pairprocesshelpers::PairOrder pairOrder = pairprocesshelpers::kOrder12; if (mMixIdenticalParticles) { pairOrder = static_cast(mDist(mRng)); } - return pairprocesshelpers::processSameEvent(trackSlice1, trackTable, col, mTrackHistManagerSe1, mPairHistManagerSe, mCprSe, mPcSe, pairOrder); + return pairprocesshelpers::processSameEvent(trackSlice1, trackTable, col, mTrackHistManagerSe1, mPairHistManagerSe, mCprSe, mPcSe, pairOrder, mColHistManagerSe); } auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -176,9 +176,8 @@ class PairTrackTrackBuilder if (trackSlice1.size() < nLimitPartitionParticles || trackSlice2.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice1, trackSlice2, trackTable, col, mTrackHistManagerSe1, mTrackHistManagerSe2, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice1, trackSlice2, trackTable, col, mTrackHistManagerSe1, mTrackHistManagerSe2, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } // mc @@ -191,13 +190,12 @@ class PairTrackTrackBuilder if (trackSlice1.size() < nLimitPartitionIdenticalParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); pairprocesshelpers::PairOrder pairOrder = pairprocesshelpers::kOrder12; if (mMixIdenticalParticles) { pairOrder = static_cast(mDist(mRng)); } - return pairprocesshelpers::processSameEvent(trackSlice1, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mPairHistManagerSe, mTrackCleaner1, mCprSe, mPcSe, pairOrder); + return pairprocesshelpers::processSameEvent(trackSlice1, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mPairHistManagerSe, mTrackCleaner1, mCprSe, mPcSe, pairOrder, mColHistManagerSe); } auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -205,9 +203,8 @@ class PairTrackTrackBuilder if (trackSlice1.size() < nLimitPartitionParticles || trackSlice2.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice1, trackSlice2, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTrackHistManagerSe2, mPairHistManagerSe, mTrackCleaner1, mTrackCleaner2, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice1, trackSlice2, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTrackHistManagerSe2, mPairHistManagerSe, mTrackCleaner1, mTrackCleaner2, mCprSe, mPcSe, mColHistManagerSe); } template @@ -217,17 +214,17 @@ class PairTrackTrackBuilder if (mSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCentEventPlaneAngle): if constexpr (utils::HasEventShape) { - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxCentEventPlaneAngle, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxCentEventPlaneAngle, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); } else { LOG(fatal) << "Mixing policy kVtxCentEventPlaneAngle requires a collision table with event-shape columns. Breaking..."; } @@ -238,17 +235,17 @@ class PairTrackTrackBuilder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCentEventPlaneAngle): if constexpr (utils::HasEventShape) { - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxCentEventPlaneAngle, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxCentEventPlaneAngle, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mColHistManagerMe); } else { LOG(fatal) << "Mixing policy kVtxCentEventPlaneAngle requires a collision table with event-shape columns. Breaking..."; } @@ -265,17 +262,17 @@ class PairTrackTrackBuilder if (mSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCentEventPlaneAngle): if constexpr (utils::HasEventShape) { - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCentEventPlaneAngle, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCentEventPlaneAngle, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); } else { LOG(fatal) << "Mixing policy kVtxCentEventPlaneAngle requires a collision table with event-shape columns. Breaking..."; } @@ -286,17 +283,17 @@ class PairTrackTrackBuilder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCentEventPlaneAngle): if constexpr (utils::HasEventShape) { - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCentEventPlaneAngle, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCentEventPlaneAngle, mMixingDepth, mPairHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mColHistManagerMe); } else { LOG(fatal) << "Mixing policy kVtxCentEventPlaneAngle requires a collision table with event-shape columns. Breaking..."; } @@ -308,7 +305,8 @@ class PairTrackTrackBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe1; trackhistmanager::TrackHistManager mTrackHistManagerSe2; // single-particle histograms for particles that end up in mixed-event pairs -- same config @@ -416,7 +414,8 @@ class PairV0V0Builder } } - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mPairHistManagerSe.template init(registry, pairHistSpec, confPairBinning, confPairCuts, confMixing); mPairHistManagerMe.template init(registry, pairHistSpec, confPairBinning, confPairCuts, confMixing); mPcSe.template init(registry, pairCleanerHistSpec, confPairCuts); @@ -478,13 +477,12 @@ class PairV0V0Builder if (v0Slice1.size() < nLimitPartitionIdenticalParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); pairprocesshelpers::PairOrder pairOrder = pairprocesshelpers::kOrder12; if (mMixIdenticalParticles) { pairOrder = static_cast(mDist(mRng)); } - return pairprocesshelpers::processSameEvent(v0Slice1, trackTable, col, mV0HistManagerSe1, mPairHistManagerSe, mCprSe, mPcSe, pairOrder); + return pairprocesshelpers::processSameEvent(v0Slice1, trackTable, col, mV0HistManagerSe1, mPairHistManagerSe, mCprSe, mPcSe, pairOrder, mColHistManagerSe); } auto v0Slice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -492,9 +490,8 @@ class PairV0V0Builder if (v0Slice1.size() < nLimitPartitionParticles || v0Slice2.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(v0Slice1, v0Slice2, trackTable, col, mV0HistManagerSe1, mV0HistManagerSe2, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(v0Slice1, v0Slice2, trackTable, col, mV0HistManagerSe1, mV0HistManagerSe2, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } // mc @@ -507,13 +504,12 @@ class PairV0V0Builder if (v0Slice1.size() < nLimitPartitionIdenticalParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); pairprocesshelpers::PairOrder pairOrder = pairprocesshelpers::kOrder12; if (mMixIdenticalParticles) { pairOrder = static_cast(mDist(mRng)); } - return pairprocesshelpers::processSameEvent(v0Slice1, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mV0HistManagerSe1, mPairHistManagerSe, mV0Cleaner1, mCprSe, mPcSe, pairOrder); + return pairprocesshelpers::processSameEvent(v0Slice1, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mV0HistManagerSe1, mPairHistManagerSe, mV0Cleaner1, mCprSe, mPcSe, pairOrder, mColHistManagerSe); } auto v0Slice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -521,9 +517,8 @@ class PairV0V0Builder if (v0Slice1.size() < nLimitPartitionParticles || v0Slice2.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(v0Slice1, v0Slice2, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mV0HistManagerSe1, mV0HistManagerSe2, mPairHistManagerSe, mV0Cleaner1, mV0Cleaner2, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(v0Slice1, v0Slice2, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mV0HistManagerSe1, mV0HistManagerSe2, mPairHistManagerSe, mV0Cleaner1, mV0Cleaner2, mCprSe, mPcSe, mColHistManagerSe); } template @@ -533,13 +528,13 @@ class PairV0V0Builder if (mSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -547,13 +542,13 @@ class PairV0V0Builder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -567,13 +562,13 @@ class PairV0V0Builder if (mSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner1, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner1, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner1, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner1, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner1, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner1, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe1, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -581,13 +576,13 @@ class PairV0V0Builder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner2, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner2, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner2, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner2, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner2, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mV0Cleaner1, mV0Cleaner2, mCprMe, mPcMe, mEventStride, mV0HistManagerMe1, mV0HistManagerMe2, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -596,7 +591,8 @@ class PairV0V0Builder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; v0histmanager::V0HistManager mV0HistManagerSe1; v0histmanager::V0HistManager mV0HistManagerSe2; v0histmanager::V0HistManager mV0HistManagerMe1; @@ -708,7 +704,8 @@ class PairD0D0Builder LOG(warn) << "sign=0 accepts both the D0 and the D0bar hypothesis of the same candidate. " << "Set an explicit sign (+1: D0, -1: D0bar) for both slots in a D0-D0 analysis."; } - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mPairHistManagerSe.template init(registry, pairHistSpec, confPairBinning, confPairCuts, confMixing); mPairHistManagerMe.template init(registry, pairHistSpec, confPairBinning, confPairCuts, confMixing); mPcSe.template init(registry, pairCleanerHistSpec, confPairCuts); @@ -777,13 +774,12 @@ class PairD0D0Builder if (d0Slice1.size() < nLimitPartitionIdenticalParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); pairprocesshelpers::PairOrder pairOrder = pairprocesshelpers::kOrder12; if (mMixIdenticalParticles) { pairOrder = static_cast(mDist(mRng)); } - return pairprocesshelpers::processSameEvent(d0Slice1, trackTable, col, mD0HistManagerSe1, mPairHistManagerSe, mCprSe, mPcSe, pairOrder); + return pairprocesshelpers::processSameEvent(d0Slice1, trackTable, col, mD0HistManagerSe1, mPairHistManagerSe, mCprSe, mPcSe, pairOrder, mColHistManagerSe); } auto d0Slice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -791,9 +787,8 @@ class PairD0D0Builder if (d0Slice1.size() < nLimitPartitionParticles || d0Slice2.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(d0Slice1, d0Slice2, trackTable, col, mD0HistManagerSe1, mD0HistManagerSe2, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(d0Slice1, d0Slice2, trackTable, col, mD0HistManagerSe1, mD0HistManagerSe2, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } // mc @@ -806,22 +801,20 @@ class PairD0D0Builder if (d0Slice1.size() < nLimitPartitionIdenticalParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); pairprocesshelpers::PairOrder pairOrder = pairprocesshelpers::kOrder12; if (mMixIdenticalParticles) { pairOrder = static_cast(mDist(mRng)); } - return pairprocesshelpers::processSameEvent(d0Slice1, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mD0HistManagerSe1, mPairHistManagerSe, mD0Cleaner1, mCprSe, mPcSe, pairOrder); + return pairprocesshelpers::processSameEvent(d0Slice1, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mD0HistManagerSe1, mPairHistManagerSe, mD0Cleaner1, mCprSe, mPcSe, pairOrder, mColHistManagerSe); } auto d0Slice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); auto d0Slice2 = partition2->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); if (d0Slice1.size() < nLimitPartitionParticles || d0Slice2.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(d0Slice1, d0Slice2, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mD0HistManagerSe1, mD0HistManagerSe2, mPairHistManagerSe, mD0Cleaner1, mD0Cleaner2, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(d0Slice1, d0Slice2, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mD0HistManagerSe1, mD0HistManagerSe2, mPairHistManagerSe, mD0Cleaner1, mD0Cleaner2, mCprSe, mPcSe, mColHistManagerSe); } template @@ -830,13 +823,13 @@ class PairD0D0Builder if (mSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -844,13 +837,13 @@ class PairD0D0Builder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -864,13 +857,13 @@ class PairD0D0Builder if (mSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner1, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner1, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner1, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner1, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner1, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner1, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe1, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -878,13 +871,13 @@ class PairD0D0Builder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner2, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner2, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner2, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner2, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner2, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mD0Cleaner1, mD0Cleaner2, mCprMe, mPcMe, mEventStride, mD0HistManagerMe1, mD0HistManagerMe2, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -893,7 +886,8 @@ class PairD0D0Builder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; charmhadronhistmanager::CharmHadronHistManager mD0HistManagerSe1; // the third prong prefix is unused for 2-prong candidates charmhadronhistmanager::CharmHadronHistManager mD0HistManagerSe2; // the third prong prefix is unused for 2-prong candidates charmhadronhistmanager::CharmHadronHistManager mD0HistManagerMe1; // the third prong prefix is unused for 2-prong candidates @@ -973,7 +967,8 @@ class PairTrackD0Builder std::map>& cprHistSpec, std::map>& pairCleanerHistSpec) { - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTrackHistManagerSe.template init(registry, trackHistSpec, confTrackSelection); mD0HistManagerSe.template init(registry, d0HistSpec, confD0Selection, posDauHistSpec, negDauHistSpec); @@ -1023,9 +1018,8 @@ class PairTrackD0Builder if (trackSlice.size() < nLimitPartitionParticles || d0Slice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, d0Slice, trackTable, col, mTrackHistManagerSe, mD0HistManagerSe, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, d0Slice, trackTable, col, mTrackHistManagerSe, mD0HistManagerSe, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } template @@ -1033,13 +1027,13 @@ class PairTrackD0Builder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, trackPartition, d0Partition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, d0Partition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, d0Partition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, d0Partition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, d0Partition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, d0Partition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1055,9 +1049,8 @@ class PairTrackD0Builder if (trackSlice.size() < nLimitPartitionParticles || d0Slice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, d0Slice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe, mD0HistManagerSe, mPairHistManagerSe, mTrackCleaner, mD0Cleaner, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, d0Slice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe, mD0HistManagerSe, mPairHistManagerSe, mTrackCleaner, mD0Cleaner, mCprSe, mPcSe, mColHistManagerSe); } template @@ -1065,13 +1058,13 @@ class PairTrackD0Builder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, d0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mD0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, d0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mD0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, d0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mD0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, d0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mD0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, d0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mD0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, d0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mD0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mD0HistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1079,7 +1072,8 @@ class PairTrackD0Builder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe; charmhadronhistmanager::CharmHadronHistManager mD0HistManagerSe; // the third prong prefix is unused for 2-prong candidates trackhistmanager::TrackHistManager mTrackHistManagerMe; @@ -1149,7 +1143,8 @@ class PairTrackLcBuilder std::map>& cprHistSpec, std::map>& pairCleanerHistSpec) { - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTrackHistManagerSe.template init(registry, trackHistSpec, confTrackSelection); mLcHistManagerSe.template init(registry, lcHistSpec, confLcSelection, protonDauHistSpec, kaonDauHistSpec, pionDauHistSpec); @@ -1192,9 +1187,8 @@ class PairTrackLcBuilder if (trackSlice.size() < nLimitPartitionParticles || lcSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, lcSlice, trackTable, col, mTrackHistManagerSe, mLcHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, lcSlice, trackTable, col, mTrackHistManagerSe, mLcHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } template @@ -1202,13 +1196,13 @@ class PairTrackLcBuilder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, trackPartition, lcPartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, lcPartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, lcPartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, lcPartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, lcPartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, lcPartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1224,9 +1218,8 @@ class PairTrackLcBuilder if (trackSlice.size() < nLimitPartitionParticles || lcSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, lcSlice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe, mLcHistManagerSe, mPairHistManagerSe, mTrackCleaner, mLcCleaner, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, lcSlice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe, mLcHistManagerSe, mPairHistManagerSe, mTrackCleaner, mLcCleaner, mCprSe, mPcSe, mColHistManagerSe); } template @@ -1234,13 +1227,13 @@ class PairTrackLcBuilder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, lcPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mLcCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, lcPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mLcCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, lcPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mLcCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, lcPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mLcCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, lcPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mLcCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, lcPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mLcCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mLcHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1248,7 +1241,8 @@ class PairTrackLcBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe; charmhadronhistmanager::CharmHadronHistManager mLcHistManagerSe; trackhistmanager::TrackHistManager mTrackHistManagerMe; @@ -1323,7 +1317,8 @@ class PairTrackV0Builder std::map>& cprHistSpec, std::map>& pairCleanerHistSpec) { - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTrackHistManagerSe.template init(registry, trackHistSpec, confTrackSelection); mV0HistManagerSe.template init(registry, v0HistSpec, confV0Selection, posDauHistSpec, negDauHistSpec); @@ -1375,9 +1370,8 @@ class PairTrackV0Builder if (trackSlice.size() < nLimitPartitionParticles || v0Slice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, v0Slice, trackTable, col, mTrackHistManagerSe, mV0HistManagerSe, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, v0Slice, trackTable, col, mTrackHistManagerSe, mV0HistManagerSe, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } /// \return true if at least one pair passed all pair selections (usable as pair trigger) @@ -1389,9 +1383,8 @@ class PairTrackV0Builder if (trackSlice.size() < nLimitPartitionParticles || v0Slice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, v0Slice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe, mV0HistManagerSe, mPairHistManagerSe, mTrackCleaner, mV0Cleaner, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, v0Slice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe, mV0HistManagerSe, mPairHistManagerSe, mTrackCleaner, mV0Cleaner, mCprSe, mPcSe, mColHistManagerSe); } template @@ -1399,13 +1392,13 @@ class PairTrackV0Builder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, trackPartition, v0Partition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, v0Partition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, v0Partition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, v0Partition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, v0Partition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, v0Partition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1417,13 +1410,13 @@ class PairTrackV0Builder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, v0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mV0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, v0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mV0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, v0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mV0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, v0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mV0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, v0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mV0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, v0Partition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mV0Cleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mV0HistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1431,7 +1424,8 @@ class PairTrackV0Builder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe; v0histmanager::V0HistManager mV0HistManagerSe; trackhistmanager::TrackHistManager mTrackHistManagerMe; @@ -1507,7 +1501,8 @@ class PairTrackTwoPhotonResonanceBuilder std::map> const& cprHistSpec, std::map> const& pairCleanerHistSpec) { - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTrackHistManagerSe.template init(registry, trackHistSpec, confTrackSelection); mResonanceHistManagerSe.template init(registry, resonanceHistSpec, dauHistSpec, confDauQaBinning); @@ -1542,9 +1537,8 @@ class PairTrackTwoPhotonResonanceBuilder if (trackSlice.size() < nLimitPartitionParticles || resonanceSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, resonanceSlice, photonTable, col, mTrackHistManagerSe, mResonanceHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, resonanceSlice, photonTable, col, mTrackHistManagerSe, mResonanceHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } template @@ -1552,13 +1546,13 @@ class PairTrackTwoPhotonResonanceBuilder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, photonTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, photonTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, photonTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, photonTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, photonTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, photonTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1566,7 +1560,8 @@ class PairTrackTwoPhotonResonanceBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe; twophotonresonancehistmanager::TwoPhotonResonanceHistManager mResonanceHistManagerSe; trackhistmanager::TrackHistManager mTrackHistManagerMe; @@ -1635,7 +1630,8 @@ class PairTrackTwoTrackResonanceBuilder std::map> const& cprHistSpec, std::map> const& pairCleanerHistSpec) { - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTrackHistManagerSe.template init(registry, trackHistSpec, confTrackSelection); mResonanceHistManagerSe.template init(registry, resonanceHistSpec, confResonanceSelection, posDauHistSpec, negDauHistSpec); @@ -1669,9 +1665,8 @@ class PairTrackTwoTrackResonanceBuilder if (trackSlice.size() < nLimitPartitionParticles || resonanaceSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, resonanaceSlice, trackTable, col, mTrackHistManagerSe, mResonanceHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, resonanaceSlice, trackTable, col, mTrackHistManagerSe, mResonanceHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } template @@ -1679,13 +1674,13 @@ class PairTrackTwoTrackResonanceBuilder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, resonancePartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mResonanceHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1693,7 +1688,8 @@ class PairTrackTwoTrackResonanceBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe; twotrackresonancehistmanager::TwoTrackResonanceHistManager mResonanceHistManagerSe; trackhistmanager::TrackHistManager mTrackHistManagerMe; @@ -1777,7 +1773,8 @@ class PairV0TwoTrackResonanceBuilder std::map> const& cprHistSpecNeg, std::map> const& pairCleanerHistSpec) { - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mV0HistManagerSe.template init(registry, v0HistSpec, confV0Selection, V0posDauHistSpec, V0negDauHistSpec); mResonanceHistManagerSe.template init(registry, resonanceHistSpec, confResonanceSelection, ResonancePosDauHistSpec, ResonanceNegDauHistSpec); @@ -1811,9 +1808,8 @@ class PairV0TwoTrackResonanceBuilder if (v0Slice.size() < nLimitPartitionParticles || resonanaceSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(v0Slice, resonanaceSlice, trackTable, col, mV0HistManagerSe, mResonanceHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(v0Slice, resonanaceSlice, trackTable, col, mV0HistManagerSe, mResonanceHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } template @@ -1821,13 +1817,13 @@ class PairV0TwoTrackResonanceBuilder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, v0Partition, resonancePartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe, mResonanceHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, v0Partition, resonancePartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe, mResonanceHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, v0Partition, resonancePartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe, mResonanceHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, v0Partition, resonancePartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe, mResonanceHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, v0Partition, resonancePartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe, mResonanceHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, v0Partition, resonancePartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mV0HistManagerMe, mResonanceHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1835,7 +1831,8 @@ class PairV0TwoTrackResonanceBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; v0histmanager::V0HistManager mV0HistManagerSe; twotrackresonancehistmanager::TwoTrackResonanceHistManager mResonanceHistManagerSe; v0histmanager::V0HistManager mV0HistManagerMe; @@ -1904,7 +1901,8 @@ class PairTrackKinkBuilder std::map> const& cprHistSpec, std::map> const& pairCleanerHistSpec) { - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTrackHistManagerSe.template init(registry, trackHistSpec, confTrackSelection); mKinkHistManagerSe.template init(registry, kinkHistSpec, confKinkSelection, chaDauHistSpec); @@ -1941,9 +1939,8 @@ class PairTrackKinkBuilder if (trackSlice.size() < nLimitPartitionParticles || kinkSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, kinkSlice, trackTable, col, mTrackHistManagerSe, mKinkHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, kinkSlice, trackTable, col, mTrackHistManagerSe, mKinkHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } /// \return true if at least one pair passed all pair selections (usable as pair trigger) @@ -1955,9 +1952,8 @@ class PairTrackKinkBuilder if (trackSlice.size() < nLimitPartitionParticles || kinkSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, kinkSlice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe, mKinkHistManagerSe, mPairHistManagerSe, mTrackCleaner, mKinkCleaner, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, kinkSlice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe, mKinkHistManagerSe, mPairHistManagerSe, mTrackCleaner, mKinkCleaner, mCprSe, mPcSe, mColHistManagerSe); } template @@ -1965,13 +1961,13 @@ class PairTrackKinkBuilder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, trackPartition, kinkPartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, kinkPartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, kinkPartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, kinkPartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, kinkPartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, kinkPartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1983,13 +1979,13 @@ class PairTrackKinkBuilder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, kinkPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mKinkCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, kinkPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mKinkCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, kinkPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mKinkCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, kinkPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mKinkCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, kinkPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mKinkCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, kinkPartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mKinkCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mKinkHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1997,7 +1993,8 @@ class PairTrackKinkBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe; kinkhistmanager::KinkHistManager mKinkHistManagerSe; trackhistmanager::TrackHistManager mTrackHistManagerMe; @@ -2082,7 +2079,8 @@ class PairTrackCascadeBuilder std::map> const& cprHistSpecV0Daughter, std::map> const& pairCleanerHistSpec) { - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTrackHistManagerSe.template init(registry, trackHistSpec, confTrackSelection); mCascadeHistManagerSe.template init(registry, cascadeHistSpec, confCascadeSelection, bachelorHistSpec, posDauHistSpec, negDauHistSpec); @@ -2119,9 +2117,8 @@ class PairTrackCascadeBuilder if (trackSlice.size() < nLimitPartitionParticles || cascadeSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, cascadeSlice, trackTable, col, mTrackHistManagerSe, mCascadeHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, cascadeSlice, trackTable, col, mTrackHistManagerSe, mCascadeHistManagerSe, mPairHistManagerSe, mCprSe, mPcSe, mColHistManagerSe); } /// \return true if at least one pair passed all pair selections (usable as pair trigger) @@ -2133,9 +2130,8 @@ class PairTrackCascadeBuilder if (trackSlice.size() < nLimitPartitionParticles || cascadeSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCprSe.setMagField(col.magField()); - return pairprocesshelpers::processSameEvent(trackSlice, cascadeSlice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe, mCascadeHistManagerSe, mPairHistManagerSe, mTrackCleaner, mCascadeCleaner, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(trackSlice, cascadeSlice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe, mCascadeHistManagerSe, mPairHistManagerSe, mTrackCleaner, mCascadeCleaner, mCprSe, mPcSe, mColHistManagerSe); } template @@ -2143,13 +2139,13 @@ class PairTrackCascadeBuilder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, trackPartition, cascadePartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, cascadePartition, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, cascadePartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, cascadePartition, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, trackPartition, cascadePartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, trackPartition, cascadePartition, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -2161,13 +2157,13 @@ class PairTrackCascadeBuilder { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, cascadePartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mCascadeCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, cascadePartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mCascadeCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, cascadePartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mCascadeCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, cascadePartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mCascadeCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, cascadePartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mCascadeCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe); + pairprocesshelpers::processMixedEvent(cols, mcCols, trackPartition, cascadePartition, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mTrackCleaner, mCascadeCleaner, mCprMe, mPcMe, mEventStride, mTrackHistManagerMe, mCascadeHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -2175,7 +2171,8 @@ class PairTrackCascadeBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe; cascadehistmanager::CascadeHistManager mCascadeHistManagerSe; trackhistmanager::TrackHistManager mTrackHistManagerMe; @@ -2242,7 +2239,8 @@ class PairMcParticleMcParticleBuilder // check if correlate the same tracks or not mSameSpecies = confMixing.sameSpecies.value; - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mPairHistManagerSe.template init(registry, pairHistSpec, confPairBinning, confPairCuts, confMixing); mPairHistManagerMe.template init(registry, pairHistSpec, confPairBinning, confPairCuts, confMixing); mPcSe.template init(registry, pairCleanerHistSpec, confPairCuts); @@ -2308,12 +2306,11 @@ class PairMcParticleMcParticleBuilder if (mcParticleSlice.size() < nLimitPartitionIdenticalParticles) { return false; } - mColHistManager.template fill(col); pairprocesshelpers::PairOrder pairOrder = pairprocesshelpers::kOrder12; if (mMixIdenticalParticles) { pairOrder = static_cast(mDist(mRng)); } - return pairprocesshelpers::processSameEvent(mcParticleSlice, mcParticles, mcMothers, mcPartonicMothers, col, mMcParticleHistManagerSe1, mPairHistManagerSe, mMcParticleCleaner1, mCprSe, mPcSe, pairOrder); + return pairprocesshelpers::processSameEvent(mcParticleSlice, mcParticles, mcMothers, mcPartonicMothers, col, mMcParticleHistManagerSe1, mPairHistManagerSe, mMcParticleCleaner1, mCprSe, mPcSe, pairOrder, mColHistManagerSe); } auto mcParticleSlice1 = partition1->sliceByCachedUnsorted(o2::aod::femtomcparticle::fMcColId, col.globalIndex(), cache); @@ -2321,8 +2318,7 @@ class PairMcParticleMcParticleBuilder if (mcParticleSlice1.size() < nLimitPartitionParticles || mcParticleSlice2.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); - return pairprocesshelpers::processSameEvent(mcParticleSlice1, mcParticleSlice2, mcParticles, mcMothers, mcPartonicMothers, col, mMcParticleHistManagerSe1, mMcParticleHistManagerSe2, mPairHistManagerSe, mMcParticleCleaner1, mMcParticleCleaner2, mCprSe, mPcSe); + return pairprocesshelpers::processSameEvent(mcParticleSlice1, mcParticleSlice2, mcParticles, mcMothers, mcPartonicMothers, col, mMcParticleHistManagerSe1, mMcParticleHistManagerSe2, mPairHistManagerSe, mMcParticleCleaner1, mMcParticleCleaner2, mCprSe, mPcSe, mColHistManagerSe); } template @@ -2331,13 +2327,13 @@ class PairMcParticleMcParticleBuilder if (mSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1); + pairprocesshelpers::processMixedEvent(cols, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -2345,13 +2341,13 @@ class PairMcParticleMcParticleBuilder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mCprMe, mPcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -2360,7 +2356,8 @@ class PairMcParticleMcParticleBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; mcparticlehistmanager::McParticleHistManager mMcParticleHistManagerSe1; mcparticlehistmanager::McParticleHistManager mMcParticleHistManagerSe2; mcparticlehistmanager::McParticleHistManager mMcParticleHistManagerMe1; diff --git a/PWGCF/Femto/Core/pairProcessHelpers.h b/PWGCF/Femto/Core/pairProcessHelpers.h index 6a41c2095c8..37f854d8502 100644 --- a/PWGCF/Femto/Core/pairProcessHelpers.h +++ b/PWGCF/Femto/Core/pairProcessHelpers.h @@ -44,7 +44,8 @@ template + typename T7, + typename T8> bool processSameEvent(T1 const& SliceParticle, T2 const& TrackTable, T3 const& Collision, @@ -52,13 +53,11 @@ bool processSameEvent(T1 const& SliceParticle, T5& PairHistManager, T6& CprManager, T7& PcManager, - PairOrder pairOrder) + PairOrder pairOrder, + T8& ColHistManager) { PairHistManager.resetTrackedParticlesPerEvent(); bool foundPair = false; - for (auto const& part : SliceParticle) { - ParticleHistManager.template fill(part, TrackTable); - } for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(SliceParticle, SliceParticle))) { // Randomize pair order if enabled, then compute the kinematic (kstar) for this pair switch (pairOrder) { @@ -86,6 +85,14 @@ bool processSameEvent(T1 const& SliceParticle, foundPair = true; } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted pair -- same acceptance as the mixed-event side + if (foundPair) { + ColHistManager.template fill(Collision); + for (auto const& part : SliceParticle) { + ParticleHistManager.template fill(part, TrackTable); + } + } PairHistManager.fillMixingQaSe(); return foundPair; } @@ -103,7 +110,8 @@ template + typename T12, + typename T13> bool processSameEvent(T1 const& SliceParticle, T2 const& TrackTable, T3 const& mcParticles, @@ -116,16 +124,11 @@ bool processSameEvent(T1 const& SliceParticle, T10& ParticleCleaner, T11& CprManager, T12& PcManager, - PairOrder pairOrder) + PairOrder pairOrder, + T13& ColHistManager) { PairHistManager.resetTrackedParticlesPerEvent(); bool foundPair = false; - for (auto const& part : SliceParticle) { - if (!ParticleCleaner.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); - } for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(SliceParticle, SliceParticle))) { // check if particles are clean if (!ParticleCleaner.isClean(p1, mcParticles, mcMothers, mcPartonicMothers) || @@ -158,6 +161,17 @@ bool processSameEvent(T1 const& SliceParticle, foundPair = true; } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted pair + if (foundPair) { + ColHistManager.template fill(Collision, mcCollisions); + for (auto const& part : SliceParticle) { + if (!ParticleCleaner.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); + } + } PairHistManager.fillMixingQaSe(); return foundPair; } @@ -172,7 +186,8 @@ template + typename T9, + typename T10> bool processSameEvent(T1 const& SliceParticle1, T2 const& SliceParticle2, T3 const& TrackTable, @@ -181,17 +196,11 @@ bool processSameEvent(T1 const& SliceParticle1, T6& ParticleHistManager2, T7& PairHistManager, T8& CprManager, - T9& PcManager) + T9& PcManager, + T10& ColHistManager) { PairHistManager.resetTrackedParticlesPerEvent(); bool foundPair = false; - // Fill single particle histograms - for (auto const& part : SliceParticle1) { - ParticleHistManager1.template fill(part, TrackTable); - } - for (auto const& part : SliceParticle2) { - ParticleHistManager2.template fill(part, TrackTable); - } for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(SliceParticle1, SliceParticle2))) { // compute the kinematic (kstar) for this pair PairHistManager.setPair(p1, p2, TrackTable, Collision); @@ -209,6 +218,17 @@ bool processSameEvent(T1 const& SliceParticle1, foundPair = true; } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted pair -- same acceptance as the mixed-event side + if (foundPair) { + ColHistManager.template fill(Collision); + for (auto const& part : SliceParticle1) { + ParticleHistManager1.template fill(part, TrackTable); + } + for (auto const& part : SliceParticle2) { + ParticleHistManager2.template fill(part, TrackTable); + } + } PairHistManager.fillMixingQaSe(); return foundPair; } @@ -229,7 +249,8 @@ template + typename T15, + typename T16> bool processSameEvent(T1 const& SliceParticle1, T2 const& SliceParticle2, T3 const& TrackTable, @@ -244,23 +265,11 @@ bool processSameEvent(T1 const& SliceParticle1, T12& ParticleCleaner1, T13& ParticleCleaner2, T14& CprManager, - T15& PcManager) + T15& PcManager, + T16& ColHistManager) { PairHistManager.resetTrackedParticlesPerEvent(); bool foundPair = false; - // Fill single particle histograms - for (auto const& part : SliceParticle1) { - if (!ParticleCleaner1.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager1.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); - } - for (auto const& part : SliceParticle2) { - if (!ParticleCleaner2.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager2.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); - } for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(SliceParticle1, SliceParticle2))) { // check if particles are clean if (!ParticleCleaner1.isClean(p1, mcParticles, mcMothers, mcPartonicMothers) || @@ -283,6 +292,23 @@ bool processSameEvent(T1 const& SliceParticle1, foundPair = true; } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted pair -- same acceptance as the mixed-event side + if (foundPair) { + ColHistManager.template fill(Collision, mcCollisions); + for (auto const& part : SliceParticle1) { + if (!ParticleCleaner1.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager1.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); + } + for (auto const& part : SliceParticle2) { + if (!ParticleCleaner2.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager2.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); + } + } PairHistManager.fillMixingQaSe(); return foundPair; } @@ -297,7 +323,8 @@ template + typename T10, + typename T11> bool processSameEvent(T1 const& SliceParticle, T2 const& /*mcParticles*/, T3 const& mcMothers, @@ -308,16 +335,11 @@ bool processSameEvent(T1 const& SliceParticle, T8& ParticleCleaner, T9& CprManager, T10& PcManager, - PairOrder pairOrder) + PairOrder pairOrder, + T11& ColHistManager) { PairHistManager.resetTrackedParticlesPerEvent(); bool foundPair = false; - for (auto const& part : SliceParticle) { - if (!ParticleCleaner.isClean(part, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager.fill(part, mcMothers, mcPartonicMothers); - } for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(SliceParticle, SliceParticle))) { if (!ParticleCleaner.isClean(p1, mcMothers, mcPartonicMothers) || !ParticleCleaner.isClean(p2, mcMothers, mcPartonicMothers)) { @@ -347,6 +369,17 @@ bool processSameEvent(T1 const& SliceParticle, foundPair = true; } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted pair -- same acceptance as the mixed-event side + if (foundPair) { + ColHistManager.template fill(Collision); + for (auto const& part : SliceParticle) { + if (!ParticleCleaner.isClean(part, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager.fill(part, mcMothers, mcPartonicMothers); + } + } PairHistManager.fillMixingQaSe(); return foundPair; } @@ -365,7 +398,8 @@ template + typename T13, + typename T14> bool processSameEvent(T1 const& SliceParticle1, T2 const& SliceParticle2, T3 const& /*mcParticles*/, @@ -378,22 +412,11 @@ bool processSameEvent(T1 const& SliceParticle1, T10& ParticleCleaner1, T11& ParticleCleaner2, T12& CprManager, - T13& PcManager) + T13& PcManager, + T14& ColHistManager) { PairHistManager.resetTrackedParticlesPerEvent(); bool foundPair = false; - for (auto const& part : SliceParticle1) { - if (!ParticleCleaner1.isClean(part, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager1.fill(part, mcMothers, mcPartonicMothers); - } - for (auto const& part : SliceParticle2) { - if (!ParticleCleaner2.isClean(part, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager2.fill(part, mcMothers, mcPartonicMothers); - } for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(SliceParticle1, SliceParticle2))) { if (!ParticleCleaner1.isClean(p1, mcMothers, mcPartonicMothers) || !ParticleCleaner2.isClean(p2, mcMothers, mcPartonicMothers)) { @@ -414,6 +437,23 @@ bool processSameEvent(T1 const& SliceParticle1, foundPair = true; } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted pair -- same acceptance as the mixed-event side + if (foundPair) { + ColHistManager.template fill(Collision); + for (auto const& part : SliceParticle1) { + if (!ParticleCleaner1.isClean(part, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager1.fill(part, mcMothers, mcPartonicMothers); + } + for (auto const& part : SliceParticle2) { + if (!ParticleCleaner2.isClean(part, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager2.fill(part, mcMothers, mcPartonicMothers); + } + } PairHistManager.fillMixingQaSe(); return foundPair; } @@ -431,7 +471,8 @@ template + typename T12, + typename T13> void processMixedEvent(T1 const& Collisions, T2& Partition1, T3& Partition2, @@ -444,7 +485,8 @@ void processMixedEvent(T1 const& Collisions, T10& PcManager, int eventStride, T11& ParticleHistManagerMe1, - T12& ParticleHistManagerMe2) + T12& ParticleHistManagerMe2, + T13& ColHistManager) { int64_t lastCollisionIndex = -1; int windowSizeRaw = 0; @@ -532,6 +574,12 @@ void processMixedEvent(T1 const& Collisions, if (hasValidPair) { ++windowSizeEffective; + // collision histograms only get filled for collisions that actually contributed at least + // one accepted mixed-event pair -- both real collisions go into the same manager used by + // the same-event side, so its multiplicity/centrality/vertex histograms reflect every + // collision that contributed a pair, regardless of whether it came from SE or ME + ColHistManager.template fill(collision1); + ColHistManager.template fill(collision2); } PairHistManager.fillMixingQaMePerEvent(); @@ -562,7 +610,8 @@ template + typename T18, + typename T19> void processMixedEvent(T1 const& Collisions, T2 const& mcCollisions, T3& Partition1, @@ -581,7 +630,8 @@ void processMixedEvent(T1 const& Collisions, T16& PcManager, int eventStride, T17& ParticleHistManagerMe1, - T18& ParticleHistManagerMe2) + T18& ParticleHistManagerMe2, + T19& ColHistManager) { int64_t lastCollisionIndex = -1; int windowSizeRaw = 0; @@ -671,6 +721,11 @@ void processMixedEvent(T1 const& Collisions, if (hasValidPair) { ++windowSizeEffective; + // collision histograms only get filled for collisions that actually contributed at least + // one accepted mixed-event pair -- both real collisions go into the same manager used by + // the same-event side + ColHistManager.template fill(collision1, mcCollisions); + ColHistManager.template fill(collision2, mcCollisions); } PairHistManager.fillMixingQaMePerEvent(); @@ -697,7 +752,8 @@ template + typename T16, + typename T17> void processMixedEvent(T1 const& Collisions, T2& Partition1, T3& Partition2, @@ -714,7 +770,8 @@ void processMixedEvent(T1 const& Collisions, T14& PcManager, int eventStride, T15& ParticleHistManagerMe1, - T16& ParticleHistManagerMe2) + T16& ParticleHistManagerMe2, + T17& ColHistManager) { int64_t lastCollisionIndex = -1; int windowSizeRaw = 0; diff --git a/PWGCF/Femto/Core/tripletBuilder.h b/PWGCF/Femto/Core/tripletBuilder.h index 8a39f818c8b..3e5ab3aac95 100644 --- a/PWGCF/Femto/Core/tripletBuilder.h +++ b/PWGCF/Femto/Core/tripletBuilder.h @@ -114,7 +114,8 @@ class TripletTrackTrackTrackBuilder LOG(fatal) << "Option Track 1&2 are identical and Option Track 1&2&3 are identical are activated. Breaking..."; } - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTripletHistManagerSe.template init(registry, pairHistSpec, confTripletBinning, confTripletCuts, confMixing); mTripletHistManagerMe.template init(registry, pairHistSpec, confTripletBinning, confTripletCuts, confMixing); @@ -206,12 +207,11 @@ class TripletTrackTrackTrackBuilder if (trackSlice1.size() < nLimitPartitionIdenticalParticles123) { return false; } - mColHistManager.template fill(col); mCtrSe.setMagField(col.magField()); if (mMixIdenticalParticles) { tripletOrder = static_cast(mDist(mRng)); } - return tripletprocesshelpers::processSameEvent(trackSlice1, trackTable, col, mTrackHistManagerSe1, mTripletHistManagerSe, mCtrSe, mTcSe, tripletOrder); + return tripletprocesshelpers::processSameEvent(trackSlice1, trackTable, col, mTrackHistManagerSe1, mTripletHistManagerSe, mCtrSe, mTcSe, tripletOrder, mColHistManagerSe); } if (mTrack1Track2AreSameSpecies) { @@ -220,12 +220,11 @@ class TripletTrackTrackTrackBuilder if (trackSlice1.size() < nLimitPartitionIdenticalParticles12 || trackSlice3.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCtrSe.setMagField(col.magField()); if (mMixIdenticalParticles) { tripletOrder = static_cast(mDist(mRng)); } - return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice3, trackTable, col, mTrackHistManagerSe1, mTrackHistManagerSe3, mTripletHistManagerSe, mCtrSe, mTcSe, tripletOrder); + return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice3, trackTable, col, mTrackHistManagerSe1, mTrackHistManagerSe3, mTripletHistManagerSe, mCtrSe, mTcSe, tripletOrder, mColHistManagerSe); } auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -234,9 +233,8 @@ class TripletTrackTrackTrackBuilder if (trackSlice1.size() < nLimitPartitionParticles || trackSlice2.size() < nLimitPartitionParticles || trackSlice3.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCtrSe.setMagField(col.magField()); - return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, trackSlice3, trackTable, col, mTrackHistManagerSe1, mTrackHistManagerSe2, mTrackHistManagerSe3, mTripletHistManagerSe, mCtrSe, mTcSe); + return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, trackSlice3, trackTable, col, mTrackHistManagerSe1, mTrackHistManagerSe2, mTrackHistManagerSe3, mTripletHistManagerSe, mCtrSe, mTcSe, mColHistManagerSe); } // mc @@ -250,12 +248,11 @@ class TripletTrackTrackTrackBuilder if (trackSlice1.size() < nLimitPartitionIdenticalParticles123) { return false; } - mColHistManager.template fill(col, mcCols); mCtrSe.setMagField(col.magField()); if (mMixIdenticalParticles) { tripletOrder = static_cast(mDist(mRng)); } - return tripletprocesshelpers::processSameEvent(trackSlice1, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTripletHistManagerSe, mCleaner1, mCtrSe, mTcSe, tripletOrder); + return tripletprocesshelpers::processSameEvent(trackSlice1, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTripletHistManagerSe, mCleaner1, mCtrSe, mTcSe, tripletOrder, mColHistManagerSe); } if (mTrack1Track2AreSameSpecies) { auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -263,12 +260,11 @@ class TripletTrackTrackTrackBuilder if (trackSlice1.size() < nLimitPartitionIdenticalParticles12 || trackSlice3.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCtrSe.setMagField(col.magField()); if (mMixIdenticalParticles) { tripletOrder = static_cast(mDist(mRng)); } - return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice3, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTrackHistManagerSe3, mTripletHistManagerSe, mCleaner1, mCleaner3, mCtrSe, mTcSe, tripletOrder); + return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice3, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTrackHistManagerSe3, mTripletHistManagerSe, mCleaner1, mCleaner3, mCtrSe, mTcSe, tripletOrder, mColHistManagerSe); } auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -277,9 +273,8 @@ class TripletTrackTrackTrackBuilder if (trackSlice1.size() < nLimitPartitionParticles || trackSlice2.size() < nLimitPartitionParticles || trackSlice3.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCtrSe.setMagField(col.magField()); - return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, trackSlice3, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTrackHistManagerSe2, mTrackHistManagerSe3, mTripletHistManagerSe, mCleaner1, mCleaner2, mCleaner3, mCtrSe, mTcSe); + return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, trackSlice3, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTrackHistManagerSe2, mTrackHistManagerSe3, mTripletHistManagerSe, mCleaner1, mCleaner2, mCleaner3, mCtrSe, mTcSe, mColHistManagerSe); } // data @@ -289,13 +284,13 @@ class TripletTrackTrackTrackBuilder if (mTrack1Track2Track3AreSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition1, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition1, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition1, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition1, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition1, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition1, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -303,13 +298,13 @@ class TripletTrackTrackTrackBuilder } else if (mTrack1Track2AreSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -317,13 +312,13 @@ class TripletTrackTrackTrackBuilder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -338,13 +333,13 @@ class TripletTrackTrackTrackBuilder if (mTrack1Track2Track3AreSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner1, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner1, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner1, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner1, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner1, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition1, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner1, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe1, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -352,13 +347,13 @@ class TripletTrackTrackTrackBuilder } else if (mTrack1Track2AreSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mTrackHistManagerMe3, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -366,13 +361,13 @@ class TripletTrackTrackTrackBuilder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mCleaner3, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mTrackHistManagerMe3, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -381,7 +376,8 @@ class TripletTrackTrackTrackBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe1; trackhistmanager::TrackHistManager mTrackHistManagerSe2; trackhistmanager::TrackHistManager mTrackHistManagerSe3; @@ -480,7 +476,8 @@ class TripletTrackTrackV0Builder // check if correlate the same tracks or not mTrack1Track2AreSameSpecies = confMixing.particle12AreSameSpecies.value; - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTripletHistManagerSe.template init(registry, tripletHistSpec, confTripletBinning, confTripletCuts, confMixing); mTripletHistManagerMe.template init(registry, tripletHistSpec, confTripletBinning, confTripletCuts, confMixing); @@ -555,12 +552,11 @@ class TripletTrackTrackV0Builder if (trackSlice1.size() < nLimitPartitionIdenticalParticles12 || v0Slice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCtrSe.setMagField(col.magField()); if (mMixIdenticalParticles) { tripletOrder = static_cast(mDist(mRng)); } - return tripletprocesshelpers::processSameEvent(trackSlice1, v0Slice, trackTable, col, mTrackHistManagerSe1, mV0HistManagerSe, mTripletHistManagerSe, mCtrSe, mTcSe, tripletOrder); + return tripletprocesshelpers::processSameEvent(trackSlice1, v0Slice, trackTable, col, mTrackHistManagerSe1, mV0HistManagerSe, mTripletHistManagerSe, mCtrSe, mTcSe, tripletOrder, mColHistManagerSe); } auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -569,9 +565,8 @@ class TripletTrackTrackV0Builder if (trackSlice1.size() < nLimitPartitionParticles || trackSlice2.size() < nLimitPartitionParticles || v0Slice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCtrSe.setMagField(col.magField()); - return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, v0Slice, trackTable, col, mTrackHistManagerSe1, mTrackHistManagerSe2, mV0HistManagerSe, mTripletHistManagerSe, mCtrSe, mTcSe); + return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, v0Slice, trackTable, col, mTrackHistManagerSe1, mTrackHistManagerSe2, mV0HistManagerSe, mTripletHistManagerSe, mCtrSe, mTcSe, mColHistManagerSe); } // mc @@ -586,12 +581,11 @@ class TripletTrackTrackV0Builder if (trackSlice1.size() < nLimitPartitionIdenticalParticles12 || v0Slice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCtrSe.setMagField(col.magField()); if (mMixIdenticalParticles) { tripletOrder = static_cast(mDist(mRng)); } - return tripletprocesshelpers::processSameEvent(trackSlice1, v0Slice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mV0HistManagerSe, mTripletHistManagerSe, mCleaner1, mV0Cleaner, mCtrSe, mTcSe, tripletOrder); + return tripletprocesshelpers::processSameEvent(trackSlice1, v0Slice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mV0HistManagerSe, mTripletHistManagerSe, mCleaner1, mV0Cleaner, mCtrSe, mTcSe, tripletOrder, mColHistManagerSe); } auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -600,9 +594,8 @@ class TripletTrackTrackV0Builder if (trackSlice1.size() < nLimitPartitionParticles || trackSlice2.size() < nLimitPartitionParticles || v0Slice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCtrSe.setMagField(col.magField()); - return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, v0Slice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTrackHistManagerSe2, mV0HistManagerSe, mTripletHistManagerSe, mCleaner1, mCleaner2, mV0Cleaner, mCtrSe, mTcSe); + return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, v0Slice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTrackHistManagerSe2, mV0HistManagerSe, mTripletHistManagerSe, mCleaner1, mCleaner2, mV0Cleaner, mCtrSe, mTcSe, mColHistManagerSe); } // data @@ -612,13 +605,13 @@ class TripletTrackTrackV0Builder if (mTrack1Track2AreSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -626,13 +619,13 @@ class TripletTrackTrackV0Builder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -647,13 +640,13 @@ class TripletTrackTrackV0Builder if (mTrack1Track2AreSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner1, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mV0HistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -661,13 +654,13 @@ class TripletTrackTrackV0Builder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCleaner1, mCleaner2, mV0Cleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mV0HistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -676,7 +669,8 @@ class TripletTrackTrackV0Builder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe1; trackhistmanager::TrackHistManager mTrackHistManagerSe2; v0histmanager::V0HistManager mV0HistManagerSe; @@ -790,7 +784,8 @@ class TripletTrackTrackCascadeBuilder { // check if correlate the same tracks or not mTrack1Track2AreSameSpecies = confMixing.particle12AreSameSpecies.value; - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTripletHistManagerSe.template init(registry, tripletHistSpec, confTripletBinning, confTripletCuts, confMixing); mTripletHistManagerMe.template init(registry, tripletHistSpec, confTripletBinning, confTripletCuts, confMixing); @@ -861,12 +856,11 @@ class TripletTrackTrackCascadeBuilder if (trackSlice1.size() < nLimitPartitionIdenticalParticles12 || cascadeSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCtrSe.setMagField(col.magField()); if (mMixIdenticalParticles) { tripletOrder = static_cast(mDist(mRng)); } - return tripletprocesshelpers::processSameEvent(trackSlice1, cascadeSlice, trackTable, col, mTrackHistManagerSe1, mCascadeHistManagerSe, mTripletHistManagerSe, mCtrSe, mTcSe, tripletOrder); + return tripletprocesshelpers::processSameEvent(trackSlice1, cascadeSlice, trackTable, col, mTrackHistManagerSe1, mCascadeHistManagerSe, mTripletHistManagerSe, mCtrSe, mTcSe, tripletOrder, mColHistManagerSe); } auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -875,9 +869,8 @@ class TripletTrackTrackCascadeBuilder if (trackSlice1.size() < nLimitPartitionParticles || trackSlice2.size() < nLimitPartitionParticles || cascadeSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col); mCtrSe.setMagField(col.magField()); - return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, cascadeSlice, trackTable, col, mTrackHistManagerSe1, mTrackHistManagerSe2, mCascadeHistManagerSe, mTripletHistManagerSe, mCtrSe, mTcSe); + return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, cascadeSlice, trackTable, col, mTrackHistManagerSe1, mTrackHistManagerSe2, mCascadeHistManagerSe, mTripletHistManagerSe, mCtrSe, mTcSe, mColHistManagerSe); } // mc @@ -892,12 +885,11 @@ class TripletTrackTrackCascadeBuilder if (trackSlice1.size() < nLimitPartitionIdenticalParticles12 || cascadeSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCtrSe.setMagField(col.magField()); if (mMixIdenticalParticles) { tripletOrder = static_cast(mDist(mRng)); } - return tripletprocesshelpers::processSameEvent(trackSlice1, cascadeSlice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mCascadeHistManagerSe, mTripletHistManagerSe, mTrackCleaner1, mCascadeCleaner, mCtrSe, mTcSe, tripletOrder); + return tripletprocesshelpers::processSameEvent(trackSlice1, cascadeSlice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mCascadeHistManagerSe, mTripletHistManagerSe, mTrackCleaner1, mCascadeCleaner, mCtrSe, mTcSe, tripletOrder, mColHistManagerSe); } auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -906,9 +898,8 @@ class TripletTrackTrackCascadeBuilder if (trackSlice1.size() < nLimitPartitionParticles || trackSlice2.size() < nLimitPartitionParticles || cascadeSlice.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(col, mcCols); mCtrSe.setMagField(col.magField()); - return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, cascadeSlice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTrackHistManagerSe2, mCascadeHistManagerSe, mTripletHistManagerSe, mTrackCleaner1, mTrackCleaner2, mCascadeCleaner, mCtrSe, mTcSe); + return tripletprocesshelpers::processSameEvent(trackSlice1, trackSlice2, cascadeSlice, trackTable, mcParticles, mcMothers, mcPartonicMothers, col, mcCols, mTrackHistManagerSe1, mTrackHistManagerSe2, mCascadeHistManagerSe, mTripletHistManagerSe, mTrackCleaner1, mTrackCleaner2, mCascadeCleaner, mCtrSe, mTcSe, mColHistManagerSe); } // data @@ -918,13 +909,13 @@ class TripletTrackTrackCascadeBuilder if (mTrack1Track2AreSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition1, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -932,13 +923,13 @@ class TripletTrackTrackCascadeBuilder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, partition1, partition2, partition3, trackTable, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -953,13 +944,13 @@ class TripletTrackTrackCascadeBuilder if (mTrack1Track2AreSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition1, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner1, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe1, mCascadeHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -967,13 +958,13 @@ class TripletTrackTrackCascadeBuilder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe, mColHistManagerMe); break; case static_cast(pairhistmanager::kVtxMultCent): - tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe); + tripletprocesshelpers::processMixedEvent(cols, mcCols, partition1, partition2, partition3, trackTable, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mTrackCleaner1, mTrackCleaner2, mCascadeCleaner, mCtrMe, mTcMe, mEventStride, mTrackHistManagerMe1, mTrackHistManagerMe2, mCascadeHistManagerMe, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policy specifed. Breaking..."; @@ -982,7 +973,8 @@ class TripletTrackTrackCascadeBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; trackhistmanager::TrackHistManager mTrackHistManagerSe1; trackhistmanager::TrackHistManager mTrackHistManagerSe2; cascadehistmanager::CascadeHistManager mCascadeHistManagerSe; @@ -1063,7 +1055,8 @@ class TripletMcParticleMcParticleMcParticleBuilder LOG(fatal) << "Option Particle 1&2 are identical and Option Particle 1&2&3 are identical are activated. Breaking..."; } - mColHistManager.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerSe.template init(registry, colHistSpec, confCollisionBinning); + mColHistManagerMe.template init(registry, colHistSpec, confCollisionBinning); mTripletHistManagerSe.template init(registry, tripletHistSpec, confTripletBinning, confTripletCuts, confMixing); mTripletHistManagerMe.template init(registry, tripletHistSpec, confTripletBinning, confTripletCuts, confMixing); @@ -1135,11 +1128,10 @@ class TripletMcParticleMcParticleMcParticleBuilder if (mcParticleSlice1.size() < nLimitPartitionIdenticalParticles123) { return false; } - mColHistManager.template fill(mcCol); if (mMixIdenticalParticles) { tripletOrder = static_cast(mDist(mRng)); } - return tripletprocesshelpers::processSameEventMcTruth(mcParticleSlice1, mcParticles, mcMothers, mcPartonicMothers, mcCol, mMcParticleHistManagerSe1, mTripletHistManagerSe, mMcParticleCleaner1, mCtrSe, mTcSe, tripletOrder); + return tripletprocesshelpers::processSameEventMcTruth(mcParticleSlice1, mcParticles, mcMothers, mcPartonicMothers, mcCol, mMcParticleHistManagerSe1, mTripletHistManagerSe, mMcParticleCleaner1, mCtrSe, mTcSe, tripletOrder, mColHistManagerSe); } if (mParticle1Particle2AreSameSpecies) { @@ -1148,11 +1140,10 @@ class TripletMcParticleMcParticleMcParticleBuilder if (mcParticleSlice1.size() < nLimitPartitionIdenticalParticles12 || mcParticleSlice3.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(mcCol); if (mMixIdenticalParticles) { tripletOrder = static_cast(mDist(mRng)); } - return tripletprocesshelpers::processSameEventMcTruth(mcParticleSlice1, mcParticleSlice3, mcParticles, mcMothers, mcPartonicMothers, mcCol, mMcParticleHistManagerSe1, mMcParticleHistManagerSe3, mTripletHistManagerSe, mMcParticleCleaner1, mMcParticleCleaner3, mCtrSe, mTcSe, tripletOrder); + return tripletprocesshelpers::processSameEventMcTruth(mcParticleSlice1, mcParticleSlice3, mcParticles, mcMothers, mcPartonicMothers, mcCol, mMcParticleHistManagerSe1, mMcParticleHistManagerSe3, mTripletHistManagerSe, mMcParticleCleaner1, mMcParticleCleaner3, mCtrSe, mTcSe, tripletOrder, mColHistManagerSe); } auto mcParticleSlice1 = partition1->sliceByCachedUnsorted(o2::aod::femtomcparticle::fMcColId, mcCol.globalIndex(), cache); @@ -1161,8 +1152,7 @@ class TripletMcParticleMcParticleMcParticleBuilder if (mcParticleSlice1.size() < nLimitPartitionParticles || mcParticleSlice2.size() < nLimitPartitionParticles || mcParticleSlice3.size() < nLimitPartitionParticles) { return false; } - mColHistManager.template fill(mcCol); - return tripletprocesshelpers::processSameEventMcTruth(mcParticleSlice1, mcParticleSlice2, mcParticleSlice3, mcParticles, mcMothers, mcPartonicMothers, mcCol, mMcParticleHistManagerSe1, mMcParticleHistManagerSe2, mMcParticleHistManagerSe3, mTripletHistManagerSe, mMcParticleCleaner1, mMcParticleCleaner2, mMcParticleCleaner3, mCtrSe, mTcSe); + return tripletprocesshelpers::processSameEventMcTruth(mcParticleSlice1, mcParticleSlice2, mcParticleSlice3, mcParticles, mcMothers, mcPartonicMothers, mcCol, mMcParticleHistManagerSe1, mMcParticleHistManagerSe2, mMcParticleHistManagerSe3, mTripletHistManagerSe, mMcParticleCleaner1, mMcParticleCleaner2, mMcParticleCleaner3, mCtrSe, mTcSe, mColHistManagerSe); } template @@ -1174,13 +1164,13 @@ class TripletMcParticleMcParticleMcParticleBuilder if (mParticle1Particle2Particle3AreSameSpecies) { switch (mMixingPolicy) { case triplethistmanager::MixingPolicy::kVtxMult: - tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner1, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1); + tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner1, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mColHistManagerMe); break; case triplethistmanager::MixingPolicy::kVtxCent: - tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner1, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1); + tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner1, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mColHistManagerMe); break; case triplethistmanager::MixingPolicy::kVtxMultCent: - tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner1, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1); + tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition1, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner1, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1188,13 +1178,13 @@ class TripletMcParticleMcParticleMcParticleBuilder } else if (mParticle1Particle2AreSameSpecies) { switch (mMixingPolicy) { case triplethistmanager::MixingPolicy::kVtxMult: - tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe3); + tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe3, mColHistManagerMe); break; case triplethistmanager::MixingPolicy::kVtxCent: - tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe3); + tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe3, mColHistManagerMe); break; case triplethistmanager::MixingPolicy::kVtxMultCent: - tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe3); + tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition1, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner1, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe1, mMcParticleHistManagerMe3, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1202,13 +1192,13 @@ class TripletMcParticleMcParticleMcParticleBuilder } else { switch (mMixingPolicy) { case triplethistmanager::MixingPolicy::kVtxMult: - tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition2, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2, mMcParticleHistManagerMe3); + tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition2, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMult, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2, mMcParticleHistManagerMe3, mColHistManagerMe); break; case triplethistmanager::MixingPolicy::kVtxCent: - tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition2, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2, mMcParticleHistManagerMe3); + tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition2, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2, mMcParticleHistManagerMe3, mColHistManagerMe); break; case triplethistmanager::MixingPolicy::kVtxMultCent: - tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition2, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2, mMcParticleHistManagerMe3); + tripletprocesshelpers::processMixedEventMcTruth(mcCols, partition1, partition2, partition3, mcParticles, mcMothers, mcPartonicMothers, cache, binsVtxMultCent, mMixingDepth, mTripletHistManagerMe, mMcParticleCleaner1, mMcParticleCleaner2, mMcParticleCleaner3, mCtrMe, mTcMe, mEventStride, mMcParticleHistManagerMe1, mMcParticleHistManagerMe2, mMcParticleHistManagerMe3, mColHistManagerMe); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -1217,7 +1207,8 @@ class TripletMcParticleMcParticleMcParticleBuilder } private: - colhistmanager::CollisionHistManager mColHistManager; + colhistmanager::CollisionHistManager mColHistManagerSe; + colhistmanager::CollisionHistManager mColHistManagerMe; mcparticlehistmanager::McParticleHistManager mMcParticleHistManagerSe1; mcparticlehistmanager::McParticleHistManager mMcParticleHistManagerSe2; mcparticlehistmanager::McParticleHistManager mMcParticleHistManagerSe3; diff --git a/PWGCF/Femto/Core/tripletProcessHelpers.h b/PWGCF/Femto/Core/tripletProcessHelpers.h index df75ace9ef9..f7c2eb19fae 100644 --- a/PWGCF/Femto/Core/tripletProcessHelpers.h +++ b/PWGCF/Femto/Core/tripletProcessHelpers.h @@ -48,7 +48,8 @@ template + typename T7, + typename T8> bool processSameEvent(T1 const& SliceParticle, T2 const& TrackTable, T3 const& Collision, @@ -56,15 +57,12 @@ bool processSameEvent(T1 const& SliceParticle, T5& TripletHistManager, T6& CtrManager, T7& TcManager, - TripletOrder tripletOrder) + TripletOrder tripletOrder, + T8& ColHistManager) { TripletHistManager.resetTrackedParticlesPerEvent(); bool foundTriplet = false; - for (auto const& part : SliceParticle) { - ParticleHistManager.template fill(part, TrackTable); - } - for (auto const& [p1, p2, p3] : o2::soa::combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(SliceParticle, SliceParticle, SliceParticle))) { // Randomize triplet order if enabled, then compute the kinematic (Q3) for this triplet @@ -110,6 +108,15 @@ bool processSameEvent(T1 const& SliceParticle, } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted triplet -- same acceptance as the mixed-event side + if (foundTriplet) { + ColHistManager.template fill(Collision); + for (auto const& part : SliceParticle) { + ParticleHistManager.template fill(part, TrackTable); + } + } + TripletHistManager.fillMixingQaSe(); return foundTriplet; } @@ -117,7 +124,7 @@ bool processSameEvent(T1 const& SliceParticle, // process same event for identical 2 particles and 1 other particle template + typename T5, typename T6, typename T7, typename T8, typename T9, typename T10> bool processSameEvent(T1 const& SliceParticle1, // 1&2 have same species T2 const& SliceParticle3, T3 const& TrackTable, @@ -127,18 +134,12 @@ bool processSameEvent(T1 const& SliceParticle1, // 1&2 have same species T7& TripletHistManager, T8& CtrManager, T9& TcManager, - TripletOrder tripletOrder) + TripletOrder tripletOrder, + T10& ColHistManager) { TripletHistManager.resetTrackedParticlesPerEvent(); bool foundTriplet = false; - for (auto const& part : SliceParticle1) { - ParticleHistManager1.template fill(part, TrackTable); - } - for (auto const& part : SliceParticle3) { - ParticleHistManager3.template fill(part, TrackTable); - } - for (auto const& p3 : SliceParticle3) { for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(SliceParticle1, SliceParticle1))) { @@ -173,6 +174,18 @@ bool processSameEvent(T1 const& SliceParticle1, // 1&2 have same species } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted triplet -- same acceptance as the mixed-event side + if (foundTriplet) { + ColHistManager.template fill(Collision); + for (auto const& part : SliceParticle1) { + ParticleHistManager1.template fill(part, TrackTable); + } + for (auto const& part : SliceParticle3) { + ParticleHistManager3.template fill(part, TrackTable); + } + } + TripletHistManager.fillMixingQaSe(); return foundTriplet; } @@ -189,7 +202,8 @@ template + typename T11, + typename T12> bool processSameEvent(T1 const& SliceParticle1, T2 const& SliceParticle2, T3 const& SliceParticle3, @@ -200,21 +214,12 @@ bool processSameEvent(T1 const& SliceParticle1, T8& ParticleHistManager3, T9& TripletHistManager, T10& CtrManager, - T11& TcManager) + T11& TcManager, + T12& ColHistManager) { TripletHistManager.resetTrackedParticlesPerEvent(); bool foundTriplet = false; - for (auto const& part : SliceParticle1) { - ParticleHistManager1.template fill(part, TrackTable); - } - for (auto const& part : SliceParticle2) { - ParticleHistManager2.template fill(part, TrackTable); - } - for (auto const& part : SliceParticle3) { - ParticleHistManager3.template fill(part, TrackTable); - } - for (auto const& [p1, p2, p3] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(SliceParticle1, SliceParticle2, SliceParticle3))) { // compute the kinematic (Q3) for this triplet @@ -238,6 +243,21 @@ bool processSameEvent(T1 const& SliceParticle1, } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted triplet -- same acceptance as the mixed-event side + if (foundTriplet) { + ColHistManager.template fill(Collision); + for (auto const& part : SliceParticle1) { + ParticleHistManager1.template fill(part, TrackTable); + } + for (auto const& part : SliceParticle2) { + ParticleHistManager2.template fill(part, TrackTable); + } + for (auto const& part : SliceParticle3) { + ParticleHistManager3.template fill(part, TrackTable); + } + } + TripletHistManager.fillMixingQaSe(); return foundTriplet; } @@ -255,7 +275,8 @@ template + typename T12, + typename T13> bool processSameEvent(T1 const& SliceParticle, T2 const& TrackTable, T3 const& mcParticles, @@ -268,18 +289,12 @@ bool processSameEvent(T1 const& SliceParticle, T10& Cleaner, T11& CtrManager, T12& TcManager, - TripletOrder tripletOrder) + TripletOrder tripletOrder, + T13& ColHistManager) { TripletHistManager.resetTrackedParticlesPerEvent(); bool foundTriplet = false; - for (auto const& part : SliceParticle) { - if (!Cleaner.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); - } - for (auto const& [p1, p2, p3] : o2::soa::combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(SliceParticle, SliceParticle, SliceParticle))) { // check if all three particles are clean if (!Cleaner.isClean(p1, mcParticles, mcMothers, mcPartonicMothers) || @@ -331,6 +346,18 @@ bool processSameEvent(T1 const& SliceParticle, } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted triplet -- same acceptance as the mixed-event side + if (foundTriplet) { + ColHistManager.template fill(Collision, mcCollisions); + for (auto const& part : SliceParticle) { + if (!Cleaner.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); + } + } + TripletHistManager.fillMixingQaSe(); return foundTriplet; } @@ -338,7 +365,7 @@ bool processSameEvent(T1 const& SliceParticle, // process same event for 2 identical particles and one other with mc information template + typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16> bool processSameEvent(T1 const& SliceParticle1, T2 const& SliceParticle3, T3 const& TrackTable, @@ -354,24 +381,12 @@ bool processSameEvent(T1 const& SliceParticle1, T13& Cleaner3, T14& CtrManager, T15& TcManager, - TripletOrder tripletOrder) + TripletOrder tripletOrder, + T16& ColHistManager) { TripletHistManager.resetTrackedParticlesPerEvent(); bool foundTriplet = false; - for (auto const& part : SliceParticle1) { - if (!Cleaner1.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager1.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); - } - for (auto const& part : SliceParticle3) { - if (!Cleaner3.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager3.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); - } - for (auto const& p3 : SliceParticle3) { for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(SliceParticle1, SliceParticle1))) { // check if all three particles are clean @@ -412,6 +427,24 @@ bool processSameEvent(T1 const& SliceParticle1, } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted triplet -- same acceptance as the mixed-event side + if (foundTriplet) { + ColHistManager.template fill(Collision, mcCollisions); + for (auto const& part : SliceParticle1) { + if (!Cleaner1.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager1.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); + } + for (auto const& part : SliceParticle3) { + if (!Cleaner3.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager3.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); + } + } + TripletHistManager.fillMixingQaSe(); return foundTriplet; } @@ -435,7 +468,8 @@ template + typename T18, + typename T19> bool processSameEvent(T1 const& SliceParticle1, T2 const& SliceParticle2, T3 const& SliceParticle3, @@ -453,30 +487,12 @@ bool processSameEvent(T1 const& SliceParticle1, T15& Cleaner2, T16& Cleaner3, T17& CtrManager, - T18& TcManager) + T18& TcManager, + T19& ColHistManager) { TripletHistManager.resetTrackedParticlesPerEvent(); bool foundTriplet = false; - for (auto const& part : SliceParticle1) { - if (!Cleaner1.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager1.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); - } - for (auto const& part : SliceParticle2) { - if (!Cleaner2.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager2.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); - } - for (auto const& part : SliceParticle3) { - if (!Cleaner3.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager3.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); - } - for (auto const& [p1, p2, p3] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(SliceParticle1, SliceParticle2, SliceParticle3))) { // check if all three particles are clean if (!Cleaner1.isClean(p1, mcParticles, mcMothers, mcPartonicMothers) || @@ -506,6 +522,30 @@ bool processSameEvent(T1 const& SliceParticle1, } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted triplet -- same acceptance as the mixed-event side + if (foundTriplet) { + ColHistManager.template fill(Collision, mcCollisions); + for (auto const& part : SliceParticle1) { + if (!Cleaner1.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager1.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); + } + for (auto const& part : SliceParticle2) { + if (!Cleaner2.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager2.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); + } + for (auto const& part : SliceParticle3) { + if (!Cleaner3.isClean(part, mcParticles, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager3.template fill(part, TrackTable, Collision, mcParticles, mcMothers, mcPartonicMothers); + } + } + TripletHistManager.fillMixingQaSe(); return foundTriplet; } @@ -522,7 +562,8 @@ template + typename T10, + typename T11> bool processSameEventMcTruth(T1 const& SliceParticle, T2 const& /*mcParticles*/, T3 const& mcMothers, @@ -533,18 +574,12 @@ bool processSameEventMcTruth(T1 const& SliceParticle, T8& ParticleCleaner, T9& CtrManager, T10& TcManager, - TripletOrder tripletOrder) + TripletOrder tripletOrder, + T11& ColHistManager) { TripletHistManager.resetTrackedParticlesPerEvent(); bool foundTriplet = false; - for (auto const& part : SliceParticle) { - if (!ParticleCleaner.isClean(part, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager.fill(part, mcMothers, mcPartonicMothers); - } - for (auto const& [p1, p2, p3] : o2::soa::combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(SliceParticle, SliceParticle, SliceParticle))) { if (!ParticleCleaner.isClean(p1, mcMothers, mcPartonicMothers) || !ParticleCleaner.isClean(p2, mcMothers, mcPartonicMothers) || @@ -592,6 +627,18 @@ bool processSameEventMcTruth(T1 const& SliceParticle, } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted triplet -- same acceptance as the mixed-event side + if (foundTriplet) { + ColHistManager.template fill(Collision); + for (auto const& part : SliceParticle) { + if (!ParticleCleaner.isClean(part, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager.fill(part, mcMothers, mcPartonicMothers); + } + } + TripletHistManager.fillMixingQaSe(); return foundTriplet; } @@ -599,7 +646,7 @@ bool processSameEventMcTruth(T1 const& SliceParticle, // process same event for 2 identical mc particles and 1 other mc particle template + typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14> bool processSameEventMcTruth(T1 const& SliceParticle1, // 1&2 have same species T2 const& SliceParticle3, T3 const& /*mcParticles*/, @@ -613,24 +660,12 @@ bool processSameEventMcTruth(T1 const& SliceParticle1, // 1&2 have same species T11& ParticleCleaner3, T12& CtrManager, T13& TcManager, - TripletOrder tripletOrder) + TripletOrder tripletOrder, + T14& ColHistManager) { TripletHistManager.resetTrackedParticlesPerEvent(); bool foundTriplet = false; - for (auto const& part : SliceParticle1) { - if (!ParticleCleaner1.isClean(part, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager1.fill(part, mcMothers, mcPartonicMothers); - } - for (auto const& part : SliceParticle3) { - if (!ParticleCleaner3.isClean(part, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager3.fill(part, mcMothers, mcPartonicMothers); - } - for (auto const& p3 : SliceParticle3) { if (!ParticleCleaner3.isClean(p3, mcMothers, mcPartonicMothers)) { continue; @@ -667,6 +702,24 @@ bool processSameEventMcTruth(T1 const& SliceParticle1, // 1&2 have same species } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted triplet -- same acceptance as the mixed-event side + if (foundTriplet) { + ColHistManager.template fill(Collision); + for (auto const& part : SliceParticle1) { + if (!ParticleCleaner1.isClean(part, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager1.fill(part, mcMothers, mcPartonicMothers); + } + for (auto const& part : SliceParticle3) { + if (!ParticleCleaner3.isClean(part, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager3.fill(part, mcMothers, mcPartonicMothers); + } + } + TripletHistManager.fillMixingQaSe(); return foundTriplet; } @@ -674,7 +727,7 @@ bool processSameEventMcTruth(T1 const& SliceParticle1, // 1&2 have same species // process same event for 3 different mc particles template + typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17> bool processSameEventMcTruth(T1 const& SliceParticle1, T2 const& SliceParticle2, T3 const& SliceParticle3, @@ -690,30 +743,12 @@ bool processSameEventMcTruth(T1 const& SliceParticle1, T13& ParticleCleaner2, T14& ParticleCleaner3, T15& CtrManager, - T16& TcManager) + T16& TcManager, + T17& ColHistManager) { TripletHistManager.resetTrackedParticlesPerEvent(); bool foundTriplet = false; - for (auto const& part : SliceParticle1) { - if (!ParticleCleaner1.isClean(part, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager1.fill(part, mcMothers, mcPartonicMothers); - } - for (auto const& part : SliceParticle2) { - if (!ParticleCleaner2.isClean(part, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager2.fill(part, mcMothers, mcPartonicMothers); - } - for (auto const& part : SliceParticle3) { - if (!ParticleCleaner3.isClean(part, mcMothers, mcPartonicMothers)) { - continue; - } - ParticleHistManager3.fill(part, mcMothers, mcPartonicMothers); - } - for (auto const& [p1, p2, p3] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(SliceParticle1, SliceParticle2, SliceParticle3))) { if (!ParticleCleaner1.isClean(p1, mcMothers, mcPartonicMothers) || !ParticleCleaner2.isClean(p2, mcMothers, mcPartonicMothers) || @@ -738,6 +773,30 @@ bool processSameEventMcTruth(T1 const& SliceParticle1, } } + // Single-particle and collision histograms only get filled for events that actually contributed + // at least one accepted triplet -- same acceptance as the mixed-event side + if (foundTriplet) { + ColHistManager.template fill(Collision); + for (auto const& part : SliceParticle1) { + if (!ParticleCleaner1.isClean(part, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager1.fill(part, mcMothers, mcPartonicMothers); + } + for (auto const& part : SliceParticle2) { + if (!ParticleCleaner2.isClean(part, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager2.fill(part, mcMothers, mcPartonicMothers); + } + for (auto const& part : SliceParticle3) { + if (!ParticleCleaner3.isClean(part, mcMothers, mcPartonicMothers)) { + continue; + } + ParticleHistManager3.fill(part, mcMothers, mcPartonicMothers); + } + } + TripletHistManager.fillMixingQaSe(); return foundTriplet; } @@ -757,7 +816,8 @@ template + typename T14, + typename T15> void processMixedEvent(T1 const& Collisions, T2& Partition1, T3& Partition2, @@ -772,7 +832,8 @@ void processMixedEvent(T1 const& Collisions, int eventStride, T12& ParticleHistManagerMe1, T13& ParticleHistManagerMe2, - T14& ParticleHistManagerMe3) + T14& ParticleHistManagerMe3, + T15& ColHistManager) { int64_t lastCollisionIndex1 = -1; int64_t lastCollisionIndex2 = -1; @@ -870,6 +931,12 @@ void processMixedEvent(T1 const& Collisions, if (hasValidTriplet) { ++windowSizeEffective; + // collision histograms only get filled for collisions that actually contributed at least + // one accepted mixed-event triplet -- all three real collisions go into the same manager + // used by the same-event side + ColHistManager.template fill(collision1); + ColHistManager.template fill(collision2); + ColHistManager.template fill(collision3); } TripletHistManager.fillMixingQaMePerEvent(); @@ -903,7 +970,8 @@ template + typename T21, + typename T22> void processMixedEvent(T1 const& Collisions, T2 const& mcCollisions, T3& Partition1, @@ -925,7 +993,8 @@ void processMixedEvent(T1 const& Collisions, int eventStride, T19& ParticleHistManagerMe1, T20& ParticleHistManagerMe2, - T21& ParticleHistManagerMe3) + T21& ParticleHistManagerMe3, + T22& ColHistManager) { int64_t lastCollisionIndex1 = -1; int64_t lastCollisionIndex2 = -1; @@ -1030,6 +1099,11 @@ void processMixedEvent(T1 const& Collisions, if (hasValidTriplet) { ++windowSizeEffective; + // collision histograms only get filled for collisions that actually contributed at least + // one accepted mixed-event triplet + ColHistManager.template fill(collision1, mcCollisions); + ColHistManager.template fill(collision2, mcCollisions); + ColHistManager.template fill(collision3, mcCollisions); } TripletHistManager.fillMixingQaMePerEvent(); @@ -1046,7 +1120,7 @@ void processMixedEvent(T1 const& Collisions, template + typename T17, typename T18, typename T19, typename T20> void processMixedEventMcTruth(T1 const& McCollisions, T2& Partition1, T3& Partition2, @@ -1066,7 +1140,8 @@ void processMixedEventMcTruth(T1 const& McCollisions, int eventStride, T17& ParticleHistManagerMe1, T18& ParticleHistManagerMe2, - T19& ParticleHistManagerMe3) + T19& ParticleHistManagerMe3, + T20& ColHistManager) { int64_t lastCollisionIndex1 = -1; int64_t lastCollisionIndex2 = -1; @@ -1158,6 +1233,11 @@ void processMixedEventMcTruth(T1 const& McCollisions, if (hasValidTriplet) { ++windowSizeEffective; + // collision histograms only get filled for collisions that actually contributed at least + // one accepted mixed-event triplet + ColHistManager.template fill(collision1); + ColHistManager.template fill(collision2); + ColHistManager.template fill(collision3); } TripletHistManager.fillMixingQaMePerEvent(); diff --git a/PWGCF/Femto/Tasks/femtoCascadeQa.cxx b/PWGCF/Femto/Tasks/femtoCascadeQa.cxx index 78b8ae337dc..587ed60370c 100644 --- a/PWGCF/Femto/Tasks/femtoCascadeQa.cxx +++ b/PWGCF/Femto/Tasks/femtoCascadeQa.cxx @@ -64,7 +64,7 @@ struct FemtoCascadeQa { // setup collisions collisionbuilder::ConfCollisionSelection collisionSelection; o2::framework::expressions::Filter collisionFilter = MAKE_COLLISION_FILTER(collisionSelection); - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; colhistmanager::ConfCollisionBinning confCollisionBinning; colhistmanager::ConfCollisionQaBinning confCollisionQaBinning; diff --git a/PWGCF/Femto/Tasks/femtoCharmHadronQa.cxx b/PWGCF/Femto/Tasks/femtoCharmHadronQa.cxx index 76bf7ad3f31..844e2c09fd4 100644 --- a/PWGCF/Femto/Tasks/femtoCharmHadronQa.cxx +++ b/PWGCF/Femto/Tasks/femtoCharmHadronQa.cxx @@ -66,7 +66,7 @@ struct FemtoCharmHadronQa { // setup for collisions collisionbuilder::ConfCollisionSelection collisionSelection; o2::framework::expressions::Filter collisionFilter = MAKE_COLLISION_FILTER(collisionSelection); - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; colhistmanager::ConfCollisionBinning confCollisionBinning; colhistmanager::ConfCollisionQaBinning confCollisionQaBinning; diff --git a/PWGCF/Femto/Tasks/femtoKinkQa.cxx b/PWGCF/Femto/Tasks/femtoKinkQa.cxx index e89ed4926dc..7523b7511f3 100644 --- a/PWGCF/Femto/Tasks/femtoKinkQa.cxx +++ b/PWGCF/Femto/Tasks/femtoKinkQa.cxx @@ -68,7 +68,7 @@ struct FemtoKinkQa { collisionbuilder::ConfCollisionSelection collisionSelection; o2::framework::expressions::Filter collisionFilter = MAKE_COLLISION_FILTER(collisionSelection); - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; colhistmanager::ConfCollisionBinning confCollisionBinning; colhistmanager::ConfCollisionQaBinning confCollisionQaBinning; diff --git a/PWGCF/Femto/Tasks/femtoMcParticleQa.cxx b/PWGCF/Femto/Tasks/femtoMcParticleQa.cxx index ca7560853da..ba7c4506fee 100644 --- a/PWGCF/Femto/Tasks/femtoMcParticleQa.cxx +++ b/PWGCF/Femto/Tasks/femtoMcParticleQa.cxx @@ -51,7 +51,7 @@ struct FemtoMcParticleQa { mcbuilder::ConfMcCollisionFilters collisionSelection; o2::framework::expressions::Filter collisionFilter = MAKE_MC_COLLISION_FILTER(collisionSelection); colhistmanager::ConfCollisionBinning confCollisionBinning; - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; // setup mc particles mcbuilder::ConfMcParticleSelection1 confMcParticleSelection1; diff --git a/PWGCF/Femto/Tasks/femtoPairMcParticleMcParticle.cxx b/PWGCF/Femto/Tasks/femtoPairMcParticleMcParticle.cxx index f4eb09769b3..cea2e3051a7 100644 --- a/PWGCF/Femto/Tasks/femtoPairMcParticleMcParticle.cxx +++ b/PWGCF/Femto/Tasks/femtoPairMcParticleMcParticle.cxx @@ -57,7 +57,7 @@ struct FemtoPairMcParticleMcParticle { mcbuilder::ConfMcCollisionFilters collisionSelection; o2::framework::expressions::Filter collisionFilter = MAKE_MC_COLLISION_FILTER(collisionSelection); colhistmanager::ConfCollisionBinning confCollisionBinning; - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; // setup mc particles mcbuilder::ConfMcParticleSelection1 confMcParticleSelection1; diff --git a/PWGCF/Femto/Tasks/femtoPhotonQa.cxx b/PWGCF/Femto/Tasks/femtoPhotonQa.cxx index 2e074fb1ff3..49d905b0436 100644 --- a/PWGCF/Femto/Tasks/femtoPhotonQa.cxx +++ b/PWGCF/Femto/Tasks/femtoPhotonQa.cxx @@ -49,7 +49,7 @@ struct FemtoPhotonQa { // setup for collisions collisionbuilder::ConfCollisionSelection collisionSelection; o2::framework::expressions::Filter collisionFilter = MAKE_COLLISION_FILTER(collisionSelection); - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; colhistmanager::ConfCollisionBinning confCollisionBinning; colhistmanager::ConfCollisionQaBinning confCollisionQaBinning; diff --git a/PWGCF/Femto/Tasks/femtoTrackQa.cxx b/PWGCF/Femto/Tasks/femtoTrackQa.cxx index c3dc0898145..7d9997755d1 100644 --- a/PWGCF/Femto/Tasks/femtoTrackQa.cxx +++ b/PWGCF/Femto/Tasks/femtoTrackQa.cxx @@ -66,7 +66,7 @@ struct FemtoTrackQa { o2::framework::expressions::Filter collisionFilter = MAKE_COLLISION_FILTER(collisionSelection); colhistmanager::ConfCollisionBinning confCollisionBinning; colhistmanager::ConfCollisionQaBinning confCollisionQaBinning; - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; // setup tracks trackbuilder::ConfTrackSelection1 confTrackSelection; diff --git a/PWGCF/Femto/Tasks/femtoTrackTrackTwoPhotonResonanceQa.cxx b/PWGCF/Femto/Tasks/femtoTrackTrackTwoPhotonResonanceQa.cxx index 59c98e936c2..7963bccd4b6 100644 --- a/PWGCF/Femto/Tasks/femtoTrackTrackTwoPhotonResonanceQa.cxx +++ b/PWGCF/Femto/Tasks/femtoTrackTrackTwoPhotonResonanceQa.cxx @@ -53,7 +53,7 @@ struct FemtoTrackTrackTwoPhotonResonanceQa { // setup for collisions collisionbuilder::ConfCollisionSelection collisionSelection; o2::framework::expressions::Filter collisionFilter = MAKE_COLLISION_FILTER(collisionSelection); - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; colhistmanager::ConfCollisionBinning confCollisionBinning; colhistmanager::ConfCollisionQaBinning confCollisionQaBinning; diff --git a/PWGCF/Femto/Tasks/femtoTwoPhotonResonanceQa.cxx b/PWGCF/Femto/Tasks/femtoTwoPhotonResonanceQa.cxx index afcf432c8e4..8ae9880c310 100644 --- a/PWGCF/Femto/Tasks/femtoTwoPhotonResonanceQa.cxx +++ b/PWGCF/Femto/Tasks/femtoTwoPhotonResonanceQa.cxx @@ -50,7 +50,7 @@ struct FemtoTwoPhotonResonanceQa { // setup for collisions collisionbuilder::ConfCollisionSelection collisionSelection; o2::framework::expressions::Filter collisionFilter = MAKE_COLLISION_FILTER(collisionSelection); - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; colhistmanager::ConfCollisionBinning confCollisionBinning; colhistmanager::ConfCollisionQaBinning confCollisionQaBinning; diff --git a/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx b/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx index fbb62a1003f..132b22d2be6 100644 --- a/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx +++ b/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx @@ -56,7 +56,7 @@ struct FemtoTwotrackresonanceQa { // setup for collisions collisionbuilder::ConfCollisionSelection collisionSelection; o2::framework::expressions::Filter collisionFilter = MAKE_COLLISION_FILTER(collisionSelection); - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; colhistmanager::ConfCollisionBinning confCollisionBinning; colhistmanager::ConfCollisionQaBinning confCollisionQaBinning; diff --git a/PWGCF/Femto/Tasks/femtoV0Qa.cxx b/PWGCF/Femto/Tasks/femtoV0Qa.cxx index 4ae00099140..658f19b3d46 100644 --- a/PWGCF/Femto/Tasks/femtoV0Qa.cxx +++ b/PWGCF/Femto/Tasks/femtoV0Qa.cxx @@ -65,7 +65,7 @@ struct FemtoV0Qa { // setup for collisions collisionbuilder::ConfCollisionSelection collisionSelection; o2::framework::expressions::Filter collisionFilter = MAKE_COLLISION_FILTER(collisionSelection); - colhistmanager::CollisionHistManager colHistManager; + colhistmanager::CollisionHistManager colHistManager; colhistmanager::ConfCollisionBinning confCollisionBinning; colhistmanager::ConfCollisionQaBinning confCollisionQaBinning; From 8459e1094ae5e10111631db3f380efd9ae6a42f4 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 11:09:45 +0100 Subject: [PATCH 02/11] Fix: fix histogram naming --- PWGCF/Femto/Core/dndetaHistManager.h | 14 ++++++------ PWGCF/Femto/Core/pairHistManager.h | 16 +++++++------- PWGCF/Femto/Core/trackHistManager.h | 32 +++++++++++++-------------- PWGCF/Femto/Core/tripletHistManager.h | 2 +- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/PWGCF/Femto/Core/dndetaHistManager.h b/PWGCF/Femto/Core/dndetaHistManager.h index 69b2107d575..77d44779ee4 100644 --- a/PWGCF/Femto/Core/dndetaHistManager.h +++ b/PWGCF/Femto/Core/dndetaHistManager.h @@ -173,22 +173,22 @@ constexpr std::array, kDndetaHistLast> HistTab {kCent, o2::framework::HistType::kTH1F, "hCent", "Centrality; Centrality (%); Entries"}, {kPosZVsCent, o2::framework::HistType::kTH2F, "hPosZVsCent", "Vertex z vs centrality; V_{Z} (cm); Centrality (%)"}, // data - {kDataDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Tracks; V_{Z} (cm); Centrality (%); #eta; #varphi; Track type"}, - {kDataDndetaMb, o2::framework::HistType::kTHnSparseF, "hDndetaMb", "Tracks (MB); V_{Z} (cm); #eta; #varphi"}, + {kDataDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Tracks; V_{Z} (cm); Centrality (%); #eta; #varphi; Track type;"}, + {kDataDndetaMb, o2::framework::HistType::kTHnSparseF, "hDndetaMb", "Tracks (MB); V_{Z} (cm); #eta; #varphi;"}, // mc: generated {kGenPosZ, o2::framework::HistType::kTH1F, "hPosZ", "Generated vertex z; V_{Z,gen} (cm); Entries"}, {kGenPosZVsCent, o2::framework::HistType::kTH2F, "hPosZVsCent", "Generated vertex z vs centrality; V_{Z,gen} (cm); Centrality_{gen} (%)"}, {kGenAssocRecoPosZ, o2::framework::HistType::kTH1F, "hAssocRecoPosZ", "Generated vertex z (with selected reco); V_{Z,gen} (cm); Entries"}, {kGenAssocRecoPosZVsCent, o2::framework::HistType::kTH2F, "hAssocRecoPosZVsCent", "Generated vertex z vs centrality (with selected reco); V_{Z,gen} (cm); Centrality_{gen} (%)"}, - {kGenDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Generated primaries; V_{Z,gen} (cm); Centrality_{gen} (%); #eta; #varphi"}, - {kGenAssocRecoDndeta, o2::framework::HistType::kTHnSparseF, "hAssocRecoDndeta", "Generated primaries (with selected reco); V_{Z,gen} (cm); Centrality_{gen} (%); #eta; #varphi; Species; p_{T} variation"}, - {kGenAssocRecoDndetaMb, o2::framework::HistType::kTHnSparseF, "hAssocRecoDndetaMb", "Generated primaries (with selected reco, MB); V_{Z,gen} (cm); #eta; #varphi; Species"}, + {kGenDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Generated primaries; V_{Z,gen} (cm); Centrality_{gen} (%); #eta; #varphi;"}, + {kGenAssocRecoDndeta, o2::framework::HistType::kTHnSparseF, "hAssocRecoDndeta", "Generated primaries (with selected reco); V_{Z,gen} (cm); Centrality_{gen} (%); #eta; #varphi; Species; p_{T} variation;"}, + {kGenAssocRecoDndetaMb, o2::framework::HistType::kTHnSparseF, "hAssocRecoDndetaMb", "Generated primaries (with selected reco, MB); V_{Z,gen} (cm); #eta; #varphi; Species;"}, // mc: reconstructed {kRecoPosZ, o2::framework::HistType::kTH1F, "hPosZ", "Reconstructed vertex z; V_{Z} (cm); Entries"}, {kRecoCent, o2::framework::HistType::kTH1F, "hCent", "Reconstructed centrality; Centrality (%); Entries"}, {kRecoPosZVsCent, o2::framework::HistType::kTH2F, "hPosZVsCent", "Reconstructed vertex z vs centrality; V_{Z} (cm); Centrality (%)"}, - {kRecoDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Reconstructed tracks; V_{Z} (cm); Centrality (%); #eta; #varphi; Track class"}, - {kRecoDndetaMb, o2::framework::HistType::kTHnSparseF, "hDndetaMb", "Reconstructed tracks (MB); V_{Z} (cm); #eta; #varphi; Track class"}, + {kRecoDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Reconstructed tracks; V_{Z} (cm); Centrality (%); #eta; #varphi; Track class;"}, + {kRecoDndetaMb, o2::framework::HistType::kTHnSparseF, "hDndetaMb", "Reconstructed tracks (MB); V_{Z} (cm); #eta; #varphi; Track class;"}, // mc: event and signal loss {kLossEvents, o2::framework::HistType::kTH1F, "hEvents", "Generated events; ; Entries"}, {kLossCentGen, o2::framework::HistType::kTH1F, "hCentGen", "Generated events; Centrality_{gen} (%); Entries"}, diff --git a/PWGCF/Femto/Core/pairHistManager.h b/PWGCF/Femto/Core/pairHistManager.h index b6bb3ca1942..0beea1b6b16 100644 --- a/PWGCF/Femto/Core/pairHistManager.h +++ b/PWGCF/Femto/Core/pairHistManager.h @@ -328,13 +328,13 @@ constexpr std::array, kPairHistogramLast> {kKstarVsMtVsMass1VsMass2VsPt1VsPt2, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMass1VsMass2VsPt1VsPt2", "k* vs m_{T} vs m_{1} vs m_{2} vs p_{T,1} vs p_{T,2}; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{1} (GeV/#it{c}^{2}); m_{2} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c});"}, {kKstarVsMtVsMass1VsMass2VsPt1VsPt2VsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMass1VsMass2VsPt1VsPt2VsMult", "k* vs m_{T} vs m_{1} vs m_{2} vs p_{T,1} vs p_{T,2} vs multiplicity; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{1} (GeV/#it{c}^{2}); m_{2} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity;"}, {kKstarVsMtVsMass1VsMass2VsPt1VsPt2VsMultVsCent, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMass1VsMass2VsPt1VsPt2VsMultVsCent", "k* vs m_{T} vs m_{1} vs m_{2} vs p_{T,1} vs p_{T,2} vs multiplicity vs centrality; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{1} (GeV/#it{c}^{2}); m_{2} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity; Centrality (%);"}, - {kKstarVsMtVsMinvVsPt1VsPt2, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPt1VsPt2", "k* vs m_{T} vs m_{Inv} vs p_{T,1} vs p_{T,2}; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c})"}, - {kKstarVsMtVsMinvVsPt1VsPt2VsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPt1VsPt2VsMult", "k* vs m_{T} vs m_{Inv} vs p_{T,1} vs p_{T,2} vs multiplicity; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity"}, - {kKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent", "k* vs m_{T} vs m_{Inv} vs p_{T,1} vs p_{T,2} vs multiplicity vs centrality; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity; Centrality (%)"}, - {kKstarVsMinvVsKtVsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMinvVsKtVsMult", "k* vs m_{Inv} vs k_{T} vs multiplicity; k* (GeV/#it{c}); m_{Inv} (GeV/#it{c}^{2}); k_{T} (GeV/#it{c}); Multiplicity"}, - {kKstarVsMtVsMinvVsKtVsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsKtVsMult", "k* vs m_{T} vs m_{Inv} vs k_{T} vs multiplicity; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); k_{T} (GeV/#it{c}); Multiplicity"}, - {kKstarVsMtVsMinvVsKtVsPt1VsPt2VsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsKtVsPt1VsPt2VsMult", "k* vs m_{T} vs m_{Inv} vs k_{T} vs p_{T,1} vs p_{T,2} vs multiplicity; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); k_{T} (GeV/#it{c}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity"}, - {kKstarVsMtVsMinvVsKtVsPt1VsPt2VsMultVsCent, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsKtVsPt1VsPt2VsMultVsCent", "k* vs m_{T} vs m_{Inv} vs k_{T} vs p_{T,1} vs p_{T,2} vs multiplicity vs centrality; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); k_{T} (GeV/#it{c}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity; Centrality (%)"}, + {kKstarVsMtVsMinvVsPt1VsPt2, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPt1VsPt2", "k* vs m_{T} vs m_{Inv} vs p_{T,1} vs p_{T,2}; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c});"}, + {kKstarVsMtVsMinvVsPt1VsPt2VsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPt1VsPt2VsMult", "k* vs m_{T} vs m_{Inv} vs p_{T,1} vs p_{T,2} vs multiplicity; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity;"}, + {kKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsPt1VsPt2VsMultVsCent", "k* vs m_{T} vs m_{Inv} vs p_{T,1} vs p_{T,2} vs multiplicity vs centrality; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity; Centrality (%);"}, + {kKstarVsMinvVsKtVsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMinvVsKtVsMult", "k* vs m_{Inv} vs k_{T} vs multiplicity; k* (GeV/#it{c}); m_{Inv} (GeV/#it{c}^{2}); k_{T} (GeV/#it{c}); Multiplicity;"}, + {kKstarVsMtVsMinvVsKtVsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsKtVsMult", "k* vs m_{T} vs m_{Inv} vs k_{T} vs multiplicity; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); k_{T} (GeV/#it{c}); Multiplicity;"}, + {kKstarVsMtVsMinvVsKtVsPt1VsPt2VsMult, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsKtVsPt1VsPt2VsMult", "k* vs m_{T} vs m_{Inv} vs k_{T} vs p_{T,1} vs p_{T,2} vs multiplicity; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); k_{T} (GeV/#it{c}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity;"}, + {kKstarVsMtVsMinvVsKtVsPt1VsPt2VsMultVsCent, o2::framework::HistType::kTHnSparseF, "hKstarVsMtVsMinvVsKtVsPt1VsPt2VsMultVsCent", "k* vs m_{T} vs m_{Inv} vs k_{T} vs p_{T,1} vs p_{T,2} vs multiplicity vs centrality; k* (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); m_{Inv} (GeV/#it{c}^{2}); k_{T} (GeV/#it{c}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); Multiplicity; Centrality (%);"}, {kDalitz, o2::framework::HistType::kTHnSparseF, "hDalitz", "Dalitz plot; k* (GeV/#it{c}); m^{2}_{123} (GeV/#it{c}^{2})^{2}; m^{2}_{12} (GeV/#it{c}^{2})^{2}; m^{2}_{13} (GeV/#it{c}^{2})^{2};"}, // reco-vs-mc-truth correlation {kTrueKstarVsKstar, o2::framework::HistType::kTH2F, "hTrueKstarVsKstar", "k*_{True} vs k*; k*_{True} (GeV/#it{c}); k* (GeV/#it{c})"}, @@ -374,7 +374,7 @@ constexpr std::array, kPairHistogramLast> {kMeMixingWindowRaw, o2::framework::HistType::kTH1F, "hMeMixingWindowRaw", "Raw Mixing Window; Raw Mixing Window; Entries"}, {kMeMixingWindowEffective, o2::framework::HistType::kTH1F, "hMeMixingWindowEffective", "Effective Mixing Window; Effective Mixing Window; Entries"}, {kMeNpart1VsNpart2, o2::framework::HistType::kTH2F, "hMeNpart1VsNpart2", "# unique particle 1 vs # unique particle 2 in each mixing bin; # particle 1; # particle 2"}, - {kMeVtz1VsMult1VsCent1VsVtz2VsMult2VsCent2, o2::framework::HistType::kTHnSparseF, "hVtz1VsMult1VsCent1VsVtz2VsMult2VsCent2", "Mixing bins; V_{z,1} (cm); multiplicity_{1}; centrality_{1} (%); V_{z,2} (cm); multiplicity_{2}; centrality_{2} (%)"}, + {kMeVtz1VsMult1VsCent1VsVtz2VsMult2VsCent2, o2::framework::HistType::kTHnSparseF, "hVtz1VsMult1VsCent1VsVtz2VsMult2VsCent2", "Mixing bins; V_{z,1} (cm); multiplicity_{1}; centrality_{1} (%); V_{z,2} (cm); multiplicity_{2}; centrality_{2} (%);"}, // angular {kDeltaEtaDeltaPhi, o2::framework::HistType::kTH2F, "hDeltaEtaDeltaPhi", "#Delta#phi vs #Delta#eta; #Delta#phi; #Delta#eta"}, // angles diff --git a/PWGCF/Femto/Core/trackHistManager.h b/PWGCF/Femto/Core/trackHistManager.h index 66e4fe3fab3..be224cf6b95 100644 --- a/PWGCF/Femto/Core/trackHistManager.h +++ b/PWGCF/Femto/Core/trackHistManager.h @@ -426,26 +426,26 @@ constexpr std::array, kTrackHistLast> {kTpctofDeuteron, o2::framework::HistType::kTH2F, "hTpctofPidDeuteron", "TPC+TOF PID Deuteron; p (GeV/#it{c}) ; #sqrt{n#sigma_{TPC,de}^{2}+n#sigma_{TOF,de}^{2}}"}, {kTpctofTriton, o2::framework::HistType::kTH2F, "hTpctofPidTriton", "TPC+TOF PID Triton; p (GeV/#it{c}) ; #sqrt{n#sigma_{TPC,tr}^{2}+n#sigma_{TOF,tr}^{2}}"}, {kTpctofHelium, o2::framework::HistType::kTH2F, "hTpctofPidHelium", "TPC+TOF PID Helium; p (GeV/#it{c}) ; #sqrt{n#sigma_{TPC,he}^{2}+n#sigma_{TOF,he}^{2}}"}, - {kTpcVsItsElectron, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidElectron", "TPC vs ITS PID Electron; p (GeV/#it{c}) ; n#sigma_{TPC,el} ; n#sigma_{ITS,el}"}, - {kTpcVsItsPion, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidPion", "TPC vs ITS PID Pion; p (GeV/#it{c}) ; n#sigma_{TPC,pi} ; n#sigma_{ITS,pi}"}, - {kTpcVsItsKaon, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidKaon", "TPC vs ITS PID Kaon; p (GeV/#it{c}) ; n#sigma_{TPC,ka} ; n#sigma_{ITS,ka}"}, - {kTpcVsItsProton, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidProton", "TPC vs ITS PID Proton; p (GeV/#it{c}) ; n#sigma_{TPC,pr} ; n#sigma_{ITS,pr}"}, - {kTpcVsItsDeuteron, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidDeuteron", "TPC vs ITS PID Deuteron; p (GeV/#it{c}) ; n#sigma_{TPC,de} ; n#sigma_{ITS,de}"}, - {kTpcVsItsTriton, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidTriton", "TPC vs ITS PID Triton; p (GeV/#it{c}) ; n#sigma_{TPC,tr} ; n#sigma_{ITS,tr}"}, - {kTpcVsItsHelium, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidHelium", "TPC vs ITS PID Helium; p (GeV/#it{c}) ; n#sigma_{TPC,he} ; n#sigma_{ITS,he}"}, - {kTpcVsTofElectron, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidElectron", "TPC vs TOF PID Electron; p (GeV/#it{c}) ; n#sigma_{TPC,el} ; n#sigma_{TOF,el}"}, - {kTpcVsTofPion, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidPion", "TPC vs TOF PID Pion; p (GeV/#it{c}) ; n#sigma_{TPC,pi} ; n#sigma_{TOF,pi}"}, - {kTpcVsTofKaon, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidKaon", "TPC vs TOF PID Kaon; p (GeV/#it{c}) ; n#sigma_{TPC,ka} ; n#sigma_{TOF,ka}"}, - {kTpcVsTofProton, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidProton", "TPC vs TOF PID Proton; p (GeV/#it{c}) ; n#sigma_{TPC,pr} ; n#sigma_{TOF,pr}"}, - {kTpcVsTofDeuteron, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidDeuteron", "TPC vs TOF PID Deuteron; p (GeV/#it{c}) ; n#sigma_{TPC,de} ; n#sigma_{TOF,de}"}, - {kTpcVsTofTriton, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidTriton", "TPC vs TOF PID Triton; p (GeV/#it{c}) ; n#sigma_{TPC,tr} ; n#sigma_{TOF,tr}"}, - {kTpcVsTofHelium, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidHelium", "TPC vs TOF PID Helium; p (GeV/#it{c}) ; n#sigma_{TPC,he} ; n#sigma_{TOF,he}"}, + {kTpcVsItsElectron, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidElectron", "TPC vs ITS PID Electron; p (GeV/#it{c}) ; n#sigma_{TPC,el} ; n#sigma_{ITS,el};"}, + {kTpcVsItsPion, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidPion", "TPC vs ITS PID Pion; p (GeV/#it{c}) ; n#sigma_{TPC,pi} ; n#sigma_{ITS,pi};"}, + {kTpcVsItsKaon, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidKaon", "TPC vs ITS PID Kaon; p (GeV/#it{c}) ; n#sigma_{TPC,ka} ; n#sigma_{ITS,ka};"}, + {kTpcVsItsProton, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidProton", "TPC vs ITS PID Proton; p (GeV/#it{c}) ; n#sigma_{TPC,pr} ; n#sigma_{ITS,pr};"}, + {kTpcVsItsDeuteron, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidDeuteron", "TPC vs ITS PID Deuteron; p (GeV/#it{c}) ; n#sigma_{TPC,de} ; n#sigma_{ITS,de};"}, + {kTpcVsItsTriton, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidTriton", "TPC vs ITS PID Triton; p (GeV/#it{c}) ; n#sigma_{TPC,tr} ; n#sigma_{ITS,tr};"}, + {kTpcVsItsHelium, o2::framework::HistType::kTHnSparseF, "hTpcVsItsPidHelium", "TPC vs ITS PID Helium; p (GeV/#it{c}) ; n#sigma_{TPC,he} ; n#sigma_{ITS,he};"}, + {kTpcVsTofElectron, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidElectron", "TPC vs TOF PID Electron; p (GeV/#it{c}) ; n#sigma_{TPC,el} ; n#sigma_{TOF,el};"}, + {kTpcVsTofPion, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidPion", "TPC vs TOF PID Pion; p (GeV/#it{c}) ; n#sigma_{TPC,pi} ; n#sigma_{TOF,pi};"}, + {kTpcVsTofKaon, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidKaon", "TPC vs TOF PID Kaon; p (GeV/#it{c}) ; n#sigma_{TPC,ka} ; n#sigma_{TOF,ka};"}, + {kTpcVsTofProton, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidProton", "TPC vs TOF PID Proton; p (GeV/#it{c}) ; n#sigma_{TPC,pr} ; n#sigma_{TOF,pr};"}, + {kTpcVsTofDeuteron, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidDeuteron", "TPC vs TOF PID Deuteron; p (GeV/#it{c}) ; n#sigma_{TPC,de} ; n#sigma_{TOF,de};"}, + {kTpcVsTofTriton, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidTriton", "TPC vs TOF PID Triton; p (GeV/#it{c}) ; n#sigma_{TPC,tr} ; n#sigma_{TOF,tr};"}, + {kTpcVsTofHelium, o2::framework::HistType::kTHnSparseF, "hTpcVsTofPidHelium", "TPC vs TOF PID Helium; p (GeV/#it{c}) ; n#sigma_{TPC,he} ; n#sigma_{TOF,he};"}, {kItsPurity, o2::framework::HistType::kTH2F, "hItsPurity", "ITS purity nSigma (species picked via puritySlotMask); p_{T} (GeV/#it{c}) ; n#sigma_{ITS}"}, {kTpcPurity, o2::framework::HistType::kTH2F, "hTpcPurity", "TPC purity nSigma (species picked via puritySlotMask); p_{T} (GeV/#it{c}) ; n#sigma_{TPC}"}, {kTofPurity, o2::framework::HistType::kTH2F, "hTofPurity", "TOF purity nSigma (species picked via puritySlotMask); p_{T} (GeV/#it{c}) ; n#sigma_{TOF}"}, {kTpcitsPurity, o2::framework::HistType::kTH2F, "hTpcitsPurity", "TPC+ITS combined purity nSigma (species picked via puritySlotMask); p_{T} (GeV/#it{c}) ; #sqrt{n#sigma_{TPC}^{2}+n#sigma_{ITS}^{2}}"}, {kTpctofPurity, o2::framework::HistType::kTH2F, "hTpctofPurity", "TPC+TOF combined purity nSigma (species picked via puritySlotMask); p_{T} (GeV/#it{c}) ; #sqrt{n#sigma_{TPC}^{2}+n#sigma_{TOF}^{2}}"}, - {kFractionDca, o2::framework::HistType::kTHnSparseF, "hFractionDca", "DCA for fraction extraction; p_{T} (GeV/#it{c}) ; DCA_{xy} (cm) ; DCA_{z} (cm)"}, + {kFractionDca, o2::framework::HistType::kTHnSparseF, "hFractionDca", "DCA for fraction extraction; p_{T} (GeV/#it{c}) ; DCA_{xy} (cm) ; DCA_{z} (cm);"}, {kOrigin, o2::framework::HistType::kTH1F, "hOrigin", "Status Codes (=Origin); Status Code; Entries"}, {kPdg, o2::framework::HistType::kTH1F, "hPdg", "PDG Codes of selected tracks; PDG Code; Entries"}, {kPdgMother, o2::framework::HistType::kTH1F, "hPdgMother", "PDG Codes of mother of selected tracks; PDG Code; Entries"}, @@ -454,7 +454,7 @@ constexpr std::array, kTrackHistLast> {kTrueEtaVsEta, o2::framework::HistType::kTH2F, "hTrueEtaVsEta", "True pseudorapdity vs pseudorapdity; #eta_{True}; #eta"}, {kTruePhiVsPhi, o2::framework::HistType::kTH2F, "hTruePhiVsPhi", "True azimuthal angle vs azimuthal angle; #varphi_{True}; #varphi"}, {kNoMcParticle, o2::framework::HistType::kTHnSparseF, "hNoMcParticle", "Wrongly reconstructed particles; p_{T} (GeV/#it{c}); DCA_{xy} (cm); DCA_{z} (cm);"}, - {kPrimary, o2::framework::HistType::kTHnSparseF, "hPrimary", "Primary particles; p_{T} (GeV/#it{c}); DCA_{xy} (cm); DCA_{z} (cm)"}, + {kPrimary, o2::framework::HistType::kTHnSparseF, "hPrimary", "Primary particles; p_{T} (GeV/#it{c}); DCA_{xy} (cm); DCA_{z} (cm);"}, {kFromWrongCollision, o2::framework::HistType::kTHnSparseF, "hFromWrongCollision", "Particles associated to wrong collision; p_{T} (GeV/#it{c}); DCA_{xy} (cm); DCA_{z} (cm);"}, {kFromMaterial, o2::framework::HistType::kTHnSparseF, "hFromMaterial", "Particles from material; p_{T} (GeV/#it{c}); DCA_{xy} (cm); DCA_{z} (cm);"}, {kMissidentified, o2::framework::HistType::kTHnSparseF, "hMissidentified", "Missidentified particles (fake/wrong PDG code); p_{T} (GeV/#it{c}); DCA_{xy} (cm); DCA_{z} (cm);"}, diff --git a/PWGCF/Femto/Core/tripletHistManager.h b/PWGCF/Femto/Core/tripletHistManager.h index b7eadec7642..bd4aa2c7414 100644 --- a/PWGCF/Femto/Core/tripletHistManager.h +++ b/PWGCF/Femto/Core/tripletHistManager.h @@ -183,7 +183,7 @@ constexpr std::array, kTripletHistogramLast> // n-D {kPt1VsPt2VsPt3, o2::framework::HistType::kTHnSparseF, "hPt1VsPt2VsPt3", "p_{T,1} vs p_{T,2} vs p_{T,3}; p_{T,1} (GeV/#it{c});p_{T,2} (GeV/#it{c});p_{T,3} (GeV/#it{c});"}, {kQ3VsPt1VsPt2VsPt3, o2::framework::HistType::kTHnSparseF, "hQ3VsPt1VsPt2VsPt3", "Q_{3} vs p_{T,1} vs p_{T,2} vs p_{T,3}; Q_{3} (GeV/#it{c}); p_{T,1} (GeV/#it{c}); p_{T,2} (GeV/#it{c}); p_{T,3} (GeV/#it{c});"}, - {kQ3VsMtVsMult, o2::framework::HistType::kTHnSparseF, "hQ3VsMtVsMult", "Q_{3} vs m_{T} vs multiplicity; Q_{3} (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); Multiplicity"}, + {kQ3VsMtVsMult, o2::framework::HistType::kTHnSparseF, "hQ3VsMtVsMult", "Q_{3} vs m_{T} vs multiplicity; Q_{3} (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); Multiplicity;"}, {kQ3VsMtVsMultVsCent, o2::framework::HistType::kTHnSparseF, "hQ3VsMtVsMultVsCent", "Q_{3} vs m_{T} vs multiplicity vs centrality; Q_{3} (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); Multiplicity; Centrality (%);"}, // n-D with mass {kQ3VsMtVsPt1VsPt2VsPt3VsMult, o2::framework::HistType::kTHnSparseF, "hQ3VsMtVsPt1VsPt2VsPt3VsMult", "Q_{3} vs m_{T} vs p_{T,1} vs p_{T,2} vs p_{T,3} vs multiplicity; Q_{3} (GeV/#it{c}); m_{T} (GeV/#it{c}^{2}); p_{T,1} (GeV/#it{c}) ; p_{T,2} (GeV/#it{c}); p_{T,3} (GeV/#it{c}); Multiplicity;"}, From 5f49ba73b55a390118573712d0b7108c7d573310 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 13:36:34 +0100 Subject: [PATCH 03/11] Feat: add kstar axis to dndeta histograms --- PWGCF/Femto/Core/dndetaBuilder.h | 44 +++++++++----- PWGCF/Femto/Core/dndetaHistManager.h | 73 ++++++++++++++---------- PWGCF/Femto/Core/pairBuilder.h | 12 ++++ PWGCF/Femto/Core/pairHistManager.h | 12 ++++ PWGCF/Femto/Core/tripletBuilder.h | 12 ++++ PWGCF/Femto/Core/tripletHistManager.h | 12 ++++ PWGCF/Femto/Tasks/femtoDndetaPair.cxx | 40 ++++++++----- PWGCF/Femto/Tasks/femtoDndetaTriplet.cxx | 36 ++++++------ 8 files changed, 167 insertions(+), 74 deletions(-) diff --git a/PWGCF/Femto/Core/dndetaBuilder.h b/PWGCF/Femto/Core/dndetaBuilder.h index 2404c573ec3..9690b6e962c 100644 --- a/PWGCF/Femto/Core/dndetaBuilder.h +++ b/PWGCF/Femto/Core/dndetaBuilder.h @@ -173,9 +173,13 @@ class DndetaBuilder // data // --------------------------------------------------------------------------- + /// \param triggerKinematic k*/Q3 of the triggering pair/triplet (minimum over the event), written + /// by the trigger callable as a side effect on itself returning true; -1 (or whatever the + /// caller initializes it to) for minimum bias. Read only after trigger() has run, i.e. + /// only meaningful once this function returns true. /// \return true if the collision was selected (including the trigger) template - bool processData(T1 const& col, T2& partitionGlobal, T3& partitionItsOnly, T4& cache, T5 const& trigger) + bool processData(T1 const& col, T2& partitionGlobal, T3& partitionItsOnly, T4& cache, T5 const& trigger, float triggerKinematic = -1.f) { if (!selectCollision(col, trigger)) { return false; @@ -194,7 +198,7 @@ class DndetaBuilder } nch++; mTrackHistManagerGlobal.template fill(track, tracksGlobal); - mHistManager.fillDataTrack(posZ, cent, track.eta(), track.phi(), true); + mHistManager.fillDataTrack(posZ, cent, track.eta(), track.phi(), true, triggerKinematic); } for (auto const& track : tracksItsOnly) { if (!isTrackAccepted(track, false)) { @@ -202,7 +206,7 @@ class DndetaBuilder } nch++; mTrackHistManagerItsOnly.template fill(track, tracksItsOnly); - mHistManager.fillDataTrack(posZ, cent, track.eta(), track.phi(), false); + mHistManager.fillDataTrack(posZ, cent, track.eta(), track.phi(), false, triggerKinematic); } if (mDoCorrelation) { mHistManager.fillCorrelation(static_cast(nch), col.mult(), col.multFT0A(), col.multFT0C()); @@ -234,7 +238,11 @@ class DndetaBuilder /// - gen: efficiency histograms for all generated collisions, loss histograms for the generated event class /// (optional INEL>0, optional generator-level trigger); the loss block's reco requirement is Sel8 /// only (no vtxZ, see isSelectedByMaskOnly), the vtxZ cut only gates the efficiency block above - template + /// \param triggerKinematicScratch scratch variable the recoTrigger callable writes the + /// triggering k*/Q3 into as a side effect when it returns true (minimum over the event); + /// read back immediately after each recoTrigger() call, so its value right before the + /// call is irrelevant and it is freely reused across collisions + template void processMc(T1 const& cols, T2 const& mcCols, T3& partitionGlobal, @@ -245,7 +253,8 @@ class DndetaBuilder T8 const& perMcColParticles, T9& pdg, T10 const& recoTrigger, - T11 const& genTrigger) + T11 const& genTrigger, + T12& triggerKinematicScratch) { const auto nMcCols = static_cast(mcCols.size()); @@ -270,6 +279,7 @@ class DndetaBuilder // not implemented (every Run3 event with a vertex is already within the stored range), so the loss-block // reco requirement must not carry the vtxZ cut like the Ctrk-side "selvtx" one does std::vector selectedReco(nMcCols, -1); + std::vector selectedRecoTriggerKinematic(nMcCols, -1.f); std::vector hasSel8Reco(nMcCols, false); for (auto const& col : cols) { if (!col.has_fMcCol() || bestReco[static_cast(col.fMcColId())] != col.globalIndex()) { @@ -284,10 +294,11 @@ class DndetaBuilder continue; } selectedReco[static_cast(col.fMcColId())] = col.globalIndex(); + selectedRecoTriggerKinematic[static_cast(col.fMcColId())] = triggerKinematicScratch; if (mDoMcEfficiency) { auto tracksGlobal = partitionGlobal->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); auto tracksItsOnly = partitionItsOnly->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); - fillRecoMc(col, tracksGlobal, tracksItsOnly, mcParticles, mcMothers); + fillRecoMc(col, tracksGlobal, tracksItsOnly, mcParticles, mcMothers, triggerKinematicScratch); } } @@ -300,13 +311,14 @@ class DndetaBuilder // efficiency: centrality of the selected reconstructed collision (underflow if there is none) if (mDoMcEfficiency) { const float recoCent = hasSelectedReco ? cols.rawIteratorAt(selectedReco[mcColIndex]).cent() : -1.f; + const float triggerKinematic = hasSelectedReco ? selectedRecoTriggerKinematic[mcColIndex] : -1.f; mHistManager.fillGenCollision(mcCol.posZ(), recoCent, hasSelectedReco); for (auto const& particle : particles) { if (!isGenParticleSelected(particle, pdg)) { continue; } mHistManager.fillGenParticle(mcCol.posZ(), recoCent, particle.eta(), particle.phi(), genType(particle.pdgCode()), hasSelectedReco, - ptVariationWeight(particle.pt(), mPtVariationUp), ptVariationWeight(particle.pt(), mPtVariationDown)); + ptVariationWeight(particle.pt(), mPtVariationUp), ptVariationWeight(particle.pt(), mPtVariationDown), triggerKinematic); } } @@ -492,20 +504,22 @@ class DndetaBuilder } template - void fillRecoMcTrack(T1 const& col, T2 const& track, T3 const& /*mcParticles*/, T4 const& /*mcMothers*/, std::vector& usedLabels) + void fillRecoMcTrack(T1 const& col, T2 const& track, T3 const& /*mcParticles*/, T4 const& /*mcMothers*/, std::vector& usedLabels, float triggerKinematic) { const float posZ = col.posZ(); const float cent = col.cent(); if (!track.has_fMcParticle()) { - mHistManager.fillRecoTrack(posZ, cent, track.eta(), track.phi(), dndetahistmanager::kRecoBkg); + mHistManager.fillRecoTrack(posZ, cent, track.eta(), track.phi(), dndetahistmanager::kRecoBkg, triggerKinematic); return; } auto mcParticle = track.template fMcParticle_as(); - // tracks matched to a particle from another mc collision are skipped (as in the legacy task) + // a track whose matched mc particle belongs to a different mc collision is a mis-association + // (e.g. an ambiguous/pileup-adjacent match); counting it here would attribute it to the wrong + // collision's efficiency, so it is skipped if (mcParticle.fMcColId() != col.fMcColId()) { return; } - mHistManager.fillRecoTrack(posZ, cent, track.eta(), track.phi(), dndetahistmanager::kRecoAll); + mHistManager.fillRecoTrack(posZ, cent, track.eta(), track.phi(), dndetahistmanager::kRecoAll, triggerKinematic); dndetahistmanager::RecoType type = dndetahistmanager::kRecoSecondary; if (isPhysicalPrimary(mcParticle)) { @@ -521,11 +535,11 @@ class DndetaBuilder type = dndetahistmanager::kRecoFake; } usedLabels.push_back(track.fMcParticleId()); - mHistManager.fillRecoTrack(posZ, cent, mcParticle.eta(), mcParticle.phi(), type); + mHistManager.fillRecoTrack(posZ, cent, mcParticle.eta(), mcParticle.phi(), type, triggerKinematic); } template - void fillRecoMc(T1 const& col, T2 const& tracksGlobal, T3 const& tracksItsOnly, T4 const& mcParticles, T5 const& mcMothers) + void fillRecoMc(T1 const& col, T2 const& tracksGlobal, T3 const& tracksItsOnly, T4 const& mcParticles, T5 const& mcMothers, float triggerKinematic) { mHistManager.fillRecoCollision(col.posZ(), col.cent()); // labels are tracked over both partitions, so a fake is also found if the other track comes from the other partition @@ -533,13 +547,13 @@ class DndetaBuilder for (auto const& track : tracksGlobal) { if (isTrackAccepted(track, true)) { mTrackHistManagerGlobal.template fill(track, tracksGlobal); - fillRecoMcTrack(col, track, mcParticles, mcMothers, usedLabels); + fillRecoMcTrack(col, track, mcParticles, mcMothers, usedLabels, triggerKinematic); } } for (auto const& track : tracksItsOnly) { if (isTrackAccepted(track, false)) { mTrackHistManagerItsOnly.template fill(track, tracksItsOnly); - fillRecoMcTrack(col, track, mcParticles, mcMothers, usedLabels); + fillRecoMcTrack(col, track, mcParticles, mcMothers, usedLabels, triggerKinematic); } } } diff --git a/PWGCF/Femto/Core/dndetaHistManager.h b/PWGCF/Femto/Core/dndetaHistManager.h index 77d44779ee4..d53a082ec70 100644 --- a/PWGCF/Femto/Core/dndetaHistManager.h +++ b/PWGCF/Femto/Core/dndetaHistManager.h @@ -173,22 +173,22 @@ constexpr std::array, kDndetaHistLast> HistTab {kCent, o2::framework::HistType::kTH1F, "hCent", "Centrality; Centrality (%); Entries"}, {kPosZVsCent, o2::framework::HistType::kTH2F, "hPosZVsCent", "Vertex z vs centrality; V_{Z} (cm); Centrality (%)"}, // data - {kDataDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Tracks; V_{Z} (cm); Centrality (%); #eta; #varphi; Track type;"}, - {kDataDndetaMb, o2::framework::HistType::kTHnSparseF, "hDndetaMb", "Tracks (MB); V_{Z} (cm); #eta; #varphi;"}, + {kDataDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Tracks; V_{Z} (cm); Centrality (%); #eta; #varphi; Track type; k*/Q_{3} (GeV/#it{c});"}, + {kDataDndetaMb, o2::framework::HistType::kTHnSparseF, "hDndetaMb", "Tracks (MB); V_{Z} (cm); #eta; #varphi; k*/Q_{3} (GeV/#it{c});"}, // mc: generated {kGenPosZ, o2::framework::HistType::kTH1F, "hPosZ", "Generated vertex z; V_{Z,gen} (cm); Entries"}, {kGenPosZVsCent, o2::framework::HistType::kTH2F, "hPosZVsCent", "Generated vertex z vs centrality; V_{Z,gen} (cm); Centrality_{gen} (%)"}, {kGenAssocRecoPosZ, o2::framework::HistType::kTH1F, "hAssocRecoPosZ", "Generated vertex z (with selected reco); V_{Z,gen} (cm); Entries"}, {kGenAssocRecoPosZVsCent, o2::framework::HistType::kTH2F, "hAssocRecoPosZVsCent", "Generated vertex z vs centrality (with selected reco); V_{Z,gen} (cm); Centrality_{gen} (%)"}, - {kGenDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Generated primaries; V_{Z,gen} (cm); Centrality_{gen} (%); #eta; #varphi;"}, - {kGenAssocRecoDndeta, o2::framework::HistType::kTHnSparseF, "hAssocRecoDndeta", "Generated primaries (with selected reco); V_{Z,gen} (cm); Centrality_{gen} (%); #eta; #varphi; Species; p_{T} variation;"}, - {kGenAssocRecoDndetaMb, o2::framework::HistType::kTHnSparseF, "hAssocRecoDndetaMb", "Generated primaries (with selected reco, MB); V_{Z,gen} (cm); #eta; #varphi; Species;"}, + {kGenDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Generated primaries; V_{Z,gen} (cm); Centrality_{gen} (%); #eta; #varphi; k*/Q_{3} (GeV/#it{c});"}, + {kGenAssocRecoDndeta, o2::framework::HistType::kTHnSparseF, "hAssocRecoDndeta", "Generated primaries (with selected reco); V_{Z,gen} (cm); Centrality_{gen} (%); #eta; #varphi; Species; p_{T} variation; k*/Q_{3} (GeV/#it{c});"}, + {kGenAssocRecoDndetaMb, o2::framework::HistType::kTHnSparseF, "hAssocRecoDndetaMb", "Generated primaries (with selected reco, MB); V_{Z,gen} (cm); #eta; #varphi; Species; k*/Q_{3} (GeV/#it{c});"}, // mc: reconstructed {kRecoPosZ, o2::framework::HistType::kTH1F, "hPosZ", "Reconstructed vertex z; V_{Z} (cm); Entries"}, {kRecoCent, o2::framework::HistType::kTH1F, "hCent", "Reconstructed centrality; Centrality (%); Entries"}, {kRecoPosZVsCent, o2::framework::HistType::kTH2F, "hPosZVsCent", "Reconstructed vertex z vs centrality; V_{Z} (cm); Centrality (%)"}, - {kRecoDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Reconstructed tracks; V_{Z} (cm); Centrality (%); #eta; #varphi; Track class;"}, - {kRecoDndetaMb, o2::framework::HistType::kTHnSparseF, "hDndetaMb", "Reconstructed tracks (MB); V_{Z} (cm); #eta; #varphi; Track class;"}, + {kRecoDndeta, o2::framework::HistType::kTHnSparseF, "hDndeta", "Reconstructed tracks; V_{Z} (cm); Centrality (%); #eta; #varphi; Track class; k*/Q_{3} (GeV/#it{c});"}, + {kRecoDndetaMb, o2::framework::HistType::kTHnSparseF, "hDndetaMb", "Reconstructed tracks (MB); V_{Z} (cm); #eta; #varphi; Track class; k*/Q_{3} (GeV/#it{c});"}, // mc: event and signal loss {kLossEvents, o2::framework::HistType::kTH1F, "hEvents", "Generated events; ; Entries"}, {kLossCentGen, o2::framework::HistType::kTH1F, "hCentGen", "Generated events; Centrality_{gen} (%); Entries"}, @@ -231,6 +231,11 @@ struct ConfDndetaBinning : o2::framework::ConfigurableGroup { o2::framework::ConfigurableAxis ft0c{"ft0c", {501, -0.5, 500.5}, "FT0C amplitude binning (correlations)"}; o2::framework::ConfigurableAxis massK0short{"massK0short", {200, 0.4, 0.6}, "K0short mass binning"}; o2::framework::ConfigurableAxis massLambda{"massLambda", {200, 1.07, 1.17}, "Lambda mass binning"}; + // trigger kinematic: k* for a pair trigger, Q3 for a triplet trigger (-1 for minimum bias, i.e. + // no trigger pair/triplet was required) -- carried as an extra axis on the dN/deta histograms so + // a k*/Q3-differential multiplicity can be computed by projecting/cutting post-hoc, without + // rerunning the production for every limit + o2::framework::ConfigurableAxis kstarQ3{"kstarQ3", {402, -0.02, 2.0}, "Trigger kinematic (k* or Q3) binning"}; }; namespace detail @@ -260,22 +265,22 @@ auto makeDndetaHistSpecMap(T const& conf) {kCent, {conf.centFine}}, {kPosZVsCent, {conf.vtxZ, conf.cent}}, // data - {kDataDndeta, {conf.vtxZ, conf.cent, conf.eta, conf.phi, axisTrackType}}, - {kDataDndetaMb, {conf.vtxZ, conf.eta, conf.phi}}, + {kDataDndeta, {conf.vtxZ, conf.cent, conf.eta, conf.phi, axisTrackType, conf.kstarQ3}}, + {kDataDndetaMb, {conf.vtxZ, conf.eta, conf.phi, conf.kstarQ3}}, // mc: generated {kGenPosZ, {conf.vtxZ}}, {kGenPosZVsCent, {conf.vtxZ, conf.cent}}, {kGenAssocRecoPosZ, {conf.vtxZ}}, {kGenAssocRecoPosZVsCent, {conf.vtxZ, conf.cent}}, - {kGenDndeta, {conf.vtxZ, conf.cent, conf.eta, conf.phi}}, - {kGenAssocRecoDndeta, {conf.vtxZ, conf.cent, conf.eta, conf.phi, axisGenType, axisPtVariation}}, - {kGenAssocRecoDndetaMb, {conf.vtxZ, conf.eta, conf.phi, axisGenType}}, + {kGenDndeta, {conf.vtxZ, conf.cent, conf.eta, conf.phi, conf.kstarQ3}}, + {kGenAssocRecoDndeta, {conf.vtxZ, conf.cent, conf.eta, conf.phi, axisGenType, axisPtVariation, conf.kstarQ3}}, + {kGenAssocRecoDndetaMb, {conf.vtxZ, conf.eta, conf.phi, axisGenType, conf.kstarQ3}}, // mc: reconstructed {kRecoPosZ, {conf.vtxZ}}, {kRecoCent, {conf.centFine}}, {kRecoPosZVsCent, {conf.vtxZ, conf.cent}}, - {kRecoDndeta, {conf.vtxZ, conf.cent, conf.eta, conf.phi, axisRecoType}}, - {kRecoDndetaMb, {conf.vtxZ, conf.eta, conf.phi, axisRecoType}}, + {kRecoDndeta, {conf.vtxZ, conf.cent, conf.eta, conf.phi, axisRecoType, conf.kstarQ3}}, + {kRecoDndetaMb, {conf.vtxZ, conf.eta, conf.phi, axisRecoType, conf.kstarQ3}}, // mc: event and signal loss {kLossEvents, {axisLossEvent}}, {kLossCentGen, {conf.centFine}}, @@ -361,12 +366,15 @@ class DndetaHistManager // ---- data --------------------------------------------------------------- /// fill a selected data track (track QA is done with the track histogram managers) - void fillDataTrack(float posZ, float cent, float eta, float phi, bool hasTpc) + /// \param triggerKinematic k*/Q3 of the triggering pair/triplet (minimum over the event, see + /// PairHistManager::getMinimumAcceptedKstar()/TripletHistManager::getMinimumAcceptedQ3()), + /// or -1 for minimum bias (no trigger pair/triplet required) + void fillDataTrack(float posZ, float cent, float eta, float phi, bool hasTpc, float triggerKinematic) { - mHistogramRegistry->fill(HIST(DataDir) + HIST(getHistName(kDataDndetaMb, HistTable)), posZ, eta, phi); - mHistogramRegistry->fill(HIST(DataDir) + HIST(getHistName(kDataDndeta, HistTable)), posZ, cent, eta, phi, static_cast(kGlobalPlusIts)); + mHistogramRegistry->fill(HIST(DataDir) + HIST(getHistName(kDataDndetaMb, HistTable)), posZ, eta, phi, triggerKinematic); + mHistogramRegistry->fill(HIST(DataDir) + HIST(getHistName(kDataDndeta, HistTable)), posZ, cent, eta, phi, static_cast(kGlobalPlusIts), triggerKinematic); const DataTrackType type = hasTpc ? kGlobalOnly : kItsOnly; - mHistogramRegistry->fill(HIST(DataDir) + HIST(getHistName(kDataDndeta, HistTable)), posZ, cent, eta, phi, static_cast(type)); + mHistogramRegistry->fill(HIST(DataDir) + HIST(getHistName(kDataDndeta, HistTable)), posZ, cent, eta, phi, static_cast(type), triggerKinematic); } // ---- mc: generated ------------------------------------------------------ @@ -384,21 +392,24 @@ class DndetaHistManager /// fill a selected generated primary /// weightUp/weightDown are the weights of the pT variations (uncertainty of the extrapolation to pT = 0), /// they are computed by the dndeta builder - void fillGenParticle(float posZ, float cent, float eta, float phi, GenType species, bool hasSelectedReco, double weightUp, double weightDown) + /// \param triggerKinematic k*/Q3 of the reco-side triggering pair/triplet matched to this mc + /// collision (or -1 for minimum bias) -- the same value used for fillRecoTrack() of that + /// collision, so gen and reco can be compared/efficiency-corrected differentially in k*/Q3 + void fillGenParticle(float posZ, float cent, float eta, float phi, GenType species, bool hasSelectedReco, double weightUp, double weightDown, float triggerKinematic) { - mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenDndeta, HistTable)), posZ, cent, eta, phi); + mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenDndeta, HistTable)), posZ, cent, eta, phi, triggerKinematic); if (!hasSelectedReco) { return; } const auto all = static_cast(kGenAll); - mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndeta, HistTable)), posZ, cent, eta, phi, all, static_cast(kPtNominal)); - mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndetaMb, HistTable)), posZ, eta, phi, all); - mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndeta, HistTable)), posZ, cent, eta, phi, all, static_cast(kPtUp), weightUp); - mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndeta, HistTable)), posZ, cent, eta, phi, all, static_cast(kPtDown), weightDown); + mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndeta, HistTable)), posZ, cent, eta, phi, all, static_cast(kPtNominal), triggerKinematic); + mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndetaMb, HistTable)), posZ, eta, phi, all, triggerKinematic); + mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndeta, HistTable)), posZ, cent, eta, phi, all, static_cast(kPtUp), triggerKinematic, weightUp); + mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndeta, HistTable)), posZ, cent, eta, phi, all, static_cast(kPtDown), triggerKinematic, weightDown); const auto spec = static_cast(species); - mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndeta, HistTable)), posZ, cent, eta, phi, spec, static_cast(kPtNominal)); - mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndetaMb, HistTable)), posZ, eta, phi, spec); + mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndeta, HistTable)), posZ, cent, eta, phi, spec, static_cast(kPtNominal), triggerKinematic); + mHistogramRegistry->fill(HIST(GenDir) + HIST(getHistName(kGenAssocRecoDndetaMb, HistTable)), posZ, eta, phi, spec, triggerKinematic); } // ---- mc: reconstructed -------------------------------------------------- @@ -410,11 +421,13 @@ class DndetaHistManager mHistogramRegistry->fill(HIST(RecoDir) + HIST(getHistName(kRecoPosZVsCent, HistTable)), posZ, cent); } - /// eta/phi are the reconstructed ones for kRecoAll and kRecoBkg, the generated ones otherwise (as in the legacy task) - void fillRecoTrack(float posZ, float cent, float eta, float phi, RecoType type) + /// eta/phi are the reconstructed ones for kRecoAll and kRecoBkg, the generated ones otherwise + /// \param triggerKinematic k*/Q3 of the triggering pair/triplet for this reconstructed collision + /// (minimum over the event), or -1 for minimum bias + void fillRecoTrack(float posZ, float cent, float eta, float phi, RecoType type, float triggerKinematic) { - mHistogramRegistry->fill(HIST(RecoDir) + HIST(getHistName(kRecoDndeta, HistTable)), posZ, cent, eta, phi, static_cast(type)); - mHistogramRegistry->fill(HIST(RecoDir) + HIST(getHistName(kRecoDndetaMb, HistTable)), posZ, eta, phi, static_cast(type)); + mHistogramRegistry->fill(HIST(RecoDir) + HIST(getHistName(kRecoDndeta, HistTable)), posZ, cent, eta, phi, static_cast(type), triggerKinematic); + mHistogramRegistry->fill(HIST(RecoDir) + HIST(getHistName(kRecoDndetaMb, HistTable)), posZ, eta, phi, static_cast(type), triggerKinematic); } // ---- mc: event and signal loss ------------------------------------------ diff --git a/PWGCF/Femto/Core/pairBuilder.h b/PWGCF/Femto/Core/pairBuilder.h index 9df1db7d79b..1bcc34dd311 100644 --- a/PWGCF/Femto/Core/pairBuilder.h +++ b/PWGCF/Femto/Core/pairBuilder.h @@ -304,6 +304,10 @@ class PairTrackTrackBuilder } } + /// minimum kstar among pairs accepted in the last processSameEvent() call, or -1 if none were + /// accepted -- used as the dN/deta trigger kinematic (see dndetaBuilder.h) + [[nodiscard]] float getMinimumAcceptedKstar() const { return mPairHistManagerSe.getMinimumAcceptedKstar(); } + private: colhistmanager::CollisionHistManager mColHistManagerSe; colhistmanager::CollisionHistManager mColHistManagerMe; @@ -1423,6 +1427,10 @@ class PairTrackV0Builder } } + /// minimum kstar among pairs accepted in the last processSameEvent() call, or -1 if none were + /// accepted -- used as the dN/deta trigger kinematic (see dndetaBuilder.h) + [[nodiscard]] float getMinimumAcceptedKstar() const { return mPairHistManagerSe.getMinimumAcceptedKstar(); } + private: colhistmanager::CollisionHistManager mColHistManagerSe; colhistmanager::CollisionHistManager mColHistManagerMe; @@ -2355,6 +2363,10 @@ class PairMcParticleMcParticleBuilder } } + /// minimum kstar among pairs accepted in the last processSameEvent() call, or -1 if none were + /// accepted -- used as the dN/deta trigger kinematic (see dndetaBuilder.h) + [[nodiscard]] float getMinimumAcceptedKstar() const { return mPairHistManagerSe.getMinimumAcceptedKstar(); } + private: colhistmanager::CollisionHistManager mColHistManagerSe; colhistmanager::CollisionHistManager mColHistManagerMe; diff --git a/PWGCF/Femto/Core/pairHistManager.h b/PWGCF/Femto/Core/pairHistManager.h index 0beea1b6b16..887fc40c9d8 100644 --- a/PWGCF/Femto/Core/pairHistManager.h +++ b/PWGCF/Femto/Core/pairHistManager.h @@ -881,6 +881,12 @@ class PairHistManager template void fill() { + // track the closest (minimum) kstar among accepted pairs this event -- used by the dN/deta + // trigger (see dndetaBuilder.h) to tag its per-track entries with the triggering kinematic, + // independent of which mode (data/mc/mc-truth) accepted this particular pair + if (mMinimumAcceptedKstar < 0.f || mKstar < mMinimumAcceptedKstar) { + mMinimumAcceptedKstar = mKstar; + } if constexpr (isFlagSet(mode, modes::Mode::kReco)) { fillAnalysis(); } @@ -892,6 +898,10 @@ class PairHistManager } } + /// minimum kstar among pairs accepted since the last resetTrackedParticlesPerEvent() call, or -1 + /// if no pair was accepted this event -- used by the dN/deta trigger (see dndetaBuilder.h) + [[nodiscard]] float getMinimumAcceptedKstar() const { return mMinimumAcceptedKstar; } + template void trackParticlesPerEvent(T1 const& particle1, T2 const& particle2) { @@ -916,6 +926,7 @@ class PairHistManager mParticles1PerEvent.reserve(100); mParticles2PerEvent.clear(); mParticles2PerEvent.reserve(100); + mMinimumAcceptedKstar = -1.f; } void fillMixingQaSe() @@ -1621,6 +1632,7 @@ class PairHistManager float mRecoMass1 = 0.f; float mRecoMass2 = 0.f; float mKstar = 0.f; + float mMinimumAcceptedKstar = -1.f; ///< minimum kstar among pairs accepted this event, see getMinimumAcceptedKstar() float mKt = 0.f; float mMt = 0.f; float mMassInv = 0.f; diff --git a/PWGCF/Femto/Core/tripletBuilder.h b/PWGCF/Femto/Core/tripletBuilder.h index 3e5ab3aac95..177ab5236dc 100644 --- a/PWGCF/Femto/Core/tripletBuilder.h +++ b/PWGCF/Femto/Core/tripletBuilder.h @@ -375,6 +375,10 @@ class TripletTrackTrackTrackBuilder } } + /// minimum Q3 among triplets accepted in the last processSameEvent() call, or -1 if none were + /// accepted -- used as the dN/deta trigger kinematic (see dndetaBuilder.h) + [[nodiscard]] float getMinimumAcceptedQ3() const { return mTripletHistManagerSe.getMinimumAcceptedQ3(); } + private: colhistmanager::CollisionHistManager mColHistManagerSe; colhistmanager::CollisionHistManager mColHistManagerMe; @@ -668,6 +672,10 @@ class TripletTrackTrackV0Builder } } + /// minimum Q3 among triplets accepted in the last processSameEvent() call, or -1 if none were + /// accepted -- used as the dN/deta trigger kinematic (see dndetaBuilder.h) + [[nodiscard]] float getMinimumAcceptedQ3() const { return mTripletHistManagerSe.getMinimumAcceptedQ3(); } + private: colhistmanager::CollisionHistManager mColHistManagerSe; colhistmanager::CollisionHistManager mColHistManagerMe; @@ -1206,6 +1214,10 @@ class TripletMcParticleMcParticleMcParticleBuilder } } + /// minimum Q3 among triplets accepted in the last processSameEvent() call, or -1 if none were + /// accepted -- used as the dN/deta trigger kinematic (see dndetaBuilder.h) + [[nodiscard]] float getMinimumAcceptedQ3() const { return mTripletHistManagerSe.getMinimumAcceptedQ3(); } + private: colhistmanager::CollisionHistManager mColHistManagerSe; colhistmanager::CollisionHistManager mColHistManagerMe; diff --git a/PWGCF/Femto/Core/tripletHistManager.h b/PWGCF/Femto/Core/tripletHistManager.h index bd4aa2c7414..5b7f42a69b3 100644 --- a/PWGCF/Femto/Core/tripletHistManager.h +++ b/PWGCF/Femto/Core/tripletHistManager.h @@ -570,6 +570,12 @@ class TripletHistManager template void fill() { + // track the closest (minimum) Q3 among accepted triplets this event -- used by the dN/deta + // trigger (see dndetaBuilder.h) to tag its per-track entries with the triggering kinematic, + // independent of which mode (data/mc/mc-truth) accepted this particular triplet + if (mMinimumAcceptedQ3 < 0.f || mQ3 < mMinimumAcceptedQ3) { + mMinimumAcceptedQ3 = mQ3; + } if constexpr (isFlagSet(mode, modes::Mode::kReco)) { fillAnalysis(); } @@ -581,6 +587,10 @@ class TripletHistManager } } + /// minimum Q3 among triplets accepted since the last resetTrackedParticlesPerEvent() call, or -1 + /// if no triplet was accepted this event -- used by the dN/deta trigger (see dndetaBuilder.h) + [[nodiscard]] float getMinimumAcceptedQ3() const { return mMinimumAcceptedQ3; } + // kinematicVariable is supplied by the caller (CPR/triplet cleaner), each of which carries its // own Configurable for it -- this manager has no opinion of its own on which variable to report. // kstar has no single value for a triplet, so kKstar reports the average of the three pair kstars. @@ -632,6 +642,7 @@ class TripletHistManager mParticles2PerEvent.reserve(100); mParticles3PerEvent.clear(); mParticles3PerEvent.reserve(100); + mMinimumAcceptedQ3 = -1.f; } void fillMixingQaSe() @@ -848,6 +859,7 @@ class TripletHistManager float mMass2 = 0.f; float mMass3 = 0.f; float mQ3 = 0.f; + float mMinimumAcceptedQ3 = -1.f; ///< minimum Q3 among triplets accepted this event, see getMinimumAcceptedQ3() float mMt = 0.f; float mMult = 0.f; float mCent = 0.f; diff --git a/PWGCF/Femto/Tasks/femtoDndetaPair.cxx b/PWGCF/Femto/Tasks/femtoDndetaPair.cxx index df35e04f725..4de1dfda814 100644 --- a/PWGCF/Femto/Tasks/femtoDndetaPair.cxx +++ b/PWGCF/Femto/Tasks/femtoDndetaPair.cxx @@ -309,13 +309,15 @@ struct FemtoDndetaPair { void processTrackTrack(FemtoCollision const& col, FemtoTracks const& tracks) { - dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [&]() { return pairTrackTrackBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, cache); }); + bool const found = pairTrackTrackBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, cache); + dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [found]() { return found; }, found ? pairTrackTrackBuilder.getMinimumAcceptedKstar() : -1.f); } PROCESS_SWITCH(FemtoDndetaPair, processTrackTrack, "Data, track-track trigger", false); void processTrackV0(FemtoCollision const& col, FemtoTracks const& tracks, FemtoLambdas const& lambdas) { - dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [&]() { return pairTrackLambdaBuilder.processSameEvent(col, tracks, trackPartition1, lambdas, lambdaPartition, cache); }); + bool const found = pairTrackLambdaBuilder.processSameEvent(col, tracks, trackPartition1, lambdas, lambdaPartition, cache); + dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [found]() { return found; }, found ? pairTrackLambdaBuilder.getMinimumAcceptedKstar() : -1.f); } PROCESS_SWITCH(FemtoDndetaPair, processTrackV0, "Data, track-lambda trigger", false); @@ -340,9 +342,8 @@ struct FemtoDndetaPair { void processTrackTrackWithStrangeness(FemtoCollision const& col, FemtoTracks const& tracks, FemtoLambdas const& /*lambdas*/, FemtoK0shorts const& /*k0shorts*/) { - if (dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [&]() { - return pairTrackTrackBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, cache); - })) { + bool const found = pairTrackTrackBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, cache); + if (dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [found]() { return found; }, found ? pairTrackTrackBuilder.getMinimumAcceptedKstar() : -1.f)) { fillStrangeness(col); } } @@ -350,9 +351,8 @@ struct FemtoDndetaPair { void processTrackV0WithStrangeness(FemtoCollision const& col, FemtoTracks const& tracks, FemtoLambdas const& lambdas, FemtoK0shorts const& /*k0shorts*/) { - if (dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [&]() { - return pairTrackLambdaBuilder.processSameEvent(col, tracks, trackPartition1, lambdas, lambdaPartition, cache); - })) { + bool const found = pairTrackLambdaBuilder.processSameEvent(col, tracks, trackPartition1, lambdas, lambdaPartition, cache); + if (dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [found]() { return found; }, found ? pairTrackLambdaBuilder.getMinimumAcceptedKstar() : -1.f)) { fillStrangeness(col); } } @@ -361,30 +361,44 @@ struct FemtoDndetaPair { // mc void processMinimumBiasMc(FemtoCollisionsWithLabel const& cols, o2::aod::FMcCols const& mcCols, FemtoTracksWithLabel const& /*tracks*/, FemtoMcParticles const& mcParticles, o2::aod::FMcMothers const& mcMothers) { + float triggerKstar = -1.f; // unused for minimum bias, but processMc() needs an lvalue dndetaBuilder.processMc( cols, mcCols, dndetaTrackWithLabelPartitionGlobal, dndetaTrackWithLabelPartitionItsOnly, cache, mcParticles, mcMothers, perMcColParticles, pdg, [](auto const& /*col*/) { return true; }, - [](auto const& /*mcCol*/) { return true; }); + [](auto const& /*mcCol*/) { return true; }, + triggerKstar); } PROCESS_SWITCH(FemtoDndetaPair, processMinimumBiasMc, "MC, no trigger", false); void processTrackTrackMc(FemtoCollisionsWithLabel const& cols, o2::aod::FMcCols const& mcCols, FemtoTracksWithLabel const& tracks, FemtoMcParticles const& mcParticles, o2::aod::FMcMothers const& mcMothers, o2::aod::FMcPartMoths const& mcPartonicMothers) { + float triggerKstar = -1.f; dndetaBuilder.processMc( cols, mcCols, dndetaTrackWithLabelPartitionGlobal, dndetaTrackWithLabelPartitionItsOnly, cache, mcParticles, mcMothers, perMcColParticles, pdg, - [&](auto const& col) { return pairTrackTrackBuilder.processSameEvent(col, mcCols, tracks, trackWithLabelPartition1, trackWithLabelPartition2, mcParticles, mcMothers, mcPartonicMothers, cache); }, - [&](auto const& mcCol) { return pairMcParticleMcParticleBuilder.processSameEvent(mcCol, mcParticles, mcMothers, mcPartonicMothers, mcParticlePartition1, mcParticlePartition2, cache); }); + [&](auto const& col) { + bool const found = pairTrackTrackBuilder.processSameEvent(col, mcCols, tracks, trackWithLabelPartition1, trackWithLabelPartition2, mcParticles, mcMothers, mcPartonicMothers, cache); + triggerKstar = found ? pairTrackTrackBuilder.getMinimumAcceptedKstar() : -1.f; + return found; + }, + [&](auto const& mcCol) { return pairMcParticleMcParticleBuilder.processSameEvent(mcCol, mcParticles, mcMothers, mcPartonicMothers, mcParticlePartition1, mcParticlePartition2, cache); }, + triggerKstar); } PROCESS_SWITCH(FemtoDndetaPair, processTrackTrackMc, "MC, track-track trigger", false); void processTrackV0Mc(FemtoCollisionsWithLabel const& cols, o2::aod::FMcCols const& mcCols, FemtoTracksWithLabel const& tracks, FemtoLambdasWithLabel const& lambdas, FemtoMcParticles const& mcParticles, o2::aod::FMcMothers const& mcMothers, o2::aod::FMcPartMoths const& mcPartonicMothers) { + float triggerKstar = -1.f; dndetaBuilder.processMc( cols, mcCols, dndetaTrackWithLabelPartitionGlobal, dndetaTrackWithLabelPartitionItsOnly, cache, mcParticles, mcMothers, perMcColParticles, pdg, - [&](auto const& col) { return pairTrackLambdaBuilder.processSameEvent(col, mcCols, tracks, trackWithLabelPartition1, lambdas, lambdaWithLabelPartition, mcParticles, mcMothers, mcPartonicMothers, cache); }, - [&](auto const& mcCol) { return pairMcParticleMcParticleBuilder.processSameEvent(mcCol, mcParticles, mcMothers, mcPartonicMothers, mcParticlePartition1, mcParticlePartition2, cache); }); + [&](auto const& col) { + bool const found = pairTrackLambdaBuilder.processSameEvent(col, mcCols, tracks, trackWithLabelPartition1, lambdas, lambdaWithLabelPartition, mcParticles, mcMothers, mcPartonicMothers, cache); + triggerKstar = found ? pairTrackLambdaBuilder.getMinimumAcceptedKstar() : -1.f; + return found; + }, + [&](auto const& mcCol) { return pairMcParticleMcParticleBuilder.processSameEvent(mcCol, mcParticles, mcMothers, mcPartonicMothers, mcParticlePartition1, mcParticlePartition2, cache); }, + triggerKstar); } PROCESS_SWITCH(FemtoDndetaPair, processTrackV0Mc, "MC, track-lambda trigger", false); }; diff --git a/PWGCF/Femto/Tasks/femtoDndetaTriplet.cxx b/PWGCF/Femto/Tasks/femtoDndetaTriplet.cxx index 44e830e1aed..4175e97dae5 100644 --- a/PWGCF/Femto/Tasks/femtoDndetaTriplet.cxx +++ b/PWGCF/Femto/Tasks/femtoDndetaTriplet.cxx @@ -352,26 +352,23 @@ struct FemtoDndetaTriplet { // data void processTrackTrackTrack(FemtoCollision const& col, FemtoTracks const& tracks) { - dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [&]() { - return tripletTrackTrackTrackBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, trackPartition3, cache); - }); + bool const found = tripletTrackTrackTrackBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, trackPartition3, cache); + dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [found]() { return found; }, found ? tripletTrackTrackTrackBuilder.getMinimumAcceptedQ3() : -1.f); } PROCESS_SWITCH(FemtoDndetaTriplet, processTrackTrackTrack, "Data, track-track-track trigger", true); void processTrackTrackV0(FemtoCollision const& col, FemtoTracks const& tracks, FemtoLambdas const& /*lambdas*/) { - dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [&]() { - return tripletTrackTrackLambdaBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, lambdaPartition, cache); - }); + bool const found = tripletTrackTrackLambdaBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, lambdaPartition, cache); + dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [found]() { return found; }, found ? tripletTrackTrackLambdaBuilder.getMinimumAcceptedQ3() : -1.f); } PROCESS_SWITCH(FemtoDndetaTriplet, processTrackTrackV0, "Data, track-track-lambda trigger", false); // data with strangeness yields void processTrackTrackTrackWithStrangeness(FemtoCollision const& col, FemtoTracks const& tracks, FemtoLambdas const& /*lambdas*/, FemtoK0shorts const& /*k0shorts*/) { - if (dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [&]() { - return tripletTrackTrackTrackBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, trackPartition3, cache); - })) { + bool const found = tripletTrackTrackTrackBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, trackPartition3, cache); + if (dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [found]() { return found; }, found ? tripletTrackTrackTrackBuilder.getMinimumAcceptedQ3() : -1.f)) { fillStrangeness(col); } } @@ -379,9 +376,8 @@ struct FemtoDndetaTriplet { void processTrackTrackV0WithStrangeness(FemtoCollision const& col, FemtoTracks const& tracks, FemtoLambdas const& /*lambdas*/, FemtoK0shorts const& /*k0shorts*/) { - if (dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [&]() { - return tripletTrackTrackLambdaBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, lambdaPartition, cache); - })) { + bool const found = tripletTrackTrackLambdaBuilder.processSameEvent(col, tracks, trackPartition1, trackPartition2, lambdaPartition, cache); + if (dndetaBuilder.processData(col, dndetaTrackPartitionGlobal, dndetaTrackPartitionItsOnly, cache, [found]() { return found; }, found ? tripletTrackTrackLambdaBuilder.getMinimumAcceptedQ3() : -1.f)) { fillStrangeness(col); } } @@ -390,23 +386,31 @@ struct FemtoDndetaTriplet { // mc void processTrackTrackTrackMc(FemtoCollisionsWithLabel const& cols, o2::aod::FMcCols const& mcCols, FemtoTracksWithLabel const& tracks, FemtoMcParticles const& mcParticles, o2::aod::FMcMothers const& mcMothers, o2::aod::FMcPartMoths const& mcPartonicMothers) { + float triggerQ3 = -1.f; dndetaBuilder.processMc( cols, mcCols, dndetaTrackWithLabelPartitionGlobal, dndetaTrackWithLabelPartitionItsOnly, cache, mcParticles, mcMothers, perMcColParticles, pdg, [&](auto const& col) { - return tripletTrackTrackTrackBuilder.processSameEvent(col, mcCols, tracks, trackWithLabelPartition1, trackWithLabelPartition2, trackWithLabelPartition3, mcParticles, mcMothers, mcPartonicMothers, cache); + bool const found = tripletTrackTrackTrackBuilder.processSameEvent(col, mcCols, tracks, trackWithLabelPartition1, trackWithLabelPartition2, trackWithLabelPartition3, mcParticles, mcMothers, mcPartonicMothers, cache); + triggerQ3 = found ? tripletTrackTrackTrackBuilder.getMinimumAcceptedQ3() : -1.f; + return found; }, - [&](auto const& mcCol) { return evaluateGenTrigger(mcCol, mcParticles, mcMothers, mcPartonicMothers); }); + [&](auto const& mcCol) { return evaluateGenTrigger(mcCol, mcParticles, mcMothers, mcPartonicMothers); }, + triggerQ3); } PROCESS_SWITCH(FemtoDndetaTriplet, processTrackTrackTrackMc, "MC, track-track-track trigger", false); void processTrackTrackV0Mc(FemtoCollisionsWithLabel const& cols, o2::aod::FMcCols const& mcCols, FemtoTracksWithLabel const& tracks, FemtoLambdasWithLabel const& /*lambdas*/, FemtoMcParticles const& mcParticles, o2::aod::FMcMothers const& mcMothers, o2::aod::FMcPartMoths const& mcPartonicMothers) { + float triggerQ3 = -1.f; dndetaBuilder.processMc( cols, mcCols, dndetaTrackWithLabelPartitionGlobal, dndetaTrackWithLabelPartitionItsOnly, cache, mcParticles, mcMothers, perMcColParticles, pdg, [&](auto const& col) { - return tripletTrackTrackLambdaBuilder.processSameEvent(col, mcCols, tracks, trackWithLabelPartition1, trackWithLabelPartition2, lambdaWithLabelPartition, mcParticles, mcMothers, mcPartonicMothers, cache); + bool const found = tripletTrackTrackLambdaBuilder.processSameEvent(col, mcCols, tracks, trackWithLabelPartition1, trackWithLabelPartition2, lambdaWithLabelPartition, mcParticles, mcMothers, mcPartonicMothers, cache); + triggerQ3 = found ? tripletTrackTrackLambdaBuilder.getMinimumAcceptedQ3() : -1.f; + return found; }, - [&](auto const& mcCol) { return evaluateGenTrigger(mcCol, mcParticles, mcMothers, mcPartonicMothers); }); + [&](auto const& mcCol) { return evaluateGenTrigger(mcCol, mcParticles, mcMothers, mcPartonicMothers); }, + triggerQ3); } PROCESS_SWITCH(FemtoDndetaTriplet, processTrackTrackV0Mc, "MC, track-track-lambda trigger", false); }; From ec3b1e6f97a767c61b1d69a55a041d7754830ba2 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 15:08:03 +0100 Subject: [PATCH 04/11] Feat: add rapidity cut for mother particles --- PWGCF/Femto/Core/femtoUtils.h | 15 +++++++++++++++ PWGCF/Femto/Core/particleCleaner.h | 24 +++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/PWGCF/Femto/Core/femtoUtils.h b/PWGCF/Femto/Core/femtoUtils.h index 9b9c16c4884..8926d9c563a 100644 --- a/PWGCF/Femto/Core/femtoUtils.h +++ b/PWGCF/Femto/Core/femtoUtils.h @@ -82,6 +82,15 @@ float itsSignal(T const& track) return static_cast(signal); }; +// Delta(1232) baryons: no kXxx enum entry exists for these in TPDGCode.h (only the raw codes used +// internally by TDatabasePDG's particle-table construction) and no mass constant exists in +// PhysicsConstants.h either, so both the codes and the mass are hardcoded here, same as kRho770_0/ +// kRho770Plus below. +constexpr int kDeltaMinus1232 = 1114; +constexpr int kDelta01232 = 2114; +constexpr int kDeltaPlus1232 = 2214; +constexpr int kDeltaPlusPlus1232 = 2224; + inline double getPdgMass(int pdgCode) { // use this function instead of TDatabasePDG to return masses defined in the PhysicsConstants.h header @@ -149,6 +158,12 @@ inline double getPdgMass(int pdgCode) case o2::constants::physics::kEta: mass = o2::constants::physics::MassEta; break; + case kDeltaMinus1232: + case kDelta01232: + case kDeltaPlus1232: + case kDeltaPlusPlus1232: + mass = 1.232; // not defined in O2? + break; default: LOG(warn) << "PDG code " << pdgCode << " is not suppored. Return 0... "; } diff --git a/PWGCF/Femto/Core/particleCleaner.h b/PWGCF/Femto/Core/particleCleaner.h index cf354ffdcb6..5b21bd19908 100644 --- a/PWGCF/Femto/Core/particleCleaner.h +++ b/PWGCF/Femto/Core/particleCleaner.h @@ -16,6 +16,10 @@ #ifndef PWGCF_FEMTO_CORE_PARTICLECLEANER_H_ #define PWGCF_FEMTO_CORE_PARTICLECLEANER_H_ +#include "PWGCF/Femto/Core/femtoUtils.h" + +#include "Common/Core/RecoDecay.h" + #include #include @@ -45,6 +49,11 @@ struct ConfParticleCleaner : o2::framework::ConfigurableGroup { o2::framework::Configurable motherPtMax{"motherPtMax", 1e6f, "Maximum pT of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; o2::framework::Configurable motherEtaMin{"motherEtaMin", -1e6f, "Minimum eta of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; o2::framework::Configurable motherEtaMax{"motherEtaMax", 1e6f, "Maximum eta of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; + // Rapidity cut on the mother. FMcMothers has no mass column, so the mass is looked up from + // PdgCode via utils::getPdgMass() (the same lookup pairHistManager.h uses for kstar/Q3) and + // combined with the mother's pt/eta to get y -- see RecoDecay::y(pt, eta, m). + o2::framework::Configurable motherRapidityMin{"motherRapidityMin", -1e6f, "Minimum rapidity of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; + o2::framework::Configurable motherRapidityMax{"motherRapidityMax", 1e6f, "Maximum rapidity of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; o2::framework::Configurable motherPhiMin{"motherPhiMin", 0.f, "Minimum phi of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; o2::framework::Configurable motherPhiMax{"motherPhiMax", 1.f * o2::constants::math::TwoPI, "Maximum phi of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched -- not one window per pdg code."}; o2::framework::Configurable> requiredPartonicMotherPdgCodes{"requiredPartonicMotherPdgCodes", {}, "Only consider particles whose partonic mothers have one of the supplied pdg codes (including the sign!)"}; @@ -135,6 +144,8 @@ class ParticleCleaner mMotherEtaMax = confMpc.motherEtaMax.value; mMotherPhiMin = confMpc.motherPhiMin.value; mMotherPhiMax = confMpc.motherPhiMax.value; + mMotherRapidityMin = confMpc.motherRapidityMin.value; + mMotherRapidityMax = confMpc.motherRapidityMax.value; mRequiredPartonicMotherPdgCodes = confMpc.requiredPartonicMotherPdgCodes.value; mRejectedPartonicMotherPdgCodes = confMpc.rejectPartonicMotherPdgCodes.value; @@ -231,7 +242,7 @@ class ParticleCleaner } } - // One shared pt/eta/phi window, applied to the mother regardless of which (if any) + // One shared pt/eta/phi/rapidity window, applied to the mother regardless of which (if any) // requiredMotherPdgCodes/rejectMotherPdgCodes entry it matched above -- see the comment on // ConfParticleCleaner's motherPtMin et al. if (!(mother.pt() > mMotherPtMin && mother.pt() < mMotherPtMax && @@ -239,6 +250,15 @@ class ParticleCleaner mother.phi() > mMotherPhiMin && mother.phi() < mMotherPhiMax)) { motherKinematicsOk = false; } + + // rapidity needs the mother's mass, which FMcMothers does not store directly -- look it up + // from its pdg code (same mechanism as the kstar/Q3 mass lookup in pairHistManager.h) + if (mMotherRapidityMin > -1e6f || mMotherRapidityMax < 1e6f) { + double motherRapidity = RecoDecay::y(mother.pt(), mother.eta(), utils::getPdgMass(mother.pdgCode())); + if (!(motherRapidity > mMotherRapidityMin && motherRapidity < mMotherRapidityMax)) { + motherKinematicsOk = false; + } + } } // MC partonic mother — same idea, via mcParticle @@ -291,6 +311,8 @@ class ParticleCleaner float mMotherEtaMax = 1e6f; float mMotherPhiMin = 0.f; float mMotherPhiMax = 1.f * o2::constants::math::TwoPI; + float mMotherRapidityMin = -1e6f; + float mMotherRapidityMax = 1e6f; std::vector mRequiredPartonicMotherPdgCodes; std::vector mRejectedPartonicMotherPdgCodes; }; From 879b767bd8151f107f5c9c8d2e2582473917a0d2 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 15:39:00 +0100 Subject: [PATCH 05/11] Fix: fix code check errors --- PWGCF/Femto/Core/pairProcessHelpers.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PWGCF/Femto/Core/pairProcessHelpers.h b/PWGCF/Femto/Core/pairProcessHelpers.h index 37f854d8502..a0ce969b448 100644 --- a/PWGCF/Femto/Core/pairProcessHelpers.h +++ b/PWGCF/Femto/Core/pairProcessHelpers.h @@ -851,6 +851,11 @@ void processMixedEvent(T1 const& Collisions, if (hasValidPair) { ++windowSizeEffective; + // collision histograms only get filled for collisions that actually contributed at least + // one accepted mixed-event pair -- both real collisions go into the same manager used by + // the same-event side + ColHistManager.template fill(collision1); + ColHistManager.template fill(collision2); } PairHistManager.fillMixingQaMePerEvent(); From 34b4d0b728dcce3a134000bc81f3c5282d307aca Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 15:46:02 +0100 Subject: [PATCH 06/11] Feat: add rapidity histogram for mother --- PWGCF/Femto/Core/mcParticleHistManager.h | 6 ++++++ PWGCF/Femto/Core/particleCleaner.h | 9 ++++----- PWGCF/Femto/DataModel/FemtoTables.h | 8 +++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/PWGCF/Femto/Core/mcParticleHistManager.h b/PWGCF/Femto/Core/mcParticleHistManager.h index ce9c8bd4bed..dcbad7e6e35 100644 --- a/PWGCF/Femto/Core/mcParticleHistManager.h +++ b/PWGCF/Femto/Core/mcParticleHistManager.h @@ -16,6 +16,7 @@ #ifndef PWGCF_FEMTO_CORE_MCPARTICLEHISTMANAGER_H_ #define PWGCF_FEMTO_CORE_MCPARTICLEHISTMANAGER_H_ +#include "PWGCF/Femto/Core/femtoUtils.h" #include "PWGCF/Femto/Core/histManager.h" #include "PWGCF/Femto/Core/modes.h" @@ -52,6 +53,7 @@ enum McParticleHist { kMotherEta, kMotherPhi, kMotherSign, + kMotherY, // origin (kept in sync with TrackHist, even though some categories // are not expected to be populated for pure MC truth particles) kOrigin, @@ -105,6 +107,7 @@ constexpr std::array, kMcParticleHistLast> {kMotherEta, o2::framework::HistType::kTH1F, "hMotherEta", "Mother pseudorapidity; #eta; Entries"}, {kMotherPhi, o2::framework::HistType::kTH1F, "hMotherPhi", "Mother azimuthal angle; #varphi; Entries"}, {kMotherSign, o2::framework::HistType::kTH1F, "hMotherSign", "Sign of mother charge; Sign; Entries"}, + {kMotherY, o2::framework::HistType::kTH1F, "hMotherY", "Mother rapidity; Y; Entries"}, {kOrigin, o2::framework::HistType::kTH1F, "hOrigin", "Status Codes (=Origin); Status Code; Entries"}, {kNoMcParticle, o2::framework::HistType::kTH1F, "hNoMcParticle", "Particles with no associated MC information; p_{T} (GeV/#it{c}); Entries"}, {kPrimary, o2::framework::HistType::kTH1F, "hPrimary", "Primary particles; p_{T} (GeV/#it{c}); Entries"}, @@ -132,6 +135,7 @@ auto makeMcParticleHistSpecMap(const T& confBinning) {kMotherEta, {confBinning.eta}}, {kMotherPhi, {confBinning.phi}}, {kMotherSign, {confBinning.sign}}, + {kMotherY, {confBinning.eta}}, {kNoMcParticle, {confBinning.pt}}, {kPrimary, {confBinning.pt}}, {kFromWrongCollision, {confBinning.pt}}, @@ -182,6 +186,7 @@ class McParticleHistManager mHistogramRegistry->add(mcDir + getHistNameV2(kMotherEta, HistTable), getHistDesc(kMotherEta, HistTable), getHistType(kMotherEta, HistTable), {Specs.at(kMotherEta)}); mHistogramRegistry->add(mcDir + getHistNameV2(kMotherPhi, HistTable), getHistDesc(kMotherPhi, HistTable), getHistType(kMotherPhi, HistTable), {Specs.at(kMotherPhi)}); mHistogramRegistry->add(mcDir + getHistNameV2(kMotherSign, HistTable), getHistDesc(kMotherSign, HistTable), getHistType(kMotherSign, HistTable), {Specs.at(kMotherSign)}); + mHistogramRegistry->add(mcDir + getHistNameV2(kMotherY, HistTable), getHistDesc(kMotherY, HistTable), getHistType(kMotherY, HistTable), {Specs.at(kMotherY)}); this->enableOptionalHistograms(confBinning); this->initOrigin(Specs); @@ -204,6 +209,7 @@ class McParticleHistManager mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kMotherEta, HistTable)), mother.eta()); mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kMotherPhi, HistTable)), mother.phi()); mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kMotherSign, HistTable)), mother.sign()); + mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kMotherY, HistTable)), mother.y(utils::getPdgMass(mother.pdgCode()))); } else { mHistogramRegistry->fill(HIST(prefix) + HIST(McDir) + HIST(getHistName(kPdgMother, HistTable)), 0); } diff --git a/PWGCF/Femto/Core/particleCleaner.h b/PWGCF/Femto/Core/particleCleaner.h index 5b21bd19908..981043f637c 100644 --- a/PWGCF/Femto/Core/particleCleaner.h +++ b/PWGCF/Femto/Core/particleCleaner.h @@ -18,8 +18,6 @@ #include "PWGCF/Femto/Core/femtoUtils.h" -#include "Common/Core/RecoDecay.h" - #include #include @@ -251,10 +249,11 @@ class ParticleCleaner motherKinematicsOk = false; } - // rapidity needs the mother's mass, which FMcMothers does not store directly -- look it up - // from its pdg code (same mechanism as the kstar/Q3 mass lookup in pairHistManager.h) + // rapidity needs the mother's mass, which FMcMothers does not store directly -- its Y() + // dynamic column takes mass as a free argument, looked up from the pdg code (same mechanism + // as the kstar/Q3 mass lookup in pairHistManager.h) if (mMotherRapidityMin > -1e6f || mMotherRapidityMax < 1e6f) { - double motherRapidity = RecoDecay::y(mother.pt(), mother.eta(), utils::getPdgMass(mother.pdgCode())); + double motherRapidity = mother.y(utils::getPdgMass(mother.pdgCode())); if (!(motherRapidity > mMotherRapidityMin && motherRapidity < mMotherRapidityMax)) { motherKinematicsOk = false; } diff --git a/PWGCF/Femto/DataModel/FemtoTables.h b/PWGCF/Femto/DataModel/FemtoTables.h index 651e591d3d6..7f80c9ba7f6 100644 --- a/PWGCF/Femto/DataModel/FemtoTables.h +++ b/PWGCF/Femto/DataModel/FemtoTables.h @@ -246,6 +246,11 @@ DECLARE_SOA_DYNAMIC_COLUMN(Theta, theta, //! theta [](float eta) -> float { return 2.f * std::atan(std::exp(-eta)); }); +DECLARE_SOA_DYNAMIC_COLUMN(Y, y, //! rapidity -- mass is not a stored column, so it is passed in as an + //! extra free argument at the call site, e.g. mother.y(mass) + [](float signedPt, float eta, float mass) -> float { + return RecoDecay::y(std::fabs(signedPt), eta, mass); + }); } // namespace dynamic namespace lite @@ -1761,7 +1766,8 @@ DECLARE_SOA_TABLE_STAGED_VERSIONED(FMcMothers_001, "FMCMOTHER", 1, //! first dir femtobase::dynamic::Px, femtobase::dynamic::Py, femtobase::dynamic::Pz, - femtobase::dynamic::Theta); + femtobase::dynamic::Theta, + femtobase::dynamic::Y); // mass is a free argument, e.g. mother.y(mass) using FMcMothers = FMcMothers_001; using FMcMother = FMcMothers::iterator; From bf244708fd9e2e5b1c5a8e8adc6bd654b344f6a0 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 15:59:00 +0100 Subject: [PATCH 07/11] Fix: fix linter warnings --- PWGCF/Femto/Core/femtoUtils.h | 16 ++++++++-------- PWGCF/Femto/Core/particleCleaner.h | 20 ++++---------------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/PWGCF/Femto/Core/femtoUtils.h b/PWGCF/Femto/Core/femtoUtils.h index 8926d9c563a..c677f0b09e8 100644 --- a/PWGCF/Femto/Core/femtoUtils.h +++ b/PWGCF/Femto/Core/femtoUtils.h @@ -86,10 +86,10 @@ float itsSignal(T const& track) // internally by TDatabasePDG's particle-table construction) and no mass constant exists in // PhysicsConstants.h either, so both the codes and the mass are hardcoded here, same as kRho770_0/ // kRho770Plus below. -constexpr int kDeltaMinus1232 = 1114; -constexpr int kDelta01232 = 2114; -constexpr int kDeltaPlus1232 = 2214; -constexpr int kDeltaPlusPlus1232 = 2224; +constexpr int DeltaMinus1232 = 1114; +constexpr int Delta01232 = 2114; +constexpr int DeltaPlus1232 = 2214; +constexpr int DeltaPlusPlus1232 = 2224; inline double getPdgMass(int pdgCode) { @@ -158,10 +158,10 @@ inline double getPdgMass(int pdgCode) case o2::constants::physics::kEta: mass = o2::constants::physics::MassEta; break; - case kDeltaMinus1232: - case kDelta01232: - case kDeltaPlus1232: - case kDeltaPlusPlus1232: + case DeltaMinus1232: + case Delta01232: + case DeltaPlus1232: + case DeltaPlusPlus1232: mass = 1.232; // not defined in O2? break; default: diff --git a/PWGCF/Femto/Core/particleCleaner.h b/PWGCF/Femto/Core/particleCleaner.h index 981043f637c..bcf0580a933 100644 --- a/PWGCF/Femto/Core/particleCleaner.h +++ b/PWGCF/Femto/Core/particleCleaner.h @@ -47,9 +47,6 @@ struct ConfParticleCleaner : o2::framework::ConfigurableGroup { o2::framework::Configurable motherPtMax{"motherPtMax", 1e6f, "Maximum pT of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; o2::framework::Configurable motherEtaMin{"motherEtaMin", -1e6f, "Minimum eta of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; o2::framework::Configurable motherEtaMax{"motherEtaMax", 1e6f, "Maximum eta of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; - // Rapidity cut on the mother. FMcMothers has no mass column, so the mass is looked up from - // PdgCode via utils::getPdgMass() (the same lookup pairHistManager.h uses for kstar/Q3) and - // combined with the mother's pt/eta to get y -- see RecoDecay::y(pt, eta, m). o2::framework::Configurable motherRapidityMin{"motherRapidityMin", -1e6f, "Minimum rapidity of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; o2::framework::Configurable motherRapidityMax{"motherRapidityMax", 1e6f, "Maximum rapidity of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; o2::framework::Configurable motherPhiMin{"motherPhiMin", 0.f, "Minimum phi of the mother. One shared window applies regardless of which requiredMotherPdgCodes/rejectMotherPdgCodes entry the mother's own pdg code matched"}; @@ -240,24 +237,15 @@ class ParticleCleaner } } - // One shared pt/eta/phi/rapidity window, applied to the mother regardless of which (if any) - // requiredMotherPdgCodes/rejectMotherPdgCodes entry it matched above -- see the comment on - // ConfParticleCleaner's motherPtMin et al. + // One shared pt/eta/phi window, applied to the mother regardless of which (if any) + // requiredMotherPdgCodes/rejectMotherPdgCodes entry it matched above + double motherRapidity = mother.y(utils::getPdgMass(mother.pdgCode())); if (!(mother.pt() > mMotherPtMin && mother.pt() < mMotherPtMax && mother.eta() > mMotherEtaMin && mother.eta() < mMotherEtaMax && + motherRapidity > mMotherRapidityMin && motherRapidity < mMotherRapidityMax && mother.phi() > mMotherPhiMin && mother.phi() < mMotherPhiMax)) { motherKinematicsOk = false; } - - // rapidity needs the mother's mass, which FMcMothers does not store directly -- its Y() - // dynamic column takes mass as a free argument, looked up from the pdg code (same mechanism - // as the kstar/Q3 mass lookup in pairHistManager.h) - if (mMotherRapidityMin > -1e6f || mMotherRapidityMax < 1e6f) { - double motherRapidity = mother.y(utils::getPdgMass(mother.pdgCode())); - if (!(motherRapidity > mMotherRapidityMin && motherRapidity < mMotherRapidityMax)) { - motherKinematicsOk = false; - } - } } // MC partonic mother — same idea, via mcParticle From e0efd1570fe9f63f1d6c214e406eee668f6d18e1 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 16:20:28 +0100 Subject: [PATCH 08/11] Empty commit to trigger CI From 8516e8948a603ead38fc073e6a4ccb800d5f8086 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 17:22:59 +0100 Subject: [PATCH 09/11] Empty commit to trigger CI From 2b5ff8df5db93165d76c5f7a37435e8238f74ecd Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 18:34:46 +0100 Subject: [PATCH 10/11] Empty commit to trigger CI From a450c737c9a21503a345d648fdc67ca7bbae6a73 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 11 Nov 2026 19:42:40 +0100 Subject: [PATCH 11/11] Fix: fix wrong function call --- PWGCF/Femto/DataModel/FemtoTables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Femto/DataModel/FemtoTables.h b/PWGCF/Femto/DataModel/FemtoTables.h index 7f80c9ba7f6..db487072aa5 100644 --- a/PWGCF/Femto/DataModel/FemtoTables.h +++ b/PWGCF/Femto/DataModel/FemtoTables.h @@ -249,7 +249,7 @@ DECLARE_SOA_DYNAMIC_COLUMN(Theta, theta, //! theta DECLARE_SOA_DYNAMIC_COLUMN(Y, y, //! rapidity -- mass is not a stored column, so it is passed in as an //! extra free argument at the call site, e.g. mother.y(mass) [](float signedPt, float eta, float mass) -> float { - return RecoDecay::y(std::fabs(signedPt), eta, mass); + return RecoDecayPtEtaPhi::y(std::fabs(signedPt), eta, mass); }); } // namespace dynamic