From 5bf45165c0c3f261ea9cb01c42de8e9d35fab786 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Wed, 8 Oct 2025 22:49:58 +0200 Subject: [PATCH 1/3] Fix: apply fixes from clang-tidy and cppcheck --- PWGCF/Femto/Core/cascadeHistManager.h | 4 +- PWGCF/Femto/Core/closePairRejection.h | 4 ++ PWGCF/Femto/Core/collisionBuilder.h | 4 ++ PWGCF/Femto/Core/collisionHistManager.h | 4 +- PWGCF/Femto/Core/histManager.h | 46 +++++++++---------- PWGCF/Femto/Core/kinkBuilder.h | 1 + PWGCF/Femto/Core/kinkHistManager.h | 4 +- PWGCF/Femto/Core/pairBuilder.h | 5 ++ PWGCF/Femto/Core/pairHistManager.h | 17 +++---- PWGCF/Femto/Core/pairProcessHelpers.h | 1 + PWGCF/Femto/Core/selectionContainer.h | 11 +++-- PWGCF/Femto/Core/twoTrackResonanceBuilder.h | 2 +- PWGCF/Femto/TableProducer/femtoProducer.cxx | 2 + .../femtoProducerDerivedToDerived.cxx | 5 +- PWGCF/Femto/Tasks/femtoPairTrackCascade.cxx | 4 ++ PWGCF/Femto/Tasks/femtoPairTrackKink.cxx | 4 ++ PWGCF/Femto/Tasks/femtoPairTrackTrack.cxx | 6 +++ .../Tasks/femtoPairTrackTwoTrackResonance.cxx | 4 ++ PWGCF/Femto/Tasks/femtoPairTrackV0.cxx | 4 ++ .../Femto/Tasks/femtoTwotrackresonanceQa.cxx | 4 +- 20 files changed, 83 insertions(+), 53 deletions(-) diff --git a/PWGCF/Femto/Core/cascadeHistManager.h b/PWGCF/Femto/Core/cascadeHistManager.h index 91b2413ff08..9a2d21e9335 100644 --- a/PWGCF/Femto/Core/cascadeHistManager.h +++ b/PWGCF/Femto/Core/cascadeHistManager.h @@ -168,7 +168,7 @@ template mBachelorManager; trackhistmanager::TrackHistManager mPosDauManager; diff --git a/PWGCF/Femto/Core/closePairRejection.h b/PWGCF/Femto/Core/closePairRejection.h index 147c55fa6a1..291a529147b 100644 --- a/PWGCF/Femto/Core/closePairRejection.h +++ b/PWGCF/Femto/Core/closePairRejection.h @@ -19,9 +19,13 @@ #include "PWGCF/Femto/Core/femtoUtils.h" #include "PWGCF/Femto/Core/histManager.h" +#include "Framework/Configurable.h" #include "Framework/HistogramRegistry.h" +#include "Framework/HistogramSpec.h" #include +#include +#include #include #include #include diff --git a/PWGCF/Femto/Core/collisionBuilder.h b/PWGCF/Femto/Core/collisionBuilder.h index 71f9bc48028..cd6fc90fc05 100644 --- a/PWGCF/Femto/Core/collisionBuilder.h +++ b/PWGCF/Femto/Core/collisionBuilder.h @@ -20,9 +20,11 @@ #include "PWGCF/Femto/Core/dataTypes.h" #include "PWGCF/Femto/Core/femtoUtils.h" #include "PWGCF/Femto/Core/modes.h" +#include "PWGCF/Femto/Core/selectionContainer.h" #include "PWGCF/Femto/DataModel/FemtoTables.h" #include "Common/CCDB/EventSelectionParams.h" +#include "Common/CCDB/RCTSelectionFlags.h" #include "EventFiltering/Zorro.h" #include "DataFormatsParameters/GRPMagField.h" @@ -33,6 +35,8 @@ #include #include +#include +#include #include #include #include diff --git a/PWGCF/Femto/Core/collisionHistManager.h b/PWGCF/Femto/Core/collisionHistManager.h index b08972c4202..fce3c918919 100644 --- a/PWGCF/Femto/Core/collisionHistManager.h +++ b/PWGCF/Femto/Core/collisionHistManager.h @@ -125,7 +125,7 @@ template class CollisionHistManager { public: - /// Destructor + CollisionHistManager() = default; virtual ~CollisionHistManager() = default; /// Initializes histograms for the task /// \param registry Histogram registry to be passed @@ -181,7 +181,7 @@ class CollisionHistManager } private: - o2::framework::HistogramRegistry* mHistogramRegistry; + o2::framework::HistogramRegistry* mHistogramRegistry = nullptr; }; // namespace femtounitedcolhistmanager }; // namespace colhistmanager }; // namespace o2::analysis::femto diff --git a/PWGCF/Femto/Core/histManager.h b/PWGCF/Femto/Core/histManager.h index 8c22277d642..14855ad425f 100644 --- a/PWGCF/Femto/Core/histManager.h +++ b/PWGCF/Femto/Core/histManager.h @@ -37,45 +37,41 @@ struct HistInfo { template constexpr o2::framework::HistType GetHistType(EnumType variable, const ArrayType& array) { - for (const auto& entry : array) { - if (entry.hist == variable) { - return entry.histtype; - } - } - return o2::framework::kUndefinedHist; + const auto it = std::find_if(array.begin(), array.end(), [=](const auto& entry) { + return entry.hist == variable; + }); + + return it != array.end() ? it->histtype : o2::framework::kUndefinedHist; } template constexpr std::string_view GetHistName(EnumType variable, const ArrayType& array) { - for (const auto& entry : array) { - if (entry.hist == variable) { - return entry.histname; - } - } - return ""; // Return an empty string or a default name if not found + auto it = std::find_if(array.begin(), array.end(), [=](const auto& entry) { + return entry.hist == variable; + }); + + return (it != array.end()) ? it->histname : std::string_view{}; } template -constexpr std::string GetHistNamev2(EnumType variable, const ArrayType& array) +std::string GetHistNamev2(EnumType variable, const ArrayType& array) { - for (const auto& entry : array) { - if (entry.hist == variable) { - return std::string(entry.histname); - } - } - return std::string(""); // Return an empty string or a default name if not found + auto it = std::find_if(array.begin(), array.end(), [=](const auto& entry) { + return entry.hist == variable; + }); + + return (it != array.end()) ? std::string(it->histname) : std::string{}; } template constexpr const char* GetHistDesc(EnumType variable, const ArrayType& array) { - for (const auto& entry : array) { - if (entry.hist == variable) { - return entry.histdesc.data(); - } - } - return ""; // Return an empty string or a default description if not found + auto it = std::find_if(array.begin(), array.end(), [=](const auto& entry) { + return entry.hist == variable; + }); + + return it != array.end() ? it->histdesc.data() : ""; } } // namespace histmanager } // namespace o2::analysis::femto diff --git a/PWGCF/Femto/Core/kinkBuilder.h b/PWGCF/Femto/Core/kinkBuilder.h index f9f3581da3f..925dc07f16f 100644 --- a/PWGCF/Femto/Core/kinkBuilder.h +++ b/PWGCF/Femto/Core/kinkBuilder.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/PWGCF/Femto/Core/kinkHistManager.h b/PWGCF/Femto/Core/kinkHistManager.h index c32e23ba5dd..b719d328b23 100644 --- a/PWGCF/Femto/Core/kinkHistManager.h +++ b/PWGCF/Femto/Core/kinkHistManager.h @@ -166,7 +166,7 @@ template mChaDauManager; }; }; // namespace kinkhistmanager diff --git a/PWGCF/Femto/Core/pairBuilder.h b/PWGCF/Femto/Core/pairBuilder.h index 8d2e9af0641..b36b589a49c 100644 --- a/PWGCF/Femto/Core/pairBuilder.h +++ b/PWGCF/Femto/Core/pairBuilder.h @@ -30,7 +30,12 @@ #include "PWGCF/Femto/DataModel/FemtoTables.h" #include "Framework/HistogramRegistry.h" +#include "Framework/HistogramSpec.h" +#include "fairlogger/Logger.h" + +#include +#include #include #include #include diff --git a/PWGCF/Femto/Core/pairHistManager.h b/PWGCF/Femto/Core/pairHistManager.h index 0e0862499f4..541fefd06b2 100644 --- a/PWGCF/Femto/Core/pairHistManager.h +++ b/PWGCF/Femto/Core/pairHistManager.h @@ -16,27 +16,22 @@ #ifndef PWGCF_FEMTO_CORE_PAIRHISTMANAGER_H_ #define PWGCF_FEMTO_CORE_PAIRHISTMANAGER_H_ -#include "PWGCF/Femto/Core/closePairRejection.h" -#include "PWGCF/Femto/Core/collisionHistManager.h" #include "PWGCF/Femto/Core/femtoUtils.h" #include "PWGCF/Femto/Core/histManager.h" #include "PWGCF/Femto/Core/modes.h" -#include "PWGCF/Femto/Core/pairCleaner.h" -#include "PWGCF/Femto/Core/trackHistManager.h" -#include "PWGCF/Femto/DataModel/FemtoTables.h" #include "Framework/Configurable.h" -#include "Framework/GroupedCombinations.h" #include "Framework/HistogramRegistry.h" +#include "Framework/HistogramSpec.h" -#include "Math/Boost.h" -#include "Math/Vector4D.h" -#include "TMath.h" +#include +#include #include +#include #include -#include #include +#include #include namespace o2::analysis::femto @@ -221,7 +216,7 @@ class PairHistManager } private: - o2::framework::HistogramRegistry* mHistogramRegistry; + o2::framework::HistogramRegistry* mHistogramRegistry = nullptr; float mMass1 = 0.f; float mMass2 = 0.f; float mAbsCharge1 = 1.f; diff --git a/PWGCF/Femto/Core/pairProcessHelpers.h b/PWGCF/Femto/Core/pairProcessHelpers.h index f2f1debbd2a..c45d3d02db8 100644 --- a/PWGCF/Femto/Core/pairProcessHelpers.h +++ b/PWGCF/Femto/Core/pairProcessHelpers.h @@ -18,6 +18,7 @@ #include "PWGCF/Femto/DataModel/FemtoTables.h" +#include "CommonConstants/MathConstants.h" #include "Framework/ASoAHelpers.h" #include diff --git a/PWGCF/Femto/Core/selectionContainer.h b/PWGCF/Femto/Core/selectionContainer.h index 0ebeb803b0e..f97dfc4f6fd 100644 --- a/PWGCF/Femto/Core/selectionContainer.h +++ b/PWGCF/Femto/Core/selectionContainer.h @@ -47,6 +47,7 @@ enum LimitType { kUpperLimit, ///< simple upper limit for the value, kAbsLowerFunctionLimit, ///< lower limit of an absolute value given by a function, e.g. |DCA_xy| < f(pt) kEqual, ///< values need to be equal, e.g. sign = 1 kEqualArray, ///< values inside an array need to be equal + kLimitTypeLast }; std::unordered_map limitTypeAsStrings = { @@ -175,7 +176,7 @@ class SelectionContainer mComments = comments; } - std::vector getComments() const { return mComments; } + std::vector const& getComments() const { return mComments; } /// \brief Update selection limits using internal functions evaluated at a given value. /// \param value Input value to evaluate functions at. @@ -250,7 +251,7 @@ class SelectionContainer /// \brief Evaluate which selection criteria are fulfilled for a given value. /// \param values Values of the observable to evaluate - void evaluate(std::vector& values) + void evaluate(std::vector const& values) { if (values.size() != mSelectionValues.size()) { LOG(fatal) << "Wrong number of values have been passed"; @@ -341,11 +342,11 @@ class SelectionContainer /// \brief Get a copy of all selection values. /// \return Vector of selection values. - std::vector getSelectionValues() const { return mSelectionValues; } + std::vector const& getSelectionValues() const { return mSelectionValues; } /// \brief Get a copy of all selection values. /// \return Vector of selection values. - std::vector getSelectionFunction() const { return mSelectionFunctions; } + std::vector const& getSelectionFunction() const { return mSelectionFunctions; } /// \brief Check if this container is marked as minimal cut. /// \return True if minimal cut, false otherwise. @@ -359,7 +360,7 @@ class SelectionContainer std::vector mSelectionValues = {}; ///< Values used for the selection std::vector mComments = {}; ///< Comments for the values std::vector mSelectionFunctions = {}; ///< Function used for the selection - limits::LimitType mLimitType; ///< Limit type of selection + limits::LimitType mLimitType = limits::kLimitTypeLast; ///< Limit type of selection std::bitset mBitmask = {}; ///< bitmask for the observable bool mSkipMostPermissiveBit = false; ///< whether to skip the last bit or not bool mIsMinimalCut = false; ///< whether to use this observable for minimal selection or not diff --git a/PWGCF/Femto/Core/twoTrackResonanceBuilder.h b/PWGCF/Femto/Core/twoTrackResonanceBuilder.h index 69477f86666..185611e12f1 100644 --- a/PWGCF/Femto/Core/twoTrackResonanceBuilder.h +++ b/PWGCF/Femto/Core/twoTrackResonanceBuilder.h @@ -30,7 +30,7 @@ #include "Framework/AnalysisHelpers.h" #include "Framework/Configurable.h" -#include "Math/Vector4D.h" +#include #include "fairlogger/Logger.h" diff --git a/PWGCF/Femto/TableProducer/femtoProducer.cxx b/PWGCF/Femto/TableProducer/femtoProducer.cxx index c21281d0616..06ee87b2a7c 100644 --- a/PWGCF/Femto/TableProducer/femtoProducer.cxx +++ b/PWGCF/Femto/TableProducer/femtoProducer.cxx @@ -37,7 +37,9 @@ #include "Framework/AnalysisTask.h" #include "Framework/Configurable.h" #include "Framework/Expressions.h" +#include "Framework/HistogramRegistry.h" #include "Framework/InitContext.h" +#include "Framework/OutputObjHeader.h" #include "Framework/runDataProcessing.h" #include "fairlogger/Logger.h" diff --git a/PWGCF/Femto/TableProducer/femtoProducerDerivedToDerived.cxx b/PWGCF/Femto/TableProducer/femtoProducerDerivedToDerived.cxx index 13893bf3f5a..d3806ae5f78 100644 --- a/PWGCF/Femto/TableProducer/femtoProducerDerivedToDerived.cxx +++ b/PWGCF/Femto/TableProducer/femtoProducerDerivedToDerived.cxx @@ -13,14 +13,11 @@ /// \brief Tasks that produces the femto tables from derived data /// \author Anton Riedel, TU München, anton.riedel@tum.de -#include "PWGCF/Femto/Core/cascadeBuilder.h" #include "PWGCF/Femto/Core/collisionBuilder.h" -#include "PWGCF/Femto/Core/kinkBuilder.h" -#include "PWGCF/Femto/Core/modes.h" #include "PWGCF/Femto/Core/partitions.h" #include "PWGCF/Femto/Core/trackBuilder.h" -#include "PWGCF/Femto/Core/twoTrackResonanceBuilder.h" #include "PWGCF/Femto/Core/v0Builder.h" +#include "PWGCF/Femto/DataModel/FemtoTables.h" #include "Framework/AnalysisDataModel.h" #include "Framework/AnalysisHelpers.h" diff --git a/PWGCF/Femto/Tasks/femtoPairTrackCascade.cxx b/PWGCF/Femto/Tasks/femtoPairTrackCascade.cxx index 8884a1edc01..ee7d9d5e409 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackCascade.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackCascade.cxx @@ -27,10 +27,14 @@ #include "PWGCF/Femto/DataModel/FemtoTables.h" #include "Framework/ASoA.h" +#include "Framework/AnalysisHelpers.h" #include "Framework/AnalysisTask.h" +#include "Framework/BinningPolicy.h" #include "Framework/Configurable.h" #include "Framework/Expressions.h" #include "Framework/HistogramRegistry.h" +#include "Framework/InitContext.h" +#include "Framework/OutputObjHeader.h" #include "Framework/runDataProcessing.h" #include diff --git a/PWGCF/Femto/Tasks/femtoPairTrackKink.cxx b/PWGCF/Femto/Tasks/femtoPairTrackKink.cxx index 2c1448a6764..d0fd689fe21 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackKink.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackKink.cxx @@ -28,10 +28,14 @@ #include "PWGCF/Femto/DataModel/FemtoTables.h" #include "Framework/ASoA.h" +#include "Framework/AnalysisHelpers.h" #include "Framework/AnalysisTask.h" +#include "Framework/BinningPolicy.h" #include "Framework/Configurable.h" #include "Framework/Expressions.h" #include "Framework/HistogramRegistry.h" +#include "Framework/InitContext.h" +#include "Framework/OutputObjHeader.h" #include "Framework/runDataProcessing.h" #include diff --git a/PWGCF/Femto/Tasks/femtoPairTrackTrack.cxx b/PWGCF/Femto/Tasks/femtoPairTrackTrack.cxx index 511bd4f8c1c..517478ed117 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackTrack.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackTrack.cxx @@ -16,17 +16,23 @@ #include "PWGCF/Femto/Core/closePairRejection.h" #include "PWGCF/Femto/Core/collisionBuilder.h" #include "PWGCF/Femto/Core/collisionHistManager.h" +#include "PWGCF/Femto/Core/modes.h" #include "PWGCF/Femto/Core/pairBuilder.h" +#include "PWGCF/Femto/Core/pairHistManager.h" #include "PWGCF/Femto/Core/partitions.h" #include "PWGCF/Femto/Core/trackBuilder.h" #include "PWGCF/Femto/Core/trackHistManager.h" #include "PWGCF/Femto/DataModel/FemtoTables.h" #include "Framework/ASoA.h" +#include "Framework/AnalysisHelpers.h" #include "Framework/AnalysisTask.h" +#include "Framework/BinningPolicy.h" #include "Framework/Configurable.h" #include "Framework/Expressions.h" #include "Framework/HistogramRegistry.h" +#include "Framework/InitContext.h" +#include "Framework/OutputObjHeader.h" #include "Framework/runDataProcessing.h" #include diff --git a/PWGCF/Femto/Tasks/femtoPairTrackTwoTrackResonance.cxx b/PWGCF/Femto/Tasks/femtoPairTrackTwoTrackResonance.cxx index a9b534c3488..73a340cde8a 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackTwoTrackResonance.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackTwoTrackResonance.cxx @@ -27,10 +27,14 @@ #include "PWGCF/Femto/DataModel/FemtoTables.h" #include "Framework/ASoA.h" +#include "Framework/AnalysisHelpers.h" #include "Framework/AnalysisTask.h" +#include "Framework/BinningPolicy.h" #include "Framework/Configurable.h" #include "Framework/Expressions.h" #include "Framework/HistogramRegistry.h" +#include "Framework/InitContext.h" +#include "Framework/OutputObjHeader.h" #include "Framework/runDataProcessing.h" #include diff --git a/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx b/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx index 6fc0e83060a..8343736b1b8 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx @@ -27,10 +27,14 @@ #include "PWGCF/Femto/DataModel/FemtoTables.h" #include "Framework/ASoA.h" +#include "Framework/AnalysisHelpers.h" #include "Framework/AnalysisTask.h" +#include "Framework/BinningPolicy.h" #include "Framework/Configurable.h" #include "Framework/Expressions.h" #include "Framework/HistogramRegistry.h" +#include "Framework/InitContext.h" +#include "Framework/OutputObjHeader.h" #include "Framework/runDataProcessing.h" #include diff --git a/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx b/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx index ef9121df21a..527f0647672 100644 --- a/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx +++ b/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx @@ -15,7 +15,6 @@ #include "PWGCF/Femto/Core/collisionBuilder.h" #include "PWGCF/Femto/Core/collisionHistManager.h" -#include "PWGCF/Femto/Core/dataTypes.h" #include "PWGCF/Femto/Core/modes.h" #include "PWGCF/Femto/Core/partitions.h" #include "PWGCF/Femto/Core/trackHistManager.h" @@ -29,6 +28,9 @@ #include "Framework/Expressions.h" #include "Framework/HistogramRegistry.h" #include "Framework/runDataProcessing.h" +#include "Framework/AnalysisHelpers.h" +#include "Framework/OutputObjHeader.h" +#include "Framework/InitContext.h" #include #include From 56158de8a2f3681b2d33ab760bff2cc4af5310e8 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Mon, 13 Oct 2025 23:08:07 +0200 Subject: [PATCH 2/3] Feat: update --- PWGCF/Femto/Core/cascadeHistManager.h | 76 ++--- PWGCF/Femto/Core/closePairRejection.h | 92 ++++-- PWGCF/Femto/Core/collisionHistManager.h | 56 ++-- PWGCF/Femto/Core/histManager.h | 8 +- PWGCF/Femto/Core/kinkHistManager.h | 96 +++--- PWGCF/Femto/Core/pairBuilder.h | 193 +++++++++++- PWGCF/Femto/Core/pairCleaner.h | 27 +- PWGCF/Femto/Core/pairHistManager.h | 41 +-- PWGCF/Femto/Core/pairProcessHelpers.h | 236 ++++++++------- PWGCF/Femto/Core/trackHistManager.h | 286 +++++++++--------- .../Femto/Core/twoTrackResonanceHistManager.h | 44 +-- PWGCF/Femto/Core/v0Builder.h | 2 +- PWGCF/Femto/Core/v0HistManager.h | 128 ++++---- PWGCF/Femto/Tasks/CMakeLists.txt | 5 + PWGCF/Femto/Tasks/femtoPairTrackV0.cxx | 8 +- PWGCF/Femto/Tasks/femtoPairV0V0.cxx | 204 +++++++++++++ PWGCF/Femto/Tasks/femtoTrackQa.cxx | 4 +- 17 files changed, 979 insertions(+), 527 deletions(-) create mode 100644 PWGCF/Femto/Tasks/femtoPairV0V0.cxx diff --git a/PWGCF/Femto/Core/cascadeHistManager.h b/PWGCF/Femto/Core/cascadeHistManager.h index 9a2d21e9335..3429a9de3c2 100644 --- a/PWGCF/Femto/Core/cascadeHistManager.h +++ b/PWGCF/Femto/Core/cascadeHistManager.h @@ -185,51 +185,51 @@ class CascadeHistManager mNegDauManager.init(registry, NegDauSpecs); if constexpr (modes::isFlagSet(mode, modes::Mode::kAnalysis)) { std::string analysisDir = std::string(cascadePrefix) + std::string(AnalysisDir); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt, HistTable), GetHistDesc(kPt, HistTable), GetHistType(kPt, HistTable), {cascadeSpecs[kPt]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kEta, HistTable), GetHistDesc(kEta, HistTable), GetHistType(kEta, HistTable), {cascadeSpecs[kEta]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPhi, HistTable), GetHistDesc(kPhi, HistTable), GetHistType(kPhi, HistTable), {cascadeSpecs[kPhi]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kMass, HistTable), GetHistDesc(kMass, HistTable), GetHistType(kMass, HistTable), {cascadeSpecs[kMass]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kSign, HistTable), GetHistDesc(kSign, HistTable), GetHistType(kSign, HistTable), {cascadeSpecs[kSign]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt, HistTable), getHistDesc(kPt, HistTable), getHistType(kPt, HistTable), {cascadeSpecs[kPt]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kEta, HistTable), getHistDesc(kEta, HistTable), getHistType(kEta, HistTable), {cascadeSpecs[kEta]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPhi, HistTable), getHistDesc(kPhi, HistTable), getHistType(kPhi, HistTable), {cascadeSpecs[kPhi]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kMass, HistTable), getHistDesc(kMass, HistTable), getHistType(kMass, HistTable), {cascadeSpecs[kMass]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kSign, HistTable), getHistDesc(kSign, HistTable), getHistType(kSign, HistTable), {cascadeSpecs[kSign]}); } if constexpr (modes::isFlagSet(mode, modes::Mode::kQa)) { std::string qaDir = std::string(cascadePrefix) + std::string(QaDir); - mHistogramRegistry->add(qaDir + GetHistNamev2(kCosPa, HistTable), GetHistDesc(kCosPa, HistTable), GetHistType(kCosPa, HistTable), {cascadeSpecs[kCosPa]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDecayDauDca, HistTable), GetHistDesc(kDecayDauDca, HistTable), GetHistType(kDecayDauDca, HistTable), {cascadeSpecs[kDecayDauDca]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kTransRadius, HistTable), GetHistDesc(kTransRadius, HistTable), GetHistType(kTransRadius, HistTable), {cascadeSpecs[kTransRadius]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kCosPa, HistTable), getHistDesc(kCosPa, HistTable), getHistType(kCosPa, HistTable), {cascadeSpecs[kCosPa]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDecayDauDca, HistTable), getHistDesc(kDecayDauDca, HistTable), getHistType(kDecayDauDca, HistTable), {cascadeSpecs[kDecayDauDca]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kTransRadius, HistTable), getHistDesc(kTransRadius, HistTable), getHistType(kTransRadius, HistTable), {cascadeSpecs[kTransRadius]}); // qa 2d - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsEta, HistTable), GetHistDesc(kPtVsEta, HistTable), GetHistType(kPtVsEta, HistTable), {cascadeSpecs[kPtVsEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsPhi, HistTable), GetHistDesc(kPtVsPhi, HistTable), GetHistType(kPtVsPhi, HistTable), {cascadeSpecs[kPtVsPhi]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPhiVsEta, HistTable), GetHistDesc(kPhiVsEta, HistTable), GetHistType(kPhiVsEta, HistTable), {cascadeSpecs[kPhiVsEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsCosPa, HistTable), GetHistDesc(kPtVsCosPa, HistTable), GetHistType(kPtVsCosPa, HistTable), {cascadeSpecs[kPtVsCosPa]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsEta, HistTable), getHistDesc(kPtVsEta, HistTable), getHistType(kPtVsEta, HistTable), {cascadeSpecs[kPtVsEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsPhi, HistTable), getHistDesc(kPtVsPhi, HistTable), getHistType(kPtVsPhi, HistTable), {cascadeSpecs[kPtVsPhi]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPhiVsEta, HistTable), getHistDesc(kPhiVsEta, HistTable), getHistType(kPhiVsEta, HistTable), {cascadeSpecs[kPhiVsEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsCosPa, HistTable), getHistDesc(kPtVsCosPa, HistTable), getHistType(kPtVsCosPa, HistTable), {cascadeSpecs[kPtVsCosPa]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kMassXi, HistTable), GetHistDesc(kMassXi, HistTable), GetHistType(kMassXi, HistTable), {cascadeSpecs[kMassXi]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kMassOmega, HistTable), GetHistDesc(kMassOmega, HistTable), GetHistType(kMassOmega, HistTable), {cascadeSpecs[kMassOmega]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsMassXi, HistTable), GetHistDesc(kPtVsMassXi, HistTable), GetHistType(kPtVsMassXi, HistTable), {cascadeSpecs[kPtVsMassXi]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsMassOmega, HistTable), GetHistDesc(kPtVsMassOmega, HistTable), GetHistType(kPtVsMassOmega, HistTable), {cascadeSpecs[kPtVsMassOmega]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kMassXiVsMassOmega, HistTable), GetHistDesc(kMassXiVsMassOmega, HistTable), GetHistType(kMassXiVsMassOmega, HistTable), {cascadeSpecs[kMassXiVsMassOmega]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kMassXi, HistTable), getHistDesc(kMassXi, HistTable), getHistType(kMassXi, HistTable), {cascadeSpecs[kMassXi]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kMassOmega, HistTable), getHistDesc(kMassOmega, HistTable), getHistType(kMassOmega, HistTable), {cascadeSpecs[kMassOmega]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsMassXi, HistTable), getHistDesc(kPtVsMassXi, HistTable), getHistType(kPtVsMassXi, HistTable), {cascadeSpecs[kPtVsMassXi]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsMassOmega, HistTable), getHistDesc(kPtVsMassOmega, HistTable), getHistType(kPtVsMassOmega, HistTable), {cascadeSpecs[kPtVsMassOmega]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kMassXiVsMassOmega, HistTable), getHistDesc(kMassXiVsMassOmega, HistTable), getHistType(kMassXiVsMassOmega, HistTable), {cascadeSpecs[kMassXiVsMassOmega]}); } } template - void fill(T1 const& cascadeCandidate, T2 const& /*tracks*/) + void fill(T1 const& cascadeCandidate, T2 const& tracks) { auto bachelor = cascadeCandidate.template bachelor_as(); - mBachelorManager.fill(bachelor); + mBachelorManager.fill(bachelor, tracks); auto posDaughter = cascadeCandidate.template posDau_as(); - mPosDauManager.fill(posDaughter); + mPosDauManager.fill(posDaughter, tracks); auto negDaughter = cascadeCandidate.template negDau_as(); - mNegDauManager.fill(negDaughter); + mNegDauManager.fill(negDaughter, tracks); if constexpr (modes::isFlagSet(mode, modes::Mode::kAnalysis)) { - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt, HistTable)), cascadeCandidate.pt()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(AnalysisDir) + HIST(GetHistName(kEta, HistTable)), cascadeCandidate.eta()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(AnalysisDir) + HIST(GetHistName(kPhi, HistTable)), cascadeCandidate.phi()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(AnalysisDir) + HIST(GetHistName(kMass, HistTable)), cascadeCandidate.mass()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(AnalysisDir) + HIST(GetHistName(kSign, HistTable)), cascadeCandidate.sign()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(AnalysisDir) + HIST(getHistName(kPt, HistTable)), cascadeCandidate.pt()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(AnalysisDir) + HIST(getHistName(kEta, HistTable)), cascadeCandidate.eta()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(AnalysisDir) + HIST(getHistName(kPhi, HistTable)), cascadeCandidate.phi()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(AnalysisDir) + HIST(getHistName(kMass, HistTable)), cascadeCandidate.mass()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(AnalysisDir) + HIST(getHistName(kSign, HistTable)), cascadeCandidate.sign()); } if constexpr (modes::isFlagSet(mode, modes::Mode::kQa)) { float massXi, massOmega; @@ -241,18 +241,18 @@ class CascadeHistManager massXi = cascadeCandidate.massXi(); massOmega = cascadeCandidate.mass(); } - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kCosPa, HistTable)), cascadeCandidate.cascadeCosPa()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kDecayDauDca, HistTable)), cascadeCandidate.cascadeDauDca()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kTransRadius, HistTable)), cascadeCandidate.cascadeTransRadius()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsEta, HistTable)), cascadeCandidate.pt(), cascadeCandidate.eta()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsPhi, HistTable)), cascadeCandidate.pt(), cascadeCandidate.phi()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kPhiVsEta, HistTable)), cascadeCandidate.phi(), cascadeCandidate.eta()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsCosPa, HistTable)), cascadeCandidate.pt(), cascadeCandidate.cascadeCosPa()); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kMassXi, HistTable)), massXi); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kMassOmega, HistTable)), massOmega); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsMassXi, HistTable)), cascadeCandidate.pt(), massXi); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsMassOmega, HistTable)), cascadeCandidate.pt(), massOmega); - mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(GetHistName(kMassXiVsMassOmega, HistTable)), massXi, massOmega); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kCosPa, HistTable)), cascadeCandidate.cascadeCosPa()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kDecayDauDca, HistTable)), cascadeCandidate.cascadeDauDca()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kTransRadius, HistTable)), cascadeCandidate.cascadeTransRadius()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kPtVsEta, HistTable)), cascadeCandidate.pt(), cascadeCandidate.eta()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kPtVsPhi, HistTable)), cascadeCandidate.pt(), cascadeCandidate.phi()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kPhiVsEta, HistTable)), cascadeCandidate.phi(), cascadeCandidate.eta()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kPtVsCosPa, HistTable)), cascadeCandidate.pt(), cascadeCandidate.cascadeCosPa()); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kMassXi, HistTable)), massXi); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kMassOmega, HistTable)), massOmega); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kPtVsMassXi, HistTable)), cascadeCandidate.pt(), massXi); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kPtVsMassOmega, HistTable)), cascadeCandidate.pt(), massOmega); + mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(QaDir) + HIST(getHistName(kMassXiVsMassOmega, HistTable)), massXi, massOmega); } } diff --git a/PWGCF/Femto/Core/closePairRejection.h b/PWGCF/Femto/Core/closePairRejection.h index 291a529147b..3cf20930ef4 100644 --- a/PWGCF/Femto/Core/closePairRejection.h +++ b/PWGCF/Femto/Core/closePairRejection.h @@ -69,6 +69,10 @@ constexpr char PrefixTrackTrackSe[] = "CPR_TrackTrack/SE/"; constexpr char PrefixTrackTrackMe[] = "CPR_TrackTrack/ME/"; constexpr char PrefixTrackV0Se[] = "CPR_TrackV0Daughter/SE/"; constexpr char PrefixTrackV0Me[] = "CPR_TrackV0Daughter/ME/"; +constexpr char PrefixV0V0PosSe[] = "CPR_V0V0_PosDau/SE/"; +constexpr char PrefixV0V0NegSe[] = "CPR_V0V0_NegDau/SE/"; +constexpr char PrefixV0V0PosMe[] = "CPR_V0V0_PosDau/ME/"; +constexpr char PrefixV0V0NegMe[] = "CPR_V0V0_NegDau/ME/"; constexpr char PrefixTrackTwoTrackResonanceSe[] = "CPR_TrackResonanceDaughter/SE/"; constexpr char PrefixTrackTwoTrackResonnaceMe[] = "CPR_TrackResonanceDaughter/ME/"; constexpr char PrefixTrackCascadeSe[] = "CPR_TrackCascadeBachelor/SE/"; @@ -123,16 +127,16 @@ class CloseTrackRejection mHistogramRegistry = registry; - mHistogramRegistry->add(std::string(prefix) + GetHistNamev2(kAverage, HistTable), GetHistDesc(kAverage, HistTable), GetHistType(kAverage, HistTable), {specs.at(kAverage)}); - mHistogramRegistry->add(std::string(prefix) + GetHistNamev2(kRadius0, HistTable), GetHistDesc(kRadius0, HistTable), GetHistType(kRadius0, HistTable), {specs.at(kRadius0)}); - mHistogramRegistry->add(std::string(prefix) + GetHistNamev2(kRadius1, HistTable), GetHistDesc(kRadius1, HistTable), GetHistType(kRadius1, HistTable), {specs.at(kRadius1)}); - mHistogramRegistry->add(std::string(prefix) + GetHistNamev2(kRadius2, HistTable), GetHistDesc(kRadius2, HistTable), GetHistType(kRadius2, HistTable), {specs.at(kRadius2)}); - mHistogramRegistry->add(std::string(prefix) + GetHistNamev2(kRadius3, HistTable), GetHistDesc(kRadius3, HistTable), GetHistType(kRadius3, HistTable), {specs.at(kRadius3)}); - mHistogramRegistry->add(std::string(prefix) + GetHistNamev2(kRadius4, HistTable), GetHistDesc(kRadius4, HistTable), GetHistType(kRadius4, HistTable), {specs.at(kRadius4)}); - mHistogramRegistry->add(std::string(prefix) + GetHistNamev2(kRadius5, HistTable), GetHistDesc(kRadius5, HistTable), GetHistType(kRadius5, HistTable), {specs.at(kRadius5)}); - mHistogramRegistry->add(std::string(prefix) + GetHistNamev2(kRadius6, HistTable), GetHistDesc(kRadius6, HistTable), GetHistType(kRadius6, HistTable), {specs.at(kRadius6)}); - mHistogramRegistry->add(std::string(prefix) + GetHistNamev2(kRadius7, HistTable), GetHistDesc(kRadius7, HistTable), GetHistType(kRadius7, HistTable), {specs.at(kRadius7)}); - mHistogramRegistry->add(std::string(prefix) + GetHistNamev2(kRadius8, HistTable), GetHistDesc(kRadius8, HistTable), GetHistType(kRadius8, HistTable), {specs.at(kRadius8)}); + mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kAverage, HistTable), getHistDesc(kAverage, HistTable), getHistType(kAverage, HistTable), {specs.at(kAverage)}); + mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius0, HistTable), getHistDesc(kRadius0, HistTable), getHistType(kRadius0, HistTable), {specs.at(kRadius0)}); + mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius1, HistTable), getHistDesc(kRadius1, HistTable), getHistType(kRadius1, HistTable), {specs.at(kRadius1)}); + mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius2, HistTable), getHistDesc(kRadius2, HistTable), getHistType(kRadius2, HistTable), {specs.at(kRadius2)}); + mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius3, HistTable), getHistDesc(kRadius3, HistTable), getHistType(kRadius3, HistTable), {specs.at(kRadius3)}); + mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius4, HistTable), getHistDesc(kRadius4, HistTable), getHistType(kRadius4, HistTable), {specs.at(kRadius4)}); + mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius5, HistTable), getHistDesc(kRadius5, HistTable), getHistType(kRadius5, HistTable), {specs.at(kRadius5)}); + mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius6, HistTable), getHistDesc(kRadius6, HistTable), getHistType(kRadius6, HistTable), {specs.at(kRadius6)}); + mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius7, HistTable), getHistDesc(kRadius7, HistTable), getHistType(kRadius7, HistTable), {specs.at(kRadius7)}); + mHistogramRegistry->add(std::string(prefix) + getHistNameV2(kRadius8, HistTable), getHistDesc(kRadius8, HistTable), getHistType(kRadius8, HistTable), {specs.at(kRadius8)}); } void setMagField(float magField) { mMagField = magField; } @@ -161,18 +165,18 @@ class CloseTrackRejection void fill() { // fill average hist - mHistogramRegistry->fill(HIST(prefix) + HIST(GetHistName(kAverage, HistTable)), mDeta, mAverageDphistar); + mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kAverage, HistTable)), mDeta, mAverageDphistar); // fill radii hists - mHistogramRegistry->fill(HIST(prefix) + HIST(GetHistName(kRadius0, HistTable)), mDeta, mDphistar.at(0)); - mHistogramRegistry->fill(HIST(prefix) + HIST(GetHistName(kRadius1, HistTable)), mDeta, mDphistar.at(1)); - mHistogramRegistry->fill(HIST(prefix) + HIST(GetHistName(kRadius2, HistTable)), mDeta, mDphistar.at(2)); - mHistogramRegistry->fill(HIST(prefix) + HIST(GetHistName(kRadius3, HistTable)), mDeta, mDphistar.at(3)); - mHistogramRegistry->fill(HIST(prefix) + HIST(GetHistName(kRadius4, HistTable)), mDeta, mDphistar.at(4)); - mHistogramRegistry->fill(HIST(prefix) + HIST(GetHistName(kRadius5, HistTable)), mDeta, mDphistar.at(5)); - mHistogramRegistry->fill(HIST(prefix) + HIST(GetHistName(kRadius6, HistTable)), mDeta, mDphistar.at(6)); - mHistogramRegistry->fill(HIST(prefix) + HIST(GetHistName(kRadius7, HistTable)), mDeta, mDphistar.at(7)); - mHistogramRegistry->fill(HIST(prefix) + HIST(GetHistName(kRadius8, HistTable)), mDeta, mDphistar.at(8)); + mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kRadius0, HistTable)), mDeta, mDphistar.at(0)); + mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kRadius1, HistTable)), mDeta, mDphistar.at(1)); + mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kRadius2, HistTable)), mDeta, mDphistar.at(2)); + mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kRadius3, HistTable)), mDeta, mDphistar.at(3)); + mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kRadius4, HistTable)), mDeta, mDphistar.at(4)); + mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kRadius5, HistTable)), mDeta, mDphistar.at(5)); + mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kRadius6, HistTable)), mDeta, mDphistar.at(6)); + mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kRadius7, HistTable)), mDeta, mDphistar.at(7)); + mHistogramRegistry->fill(HIST(prefix) + HIST(getHistName(kRadius8, HistTable)), mDeta, mDphistar.at(8)); } bool isClosePair() const @@ -206,8 +210,8 @@ class ClosePairRejectionTrackTrack } void setMagField(float magField) { mCtr.setMagField(magField); } - template - void setPair(const T1& track1, const T2& track2) + template + void setPair(T1 const& track1, T2 const& track2, T3 const& /*tracks*/) { mCtr.compute(track1, track2); } @@ -220,6 +224,50 @@ class ClosePairRejectionTrackTrack bool mIsActivated = true; }; +template +class ClosePairRejectionV0V0 +{ + public: + void init(o2::framework::HistogramRegistry* registry, std::map>& specs, float detaMax, float dphistarMax, bool isActivated) + { + mIsActivated = isActivated; + if (mIsActivated) { + mCtrPos.init(registry, specs, detaMax, dphistarMax, 1, 1); + mCtrNeg.init(registry, specs, detaMax, dphistarMax, 1, 1); + } + } + + void setMagField(float magField) + { + mCtrPos.setMagField(magField); + mCtrNeg.setMagField(magField); + } + template + void setPair(T1 const& v01, T2 const& v02, T3 const& /*tracks*/) + { + auto posDau1 = v01.template posDau_as(); + auto negDau1 = v01.template posDau_as(); + + auto posDau2 = v02.template posDau_as(); + auto negDau2 = v02.template posDau_as(); + + mCtrPos.compute(posDau1, posDau2); + mCtrNeg.compute(negDau1, negDau2); + } + bool isClosePair() const { return mCtrPos.isClosePair() && mCtrNeg.isClosePair(); } + void fill() + { + mCtrPos.fill(); + mCtrNeg.fill(); + } + bool isActivated() const { return mIsActivated; } + + private: + CloseTrackRejection mCtrPos; + CloseTrackRejection mCtrNeg; + bool mIsActivated = true; +}; + template class ClosePairRejectionTrackV0 // can also be used for any particle type that has pos/neg daughters, like resonances { diff --git a/PWGCF/Femto/Core/collisionHistManager.h b/PWGCF/Femto/Core/collisionHistManager.h index fce3c918919..38e261069fd 100644 --- a/PWGCF/Femto/Core/collisionHistManager.h +++ b/PWGCF/Femto/Core/collisionHistManager.h @@ -134,25 +134,25 @@ class CollisionHistManager mHistogramRegistry = registry; if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) { std::string analysisDir = std::string(ColAnalysisDir); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPosZ, HistTable), GetHistDesc(kPosZ, HistTable), GetHistType(kPosZ, HistTable), {Specs[kPosZ]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kMult, HistTable), GetHistDesc(kMult, HistTable), GetHistType(kMult, HistTable), {Specs[kMult]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kCent, HistTable), GetHistDesc(kCent, HistTable), GetHistType(kCent, HistTable), {Specs[kCent]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kMagField, HistTable), GetHistDesc(kMagField, HistTable), GetHistType(kMagField, HistTable), {Specs[kMagField]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPosZ, HistTable), getHistDesc(kPosZ, HistTable), getHistType(kPosZ, HistTable), {Specs[kPosZ]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kMult, HistTable), getHistDesc(kMult, HistTable), getHistType(kMult, HistTable), {Specs[kMult]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kCent, HistTable), getHistDesc(kCent, HistTable), getHistType(kCent, HistTable), {Specs[kCent]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kMagField, HistTable), getHistDesc(kMagField, HistTable), getHistType(kMagField, HistTable), {Specs[kMagField]}); } if constexpr (isFlagSet(mode, modes::Mode::kQa)) { std::string qaDir = std::string(ColQaDir); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPosX, HistTable), GetHistDesc(kPosX, HistTable), GetHistType(kPosX, HistTable), {Specs[kPosX]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPosY, HistTable), GetHistDesc(kPosY, HistTable), GetHistType(kPosY, HistTable), {Specs[kPosY]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPos, HistTable), GetHistDesc(kPos, HistTable), GetHistType(kPos, HistTable), {Specs[kPos]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kSphericity, HistTable), GetHistDesc(kSphericity, HistTable), GetHistType(kSphericity, HistTable), {Specs[kSphericity]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kOccupancy, HistTable), GetHistDesc(kOccupancy, HistTable), GetHistType(kOccupancy, HistTable), {Specs[kOccupancy]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPoszVsMult, HistTable), GetHistDesc(kPoszVsMult, HistTable), GetHistType(kPoszVsMult, HistTable), {Specs[kPoszVsMult]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPoszVsCent, HistTable), GetHistDesc(kPoszVsCent, HistTable), GetHistType(kPoszVsCent, HistTable), {Specs[kPoszVsCent]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kCentVsMult, HistTable), GetHistDesc(kCentVsMult, HistTable), GetHistType(kCentVsMult, HistTable), {Specs[kCentVsMult]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kMultVsSphericity, HistTable), GetHistDesc(kMultVsSphericity, HistTable), GetHistType(kMultVsSphericity, HistTable), {Specs[kMultVsSphericity]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kCentVsSphericity, HistTable), GetHistDesc(kCentVsSphericity, HistTable), GetHistType(kCentVsSphericity, HistTable), {Specs[kCentVsSphericity]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPosX, HistTable), getHistDesc(kPosX, HistTable), getHistType(kPosX, HistTable), {Specs[kPosX]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPosY, HistTable), getHistDesc(kPosY, HistTable), getHistType(kPosY, HistTable), {Specs[kPosY]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPos, HistTable), getHistDesc(kPos, HistTable), getHistType(kPos, HistTable), {Specs[kPos]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kSphericity, HistTable), getHistDesc(kSphericity, HistTable), getHistType(kSphericity, HistTable), {Specs[kSphericity]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kOccupancy, HistTable), getHistDesc(kOccupancy, HistTable), getHistType(kOccupancy, HistTable), {Specs[kOccupancy]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPoszVsMult, HistTable), getHistDesc(kPoszVsMult, HistTable), getHistType(kPoszVsMult, HistTable), {Specs[kPoszVsMult]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPoszVsCent, HistTable), getHistDesc(kPoszVsCent, HistTable), getHistType(kPoszVsCent, HistTable), {Specs[kPoszVsCent]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kCentVsMult, HistTable), getHistDesc(kCentVsMult, HistTable), getHistType(kCentVsMult, HistTable), {Specs[kCentVsMult]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kMultVsSphericity, HistTable), getHistDesc(kMultVsSphericity, HistTable), getHistType(kMultVsSphericity, HistTable), {Specs[kMultVsSphericity]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kCentVsSphericity, HistTable), getHistDesc(kCentVsSphericity, HistTable), getHistType(kCentVsSphericity, HistTable), {Specs[kCentVsSphericity]}); } } // namespace o2::analysis::femtounited @@ -160,23 +160,23 @@ class CollisionHistManager void fill(T const& col) { if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) { - mHistogramRegistry->fill(HIST(ColAnalysisDir) + HIST(GetHistName(kPosZ, HistTable)), col.posZ()); - mHistogramRegistry->fill(HIST(ColAnalysisDir) + HIST(GetHistName(kMult, HistTable)), col.mult()); - mHistogramRegistry->fill(HIST(ColAnalysisDir) + HIST(GetHistName(kCent, HistTable)), col.cent()); - mHistogramRegistry->fill(HIST(ColAnalysisDir) + HIST(GetHistName(kMagField, HistTable)), col.magField()); + mHistogramRegistry->fill(HIST(ColAnalysisDir) + HIST(getHistName(kPosZ, HistTable)), col.posZ()); + mHistogramRegistry->fill(HIST(ColAnalysisDir) + HIST(getHistName(kMult, HistTable)), col.mult()); + mHistogramRegistry->fill(HIST(ColAnalysisDir) + HIST(getHistName(kCent, HistTable)), col.cent()); + mHistogramRegistry->fill(HIST(ColAnalysisDir) + HIST(getHistName(kMagField, HistTable)), col.magField()); } if constexpr (isFlagSet(mode, modes::Mode::kQa)) { - mHistogramRegistry->fill(HIST(ColQaDir) + HIST(GetHistName(kPosX, HistTable)), col.posX()); - mHistogramRegistry->fill(HIST(ColQaDir) + HIST(GetHistName(kPosY, HistTable)), col.posY()); - mHistogramRegistry->fill(HIST(ColQaDir) + HIST(GetHistName(kPos, HistTable)), std::hypot(col.posX(), col.posY(), col.posZ())); - mHistogramRegistry->fill(HIST(ColQaDir) + HIST(GetHistName(kSphericity, HistTable)), col.sphericity()); - mHistogramRegistry->fill(HIST(ColQaDir) + HIST(GetHistName(kOccupancy, HistTable)), col.trackOccupancyInTimeRange()); - mHistogramRegistry->fill(HIST(ColQaDir) + HIST(GetHistName(kPoszVsMult, HistTable)), col.posZ(), col.mult()); - mHistogramRegistry->fill(HIST(ColQaDir) + HIST(GetHistName(kPoszVsCent, HistTable)), col.posZ(), col.cent()); - mHistogramRegistry->fill(HIST(ColQaDir) + HIST(GetHistName(kCentVsMult, HistTable)), col.cent(), col.mult()); - mHistogramRegistry->fill(HIST(ColQaDir) + HIST(GetHistName(kMultVsSphericity, HistTable)), col.mult(), col.sphericity()); - mHistogramRegistry->fill(HIST(ColQaDir) + HIST(GetHistName(kCentVsSphericity, HistTable)), col.cent(), col.sphericity()); + mHistogramRegistry->fill(HIST(ColQaDir) + HIST(getHistName(kPosX, HistTable)), col.posX()); + mHistogramRegistry->fill(HIST(ColQaDir) + HIST(getHistName(kPosY, HistTable)), col.posY()); + mHistogramRegistry->fill(HIST(ColQaDir) + HIST(getHistName(kPos, HistTable)), std::hypot(col.posX(), col.posY(), col.posZ())); + mHistogramRegistry->fill(HIST(ColQaDir) + HIST(getHistName(kSphericity, HistTable)), col.sphericity()); + mHistogramRegistry->fill(HIST(ColQaDir) + HIST(getHistName(kOccupancy, HistTable)), col.trackOccupancyInTimeRange()); + mHistogramRegistry->fill(HIST(ColQaDir) + HIST(getHistName(kPoszVsMult, HistTable)), col.posZ(), col.mult()); + mHistogramRegistry->fill(HIST(ColQaDir) + HIST(getHistName(kPoszVsCent, HistTable)), col.posZ(), col.cent()); + mHistogramRegistry->fill(HIST(ColQaDir) + HIST(getHistName(kCentVsMult, HistTable)), col.cent(), col.mult()); + mHistogramRegistry->fill(HIST(ColQaDir) + HIST(getHistName(kMultVsSphericity, HistTable)), col.mult(), col.sphericity()); + mHistogramRegistry->fill(HIST(ColQaDir) + HIST(getHistName(kCentVsSphericity, HistTable)), col.cent(), col.sphericity()); } } diff --git a/PWGCF/Femto/Core/histManager.h b/PWGCF/Femto/Core/histManager.h index 14855ad425f..55630d1bb75 100644 --- a/PWGCF/Femto/Core/histManager.h +++ b/PWGCF/Femto/Core/histManager.h @@ -35,7 +35,7 @@ struct HistInfo { }; template -constexpr o2::framework::HistType GetHistType(EnumType variable, const ArrayType& array) +constexpr o2::framework::HistType getHistType(EnumType variable, const ArrayType& array) { const auto it = std::find_if(array.begin(), array.end(), [=](const auto& entry) { return entry.hist == variable; @@ -45,7 +45,7 @@ constexpr o2::framework::HistType GetHistType(EnumType variable, const ArrayType } template -constexpr std::string_view GetHistName(EnumType variable, const ArrayType& array) +constexpr std::string_view getHistName(EnumType variable, const ArrayType& array) { auto it = std::find_if(array.begin(), array.end(), [=](const auto& entry) { return entry.hist == variable; @@ -55,7 +55,7 @@ constexpr std::string_view GetHistName(EnumType variable, const ArrayType& array } template -std::string GetHistNamev2(EnumType variable, const ArrayType& array) +std::string getHistNameV2(EnumType variable, const ArrayType& array) { auto it = std::find_if(array.begin(), array.end(), [=](const auto& entry) { return entry.hist == variable; @@ -65,7 +65,7 @@ std::string GetHistNamev2(EnumType variable, const ArrayType& array) } template -constexpr const char* GetHistDesc(EnumType variable, const ArrayType& array) +constexpr const char* getHistDesc(EnumType variable, const ArrayType& array) { auto it = std::find_if(array.begin(), array.end(), [=](const auto& entry) { return entry.hist == variable; diff --git a/PWGCF/Femto/Core/kinkHistManager.h b/PWGCF/Femto/Core/kinkHistManager.h index b719d328b23..879edf32e43 100644 --- a/PWGCF/Femto/Core/kinkHistManager.h +++ b/PWGCF/Femto/Core/kinkHistManager.h @@ -181,39 +181,39 @@ class KinkHistManager if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) { std::string analysisDir = std::string(kinkPrefix) + std::string(AnalysisDir); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt, HistTable), GetHistDesc(kPt, HistTable), GetHistType(kPt, HistTable), {KinkSpecs[kPt]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kEta, HistTable), GetHistDesc(kEta, HistTable), GetHistType(kEta, HistTable), {KinkSpecs[kEta]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPhi, HistTable), GetHistDesc(kPhi, HistTable), GetHistType(kPhi, HistTable), {KinkSpecs[kPhi]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kMass, HistTable), GetHistDesc(kMass, HistTable), GetHistType(kMass, HistTable), {KinkSpecs[kMass]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kSign, HistTable), GetHistDesc(kSign, HistTable), GetHistType(kSign, HistTable), {KinkSpecs[kSign]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt, HistTable), getHistDesc(kPt, HistTable), getHistType(kPt, HistTable), {KinkSpecs[kPt]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kEta, HistTable), getHistDesc(kEta, HistTable), getHistType(kEta, HistTable), {KinkSpecs[kEta]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPhi, HistTable), getHistDesc(kPhi, HistTable), getHistType(kPhi, HistTable), {KinkSpecs[kPhi]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kMass, HistTable), getHistDesc(kMass, HistTable), getHistType(kMass, HistTable), {KinkSpecs[kMass]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kSign, HistTable), getHistDesc(kSign, HistTable), getHistType(kSign, HistTable), {KinkSpecs[kSign]}); } if constexpr (isFlagSet(mode, modes::Mode::kQa)) { std::string qaDir = std::string(kinkPrefix) + std::string(QaDir); // Basic kinematic histograms - mHistogramRegistry->add(qaDir + GetHistNamev2(kPt, HistTable), GetHistDesc(kPt, HistTable), GetHistType(kPt, HistTable), {KinkSpecs[kPt]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kEta, HistTable), GetHistDesc(kEta, HistTable), GetHistType(kEta, HistTable), {KinkSpecs[kEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPhi, HistTable), GetHistDesc(kPhi, HistTable), GetHistType(kPhi, HistTable), {KinkSpecs[kPhi]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kMass, HistTable), GetHistDesc(kMass, HistTable), GetHistType(kMass, HistTable), {KinkSpecs[kMass]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kSign, HistTable), GetHistDesc(kSign, HistTable), GetHistType(kSign, HistTable), {KinkSpecs[kSign]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPt, HistTable), getHistDesc(kPt, HistTable), getHistType(kPt, HistTable), {KinkSpecs[kPt]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kEta, HistTable), getHistDesc(kEta, HistTable), getHistType(kEta, HistTable), {KinkSpecs[kEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPhi, HistTable), getHistDesc(kPhi, HistTable), getHistType(kPhi, HistTable), {KinkSpecs[kPhi]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kMass, HistTable), getHistDesc(kMass, HistTable), getHistType(kMass, HistTable), {KinkSpecs[kMass]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kSign, HistTable), getHistDesc(kSign, HistTable), getHistType(kSign, HistTable), {KinkSpecs[kSign]}); // Kink-specific QA histograms - mHistogramRegistry->add(qaDir + GetHistNamev2(kKinkAngle, HistTable), GetHistDesc(kKinkAngle, HistTable), GetHistType(kKinkAngle, HistTable), {KinkSpecs[kKinkAngle]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDcaMothToPV, HistTable), GetHistDesc(kDcaMothToPV, HistTable), GetHistType(kDcaMothToPV, HistTable), {KinkSpecs[kDcaMothToPV]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDcaDaugToPV, HistTable), GetHistDesc(kDcaDaugToPV, HistTable), GetHistType(kDcaDaugToPV, HistTable), {KinkSpecs[kDcaDaugToPV]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDecayVtxX, HistTable), GetHistDesc(kDecayVtxX, HistTable), GetHistType(kDecayVtxX, HistTable), {KinkSpecs[kDecayVtxX]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDecayVtxY, HistTable), GetHistDesc(kDecayVtxY, HistTable), GetHistType(kDecayVtxY, HistTable), {KinkSpecs[kDecayVtxY]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDecayVtxZ, HistTable), GetHistDesc(kDecayVtxZ, HistTable), GetHistType(kDecayVtxZ, HistTable), {KinkSpecs[kDecayVtxZ]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDecayVtx, HistTable), GetHistDesc(kDecayVtx, HistTable), GetHistType(kDecayVtx, HistTable), {KinkSpecs[kDecayVtx]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kTransRadius, HistTable), GetHistDesc(kTransRadius, HistTable), GetHistType(kTransRadius, HistTable), {KinkSpecs[kTransRadius]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kKinkAngle, HistTable), getHistDesc(kKinkAngle, HistTable), getHistType(kKinkAngle, HistTable), {KinkSpecs[kKinkAngle]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDcaMothToPV, HistTable), getHistDesc(kDcaMothToPV, HistTable), getHistType(kDcaMothToPV, HistTable), {KinkSpecs[kDcaMothToPV]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDcaDaugToPV, HistTable), getHistDesc(kDcaDaugToPV, HistTable), getHistType(kDcaDaugToPV, HistTable), {KinkSpecs[kDcaDaugToPV]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDecayVtxX, HistTable), getHistDesc(kDecayVtxX, HistTable), getHistType(kDecayVtxX, HistTable), {KinkSpecs[kDecayVtxX]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDecayVtxY, HistTable), getHistDesc(kDecayVtxY, HistTable), getHistType(kDecayVtxY, HistTable), {KinkSpecs[kDecayVtxY]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDecayVtxZ, HistTable), getHistDesc(kDecayVtxZ, HistTable), getHistType(kDecayVtxZ, HistTable), {KinkSpecs[kDecayVtxZ]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDecayVtx, HistTable), getHistDesc(kDecayVtx, HistTable), getHistType(kDecayVtx, HistTable), {KinkSpecs[kDecayVtx]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kTransRadius, HistTable), getHistDesc(kTransRadius, HistTable), getHistType(kTransRadius, HistTable), {KinkSpecs[kTransRadius]}); // 2D QA histograms - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsEta, HistTable), GetHistDesc(kPtVsEta, HistTable), GetHistType(kPtVsEta, HistTable), {KinkSpecs[kPtVsEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsPhi, HistTable), GetHistDesc(kPtVsPhi, HistTable), GetHistType(kPtVsPhi, HistTable), {KinkSpecs[kPtVsPhi]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPhiVsEta, HistTable), GetHistDesc(kPhiVsEta, HistTable), GetHistType(kPhiVsEta, HistTable), {KinkSpecs[kPhiVsEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsKinkAngle, HistTable), GetHistDesc(kPtVsKinkAngle, HistTable), GetHistType(kPtVsKinkAngle, HistTable), {KinkSpecs[kPtVsKinkAngle]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsDecayRadius, HistTable), GetHistDesc(kPtVsDecayRadius, HistTable), GetHistType(kPtVsDecayRadius, HistTable), {KinkSpecs[kPtVsDecayRadius]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsEta, HistTable), getHistDesc(kPtVsEta, HistTable), getHistType(kPtVsEta, HistTable), {KinkSpecs[kPtVsEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsPhi, HistTable), getHistDesc(kPtVsPhi, HistTable), getHistType(kPtVsPhi, HistTable), {KinkSpecs[kPtVsPhi]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPhiVsEta, HistTable), getHistDesc(kPhiVsEta, HistTable), getHistType(kPhiVsEta, HistTable), {KinkSpecs[kPhiVsEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsKinkAngle, HistTable), getHistDesc(kPtVsKinkAngle, HistTable), getHistType(kPtVsKinkAngle, HistTable), {KinkSpecs[kPtVsKinkAngle]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsDecayRadius, HistTable), getHistDesc(kPtVsDecayRadius, HistTable), getHistType(kPtVsDecayRadius, HistTable), {KinkSpecs[kPtVsDecayRadius]}); } } @@ -223,48 +223,48 @@ class KinkHistManager void fill(T const& kinkcandidate) { if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) { - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt, HistTable)), kinkcandidate.pt()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kEta, HistTable)), kinkcandidate.eta()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kPhi, HistTable)), kinkcandidate.phi()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kMass, HistTable)), kinkcandidate.mass()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(getHistName(kPt, HistTable)), kinkcandidate.pt()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(getHistName(kEta, HistTable)), kinkcandidate.eta()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(getHistName(kPhi, HistTable)), kinkcandidate.phi()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(getHistName(kMass, HistTable)), kinkcandidate.mass()); if constexpr (isEqual(kink, modes::Kink::kSigma)) { - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kSign, HistTable)), kinkcandidate.sign()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(AnalysisDir) + HIST(getHistName(kSign, HistTable)), kinkcandidate.sign()); } } if constexpr (isFlagSet(mode, modes::Mode::kQa)) { // Basic kinematic histograms - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kPt, HistTable)), kinkcandidate.pt()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kEta, HistTable)), kinkcandidate.eta()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kPhi, HistTable)), kinkcandidate.phi()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kMass, HistTable)), kinkcandidate.mass()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kPt, HistTable)), kinkcandidate.pt()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kEta, HistTable)), kinkcandidate.eta()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kPhi, HistTable)), kinkcandidate.phi()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kMass, HistTable)), kinkcandidate.mass()); if constexpr (isEqual(kink, modes::Kink::kSigma)) { - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kSign, HistTable)), kinkcandidate.sign()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kSign, HistTable)), kinkcandidate.sign()); } // Kink-specific QA histograms - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kKinkAngle, HistTable)), kinkcandidate.kinkAngle()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kDcaMothToPV, HistTable)), kinkcandidate.dcaMothToPV()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kDcaDaugToPV, HistTable)), kinkcandidate.dcaDaugToPV()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kDecayVtxX, HistTable)), kinkcandidate.decayVtxX()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kDecayVtxY, HistTable)), kinkcandidate.decayVtxY()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kDecayVtxZ, HistTable)), kinkcandidate.decayVtxZ()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kKinkAngle, HistTable)), kinkcandidate.kinkAngle()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kDcaMothToPV, HistTable)), kinkcandidate.dcaMothToPV()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kDcaDaugToPV, HistTable)), kinkcandidate.dcaDaugToPV()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kDecayVtxX, HistTable)), kinkcandidate.decayVtxX()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kDecayVtxY, HistTable)), kinkcandidate.decayVtxY()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kDecayVtxZ, HistTable)), kinkcandidate.decayVtxZ()); // Calculate decay distance from PV float decayDistance = std::sqrt(kinkcandidate.decayVtxX() * kinkcandidate.decayVtxX() + kinkcandidate.decayVtxY() * kinkcandidate.decayVtxY() + kinkcandidate.decayVtxZ() * kinkcandidate.decayVtxZ()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kDecayVtx, HistTable)), decayDistance); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kTransRadius, HistTable)), kinkcandidate.transRadius()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kDecayVtx, HistTable)), decayDistance); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kTransRadius, HistTable)), kinkcandidate.transRadius()); // 2D QA histograms - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsEta, HistTable)), kinkcandidate.pt(), kinkcandidate.eta()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsPhi, HistTable)), kinkcandidate.pt(), kinkcandidate.phi()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kPhiVsEta, HistTable)), kinkcandidate.phi(), kinkcandidate.eta()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsKinkAngle, HistTable)), kinkcandidate.pt(), kinkcandidate.kinkAngle()); - mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsDecayRadius, HistTable)), kinkcandidate.pt(), kinkcandidate.transRadius()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kPtVsEta, HistTable)), kinkcandidate.pt(), kinkcandidate.eta()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kPtVsPhi, HistTable)), kinkcandidate.pt(), kinkcandidate.phi()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kPhiVsEta, HistTable)), kinkcandidate.phi(), kinkcandidate.eta()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kPtVsKinkAngle, HistTable)), kinkcandidate.pt(), kinkcandidate.kinkAngle()); + mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(QaDir) + HIST(getHistName(kPtVsDecayRadius, HistTable)), kinkcandidate.pt(), kinkcandidate.transRadius()); } } @@ -272,10 +272,10 @@ class KinkHistManager /// \param kinkcandidate Kink candidate to fill histograms for /// \param tracks Track table for daughter access template - void fill(T1 const& kinkcandidate, T2 const& /*tracks*/) + void fill(T1 const& kinkcandidate, T2 const& tracks) { auto chaDaughter = kinkcandidate.template chaDau_as(); - mChaDauManager.fill(chaDaughter); + mChaDauManager.fill(chaDaughter, tracks); fill(kinkcandidate); } diff --git a/PWGCF/Femto/Core/pairBuilder.h b/PWGCF/Femto/Core/pairBuilder.h index b36b589a49c..732ebe8dbd2 100644 --- a/PWGCF/Femto/Core/pairBuilder.h +++ b/PWGCF/Femto/Core/pairBuilder.h @@ -57,6 +57,7 @@ class PairTrackTrackBuilder { public: PairTrackTrackBuilder() = default; + ~PairTrackTrackBuilder() = default; template - void processSameEvent(T1 const& col, T2& /*trackTable*/, T3& partition1, T4& partition2, T5& cache) + void processSameEvent(T1 const& col, T2& trackTable, T3& partition1, T4& partition2, T5& cache) { if (mSameSpecies) { auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -136,7 +137,7 @@ class PairTrackTrackBuilder } mColHistManager.fill(col); mCprSe.setMagField(col.magField()); - pairprocesshelpers::processSameEvent(trackSlice1, mTrackHistManager1, mPairHistManagerSe, mCprSe, mRng, mMixIdenticalParticles); + pairprocesshelpers::processSameEvent(trackSlice1, trackTable, mTrackHistManager1, mPairHistManagerSe, mCprSe, mRng, mMixIdenticalParticles); } else { auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); auto trackSlice2 = partition2->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); @@ -145,24 +146,24 @@ class PairTrackTrackBuilder } mColHistManager.fill(col); mCprSe.setMagField(col.magField()); - pairprocesshelpers::processSameEvent(trackSlice1, trackSlice2, mTrackHistManager1, mTrackHistManager2, mPairHistManagerSe, mCprSe, mPc); + pairprocesshelpers::processSameEvent(trackSlice1, trackSlice2, trackTable, mTrackHistManager1, mTrackHistManager2, mPairHistManagerSe, mCprSe, mPc); } } template - void processMixedEvent(T1 const& cols, T2& /*trackTable*/, T3& partition1, T4& partition2, T5& cache, T6& binsVtxMult, T7& binsVtxCent, T8& binsVtxMultCent) + void processMixedEvent(T1 const& cols, T2& trackTable, T3& partition1, T4& partition2, T5& cache, T6& binsVtxMult, T7& binsVtxCent, T8& binsVtxMultCent) { if (mSameSpecies) { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, partition1, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + pairprocesshelpers::processMixedEvent(cols, partition1, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, partition1, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + pairprocesshelpers::processMixedEvent(cols, partition1, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, partition1, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + pairprocesshelpers::processMixedEvent(cols, partition1, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -170,13 +171,13 @@ class PairTrackTrackBuilder } else { switch (mMixingPolicy) { case static_cast(pairhistmanager::kVtxMult): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); break; case static_cast(pairhistmanager::kVtxCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); break; case static_cast(pairhistmanager::kVtxMultCent): - pairprocesshelpers::processMixedEvent(cols, partition1, partition2, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); break; default: LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; @@ -200,6 +201,174 @@ class PairTrackTrackBuilder bool mMixIdenticalParticles = false; }; +template < + const char* prefixV01, + const char* prefixPosDau1, + const char* prefixNegDau1, + const char* prefixV02, + const char* prefixPosDau2, + const char* prefixNegDau2, + const char* prefixSe, + const char* prefixMe, + const char* prefixCprPosSe, + const char* prefixCprNegSe, + const char* prefixCprPosMe, + const char* prefixCprNegMe, + modes::V0 v0Type1, + modes::V0 v0Type2, + modes::Mode mode> +class PairV0V0Builder +{ + public: + PairV0V0Builder() = default; + ~PairV0V0Builder() = default; + + template + void init(o2::framework::HistogramRegistry* registry, + T1& confV0Selection1, + T2& confV0Selection2, + T3& confCpr, + T4& confMixing, + std::map>& colHistSpec, + std::map>& V0HistSpec1, + std::map>& V0HistSpec2, + std::map>& PosDauHistSpec, + std::map>& NegDauHistSpec, + std::map>& pairHistSpec, + std::map>& cprHistSpec) + { + + // check if correlate the same tracks or not + mSameSpecies = confMixing.sameSpecies.value; + + mColHistManager.init(registry, colHistSpec); + mPairHistManagerSe.init(registry, pairHistSpec); + mPairHistManagerMe.init(registry, pairHistSpec); + + if (mSameSpecies) { + mV0HistManager1.init(registry, V0HistSpec1, PosDauHistSpec, NegDauHistSpec); + + mPairHistManagerSe.setMass(confV0Selection1.pdgCode.value, confV0Selection1.pdgCode.value); + mPairHistManagerSe.setCharge(1, 1); + mCprSe.init(registry, cprHistSpec, confCpr.detaMax.value, confCpr.dphistarMax.value, confCpr.on.value); + + mPairHistManagerMe.setMass(confV0Selection1.pdgCode.value, confV0Selection1.pdgCode.value); + mPairHistManagerMe.setCharge(1, 1); + mCprMe.init(registry, cprHistSpec, confCpr.detaMax.value, confCpr.dphistarMax.value, confCpr.on.value); + } else { + mV0HistManager1.init(registry, V0HistSpec1, PosDauHistSpec, NegDauHistSpec); + mV0HistManager2.init(registry, V0HistSpec2, PosDauHistSpec, NegDauHistSpec); + + mPairHistManagerSe.setMass(confV0Selection1.pdgCode.value, confV0Selection2.pdgCode.value); + mPairHistManagerSe.setCharge(1, 1); + mCprSe.init(registry, cprHistSpec, confCpr.detaMax.value, confCpr.dphistarMax.value, confCpr.on.value); + + mPairHistManagerMe.setMass(confV0Selection1.pdgCode.value, confV0Selection2.pdgCode.value); + mPairHistManagerMe.setCharge(1, 1); + mCprMe.init(registry, cprHistSpec, confCpr.detaMax.value, confCpr.dphistarMax.value, confCpr.on.value); + } + + // setup mixing + mMixingPolicy = static_cast(confMixing.policy.value); + mMixingDepth = confMixing.depth.value; + + // setup rng if necessary + if (confMixing.seed.value >= 0) { + uint64_t randomSeed = 0; + mMixIdenticalParticles = true; + if (confMixing.seed.value == 0) { + randomSeed = static_cast(std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count()); + } else { + randomSeed = static_cast(confMixing.seed.value); + } + mRng = std::mt19937(randomSeed); + } + } + + template + void processSameEvent(T1 const& col, T2& trackTable, T3& /*lambdaTable*/, T4& partition1, T5& partition2, T6& cache) + { + if (mSameSpecies) { + auto v0Slice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + if (v0Slice1.size() == 0) { + return; + } + mColHistManager.fill(col); + mCprSe.setMagField(col.magField()); + pairprocesshelpers::processSameEvent(v0Slice1, trackTable, mV0HistManager1, mPairHistManagerSe, mCprSe, mRng, mMixIdenticalParticles); + } else { + auto v0Slice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto v0Slice2 = partition2->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + if (v0Slice1.size() == 0 || v0Slice2.size() == 0) { + return; + } + mColHistManager.fill(col); + mCprSe.setMagField(col.magField()); + pairprocesshelpers::processSameEvent(v0Slice1, v0Slice2, trackTable, mV0HistManager1, mV0HistManager2, mPairHistManagerSe, mCprSe, mPc); + } + } + + template + void processMixedEvent(T1 const& cols, T2& trackTable, T3& partition1, T4& partition2, T5& cache, T6& binsVtxMult, T7& binsVtxCent, T8& binsVtxMultCent) + { + + if (mSameSpecies) { + switch (mMixingPolicy) { + case static_cast(pairhistmanager::kVtxMult): + pairprocesshelpers::processMixedEvent(cols, partition1, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + break; + case static_cast(pairhistmanager::kVtxCent): + pairprocesshelpers::processMixedEvent(cols, partition1, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + break; + case static_cast(pairhistmanager::kVtxMultCent): + pairprocesshelpers::processMixedEvent(cols, partition1, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + break; + default: + LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; + } + } else { + switch (mMixingPolicy) { + case static_cast(pairhistmanager::kVtxMult): + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMult, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + break; + case static_cast(pairhistmanager::kVtxCent): + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + break; + case static_cast(pairhistmanager::kVtxMultCent): + pairprocesshelpers::processMixedEvent(cols, partition1, partition2, trackTable, cache, binsVtxMultCent, mMixingDepth, mPairHistManagerMe, mCprMe, mPc); + break; + default: + LOG(fatal) << "Invalid binning policiy specifed. Breaking..."; + } + } + } + + private: + colhistmanager::CollisionHistManager mColHistManager; + v0histmanager::V0HistManager mV0HistManager1; + v0histmanager::V0HistManager mV0HistManager2; + pairhistmanager::PairHistManager mPairHistManagerSe; + pairhistmanager::PairHistManager mPairHistManagerMe; + closepairrejection::ClosePairRejectionV0V0 mCprSe; + closepairrejection::ClosePairRejectionV0V0 mCprMe; + paircleaner::V0V0PairCleaner mPc; + std::mt19937 mRng; + pairhistmanager::MixingPoliciy mMixingPolicy = pairhistmanager::MixingPoliciy::kVtxMult; + bool mSameSpecies = false; + int mMixingDepth = 5; + bool mMixIdenticalParticles = false; +}; + template < const char* prefixTrack, const char* prefixV0, @@ -215,6 +384,7 @@ class PairTrackV0Builder { public: PairTrackV0Builder() = default; + ~PairTrackV0Builder() = default; template - bool isCleanTrackPair(const T1& track1, const T2& track2) const + bool isCleanTrackPair(T1 const& track1, T2 const& track2) const { return track1.globalIndex() != track2.globalIndex(); }; @@ -39,19 +39,34 @@ class TrackTrackPairCleaner : public BasePairCleaner { public: TrackTrackPairCleaner() = default; - template - bool isCleanPair(const T& track1, const T& track2) const + template + bool isCleanPair(T1 const& track1, T2 const& track2, T3 const& /*trackTable*/) const { return this->isCleanTrackPair(track1, track2); } }; +class V0V0PairCleaner : public BasePairCleaner +{ + public: + V0V0PairCleaner() = default; + template + bool isCleanPair(const T1& v01, const T2& v02, const T3& /*tracks*/) const + { + auto posDaughter1 = v01.template posDau_as(); + auto negDaughter1 = v01.template negDau_as(); + auto posDaughter2 = v02.template posDau_as(); + auto negDaughter2 = v02.template negDau_as(); + return this->isCleanTrackPair(posDaughter1, posDaughter2) && this->isCleanTrackPair(negDaughter1, negDaughter2); + } +}; + class TrackV0PairCleaner : public BasePairCleaner // also works for particles decaying into a positive and negative daughter, like resonances { public: TrackV0PairCleaner() = default; template - bool isCleanPair(const T1& track, const T2& v0, const T3& /*trackTable */) const + bool isCleanPair(const T1& track, const T2& v0, const T3& /*trackTable*/) const { auto posDaughter = v0.template posDau_as(); auto negDaughter = v0.template negDau_as(); @@ -64,7 +79,7 @@ class TrackKinkPairCleaner : public BasePairCleaner public: TrackKinkPairCleaner() = default; template - bool isCleanPair(const T1& track, const T2& kink, const T3& /*trackTable */) const + bool isCleanPair(const T1& track, const T2& kink, const T3& /*trackTable*/) const { auto chaDaughter = kink.template chaDau_as(); return this->isCleanTrackPair(chaDaughter, track); @@ -76,7 +91,7 @@ class TrackCascadePairCleaner : public BasePairCleaner public: TrackCascadePairCleaner() = default; template - bool isCleanPair(const T1& track, const T2& cascade, const T3& /*trackTable */) const + bool isCleanPair(const T1& track, const T2& cascade, const T3& /*trackTable*/) const { auto bachelor = cascade.template bachelor_as(); auto posDaughter = cascade.template posDau_as(); diff --git a/PWGCF/Femto/Core/pairHistManager.h b/PWGCF/Femto/Core/pairHistManager.h index 541fefd06b2..8a4f58b44b1 100644 --- a/PWGCF/Femto/Core/pairHistManager.h +++ b/PWGCF/Femto/Core/pairHistManager.h @@ -117,6 +117,9 @@ constexpr char PrefixTrackTrackMe[] = "TrackTrack/ME/"; constexpr char PrefixTrackV0Se[] = "TrackV0/SE/"; constexpr char PrefixTrackV0Me[] = "TrackV0/ME/"; +constexpr char PrefixV0V0Se[] = "V0V0/SE/"; +constexpr char PrefixV0V0Me[] = "V0V0/ME/"; + constexpr char PrefixTrackResonanceSe[] = "TrackResonance/SE/"; constexpr char PrefixTrackResonanceMe[] = "TrackResonance/ME/"; @@ -145,15 +148,15 @@ class PairHistManager if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) { std::string analysisDir = std::string(prefix) + std::string(AnalysisDir); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kKstar, HistTable), GetHistDesc(kKstar, HistTable), GetHistType(kKstar, HistTable), {Specs[kKstar]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kMt, HistTable), GetHistDesc(kMt, HistTable), GetHistType(kMt, HistTable), {Specs[kMt]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt1VsPt2, HistTable), GetHistDesc(kPt1VsPt2, HistTable), GetHistType(kPt1VsPt2, HistTable), {Specs[kPt1VsPt2]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt1VsKstar, HistTable), GetHistDesc(kPt1VsKstar, HistTable), GetHistType(kPt1VsKstar, HistTable), {Specs[kPt1VsKstar]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt2VsKstar, HistTable), GetHistDesc(kPt2VsKstar, HistTable), GetHistType(kPt2VsKstar, HistTable), {Specs[kPt2VsKstar]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt1VsKt, HistTable), GetHistDesc(kPt1VsKt, HistTable), GetHistType(kPt1VsKt, HistTable), {Specs[kPt1VsKt]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt2VsKt, HistTable), GetHistDesc(kPt2VsKt, HistTable), GetHistType(kPt2VsKt, HistTable), {Specs[kPt2VsKt]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt1VsMt, HistTable), GetHistDesc(kPt1VsMt, HistTable), GetHistType(kPt1VsMt, HistTable), {Specs[kPt1VsMt]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt2VsMt, HistTable), GetHistDesc(kPt2VsMt, HistTable), GetHistType(kPt2VsMt, HistTable), {Specs[kPt2VsMt]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kKstar, HistTable), getHistDesc(kKstar, HistTable), getHistType(kKstar, HistTable), {Specs[kKstar]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kMt, HistTable), getHistDesc(kMt, HistTable), getHistType(kMt, HistTable), {Specs[kMt]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt1VsPt2, HistTable), getHistDesc(kPt1VsPt2, HistTable), getHistType(kPt1VsPt2, HistTable), {Specs[kPt1VsPt2]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt1VsKstar, HistTable), getHistDesc(kPt1VsKstar, HistTable), getHistType(kPt1VsKstar, HistTable), {Specs[kPt1VsKstar]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt2VsKstar, HistTable), getHistDesc(kPt2VsKstar, HistTable), getHistType(kPt2VsKstar, HistTable), {Specs[kPt2VsKstar]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt1VsKt, HistTable), getHistDesc(kPt1VsKt, HistTable), getHistType(kPt1VsKt, HistTable), {Specs[kPt1VsKt]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt2VsKt, HistTable), getHistDesc(kPt2VsKt, HistTable), getHistType(kPt2VsKt, HistTable), {Specs[kPt2VsKt]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt1VsMt, HistTable), getHistDesc(kPt1VsMt, HistTable), getHistType(kPt1VsMt, HistTable), {Specs[kPt1VsMt]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt2VsMt, HistTable), getHistDesc(kPt2VsMt, HistTable), getHistType(kPt2VsMt, HistTable), {Specs[kPt2VsMt]}); } // if constexpr (isFlagSet(mode, modes::Mode::kQA)) { @@ -199,19 +202,19 @@ class PairHistManager void fill() { if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) { - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kKstar, HistTable)), mKstar); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kMt, HistTable)), mMt); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt1VsPt2, HistTable)), mParticle1.Pt(), mParticle2.Pt()); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt1VsKstar, HistTable)), mParticle1.Pt(), mKstar); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt1VsMt, HistTable)), mParticle1.Pt(), mMt); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt1VsKt, HistTable)), mParticle1.Pt(), mKt); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt2VsKstar, HistTable)), mParticle2.Pt(), mKstar); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt2VsMt, HistTable)), mParticle2.Pt(), mMt); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt2VsKt, HistTable)), mParticle2.Pt(), mKt); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kKstar, HistTable)), mKstar); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kMt, HistTable)), mMt); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kPt1VsPt2, HistTable)), mParticle1.Pt(), mParticle2.Pt()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kPt1VsKstar, HistTable)), mParticle1.Pt(), mKstar); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kPt1VsMt, HistTable)), mParticle1.Pt(), mMt); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kPt1VsKt, HistTable)), mParticle1.Pt(), mKt); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kPt2VsKstar, HistTable)), mParticle2.Pt(), mKstar); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kPt2VsMt, HistTable)), mParticle2.Pt(), mMt); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kPt2VsKt, HistTable)), mParticle2.Pt(), mKt); } // if constexpr (isFlagSet(mode, modes::Mode::kQA)) { - // mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsDcaz, HistTable)), track.pt(), track.dcaZ()); + // mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsDcaz, HistTable)), track.pt(), track.dcaZ()); // } } diff --git a/PWGCF/Femto/Core/pairProcessHelpers.h b/PWGCF/Femto/Core/pairProcessHelpers.h index c45d3d02db8..df2510126f8 100644 --- a/PWGCF/Femto/Core/pairProcessHelpers.h +++ b/PWGCF/Femto/Core/pairProcessHelpers.h @@ -28,37 +28,35 @@ namespace o2::analysis::femto namespace pairprocesshelpers { -// process same event for identical tracks +// process same event for identical particles template -void processSameEvent(const T1& SliceParticle, - T2& ParticleHistManager, - T3& PairHistManager, - T4& CprManager, - T5& rng, + typename T5, + typename T6> +void processSameEvent(T1 const& SliceParticle, + T2 const& TrackTable, + T3& ParticleHistManager, + T4& PairHistManager, + T5& CprManager, + T6& rng, bool randomize) { // Fill single particle histograms for (auto const& part : SliceParticle) { - ParticleHistManager.fill(part); + ParticleHistManager.fill(part, TrackTable); } - std::uniform_real_distribution dist(0.f, 1.f); - for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(SliceParticle, SliceParticle))) { - // Close pair rejection if (CprManager.isActivated()) { - CprManager.setPair(p1, p2); + CprManager.setPair(p1, p2, TrackTable); if (CprManager.isClosePair()) { continue; } } CprManager.fill(); - // Randomize pair order if enabled float threshold = 0.5f; bool swapPair = randomize ? (dist(rng) > threshold) : false; @@ -71,50 +69,7 @@ void processSameEvent(const T1& SliceParticle, } } -// process same event for non-identical tracks -template -void processSameEvent(T1& SliceParticle1, - T2& SliceParticle2, - T3& ParticleHistManager1, - T4& ParticleHistManager2, - T5& PairHistManager, - T6& CprManager, - T7& PcManager) -{ - // Fill single particle histograms - for (auto const& part : SliceParticle1) { - ParticleHistManager1.fill(part); - } - - for (auto const& part : SliceParticle2) { - ParticleHistManager2.fill(part); - } - - for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(SliceParticle1, SliceParticle2))) { - // pair cleaning - if (!PcManager.isCleanPair(p1, p2)) { - continue; - } - // Close pair rejection - if (CprManager.isActivated()) { - CprManager.setPair(p1, p2); - if (CprManager.isClosePair()) { - continue; - } - } - CprManager.fill(); - PairHistManager.setPair(p1, p2); - PairHistManager.fill(); - } -} - -// process same event for tracks and particles decaying into tracks +// process same event for non-identical particles template -void processSameEvent(T1& SliceParticle1, - T2& SliceParticle2, - T3& TrackTable, +void processSameEvent(T1 const& SliceParticle1, + T2 const& SliceParticle2, + T3 const& TrackTable, T4& ParticleHistManager1, T5& ParticleHistManager2, T6& PairHistManager, @@ -134,13 +89,11 @@ void processSameEvent(T1& SliceParticle1, { // Fill single particle histograms for (auto const& part : SliceParticle1) { - ParticleHistManager1.fill(part); + ParticleHistManager1.fill(part, TrackTable); } - for (auto const& part : SliceParticle2) { ParticleHistManager2.fill(part, TrackTable); } - for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(SliceParticle1, SliceParticle2))) { // pair cleaning if (!PcManager.isCleanPair(p1, p2, TrackTable)) { @@ -159,54 +112,52 @@ void processSameEvent(T1& SliceParticle1, } } -// process mixed event identical tracks -template -void processMixedEvent(T1& Collisions, - T2& Partition, - T3& cache, - T4& policy, - T5& depth, - T6& PairHistManager, - T7& CprManager, - T8& PcManager) -{ - for (auto const& [collision1, collision2] : o2::soa::selfCombinations(policy, depth, -1, Collisions, Collisions)) { - if (!(std::fabs(collision1.magField() - collision2.magField()) < o2::constants::math::Epsilon)) { - continue; - } - CprManager.setMagField(collision1.magField()); - auto sliceParticle1 = Partition->sliceByCached(o2::aod::femtobase::stored::fColId, collision1.globalIndex(), cache); - auto sliceParticle2 = Partition->sliceByCached(o2::aod::femtobase::stored::fColId, collision2.globalIndex(), cache); - if (sliceParticle1.size() == 0 || sliceParticle2.size() == 0) { - continue; - } - for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(sliceParticle1, sliceParticle2))) { - // pair cleaning - if (!PcManager.isCleanPair(p1, p2)) { - continue; - } - // Close pair rejection - if (CprManager.isActivated()) { - CprManager.setPair(p1, p2); - if (CprManager.isClosePair()) { - continue; - } - } - CprManager.fill(); - PairHistManager.setPair(p1, p2); - PairHistManager.fill(); - } - } -} +// process same event for tracks and particles decaying into tracks +// template +// void processSameEvent(T1& SliceParticle1, +// T2& SliceParticle2, +// T3& TrackTable, +// T4& ParticleHistManager1, +// T5& ParticleHistManager2, +// T6& PairHistManager, +// T7& CprManager, +// T8& PcManager) +// { +// // Fill single particle histograms +// for (auto const& part : SliceParticle1) { +// ParticleHistManager1.fill(part); +// } +// +// for (auto const& part : SliceParticle2) { +// ParticleHistManager2.fill(part, TrackTable); +// } +// +// for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(SliceParticle1, SliceParticle2))) { +// // pair cleaning +// if (!PcManager.isCleanPair(p1, p2, TrackTable)) { +// continue; +// } +// // Close pair rejection +// if (CprManager.isActivated()) { +// CprManager.setPair(p1, p2, TrackTable); +// if (CprManager.isClosePair()) { +// continue; +// } +// } +// CprManager.fill(); +// PairHistManager.setPair(p1, p2); +// PairHistManager.fill(); +// } +// } -// process mixed event different tracks +// process mixed event for identical particles template void processMixedEvent(T1& Collisions, - T2& Partition1, - T3& Partition2, + T2& Partition, + T3& TrackTable, T4& cache, T5& policy, T6& depth, @@ -231,19 +182,19 @@ void processMixedEvent(T1& Collisions, continue; } CprManager.setMagField(collision1.magField()); - auto sliceParticle1 = Partition1->sliceByCached(o2::aod::femtobase::stored::fColId, collision1.globalIndex(), cache); - auto sliceParticle2 = Partition2->sliceByCached(o2::aod::femtobase::stored::fColId, collision2.globalIndex(), cache); + auto sliceParticle1 = Partition->sliceByCached(o2::aod::femtobase::stored::fColId, collision1.globalIndex(), cache); + auto sliceParticle2 = Partition->sliceByCached(o2::aod::femtobase::stored::fColId, collision2.globalIndex(), cache); if (sliceParticle1.size() == 0 || sliceParticle2.size() == 0) { continue; } for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(sliceParticle1, sliceParticle2))) { // pair cleaning - if (!PcManager.isCleanPair(p1, p2)) { + if (!PcManager.isCleanPair(p1, p2, TrackTable)) { continue; } // Close pair rejection if (CprManager.isActivated()) { - CprManager.setPair(p1, p2); + CprManager.setPair(p1, p2, TrackTable); if (CprManager.isClosePair()) { continue; } @@ -255,7 +206,7 @@ void processMixedEvent(T1& Collisions, } } -// process mixed event for track and particles decaying into tracks +// process mixed event different particles template +// void processMixedEvent(T1& Collisions, +// T2& Partition1, +// T3& Partition2, +// T4& TrackTable, +// T5& cache, +// T6& policy, +// T7& depth, +// T8& PairHistManager, +// T9& CprManager, +// T10& PcManager) +// { +// for (auto const& [collision1, collision2] : o2::soa::selfCombinations(policy, depth, -1, Collisions, Collisions)) { +// if (!(std::fabs(collision1.magField() - collision2.magField()) < o2::constants::math::Epsilon)) { +// continue; +// } +// CprManager.setMagField(collision1.magField()); +// auto sliceParticle1 = Partition1->sliceByCached(o2::aod::femtobase::stored::fColId, collision1.globalIndex(), cache); +// auto sliceParticle2 = Partition2->sliceByCached(o2::aod::femtobase::stored::fColId, collision2.globalIndex(), cache); +// if (sliceParticle1.size() == 0 || sliceParticle2.size() == 0) { +// continue; +// } +// for (auto const& [p1, p2] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(sliceParticle1, sliceParticle2))) { +// // pair cleaning +// if (!PcManager.isCleanPair(p1, p2, TrackTable)) { +// continue; +// } +// // Close pair rejection +// if (CprManager.isActivated()) { +// CprManager.setPair(p1, p2, TrackTable); +// if (CprManager.isClosePair()) { +// continue; +// } +// } +// CprManager.fill(); +// PairHistManager.setPair(p1, p2); +// PairHistManager.fill(); +// } +// } +// } } // namespace pairprocesshelpers } // namespace o2::analysis::femto diff --git a/PWGCF/Femto/Core/trackHistManager.h b/PWGCF/Femto/Core/trackHistManager.h index 3d3bd8ac6bb..73016325cb4 100644 --- a/PWGCF/Femto/Core/trackHistManager.h +++ b/PWGCF/Femto/Core/trackHistManager.h @@ -384,8 +384,10 @@ constexpr char PrefixResonanceNegDaughter[] = "ResonanceNegDau/"; constexpr char PrefixResonancePosDaughterQa[] = "ResonancePosDauQa/"; constexpr char PrefixResonanceNegDaughterQa[] = "ResonanceNegDauQa/"; -constexpr char PrefixV0PosDaughter[] = "V0PosDau/"; -constexpr char PrefixV0NegDaughter[] = "V0NegDau/"; +constexpr char PrefixV0PosDaughter1[] = "V0PosDau1/"; +constexpr char PrefixV0NegDaughter1[] = "V0NegDau1/"; +constexpr char PrefixV0PosDaughter2[] = "V0PosDau2/"; +constexpr char PrefixV0NegDaughter2[] = "V0NegDau2/"; constexpr char PrefixV0PosDaughterQa[] = "V0PosDauQa/"; constexpr char PrefixV0NegDaughterQa[] = "V0NegDauQa/"; @@ -421,126 +423,126 @@ class TrackHistManager if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) { std::string analysisDir = std::string(prefix) + std::string(AnalysisDir); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt, HistTable), GetHistDesc(kPt, HistTable), GetHistType(kPt, HistTable), {Specs[kPt]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kEta, HistTable), GetHistDesc(kEta, HistTable), GetHistType(kEta, HistTable), {Specs[kEta]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPhi, HistTable), GetHistDesc(kPhi, HistTable), GetHistType(kPhi, HistTable), {Specs[kPhi]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kSign, HistTable), GetHistDesc(kSign, HistTable), GetHistType(kSign, HistTable), {Specs[kSign]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt, HistTable), getHistDesc(kPt, HistTable), getHistType(kPt, HistTable), {Specs[kPt]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kEta, HistTable), getHistDesc(kEta, HistTable), getHistType(kEta, HistTable), {Specs[kEta]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPhi, HistTable), getHistDesc(kPhi, HistTable), getHistType(kPhi, HistTable), {Specs[kPhi]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kSign, HistTable), getHistDesc(kSign, HistTable), getHistType(kSign, HistTable), {Specs[kSign]}); } if constexpr (isFlagSet(mode, modes::Mode::kQa)) { std::string qaDir = std::string(prefix) + std::string(QaDir); - mHistogramRegistry->add(qaDir + GetHistNamev2(kItsCluster, HistTable), GetHistDesc(kItsCluster, HistTable), GetHistType(kItsCluster, HistTable), {Specs[kItsCluster]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kItsClusterIb, HistTable), GetHistDesc(kItsClusterIb, HistTable), GetHistType(kItsClusterIb, HistTable), {Specs[kItsClusterIb]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kTpcCrossedRows, HistTable), GetHistDesc(kTpcCrossedRows, HistTable), GetHistType(kTpcCrossedRows, HistTable), {Specs[kTpcCrossedRows]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kTpcCluster, HistTable), GetHistDesc(kTpcCluster, HistTable), GetHistType(kTpcCluster, HistTable), {Specs[kTpcCluster]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kTpcClusterOverCrossedRows, HistTable), GetHistDesc(kTpcClusterOverCrossedRows, HistTable), GetHistType(kTpcClusterOverCrossedRows, HistTable), {Specs[kTpcClusterOverCrossedRows]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kTpcClusterShared, HistTable), GetHistDesc(kTpcClusterShared, HistTable), GetHistType(kTpcClusterShared, HistTable), {Specs[kTpcClusterShared]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kTpcClusterFractionShared, HistTable), GetHistDesc(kTpcClusterFractionShared, HistTable), GetHistType(kTpcClusterFractionShared, HistTable), {Specs[kTpcClusterFractionShared]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kItsCluster, HistTable), getHistDesc(kItsCluster, HistTable), getHistType(kItsCluster, HistTable), {Specs[kItsCluster]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kItsClusterIb, HistTable), getHistDesc(kItsClusterIb, HistTable), getHistType(kItsClusterIb, HistTable), {Specs[kItsClusterIb]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kTpcCrossedRows, HistTable), getHistDesc(kTpcCrossedRows, HistTable), getHistType(kTpcCrossedRows, HistTable), {Specs[kTpcCrossedRows]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kTpcCluster, HistTable), getHistDesc(kTpcCluster, HistTable), getHistType(kTpcCluster, HistTable), {Specs[kTpcCluster]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kTpcClusterOverCrossedRows, HistTable), getHistDesc(kTpcClusterOverCrossedRows, HistTable), getHistType(kTpcClusterOverCrossedRows, HistTable), {Specs[kTpcClusterOverCrossedRows]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kTpcClusterShared, HistTable), getHistDesc(kTpcClusterShared, HistTable), getHistType(kTpcClusterShared, HistTable), {Specs[kTpcClusterShared]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kTpcClusterFractionShared, HistTable), getHistDesc(kTpcClusterFractionShared, HistTable), getHistType(kTpcClusterFractionShared, HistTable), {Specs[kTpcClusterFractionShared]}); // qa 2d - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsEta, HistTable), GetHistDesc(kPtVsEta, HistTable), GetHistType(kPtVsEta, HistTable), {Specs[kPtVsEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsPhi, HistTable), GetHistDesc(kPtVsPhi, HistTable), GetHistType(kPtVsPhi, HistTable), {Specs[kPtVsPhi]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPhiVsEta, HistTable), GetHistDesc(kPhiVsEta, HistTable), GetHistType(kPhiVsEta, HistTable), {Specs[kPhiVsEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsItsCluster, HistTable), GetHistDesc(kPtVsItsCluster, HistTable), GetHistType(kPtVsItsCluster, HistTable), {Specs[kPtVsItsCluster]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsTpcCluster, HistTable), GetHistDesc(kPtVsTpcCluster, HistTable), GetHistType(kPtVsTpcCluster, HistTable), {Specs[kPtVsTpcCluster]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsTpcCrossedRows, HistTable), GetHistDesc(kPtVsTpcCrossedRows, HistTable), GetHistType(kPtVsTpcCrossedRows, HistTable), {Specs[kPtVsTpcCrossedRows]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsTpcClusterOverCrossedRows, HistTable), GetHistDesc(kPtVsTpcClusterOverCrossedRows, HistTable), GetHistType(kPtVsTpcClusterOverCrossedRows, HistTable), {Specs[kPtVsTpcClusterOverCrossedRows]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsTpcClusterShared, HistTable), GetHistDesc(kPtVsTpcClusterShared, HistTable), GetHistType(kPtVsTpcClusterShared, HistTable), {Specs[kPtVsTpcClusterShared]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsTpcClusterFractionShared, HistTable), GetHistDesc(kPtVsTpcClusterFractionShared, HistTable), GetHistType(kPtVsTpcClusterFractionShared, HistTable), {Specs[kPtVsTpcClusterFractionShared]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kTpcClusterVsTpcCrossedRows, HistTable), GetHistDesc(kTpcClusterVsTpcCrossedRows, HistTable), GetHistType(kTpcClusterVsTpcCrossedRows, HistTable), {Specs[kTpcClusterVsTpcCrossedRows]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kTpcClusterVsTpcClusterShared, HistTable), GetHistDesc(kTpcClusterVsTpcClusterShared, HistTable), GetHistType(kTpcClusterVsTpcClusterShared, HistTable), {Specs[kTpcClusterVsTpcClusterShared]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsEta, HistTable), getHistDesc(kPtVsEta, HistTable), getHistType(kPtVsEta, HistTable), {Specs[kPtVsEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsPhi, HistTable), getHistDesc(kPtVsPhi, HistTable), getHistType(kPtVsPhi, HistTable), {Specs[kPtVsPhi]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPhiVsEta, HistTable), getHistDesc(kPhiVsEta, HistTable), getHistType(kPhiVsEta, HistTable), {Specs[kPhiVsEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsItsCluster, HistTable), getHistDesc(kPtVsItsCluster, HistTable), getHistType(kPtVsItsCluster, HistTable), {Specs[kPtVsItsCluster]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsTpcCluster, HistTable), getHistDesc(kPtVsTpcCluster, HistTable), getHistType(kPtVsTpcCluster, HistTable), {Specs[kPtVsTpcCluster]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsTpcCrossedRows, HistTable), getHistDesc(kPtVsTpcCrossedRows, HistTable), getHistType(kPtVsTpcCrossedRows, HistTable), {Specs[kPtVsTpcCrossedRows]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsTpcClusterOverCrossedRows, HistTable), getHistDesc(kPtVsTpcClusterOverCrossedRows, HistTable), getHistType(kPtVsTpcClusterOverCrossedRows, HistTable), {Specs[kPtVsTpcClusterOverCrossedRows]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsTpcClusterShared, HistTable), getHistDesc(kPtVsTpcClusterShared, HistTable), getHistType(kPtVsTpcClusterShared, HistTable), {Specs[kPtVsTpcClusterShared]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsTpcClusterFractionShared, HistTable), getHistDesc(kPtVsTpcClusterFractionShared, HistTable), getHistType(kPtVsTpcClusterFractionShared, HistTable), {Specs[kPtVsTpcClusterFractionShared]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kTpcClusterVsTpcCrossedRows, HistTable), getHistDesc(kTpcClusterVsTpcCrossedRows, HistTable), getHistType(kTpcClusterVsTpcCrossedRows, HistTable), {Specs[kTpcClusterVsTpcCrossedRows]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kTpcClusterVsTpcClusterShared, HistTable), getHistDesc(kTpcClusterVsTpcClusterShared, HistTable), getHistType(kTpcClusterVsTpcClusterShared, HistTable), {Specs[kTpcClusterVsTpcClusterShared]}); // dca - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsDcaxy, HistTable), GetHistDesc(kPtVsDcaxy, HistTable), GetHistType(kPtVsDcaxy, HistTable), {Specs[kPtVsDcaxy]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsDcaz, HistTable), GetHistDesc(kPtVsDcaz, HistTable), GetHistType(kPtVsDcaz, HistTable), {Specs[kPtVsDcaz]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsDca, HistTable), GetHistDesc(kPtVsDca, HistTable), GetHistType(kPtVsDca, HistTable), {Specs[kPtVsDca]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsDcaxy, HistTable), getHistDesc(kPtVsDcaxy, HistTable), getHistType(kPtVsDcaxy, HistTable), {Specs[kPtVsDcaxy]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsDcaz, HistTable), getHistDesc(kPtVsDcaz, HistTable), getHistType(kPtVsDcaz, HistTable), {Specs[kPtVsDcaz]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsDca, HistTable), getHistDesc(kPtVsDca, HistTable), getHistType(kPtVsDca, HistTable), {Specs[kPtVsDca]}); std::string pidDir = std::string(prefix) + std::string(PidDir); mMomentumType = static_cast(momentumTypeForPid); - mHistogramRegistry->add(pidDir + GetHistNamev2(kItsSignal, HistTable), GetHistDesc(kItsSignal, HistTable), GetHistType(kItsSignal, HistTable), {Specs[kItsSignal]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kItsElectron, HistTable), GetHistDesc(kItsElectron, HistTable), GetHistType(kItsElectron, HistTable), {Specs[kItsElectron]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kItsPion, HistTable), GetHistDesc(kItsPion, HistTable), GetHistType(kItsPion, HistTable), {Specs[kItsPion]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kItsKaon, HistTable), GetHistDesc(kItsKaon, HistTable), GetHistType(kItsKaon, HistTable), {Specs[kItsKaon]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kItsProton, HistTable), GetHistDesc(kItsProton, HistTable), GetHistType(kItsProton, HistTable), {Specs[kItsProton]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kItsDeuteron, HistTable), GetHistDesc(kItsDeuteron, HistTable), GetHistType(kItsDeuteron, HistTable), {Specs[kItsDeuteron]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kItsTriton, HistTable), GetHistDesc(kItsTriton, HistTable), GetHistType(kItsTriton, HistTable), {Specs[kItsTriton]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kItsHelium, HistTable), GetHistDesc(kItsHelium, HistTable), GetHistType(kItsHelium, HistTable), {Specs[kItsHelium]}); - - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcSignal, HistTable), GetHistDesc(kTpcSignal, HistTable), GetHistType(kTpcSignal, HistTable), {Specs[kTpcSignal]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcElectron, HistTable), GetHistDesc(kTpcElectron, HistTable), GetHistType(kTpcElectron, HistTable), {Specs[kTpcElectron]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcPion, HistTable), GetHistDesc(kTpcPion, HistTable), GetHistType(kTpcPion, HistTable), {Specs[kTpcPion]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcKaon, HistTable), GetHistDesc(kTpcKaon, HistTable), GetHistType(kTpcKaon, HistTable), {Specs[kTpcKaon]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcProton, HistTable), GetHistDesc(kTpcProton, HistTable), GetHistType(kTpcProton, HistTable), {Specs[kTpcProton]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcDeuteron, HistTable), GetHistDesc(kTpcDeuteron, HistTable), GetHistType(kTpcDeuteron, HistTable), {Specs[kTpcDeuteron]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcTriton, HistTable), GetHistDesc(kTpcTriton, HistTable), GetHistType(kTpcTriton, HistTable), {Specs[kTpcTriton]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcHelium, HistTable), GetHistDesc(kTpcHelium, HistTable), GetHistType(kTpcHelium, HistTable), {Specs[kTpcHelium]}); - - mHistogramRegistry->add(pidDir + GetHistNamev2(kTofBeta, HistTable), GetHistDesc(kTofBeta, HistTable), GetHistType(kTofBeta, HistTable), {Specs[kTofBeta]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTofMass, HistTable), GetHistDesc(kTofMass, HistTable), GetHistType(kTofMass, HistTable), {Specs[kTofMass]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTofElectron, HistTable), GetHistDesc(kTofElectron, HistTable), GetHistType(kTofElectron, HistTable), {Specs[kTofElectron]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTofPion, HistTable), GetHistDesc(kTofPion, HistTable), GetHistType(kTofPion, HistTable), {Specs[kTofPion]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTofKaon, HistTable), GetHistDesc(kTofKaon, HistTable), GetHistType(kTofKaon, HistTable), {Specs[kTofKaon]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTofProton, HistTable), GetHistDesc(kTofProton, HistTable), GetHistType(kTofProton, HistTable), {Specs[kTofProton]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTofDeuteron, HistTable), GetHistDesc(kTofDeuteron, HistTable), GetHistType(kTofDeuteron, HistTable), {Specs[kTofDeuteron]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTofTriton, HistTable), GetHistDesc(kTofTriton, HistTable), GetHistType(kTofTriton, HistTable), {Specs[kTofTriton]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTofHelium, HistTable), GetHistDesc(kTofHelium, HistTable), GetHistType(kTofHelium, HistTable), {Specs[kTofHelium]}); - - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcitsElectron, HistTable), GetHistDesc(kTpcitsElectron, HistTable), GetHistType(kTpcitsElectron, HistTable), {Specs[kTpcitsElectron]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcitsPion, HistTable), GetHistDesc(kTpcitsPion, HistTable), GetHistType(kTpcitsPion, HistTable), {Specs[kTpcitsPion]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcitsKaon, HistTable), GetHistDesc(kTpcitsKaon, HistTable), GetHistType(kTpcitsKaon, HistTable), {Specs[kTpcitsKaon]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcitsProton, HistTable), GetHistDesc(kTpcitsProton, HistTable), GetHistType(kTpcitsProton, HistTable), {Specs[kTpcitsProton]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcitsDeuteron, HistTable), GetHistDesc(kTpcitsDeuteron, HistTable), GetHistType(kTpcitsDeuteron, HistTable), {Specs[kTpcitsDeuteron]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcitsTriton, HistTable), GetHistDesc(kTpcitsTriton, HistTable), GetHistType(kTpcitsTriton, HistTable), {Specs[kTpcitsTriton]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpcitsHelium, HistTable), GetHistDesc(kTpcitsHelium, HistTable), GetHistType(kTpcitsHelium, HistTable), {Specs[kTpcitsHelium]}); - - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpctofElectron, HistTable), GetHistDesc(kTpctofElectron, HistTable), GetHistType(kTpctofElectron, HistTable), {Specs[kTpctofElectron]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpctofPion, HistTable), GetHistDesc(kTpctofPion, HistTable), GetHistType(kTpctofPion, HistTable), {Specs[kTpctofPion]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpctofKaon, HistTable), GetHistDesc(kTpctofKaon, HistTable), GetHistType(kTpctofKaon, HistTable), {Specs[kTpctofKaon]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpctofProton, HistTable), GetHistDesc(kTpctofProton, HistTable), GetHistType(kTpctofProton, HistTable), {Specs[kTpctofProton]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpctofDeuteron, HistTable), GetHistDesc(kTpctofDeuteron, HistTable), GetHistType(kTpctofDeuteron, HistTable), {Specs[kTpctofDeuteron]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpctofTriton, HistTable), GetHistDesc(kTpctofTriton, HistTable), GetHistType(kTpctofTriton, HistTable), {Specs[kTpctofTriton]}); - mHistogramRegistry->add(pidDir + GetHistNamev2(kTpctofHelium, HistTable), GetHistDesc(kTpctofHelium, HistTable), GetHistType(kTpctofHelium, HistTable), {Specs[kTpctofHelium]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kItsSignal, HistTable), getHistDesc(kItsSignal, HistTable), getHistType(kItsSignal, HistTable), {Specs[kItsSignal]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kItsElectron, HistTable), getHistDesc(kItsElectron, HistTable), getHistType(kItsElectron, HistTable), {Specs[kItsElectron]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kItsPion, HistTable), getHistDesc(kItsPion, HistTable), getHistType(kItsPion, HistTable), {Specs[kItsPion]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kItsKaon, HistTable), getHistDesc(kItsKaon, HistTable), getHistType(kItsKaon, HistTable), {Specs[kItsKaon]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kItsProton, HistTable), getHistDesc(kItsProton, HistTable), getHistType(kItsProton, HistTable), {Specs[kItsProton]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kItsDeuteron, HistTable), getHistDesc(kItsDeuteron, HistTable), getHistType(kItsDeuteron, HistTable), {Specs[kItsDeuteron]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kItsTriton, HistTable), getHistDesc(kItsTriton, HistTable), getHistType(kItsTriton, HistTable), {Specs[kItsTriton]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kItsHelium, HistTable), getHistDesc(kItsHelium, HistTable), getHistType(kItsHelium, HistTable), {Specs[kItsHelium]}); + + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcSignal, HistTable), getHistDesc(kTpcSignal, HistTable), getHistType(kTpcSignal, HistTable), {Specs[kTpcSignal]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcElectron, HistTable), getHistDesc(kTpcElectron, HistTable), getHistType(kTpcElectron, HistTable), {Specs[kTpcElectron]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcPion, HistTable), getHistDesc(kTpcPion, HistTable), getHistType(kTpcPion, HistTable), {Specs[kTpcPion]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcKaon, HistTable), getHistDesc(kTpcKaon, HistTable), getHistType(kTpcKaon, HistTable), {Specs[kTpcKaon]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcProton, HistTable), getHistDesc(kTpcProton, HistTable), getHistType(kTpcProton, HistTable), {Specs[kTpcProton]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcDeuteron, HistTable), getHistDesc(kTpcDeuteron, HistTable), getHistType(kTpcDeuteron, HistTable), {Specs[kTpcDeuteron]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcTriton, HistTable), getHistDesc(kTpcTriton, HistTable), getHistType(kTpcTriton, HistTable), {Specs[kTpcTriton]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcHelium, HistTable), getHistDesc(kTpcHelium, HistTable), getHistType(kTpcHelium, HistTable), {Specs[kTpcHelium]}); + + mHistogramRegistry->add(pidDir + getHistNameV2(kTofBeta, HistTable), getHistDesc(kTofBeta, HistTable), getHistType(kTofBeta, HistTable), {Specs[kTofBeta]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTofMass, HistTable), getHistDesc(kTofMass, HistTable), getHistType(kTofMass, HistTable), {Specs[kTofMass]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTofElectron, HistTable), getHistDesc(kTofElectron, HistTable), getHistType(kTofElectron, HistTable), {Specs[kTofElectron]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTofPion, HistTable), getHistDesc(kTofPion, HistTable), getHistType(kTofPion, HistTable), {Specs[kTofPion]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTofKaon, HistTable), getHistDesc(kTofKaon, HistTable), getHistType(kTofKaon, HistTable), {Specs[kTofKaon]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTofProton, HistTable), getHistDesc(kTofProton, HistTable), getHistType(kTofProton, HistTable), {Specs[kTofProton]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTofDeuteron, HistTable), getHistDesc(kTofDeuteron, HistTable), getHistType(kTofDeuteron, HistTable), {Specs[kTofDeuteron]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTofTriton, HistTable), getHistDesc(kTofTriton, HistTable), getHistType(kTofTriton, HistTable), {Specs[kTofTriton]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTofHelium, HistTable), getHistDesc(kTofHelium, HistTable), getHistType(kTofHelium, HistTable), {Specs[kTofHelium]}); + + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcitsElectron, HistTable), getHistDesc(kTpcitsElectron, HistTable), getHistType(kTpcitsElectron, HistTable), {Specs[kTpcitsElectron]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcitsPion, HistTable), getHistDesc(kTpcitsPion, HistTable), getHistType(kTpcitsPion, HistTable), {Specs[kTpcitsPion]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcitsKaon, HistTable), getHistDesc(kTpcitsKaon, HistTable), getHistType(kTpcitsKaon, HistTable), {Specs[kTpcitsKaon]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcitsProton, HistTable), getHistDesc(kTpcitsProton, HistTable), getHistType(kTpcitsProton, HistTable), {Specs[kTpcitsProton]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcitsDeuteron, HistTable), getHistDesc(kTpcitsDeuteron, HistTable), getHistType(kTpcitsDeuteron, HistTable), {Specs[kTpcitsDeuteron]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcitsTriton, HistTable), getHistDesc(kTpcitsTriton, HistTable), getHistType(kTpcitsTriton, HistTable), {Specs[kTpcitsTriton]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpcitsHelium, HistTable), getHistDesc(kTpcitsHelium, HistTable), getHistType(kTpcitsHelium, HistTable), {Specs[kTpcitsHelium]}); + + mHistogramRegistry->add(pidDir + getHistNameV2(kTpctofElectron, HistTable), getHistDesc(kTpctofElectron, HistTable), getHistType(kTpctofElectron, HistTable), {Specs[kTpctofElectron]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpctofPion, HistTable), getHistDesc(kTpctofPion, HistTable), getHistType(kTpctofPion, HistTable), {Specs[kTpctofPion]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpctofKaon, HistTable), getHistDesc(kTpctofKaon, HistTable), getHistType(kTpctofKaon, HistTable), {Specs[kTpctofKaon]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpctofProton, HistTable), getHistDesc(kTpctofProton, HistTable), getHistType(kTpctofProton, HistTable), {Specs[kTpctofProton]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpctofDeuteron, HistTable), getHistDesc(kTpctofDeuteron, HistTable), getHistType(kTpctofDeuteron, HistTable), {Specs[kTpctofDeuteron]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpctofTriton, HistTable), getHistDesc(kTpctofTriton, HistTable), getHistType(kTpctofTriton, HistTable), {Specs[kTpctofTriton]}); + mHistogramRegistry->add(pidDir + getHistNameV2(kTpctofHelium, HistTable), getHistDesc(kTpctofHelium, HistTable), getHistType(kTpctofHelium, HistTable), {Specs[kTpctofHelium]}); } } - template - void fill(T const& track) + template + void fill(T1 const& track, T2 const& /*trackTable*/) { if constexpr (isFlagSet(mode, modes::Mode::kAnalysis)) { - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt, HistTable)), mAbsCharge * track.pt()); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kEta, HistTable)), track.eta()); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPhi, HistTable)), track.phi()); - mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(GetHistName(kSign, HistTable)), track.sign()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kPt, HistTable)), mAbsCharge * track.pt()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kEta, HistTable)), track.eta()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kPhi, HistTable)), track.phi()); + mHistogramRegistry->fill(HIST(prefix) + HIST(AnalysisDir) + HIST(getHistName(kSign, HistTable)), track.sign()); } if constexpr (isFlagSet(mode, modes::Mode::kQa)) { - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kItsCluster, HistTable)), static_cast(track.itsNCls())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kItsClusterIb, HistTable)), static_cast(track.itsNClsInnerBarrel())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kTpcCrossedRows, HistTable)), static_cast(track.tpcNClsCrossedRows())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kTpcCluster, HistTable)), static_cast(track.tpcNClsFound())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kTpcClusterOverCrossedRows, HistTable)), static_cast(track.tpcNClsFound()) / static_cast(track.tpcNClsCrossedRows())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kTpcClusterShared, HistTable)), static_cast(track.tpcNClsShared())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kTpcClusterFractionShared, HistTable)), track.tpcSharedOverFound()); - - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsEta, HistTable)), mAbsCharge * track.pt(), track.eta()); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsPhi, HistTable)), mAbsCharge * track.pt(), track.phi()); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPhiVsEta, HistTable)), track.phi(), track.eta()); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsItsCluster, HistTable)), mAbsCharge * track.pt(), static_cast(track.itsNCls())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsTpcCluster, HistTable)), mAbsCharge * track.pt(), static_cast(track.tpcNClsFound())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsTpcCrossedRows, HistTable)), mAbsCharge * track.pt(), static_cast(track.tpcNClsCrossedRows())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsTpcClusterOverCrossedRows, HistTable)), mAbsCharge * track.pt(), static_cast(track.tpcNClsFound()) / static_cast(track.tpcNClsCrossedRows())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsTpcClusterShared, HistTable)), mAbsCharge * track.pt(), static_cast(track.tpcNClsShared())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsTpcClusterFractionShared, HistTable)), mAbsCharge * track.pt(), static_cast(track.tpcNClsShared()) / static_cast(track.tpcNClsFound())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kTpcClusterVsTpcCrossedRows, HistTable)), static_cast(track.tpcNClsFound()), static_cast(track.tpcNClsCrossedRows())); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kTpcClusterVsTpcClusterShared, HistTable)), static_cast(track.tpcNClsFound()), static_cast(track.tpcNClsShared())); - - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsDcaxy, HistTable)), mAbsCharge * track.pt(), track.dcaXY()); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsDcaz, HistTable)), mAbsCharge * track.pt(), track.dcaZ()); - mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsDca, HistTable)), mAbsCharge * track.pt(), track.dca()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kItsCluster, HistTable)), static_cast(track.itsNCls())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kItsClusterIb, HistTable)), static_cast(track.itsNClsInnerBarrel())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kTpcCrossedRows, HistTable)), static_cast(track.tpcNClsCrossedRows())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kTpcCluster, HistTable)), static_cast(track.tpcNClsFound())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kTpcClusterOverCrossedRows, HistTable)), static_cast(track.tpcNClsFound()) / static_cast(track.tpcNClsCrossedRows())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kTpcClusterShared, HistTable)), static_cast(track.tpcNClsShared())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kTpcClusterFractionShared, HistTable)), track.tpcSharedOverFound()); + + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsEta, HistTable)), mAbsCharge * track.pt(), track.eta()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsPhi, HistTable)), mAbsCharge * track.pt(), track.phi()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPhiVsEta, HistTable)), track.phi(), track.eta()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsItsCluster, HistTable)), mAbsCharge * track.pt(), static_cast(track.itsNCls())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsTpcCluster, HistTable)), mAbsCharge * track.pt(), static_cast(track.tpcNClsFound())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsTpcCrossedRows, HistTable)), mAbsCharge * track.pt(), static_cast(track.tpcNClsCrossedRows())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsTpcClusterOverCrossedRows, HistTable)), mAbsCharge * track.pt(), static_cast(track.tpcNClsFound()) / static_cast(track.tpcNClsCrossedRows())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsTpcClusterShared, HistTable)), mAbsCharge * track.pt(), static_cast(track.tpcNClsShared())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsTpcClusterFractionShared, HistTable)), mAbsCharge * track.pt(), static_cast(track.tpcNClsShared()) / static_cast(track.tpcNClsFound())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kTpcClusterVsTpcCrossedRows, HistTable)), static_cast(track.tpcNClsFound()), static_cast(track.tpcNClsCrossedRows())); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kTpcClusterVsTpcClusterShared, HistTable)), static_cast(track.tpcNClsFound()), static_cast(track.tpcNClsShared())); + + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsDcaxy, HistTable)), mAbsCharge * track.pt(), track.dcaXY()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsDcaz, HistTable)), mAbsCharge * track.pt(), track.dcaZ()); + mHistogramRegistry->fill(HIST(prefix) + HIST(QaDir) + HIST(getHistName(kPtVsDca, HistTable)), mAbsCharge * track.pt(), track.dca()); float momentum = 0.f; if (mMomentumType == modes::MomentumType::kPAtPv) { @@ -549,49 +551,49 @@ class TrackHistManager momentum = mAbsCharge * track.pt(); } - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kItsSignal, HistTable)), momentum, o2::analysis::femto::utils::itsSignal(track)); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kItsElectron, HistTable)), momentum, track.itsNSigmaEl()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kItsPion, HistTable)), momentum, track.itsNSigmaPi()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kItsKaon, HistTable)), momentum, track.itsNSigmaKa()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kItsProton, HistTable)), momentum, track.itsNSigmaPr()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kItsDeuteron, HistTable)), momentum, track.itsNSigmaDe()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kItsTriton, HistTable)), momentum, track.itsNSigmaTr()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kItsHelium, HistTable)), momentum, track.itsNSigmaHe()); - - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcSignal, HistTable)), momentum, track.tpcSignal()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcElectron, HistTable)), momentum, track.tpcNSigmaEl()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcPion, HistTable)), momentum, track.tpcNSigmaPi()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcKaon, HistTable)), momentum, track.tpcNSigmaKa()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcProton, HistTable)), momentum, track.tpcNSigmaPr()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcDeuteron, HistTable)), momentum, track.tpcNSigmaDe()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcTriton, HistTable)), momentum, track.tpcNSigmaTr()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcHelium, HistTable)), momentum, track.tpcNSigmaHe()); - - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTofBeta, HistTable)), momentum, track.tofBeta()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTofMass, HistTable)), momentum, track.tofMass()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTofElectron, HistTable)), momentum, track.tofNSigmaEl()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTofPion, HistTable)), momentum, track.tofNSigmaPi()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTofKaon, HistTable)), momentum, track.tofNSigmaKa()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTofProton, HistTable)), momentum, track.tofNSigmaPr()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTofDeuteron, HistTable)), momentum, track.tofNSigmaDe()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTofTriton, HistTable)), momentum, track.tofNSigmaTr()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTofHelium, HistTable)), momentum, track.tofNSigmaHe()); - - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcitsElectron, HistTable)), momentum, track.tpcitsNSigmaEl()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcitsPion, HistTable)), momentum, track.tpcitsNSigmaPi()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcitsKaon, HistTable)), momentum, track.tpcitsNSigmaKa()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcitsProton, HistTable)), momentum, track.tpcitsNSigmaPr()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcitsDeuteron, HistTable)), momentum, track.tpcitsNSigmaDe()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcitsTriton, HistTable)), momentum, track.tpcitsNSigmaTr()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpcitsHelium, HistTable)), momentum, track.tpcitsNSigmaHe()); - - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpctofElectron, HistTable)), momentum, track.tpctofNSigmaEl()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpctofPion, HistTable)), momentum, track.tpctofNSigmaPi()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpctofKaon, HistTable)), momentum, track.tpctofNSigmaKa()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpctofProton, HistTable)), momentum, track.tpctofNSigmaPr()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpctofDeuteron, HistTable)), momentum, track.tpctofNSigmaDe()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpctofTriton, HistTable)), momentum, track.tpctofNSigmaTr()); - mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(GetHistName(kTpctofHelium, HistTable)), momentum, track.tpctofNSigmaHe()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kItsSignal, HistTable)), momentum, o2::analysis::femto::utils::itsSignal(track)); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kItsElectron, HistTable)), momentum, track.itsNSigmaEl()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kItsPion, HistTable)), momentum, track.itsNSigmaPi()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kItsKaon, HistTable)), momentum, track.itsNSigmaKa()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kItsProton, HistTable)), momentum, track.itsNSigmaPr()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kItsDeuteron, HistTable)), momentum, track.itsNSigmaDe()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kItsTriton, HistTable)), momentum, track.itsNSigmaTr()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kItsHelium, HistTable)), momentum, track.itsNSigmaHe()); + + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcSignal, HistTable)), momentum, track.tpcSignal()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcElectron, HistTable)), momentum, track.tpcNSigmaEl()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcPion, HistTable)), momentum, track.tpcNSigmaPi()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcKaon, HistTable)), momentum, track.tpcNSigmaKa()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcProton, HistTable)), momentum, track.tpcNSigmaPr()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcDeuteron, HistTable)), momentum, track.tpcNSigmaDe()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcTriton, HistTable)), momentum, track.tpcNSigmaTr()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcHelium, HistTable)), momentum, track.tpcNSigmaHe()); + + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTofBeta, HistTable)), momentum, track.tofBeta()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTofMass, HistTable)), momentum, track.tofMass()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTofElectron, HistTable)), momentum, track.tofNSigmaEl()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTofPion, HistTable)), momentum, track.tofNSigmaPi()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTofKaon, HistTable)), momentum, track.tofNSigmaKa()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTofProton, HistTable)), momentum, track.tofNSigmaPr()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTofDeuteron, HistTable)), momentum, track.tofNSigmaDe()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTofTriton, HistTable)), momentum, track.tofNSigmaTr()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTofHelium, HistTable)), momentum, track.tofNSigmaHe()); + + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcitsElectron, HistTable)), momentum, track.tpcitsNSigmaEl()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcitsPion, HistTable)), momentum, track.tpcitsNSigmaPi()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcitsKaon, HistTable)), momentum, track.tpcitsNSigmaKa()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcitsProton, HistTable)), momentum, track.tpcitsNSigmaPr()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcitsDeuteron, HistTable)), momentum, track.tpcitsNSigmaDe()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcitsTriton, HistTable)), momentum, track.tpcitsNSigmaTr()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpcitsHelium, HistTable)), momentum, track.tpcitsNSigmaHe()); + + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpctofElectron, HistTable)), momentum, track.tpctofNSigmaEl()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpctofPion, HistTable)), momentum, track.tpctofNSigmaPi()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpctofKaon, HistTable)), momentum, track.tpctofNSigmaKa()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpctofProton, HistTable)), momentum, track.tpctofNSigmaPr()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpctofDeuteron, HistTable)), momentum, track.tpctofNSigmaDe()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpctofTriton, HistTable)), momentum, track.tpctofNSigmaTr()); + mHistogramRegistry->fill(HIST(prefix) + HIST(PidDir) + HIST(getHistName(kTpctofHelium, HistTable)), momentum, track.tpctofNSigmaHe()); } } diff --git a/PWGCF/Femto/Core/twoTrackResonanceHistManager.h b/PWGCF/Femto/Core/twoTrackResonanceHistManager.h index 1df3af003a4..38e4c6e3460 100644 --- a/PWGCF/Femto/Core/twoTrackResonanceHistManager.h +++ b/PWGCF/Femto/Core/twoTrackResonanceHistManager.h @@ -142,50 +142,50 @@ class TwoTrackResonanceHistManager if constexpr (modes::isFlagSet(mode, modes::Mode::kAnalysis)) { std::string analysisDir = std::string(resoPrefix) + std::string(AnalysisDir); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt, HistTable), GetHistDesc(kPt, HistTable), GetHistType(kPt, HistTable), {ResoSpecs[kPt]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kEta, HistTable), GetHistDesc(kEta, HistTable), GetHistType(kEta, HistTable), {ResoSpecs[kEta]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPhi, HistTable), GetHistDesc(kPhi, HistTable), GetHistType(kPhi, HistTable), {ResoSpecs[kPhi]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kMass, HistTable), GetHistDesc(kMass, HistTable), GetHistType(kMass, HistTable), {ResoSpecs[kMass]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kSign, HistTable), GetHistDesc(kSign, HistTable), GetHistType(kSign, HistTable), {ResoSpecs[kSign]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt, HistTable), getHistDesc(kPt, HistTable), getHistType(kPt, HistTable), {ResoSpecs[kPt]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kEta, HistTable), getHistDesc(kEta, HistTable), getHistType(kEta, HistTable), {ResoSpecs[kEta]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPhi, HistTable), getHistDesc(kPhi, HistTable), getHistType(kPhi, HistTable), {ResoSpecs[kPhi]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kMass, HistTable), getHistDesc(kMass, HistTable), getHistType(kMass, HistTable), {ResoSpecs[kMass]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kSign, HistTable), getHistDesc(kSign, HistTable), getHistType(kSign, HistTable), {ResoSpecs[kSign]}); } if constexpr (modes::isFlagSet(mode, modes::Mode::kQa)) { std::string qaDir = std::string(resoPrefix) + std::string(QaDir); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsEta, HistTable), GetHistDesc(kPtVsEta, HistTable), GetHistType(kPtVsEta, HistTable), {ResoSpecs[kPtVsEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsPhi, HistTable), GetHistDesc(kPtVsPhi, HistTable), GetHistType(kPtVsPhi, HistTable), {ResoSpecs[kPtVsPhi]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPhiVsEta, HistTable), GetHistDesc(kPhiVsEta, HistTable), GetHistType(kPhiVsEta, HistTable), {ResoSpecs[kPhiVsEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsMass, HistTable), GetHistDesc(kPtVsMass, HistTable), GetHistType(kPtVsMass, HistTable), {ResoSpecs[kPtVsMass]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsEta, HistTable), getHistDesc(kPtVsEta, HistTable), getHistType(kPtVsEta, HistTable), {ResoSpecs[kPtVsEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsPhi, HistTable), getHistDesc(kPtVsPhi, HistTable), getHistType(kPtVsPhi, HistTable), {ResoSpecs[kPtVsPhi]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPhiVsEta, HistTable), getHistDesc(kPhiVsEta, HistTable), getHistType(kPhiVsEta, HistTable), {ResoSpecs[kPhiVsEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsMass, HistTable), getHistDesc(kPtVsMass, HistTable), getHistType(kPtVsMass, HistTable), {ResoSpecs[kPtVsMass]}); } } template - void fill(T1 const& resonance, T2 const& /*tracks*/) + void fill(T1 const& resonance, T2 const& tracks) { auto posDaughter = resonance.template posDau_as(); - mPosDauManager.fill(posDaughter); + mPosDauManager.fill(posDaughter, tracks); auto negDaughter = resonance.template negDau_as(); - mNegDauManager.fill(negDaughter); + mNegDauManager.fill(negDaughter, tracks); if constexpr (modes::isFlagSet(mode, modes::Mode::kAnalysis)) { - mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt, HistTable)), resonance.pt()); - mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kEta, HistTable)), resonance.eta()); - mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kPhi, HistTable)), resonance.phi()); - mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kMass, HistTable)), resonance.mass()); + mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(getHistName(kPt, HistTable)), resonance.pt()); + mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(getHistName(kEta, HistTable)), resonance.eta()); + mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(getHistName(kPhi, HistTable)), resonance.phi()); + mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(getHistName(kMass, HistTable)), resonance.mass()); if constexpr (modes::isEqual(reso, modes::TwoTrackResonance::kPhi) || modes::isEqual(reso, modes::TwoTrackResonance::kRho0)) { - mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kSign, HistTable)), 0); + mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(getHistName(kSign, HistTable)), 0); } if constexpr (modes::isEqual(reso, modes::TwoTrackResonance::kKstar0) || modes::isEqual(reso, modes::TwoTrackResonance::kKstar0Bar)) { - mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(GetHistName(kSign, HistTable)), resonance.sign()); + mHistogramRegistry->fill(HIST(resoPrefix) + HIST(AnalysisDir) + HIST(getHistName(kSign, HistTable)), resonance.sign()); } } if constexpr (modes::isFlagSet(mode, modes::Mode::kQa)) { - mHistogramRegistry->fill(HIST(resoPrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsEta, HistTable)), resonance.pt(), resonance.eta()); - mHistogramRegistry->fill(HIST(resoPrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsPhi, HistTable)), resonance.pt(), resonance.phi()); - mHistogramRegistry->fill(HIST(resoPrefix) + HIST(QaDir) + HIST(GetHistName(kPhiVsEta, HistTable)), resonance.phi(), resonance.eta()); - mHistogramRegistry->fill(HIST(resoPrefix) + HIST(QaDir) + HIST(GetHistName(kPtVsMass, HistTable)), resonance.pt(), resonance.mass()); + mHistogramRegistry->fill(HIST(resoPrefix) + HIST(QaDir) + HIST(getHistName(kPtVsEta, HistTable)), resonance.pt(), resonance.eta()); + mHistogramRegistry->fill(HIST(resoPrefix) + HIST(QaDir) + HIST(getHistName(kPtVsPhi, HistTable)), resonance.pt(), resonance.phi()); + mHistogramRegistry->fill(HIST(resoPrefix) + HIST(QaDir) + HIST(getHistName(kPhiVsEta, HistTable)), resonance.phi(), resonance.eta()); + mHistogramRegistry->fill(HIST(resoPrefix) + HIST(QaDir) + HIST(getHistName(kPtVsMass, HistTable)), resonance.pt(), resonance.mass()); } } diff --git a/PWGCF/Femto/Core/v0Builder.h b/PWGCF/Femto/Core/v0Builder.h index 305759070c2..cd64c5eadec 100644 --- a/PWGCF/Femto/Core/v0Builder.h +++ b/PWGCF/Femto/Core/v0Builder.h @@ -127,7 +127,7 @@ constexpr const char PrefixLambdaSelection2[] = "LambdaSelection2"; using ConfLambdaSelection1 = ConfLambdaSelection; using ConfLambdaSelection2 = ConfLambdaSelection; constexpr const char PrefixK0shortSelection1[] = "K0shortSelection1"; -constexpr const char PrefixK0shortSelection2[] = "K0shortSelection1"; +constexpr const char PrefixK0shortSelection2[] = "K0shortSelection2"; using ConfK0shortSelection1 = ConfK0shortSelection; using ConfK0shortSelection2 = ConfK0shortSelection; diff --git a/PWGCF/Femto/Core/v0HistManager.h b/PWGCF/Femto/Core/v0HistManager.h index d767791d558..e8247cdae82 100644 --- a/PWGCF/Femto/Core/v0HistManager.h +++ b/PWGCF/Femto/Core/v0HistManager.h @@ -220,77 +220,77 @@ class V0HistManager if constexpr (modes::isFlagSet(mode, modes::Mode::kAnalysis)) { std::string analysisDir = std::string(v0Prefix) + std::string(AnalysisDir); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPt, HistTable), GetHistDesc(kPt, HistTable), GetHistType(kPt, HistTable), {V0Specs[kPt]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kEta, HistTable), GetHistDesc(kEta, HistTable), GetHistType(kEta, HistTable), {V0Specs[kEta]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kPhi, HistTable), GetHistDesc(kPhi, HistTable), GetHistType(kPhi, HistTable), {V0Specs[kPhi]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kMass, HistTable), GetHistDesc(kMass, HistTable), GetHistType(kMass, HistTable), {V0Specs[kMass]}); - mHistogramRegistry->add(analysisDir + GetHistNamev2(kSign, HistTable), GetHistDesc(kSign, HistTable), GetHistType(kSign, HistTable), {V0Specs[kSign]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPt, HistTable), getHistDesc(kPt, HistTable), getHistType(kPt, HistTable), {V0Specs[kPt]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kEta, HistTable), getHistDesc(kEta, HistTable), getHistType(kEta, HistTable), {V0Specs[kEta]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kPhi, HistTable), getHistDesc(kPhi, HistTable), getHistType(kPhi, HistTable), {V0Specs[kPhi]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kMass, HistTable), getHistDesc(kMass, HistTable), getHistType(kMass, HistTable), {V0Specs[kMass]}); + mHistogramRegistry->add(analysisDir + getHistNameV2(kSign, HistTable), getHistDesc(kSign, HistTable), getHistType(kSign, HistTable), {V0Specs[kSign]}); } if constexpr (modes::isFlagSet(mode, modes::Mode::kQa)) { std::string qaDir = std::string(v0Prefix) + std::string(QaDir); - mHistogramRegistry->add(qaDir + GetHistNamev2(kCosPa, HistTable), GetHistDesc(kCosPa, HistTable), GetHistType(kCosPa, HistTable), {V0Specs[kCosPa]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDecayDauDca, HistTable), GetHistDesc(kDecayDauDca, HistTable), GetHistType(kDecayDauDca, HistTable), {V0Specs[kDecayDauDca]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDecayVtxX, HistTable), GetHistDesc(kDecayVtxX, HistTable), GetHistType(kDecayVtxX, HistTable), {V0Specs[kDecayVtxX]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDecayVtxY, HistTable), GetHistDesc(kDecayVtxY, HistTable), GetHistType(kDecayVtxY, HistTable), {V0Specs[kDecayVtxY]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDecayVtxZ, HistTable), GetHistDesc(kDecayVtxZ, HistTable), GetHistType(kDecayVtxZ, HistTable), {V0Specs[kDecayVtxZ]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kDecayVtx, HistTable), GetHistDesc(kDecayVtx, HistTable), GetHistType(kDecayVtx, HistTable), {V0Specs[kDecayVtx]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kTransRadius, HistTable), GetHistDesc(kTransRadius, HistTable), GetHistType(kTransRadius, HistTable), {V0Specs[kTransRadius]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kCosPa, HistTable), getHistDesc(kCosPa, HistTable), getHistType(kCosPa, HistTable), {V0Specs[kCosPa]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDecayDauDca, HistTable), getHistDesc(kDecayDauDca, HistTable), getHistType(kDecayDauDca, HistTable), {V0Specs[kDecayDauDca]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDecayVtxX, HistTable), getHistDesc(kDecayVtxX, HistTable), getHistType(kDecayVtxX, HistTable), {V0Specs[kDecayVtxX]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDecayVtxY, HistTable), getHistDesc(kDecayVtxY, HistTable), getHistType(kDecayVtxY, HistTable), {V0Specs[kDecayVtxY]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDecayVtxZ, HistTable), getHistDesc(kDecayVtxZ, HistTable), getHistType(kDecayVtxZ, HistTable), {V0Specs[kDecayVtxZ]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kDecayVtx, HistTable), getHistDesc(kDecayVtx, HistTable), getHistType(kDecayVtx, HistTable), {V0Specs[kDecayVtx]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kTransRadius, HistTable), getHistDesc(kTransRadius, HistTable), getHistType(kTransRadius, HistTable), {V0Specs[kTransRadius]}); // qa 2d - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsEta, HistTable), GetHistDesc(kPtVsEta, HistTable), GetHistType(kPtVsEta, HistTable), {V0Specs[kPtVsEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsPhi, HistTable), GetHistDesc(kPtVsPhi, HistTable), GetHistType(kPtVsPhi, HistTable), {V0Specs[kPtVsPhi]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPhiVsEta, HistTable), GetHistDesc(kPhiVsEta, HistTable), GetHistType(kPhiVsEta, HistTable), {V0Specs[kPhiVsEta]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsCosPa, HistTable), GetHistDesc(kPtVsCosPa, HistTable), GetHistType(kPtVsCosPa, HistTable), {V0Specs[kPtVsCosPa]}); - - mHistogramRegistry->add(qaDir + GetHistNamev2(kMassLambda, HistTable), GetHistDesc(kMassLambda, HistTable), GetHistType(kMassLambda, HistTable), {V0Specs[kMassLambda]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kMassAntiLambda, HistTable), GetHistDesc(kMassAntiLambda, HistTable), GetHistType(kMassAntiLambda, HistTable), {V0Specs[kMassAntiLambda]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kMassK0short, HistTable), GetHistDesc(kMassK0short, HistTable), GetHistType(kMassK0short, HistTable), {V0Specs[kMassK0short]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsLambdaMass, HistTable), GetHistDesc(kPtVsLambdaMass, HistTable), GetHistType(kPtVsLambdaMass, HistTable), {V0Specs[kPtVsLambdaMass]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsAntiLambdaMass, HistTable), GetHistDesc(kPtVsAntiLambdaMass, HistTable), GetHistType(kPtVsAntiLambdaMass, HistTable), {V0Specs[kPtVsAntiLambdaMass]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kPtVsK0shortMass, HistTable), GetHistDesc(kPtVsK0shortMass, HistTable), GetHistType(kPtVsK0shortMass, HistTable), {V0Specs[kPtVsK0shortMass]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kLambdaMassVsAntiLambdaMass, HistTable), GetHistDesc(kLambdaMassVsAntiLambdaMass, HistTable), GetHistType(kLambdaMassVsAntiLambdaMass, HistTable), {V0Specs[kLambdaMassVsAntiLambdaMass]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kK0shortMassVsLambdaMass, HistTable), GetHistDesc(kK0shortMassVsLambdaMass, HistTable), GetHistType(kK0shortMassVsLambdaMass, HistTable), {V0Specs[kK0shortMassVsLambdaMass]}); - mHistogramRegistry->add(qaDir + GetHistNamev2(kK0shortMassVsAntiLambdaMass, HistTable), GetHistDesc(kK0shortMassVsAntiLambdaMass, HistTable), GetHistType(kK0shortMassVsAntiLambdaMass, HistTable), {V0Specs[kK0shortMassVsAntiLambdaMass]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsEta, HistTable), getHistDesc(kPtVsEta, HistTable), getHistType(kPtVsEta, HistTable), {V0Specs[kPtVsEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsPhi, HistTable), getHistDesc(kPtVsPhi, HistTable), getHistType(kPtVsPhi, HistTable), {V0Specs[kPtVsPhi]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPhiVsEta, HistTable), getHistDesc(kPhiVsEta, HistTable), getHistType(kPhiVsEta, HistTable), {V0Specs[kPhiVsEta]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsCosPa, HistTable), getHistDesc(kPtVsCosPa, HistTable), getHistType(kPtVsCosPa, HistTable), {V0Specs[kPtVsCosPa]}); + + mHistogramRegistry->add(qaDir + getHistNameV2(kMassLambda, HistTable), getHistDesc(kMassLambda, HistTable), getHistType(kMassLambda, HistTable), {V0Specs[kMassLambda]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kMassAntiLambda, HistTable), getHistDesc(kMassAntiLambda, HistTable), getHistType(kMassAntiLambda, HistTable), {V0Specs[kMassAntiLambda]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kMassK0short, HistTable), getHistDesc(kMassK0short, HistTable), getHistType(kMassK0short, HistTable), {V0Specs[kMassK0short]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsLambdaMass, HistTable), getHistDesc(kPtVsLambdaMass, HistTable), getHistType(kPtVsLambdaMass, HistTable), {V0Specs[kPtVsLambdaMass]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsAntiLambdaMass, HistTable), getHistDesc(kPtVsAntiLambdaMass, HistTable), getHistType(kPtVsAntiLambdaMass, HistTable), {V0Specs[kPtVsAntiLambdaMass]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kPtVsK0shortMass, HistTable), getHistDesc(kPtVsK0shortMass, HistTable), getHistType(kPtVsK0shortMass, HistTable), {V0Specs[kPtVsK0shortMass]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kLambdaMassVsAntiLambdaMass, HistTable), getHistDesc(kLambdaMassVsAntiLambdaMass, HistTable), getHistType(kLambdaMassVsAntiLambdaMass, HistTable), {V0Specs[kLambdaMassVsAntiLambdaMass]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kK0shortMassVsLambdaMass, HistTable), getHistDesc(kK0shortMassVsLambdaMass, HistTable), getHistType(kK0shortMassVsLambdaMass, HistTable), {V0Specs[kK0shortMassVsLambdaMass]}); + mHistogramRegistry->add(qaDir + getHistNameV2(kK0shortMassVsAntiLambdaMass, HistTable), getHistDesc(kK0shortMassVsAntiLambdaMass, HistTable), getHistType(kK0shortMassVsAntiLambdaMass, HistTable), {V0Specs[kK0shortMassVsAntiLambdaMass]}); } } template - void fill(T1 const& v0candidate, T2 const& /*tracks*/) + void fill(T1 const& v0candidate, T2 const& tracks) { auto posDaughter = v0candidate.template posDau_as(); - mPosDauManager.fill(posDaughter); + mPosDauManager.fill(posDaughter, tracks); auto negDaughter = v0candidate.template negDau_as(); - mNegDauManager.fill(negDaughter); + mNegDauManager.fill(negDaughter, tracks); if constexpr (modes::isFlagSet(mode, modes::Mode::kAnalysis)) { - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPt, HistTable)), v0candidate.pt()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(GetHistName(kEta, HistTable)), v0candidate.eta()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(GetHistName(kPhi, HistTable)), v0candidate.phi()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(GetHistName(kMass, HistTable)), v0candidate.mass()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(getHistName(kPt, HistTable)), v0candidate.pt()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(getHistName(kEta, HistTable)), v0candidate.eta()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(getHistName(kPhi, HistTable)), v0candidate.phi()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(getHistName(kMass, HistTable)), v0candidate.mass()); if constexpr (modes::isEqual(v0, modes::V0::kLambda) || modes::isEqual(v0, modes::V0::kAntiLambda)) { - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(GetHistName(kSign, HistTable)), v0candidate.sign()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(getHistName(kSign, HistTable)), v0candidate.sign()); } if constexpr (modes::isEqual(v0, modes::V0::kK0short)) { - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(GetHistName(kSign, HistTable)), 0); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(AnalysisDir) + HIST(getHistName(kSign, HistTable)), 0); } } if constexpr (modes::isFlagSet(mode, modes::Mode::kQa)) { - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kCosPa, HistTable)), v0candidate.cosPa()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kDecayDauDca, HistTable)), v0candidate.dauDca()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kDecayVtxX, HistTable)), v0candidate.decayVtxX()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kDecayVtxY, HistTable)), v0candidate.decayVtxY()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kDecayVtxZ, HistTable)), v0candidate.decayVtxZ()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kDecayVtx, HistTable)), v0candidate.decayVtx()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kTransRadius, HistTable)), v0candidate.transRadius()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsEta, HistTable)), v0candidate.pt(), v0candidate.eta()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsPhi, HistTable)), v0candidate.pt(), v0candidate.phi()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kPhiVsEta, HistTable)), v0candidate.phi(), v0candidate.eta()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsCosPa, HistTable)), v0candidate.pt(), v0candidate.cosPa()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kCosPa, HistTable)), v0candidate.cosPa()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kDecayDauDca, HistTable)), v0candidate.dauDca()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kDecayVtxX, HistTable)), v0candidate.decayVtxX()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kDecayVtxY, HistTable)), v0candidate.decayVtxY()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kDecayVtxZ, HistTable)), v0candidate.decayVtxZ()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kDecayVtx, HistTable)), v0candidate.decayVtx()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kTransRadius, HistTable)), v0candidate.transRadius()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kPtVsEta, HistTable)), v0candidate.pt(), v0candidate.eta()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kPtVsPhi, HistTable)), v0candidate.pt(), v0candidate.phi()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kPhiVsEta, HistTable)), v0candidate.phi(), v0candidate.eta()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kPtVsCosPa, HistTable)), v0candidate.pt(), v0candidate.cosPa()); if constexpr (modes::isEqual(v0, modes::V0::kLambda) || modes::isEqual(v0, modes::V0::kAntiLambda)) { float massLambda, massAntiLambda; @@ -301,26 +301,26 @@ class V0HistManager massLambda = v0candidate.massAnti(); massAntiLambda = v0candidate.mass(); } - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kMassLambda, HistTable)), massLambda); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kMassAntiLambda, HistTable)), massAntiLambda); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kMassK0short, HistTable)), v0candidate.massK0short()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsLambdaMass, HistTable)), v0candidate.pt(), massLambda); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsAntiLambdaMass, HistTable)), v0candidate.pt(), massAntiLambda); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsK0shortMass, HistTable)), v0candidate.pt(), v0candidate.massK0short()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kLambdaMassVsAntiLambdaMass, HistTable)), massLambda, massAntiLambda); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kK0shortMassVsLambdaMass, HistTable)), v0candidate.massK0short(), massLambda); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kK0shortMassVsAntiLambdaMass, HistTable)), v0candidate.massK0short(), massAntiLambda); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kMassLambda, HistTable)), massLambda); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kMassAntiLambda, HistTable)), massAntiLambda); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kMassK0short, HistTable)), v0candidate.massK0short()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kPtVsLambdaMass, HistTable)), v0candidate.pt(), massLambda); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kPtVsAntiLambdaMass, HistTable)), v0candidate.pt(), massAntiLambda); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kPtVsK0shortMass, HistTable)), v0candidate.pt(), v0candidate.massK0short()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kLambdaMassVsAntiLambdaMass, HistTable)), massLambda, massAntiLambda); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kK0shortMassVsLambdaMass, HistTable)), v0candidate.massK0short(), massLambda); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kK0shortMassVsAntiLambdaMass, HistTable)), v0candidate.massK0short(), massAntiLambda); } if constexpr (modes::isEqual(v0, modes::V0::kK0short)) { - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kMassLambda, HistTable)), v0candidate.massLambda()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kMassAntiLambda, HistTable)), v0candidate.massAntiLambda()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kMassK0short, HistTable)), v0candidate.mass()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsLambdaMass, HistTable)), v0candidate.pt(), v0candidate.massLambda()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsAntiLambdaMass, HistTable)), v0candidate.pt(), v0candidate.massAntiLambda()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kPtVsK0shortMass, HistTable)), v0candidate.pt(), v0candidate.mass()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kLambdaMassVsAntiLambdaMass, HistTable)), v0candidate.massLambda(), v0candidate.massAntiLambda()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kK0shortMassVsLambdaMass, HistTable)), v0candidate.mass(), v0candidate.massLambda()); - mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(GetHistName(kK0shortMassVsAntiLambdaMass, HistTable)), v0candidate.mass(), v0candidate.massAntiLambda()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kMassLambda, HistTable)), v0candidate.massLambda()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kMassAntiLambda, HistTable)), v0candidate.massAntiLambda()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kMassK0short, HistTable)), v0candidate.mass()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kPtVsLambdaMass, HistTable)), v0candidate.pt(), v0candidate.massLambda()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kPtVsAntiLambdaMass, HistTable)), v0candidate.pt(), v0candidate.massAntiLambda()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kPtVsK0shortMass, HistTable)), v0candidate.pt(), v0candidate.mass()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kLambdaMassVsAntiLambdaMass, HistTable)), v0candidate.massLambda(), v0candidate.massAntiLambda()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kK0shortMassVsLambdaMass, HistTable)), v0candidate.mass(), v0candidate.massLambda()); + mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kK0shortMassVsAntiLambdaMass, HistTable)), v0candidate.mass(), v0candidate.massAntiLambda()); } } } diff --git a/PWGCF/Femto/Tasks/CMakeLists.txt b/PWGCF/Femto/Tasks/CMakeLists.txt index 8fdc9dacae4..1cee38e9eee 100644 --- a/PWGCF/Femto/Tasks/CMakeLists.txt +++ b/PWGCF/Femto/Tasks/CMakeLists.txt @@ -58,3 +58,8 @@ o2physics_add_dpl_workflow(femto-pair-track-kink SOURCES femtoPairTrackKink.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(femto-pair-v0-v0 + SOURCES femtoPairV0V0.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) diff --git a/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx b/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx index 8343736b1b8..64fcb671314 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx @@ -95,8 +95,8 @@ struct FemtoPairTrackV0 { pairbuilder::PairTrackV0Builder< trackhistmanager::PrefixTrack1, v0histmanager::PrefixLambda1, - trackhistmanager::PrefixV0PosDaughter, - trackhistmanager::PrefixV0NegDaughter, + trackhistmanager::PrefixV0PosDaughter1, + trackhistmanager::PrefixV0NegDaughter1, pairhistmanager::PrefixTrackV0Se, pairhistmanager::PrefixTrackV0Me, closepairrejection::PrefixTrackV0Se, @@ -108,8 +108,8 @@ struct FemtoPairTrackV0 { pairbuilder::PairTrackV0Builder< trackhistmanager::PrefixTrack1, v0histmanager::PrefixK0short1, - trackhistmanager::PrefixV0PosDaughter, - trackhistmanager::PrefixV0NegDaughter, + trackhistmanager::PrefixV0PosDaughter1, + trackhistmanager::PrefixV0NegDaughter1, pairhistmanager::PrefixTrackV0Se, pairhistmanager::PrefixTrackV0Me, closepairrejection::PrefixTrackV0Se, diff --git a/PWGCF/Femto/Tasks/femtoPairV0V0.cxx b/PWGCF/Femto/Tasks/femtoPairV0V0.cxx new file mode 100644 index 00000000000..bda347ad110 --- /dev/null +++ b/PWGCF/Femto/Tasks/femtoPairV0V0.cxx @@ -0,0 +1,204 @@ +// Copyright 2019-2025 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +/// \file femtoPairV0V0.cxx +/// \brief Tasks that computes correlation between two v0s +/// \author Anton Riedel, TU München, anton.riedel@cern.ch + +#include "PWGCF/Femto/Core/closePairRejection.h" +#include "PWGCF/Femto/Core/collisionBuilder.h" +#include "PWGCF/Femto/Core/collisionHistManager.h" +#include "PWGCF/Femto/Core/modes.h" +#include "PWGCF/Femto/Core/pairBuilder.h" +#include "PWGCF/Femto/Core/pairHistManager.h" +#include "PWGCF/Femto/Core/partitions.h" +#include "PWGCF/Femto/Core/trackBuilder.h" +#include "PWGCF/Femto/Core/trackHistManager.h" +#include "PWGCF/Femto/Core/v0Builder.h" +#include "PWGCF/Femto/Core/v0HistManager.h" +#include "PWGCF/Femto/DataModel/FemtoTables.h" + +#include "Framework/ASoA.h" +#include "Framework/AnalysisHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/BinningPolicy.h" +#include "Framework/Configurable.h" +#include "Framework/Expressions.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/InitContext.h" +#include "Framework/OutputObjHeader.h" +#include "Framework/runDataProcessing.h" + +#include +#include + +using namespace o2; +using namespace o2::aod; +using namespace o2::soa; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::analysis::femto; + +struct FemtoPairV0V0 { + + // setup tables + using Collisions = Join; + using Collision = Collisions::iterator; + + using FilteredCollisions = o2::soa::Filtered; + using FilteredCollision = FilteredCollisions::iterator; + + using Tracks = o2::soa::Join; + using Lambdas = o2::soa::Join; + using K0shorts = o2::soa::Join; + + SliceCache cache; + + // setup collisions + collisionbuilder::ConfCollisionSelection collisionSelection; + Filter collisionFilter = MAKE_COLLISION_FILTER(collisionSelection); + colhistmanager::ConfCollisionBinning confCollisionBinning; + + // setup for daughters + trackhistmanager::ConfV0PosDauBinning confPosDauBinning; + trackhistmanager::ConfV0NegDauBinning confNegDauBinning; + + // setup lambdas + v0builder::ConfLambdaSelection1 lambdaSelection; + v0histmanager::ConfLambdaBinning1 confLambdaBinning; + Partition lambdaPartition = MAKE_LAMBDA_PARTITION(lambdaSelection); + Preslice perColLambdas = aod::femtobase::stored::fColId; + + // setup k0shorts + v0builder::ConfK0shortSelection1 k0shortSelection; + v0histmanager::ConfK0shortBinning1 confK0shortBinning; + Partition k0shortPartition = MAKE_K0SHORT_PARTITION(k0shortSelection); + Preslice perColk0shorts = aod::femtobase::stored::fColId; + + // setup pairs + pairhistmanager::ConfPairBinning confPairBinning; + + pairbuilder::PairV0V0Builder< + v0histmanager::PrefixLambda1, + trackhistmanager::PrefixV0PosDaughter1, + trackhistmanager::PrefixV0NegDaughter2, + v0histmanager::PrefixLambda2, + trackhistmanager::PrefixV0PosDaughter1, + trackhistmanager::PrefixV0NegDaughter2, + pairhistmanager::PrefixV0V0Se, + pairhistmanager::PrefixV0V0Me, + closepairrejection::PrefixV0V0PosSe, + closepairrejection::PrefixV0V0NegSe, + closepairrejection::PrefixV0V0PosMe, + closepairrejection::PrefixV0V0NegMe, + modes::V0::kLambda, + modes::V0::kLambda, + modes::Mode::kAnalysis> + pairLambdaLambdaBuilder; + + pairbuilder::PairV0V0Builder< + v0histmanager::PrefixK0short1, + trackhistmanager::PrefixV0PosDaughter1, + trackhistmanager::PrefixV0NegDaughter2, + v0histmanager::PrefixK0short2, + trackhistmanager::PrefixV0PosDaughter1, + trackhistmanager::PrefixV0NegDaughter2, + pairhistmanager::PrefixV0V0Se, + pairhistmanager::PrefixV0V0Me, + closepairrejection::PrefixV0V0PosSe, + closepairrejection::PrefixV0V0NegSe, + closepairrejection::PrefixV0V0PosMe, + closepairrejection::PrefixV0V0NegMe, + modes::V0::kK0short, + modes::V0::kK0short, + modes::Mode::kAnalysis> + pairK0shortK0shortBuilder; + + // setup mixing + std::vector defaultVtxBins{10, -10, 10}; + std::vector defaultMultBins{50, 0, 200}; + std::vector defaultCentBins{10, 0, 100}; + ColumnBinningPolicy mixBinsVtxMult{{defaultVtxBins, defaultMultBins}, true}; + ColumnBinningPolicy mixBinsVtxCent{{defaultVtxBins, defaultCentBins}, true}; + ColumnBinningPolicy mixBinsVtxMultCent{{defaultVtxBins, defaultMultBins, defaultCentBins}, true}; + pairhistmanager::ConfMixing confMixing; + + HistogramRegistry hRegistry{"FemtoTrackV0", {}, OutputObjHandlingPolicy::AnalysisObject}; + + // setup cpr + closepairrejection::ConfCpr confCpr; + + void init(InitContext&) + { + + // setup columnpolicy for binning + // default values are used during instantiation, so we need to explicity update them here + mixBinsVtxMult = {{confMixing.vtxBins, confMixing.multBins.value}, true}; + mixBinsVtxCent = {{confMixing.vtxBins.value, confMixing.centBins.value}, true}; + mixBinsVtxMultCent = {{confMixing.vtxBins.value, confMixing.multBins.value, confMixing.centBins.value}, true}; + + // setup histograms + auto colHistSpec = colhistmanager::makeColHistSpecMap(confCollisionBinning); + auto posDauSpec = trackhistmanager::makeTrackHistSpecMap(confPosDauBinning); + auto negDauSpec = trackhistmanager::makeTrackHistSpecMap(confNegDauBinning); + auto cprHistSpec = closepairrejection::makeCprHistSpecMap(confCpr); + + // setup for lambda + if (doprocessLambdaLambdaSameEvent || doprocessLambdaLambdaMixedEvent) { + auto lambdaHistSpec = v0histmanager::makeV0HistSpecMap(confLambdaBinning); + auto pairLambdaLambdaHistSpec = pairhistmanager::makePairHistSpecMap(confPairBinning, confLambdaBinning, confLambdaBinning); + pairLambdaLambdaBuilder.init(&hRegistry, lambdaSelection, lambdaSelection, confCpr, confMixing, colHistSpec, lambdaHistSpec, lambdaHistSpec, posDauSpec, negDauSpec, pairLambdaLambdaHistSpec, cprHistSpec); + } + + // setup for k0short + if (doprocessK0shortK0shortSameEvent || doprocessK0shortK0shortMixedEvent) { + auto k0shortHistSpec = v0histmanager::makeV0HistSpecMap(confK0shortBinning); + auto pairLambdaLambdaHistSpec = pairhistmanager::makePairHistSpecMap(confPairBinning, confLambdaBinning, confLambdaBinning); + pairLambdaLambdaBuilder.init(&hRegistry, k0shortSelection, k0shortSelection, confCpr, confMixing, colHistSpec, k0shortHistSpec, k0shortHistSpec, posDauSpec, negDauSpec, pairLambdaLambdaHistSpec, cprHistSpec); + } + + if (((doprocessLambdaLambdaSameEvent || doprocessLambdaLambdaMixedEvent) + (doprocessK0shortK0shortSameEvent || doprocessK0shortK0shortMixedEvent)) > 1) { + LOG(fatal) << "Can only process lambda-tracks Or k0short-tracks"; + } + }; + + void processLambdaLambdaSameEvent(FilteredCollision const& col, Tracks const& tracks, Lambdas const& lambdas) + { + pairLambdaLambdaBuilder.processSameEvent(col, tracks, lambdas, lambdaPartition, lambdaPartition, cache); + } + PROCESS_SWITCH(FemtoPairV0V0, processLambdaLambdaSameEvent, "Enable processing same event processing for lambdas", true); + + void processLambdaLambdaMixedEvent(FilteredCollisions const& cols, Tracks const& tracks, Lambdas const& /*lambas*/) + { + pairLambdaLambdaBuilder.processMixedEvent(cols, tracks, lambdaPartition, lambdaPartition, cache, mixBinsVtxMult, mixBinsVtxCent, mixBinsVtxMultCent); + } + PROCESS_SWITCH(FemtoPairV0V0, processLambdaLambdaMixedEvent, "Enable processing mixed event processing for lambdas", true); + + void processK0shortK0shortSameEvent(FilteredCollision const& col, Tracks const& tracks, K0shorts const& k0shorts) + { + pairK0shortK0shortBuilder.processSameEvent(col, tracks, k0shorts, k0shortPartition, lambdaPartition, cache); + } + PROCESS_SWITCH(FemtoPairV0V0, processK0shortK0shortSameEvent, "Enable processing same event processing for lambdas", true); + + void processK0shortK0shortMixedEvent(FilteredCollisions const& cols, Tracks const& tracks, K0shorts const& /*k0shorts*/) + { + pairK0shortK0shortBuilder.processMixedEvent(cols, tracks, k0shortPartition, k0shortPartition, cache, mixBinsVtxMult, mixBinsVtxCent, mixBinsVtxMultCent); + } + PROCESS_SWITCH(FemtoPairV0V0, processK0shortK0shortMixedEvent, "Enable processing mixed event processing for lambdas", true); +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + WorkflowSpec workflow{ + adaptAnalysisTask(cfgc), + }; + return workflow; +} diff --git a/PWGCF/Femto/Tasks/femtoTrackQa.cxx b/PWGCF/Femto/Tasks/femtoTrackQa.cxx index f68141e9349..cfe319e91fa 100644 --- a/PWGCF/Femto/Tasks/femtoTrackQa.cxx +++ b/PWGCF/Femto/Tasks/femtoTrackQa.cxx @@ -80,12 +80,12 @@ struct FemtoTrackQa { trackHistManager.init(&hRegistry, trackHistSpec, trackSelections.chargeAbs.value, confTrackQaBinning.momentumType.value); }; - void process(FilteredCollision const& col, Tracks const& /*tracks*/) + void process(FilteredCollision const& col, Tracks const& tracks) { colHistManager.fill(col); auto trackSlice = trackPartition->sliceByCached(femtobase::stored::fColId, col.globalIndex(), cache); for (auto const& track : trackSlice) { - trackHistManager.fill(track); + trackHistManager.fill(track, tracks); } } }; From 12582e38ba4f0d1253e5a12027b762ddef79d4dc Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Sat, 18 Oct 2025 19:15:36 +0200 Subject: [PATCH 3/3] Feat: fix bugs in index column partially --- PWGCF/Femto/Core/cascadeBuilder.h | 6 +- PWGCF/Femto/Core/kinkBuilder.h | 4 +- PWGCF/Femto/Core/pairBuilder.h | 28 +++--- PWGCF/Femto/Core/pairProcessHelpers.h | 12 +-- PWGCF/Femto/Core/trackBuilder.h | 15 ++- PWGCF/Femto/Core/v0Builder.h | 14 +-- PWGCF/Femto/Core/v0HistManager.h | 2 +- PWGCF/Femto/DataModel/FemtoTables.h | 37 +++---- PWGCF/Femto/TableProducer/femtoProducer.cxx | 98 +++++++++++-------- .../femtoProducerDerivedToDerived.cxx | 6 +- PWGCF/Femto/Tasks/femtoCascadeQa.cxx | 8 +- PWGCF/Femto/Tasks/femtoKinkQa.cxx | 4 +- PWGCF/Femto/Tasks/femtoPairTrackCascade.cxx | 6 +- PWGCF/Femto/Tasks/femtoPairTrackKink.cxx | 4 +- PWGCF/Femto/Tasks/femtoPairTrackTrack.cxx | 2 +- .../Tasks/femtoPairTrackTwoTrackResonance.cxx | 8 +- PWGCF/Femto/Tasks/femtoPairTrackV0.cxx | 6 +- PWGCF/Femto/Tasks/femtoPairV0V0.cxx | 4 +- PWGCF/Femto/Tasks/femtoTrackQa.cxx | 4 +- .../Femto/Tasks/femtoTwotrackresonanceQa.cxx | 18 ++-- PWGCF/Femto/Tasks/femtoV0Qa.cxx | 13 ++- 21 files changed, 157 insertions(+), 142 deletions(-) diff --git a/PWGCF/Femto/Core/cascadeBuilder.h b/PWGCF/Femto/Core/cascadeBuilder.h index 6a3a6722879..c65611da008 100644 --- a/PWGCF/Femto/Core/cascadeBuilder.h +++ b/PWGCF/Femto/Core/cascadeBuilder.h @@ -367,9 +367,9 @@ class CascadeBuilder return; } - int64_t bachelorIndex = 0; - int64_t posDaughterIndex = 0; - int64_t negDaughterIndex = 0; + int32_t bachelorIndex = 0; + int32_t posDaughterIndex = 0; + int32_t negDaughterIndex = 0; for (const auto& cascade : fullCascades) { if (!mCascadeSelection.checkFilters(cascade)) { continue; diff --git a/PWGCF/Femto/Core/kinkBuilder.h b/PWGCF/Femto/Core/kinkBuilder.h index 925dc07f16f..22514f77f20 100644 --- a/PWGCF/Femto/Core/kinkBuilder.h +++ b/PWGCF/Femto/Core/kinkBuilder.h @@ -243,7 +243,7 @@ class KinkSelection : public BaseSelection 0.f) ? 0.5f * std::log((p + pz) / (p - pz)) : 0.f; - float phi = std::atan2(py, px); + float phi = RecoDecay::constrainAngle(std::atan2(py, px)); return ((pt > mPtMin && pt < mPtMax) && (eta > mEtaMin && eta < mEtaMax) && @@ -372,7 +372,7 @@ class KinkBuilder float pt = std::hypot(px, py); float p = std::sqrt(px * px + py * py + pz * pz); float eta = (p > 0.f) ? 0.5f * std::log((p + pz) / (p - pz)) : 0.f; - float phi = std::atan2(py, px); + float phi = RecoDecay::constrainAngle(std::atan2(py, px)); kinkProducts.producedSigmas(collisionProducts.producedCollision.lastIndex(), kink.mothSign() * pt, diff --git a/PWGCF/Femto/Core/pairBuilder.h b/PWGCF/Femto/Core/pairBuilder.h index 732ebe8dbd2..51a361a75ec 100644 --- a/PWGCF/Femto/Core/pairBuilder.h +++ b/PWGCF/Femto/Core/pairBuilder.h @@ -131,7 +131,7 @@ class PairTrackTrackBuilder void processSameEvent(T1 const& col, T2& trackTable, T3& partition1, T4& partition2, T5& cache) { if (mSameSpecies) { - auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (trackSlice1.size() == 0) { return; } @@ -139,8 +139,8 @@ class PairTrackTrackBuilder mCprSe.setMagField(col.magField()); pairprocesshelpers::processSameEvent(trackSlice1, trackTable, mTrackHistManager1, mPairHistManagerSe, mCprSe, mRng, mMixIdenticalParticles); } else { - auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); - auto trackSlice2 = partition2->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto trackSlice1 = partition1->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); + auto trackSlice2 = partition2->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (trackSlice1.size() == 0 || trackSlice2.size() == 0) { return; } @@ -299,7 +299,7 @@ class PairV0V0Builder void processSameEvent(T1 const& col, T2& trackTable, T3& /*lambdaTable*/, T4& partition1, T5& partition2, T6& cache) { if (mSameSpecies) { - auto v0Slice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto v0Slice1 = partition1->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (v0Slice1.size() == 0) { return; } @@ -307,8 +307,8 @@ class PairV0V0Builder mCprSe.setMagField(col.magField()); pairprocesshelpers::processSameEvent(v0Slice1, trackTable, mV0HistManager1, mPairHistManagerSe, mCprSe, mRng, mMixIdenticalParticles); } else { - auto v0Slice1 = partition1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); - auto v0Slice2 = partition2->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto v0Slice1 = partition1->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); + auto v0Slice2 = partition2->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (v0Slice1.size() == 0 || v0Slice2.size() == 0) { return; } @@ -433,8 +433,8 @@ class PairTrackV0Builder template void processSameEvent(T1 const& col, T2& trackTable, T3& trackPartition, T4& /*v0table*/, T5& v0Partition, T6& cache) { - auto trackSlice = trackPartition->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); - auto v0Slice = v0Partition->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto trackSlice = trackPartition->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); + auto v0Slice = v0Partition->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (trackSlice.size() == 0 || v0Slice.size() == 0) { return; } @@ -538,8 +538,8 @@ class PairTrackTwoTrackResonanceBuilder template void processSameEvent(T1 const& col, T2& trackTable, T3& trackPartition, T4& /*resonanceTable*/, T5& resonancePartition, T6& cache) { - auto trackSlice = trackPartition->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); - auto v0Slice = resonancePartition->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto trackSlice = trackPartition->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); + auto v0Slice = resonancePartition->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (trackSlice.size() == 0 || v0Slice.size() == 0) { return; } @@ -640,8 +640,8 @@ class PairTrackKinkBuilder template void processSameEvent(T1 const& col, T2& trackTable, T3& trackPartition, T4& /*kinktable*/, T5& kinkPartition, T6& cache) { - auto trackSlice = trackPartition->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); - auto kinkSlice = kinkPartition->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto trackSlice = trackPartition->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); + auto kinkSlice = kinkPartition->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (trackSlice.size() == 0 || kinkSlice.size() == 0) { return; } @@ -748,8 +748,8 @@ class PairTrackCascadeBuilder template void processSameEvent(T1 const& col, T2& trackTable, T3& trackPartition, T4& /*cascadeTable*/, T5& v0Partition, T6& cache) { - auto trackSlice = trackPartition->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); - auto v0Slice = v0Partition->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto trackSlice = trackPartition->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); + auto v0Slice = v0Partition->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (trackSlice.size() == 0 || v0Slice.size() == 0) { return; } diff --git a/PWGCF/Femto/Core/pairProcessHelpers.h b/PWGCF/Femto/Core/pairProcessHelpers.h index df2510126f8..2d4a6f38bdd 100644 --- a/PWGCF/Femto/Core/pairProcessHelpers.h +++ b/PWGCF/Femto/Core/pairProcessHelpers.h @@ -182,8 +182,8 @@ void processMixedEvent(T1& Collisions, continue; } CprManager.setMagField(collision1.magField()); - auto sliceParticle1 = Partition->sliceByCached(o2::aod::femtobase::stored::fColId, collision1.globalIndex(), cache); - auto sliceParticle2 = Partition->sliceByCached(o2::aod::femtobase::stored::fColId, collision2.globalIndex(), cache); + auto sliceParticle1 = Partition->sliceByCached(o2::aod::femtobase::stored::collisionId, collision1.globalIndex(), cache); + auto sliceParticle2 = Partition->sliceByCached(o2::aod::femtobase::stored::collisionId, collision2.globalIndex(), cache); if (sliceParticle1.size() == 0 || sliceParticle2.size() == 0) { continue; } @@ -233,8 +233,8 @@ void processMixedEvent(T1& Collisions, continue; } CprManager.setMagField(collision1.magField()); - auto sliceParticle1 = Partition1->sliceByCached(o2::aod::femtobase::stored::fColId, collision1.globalIndex(), cache); - auto sliceParticle2 = Partition2->sliceByCached(o2::aod::femtobase::stored::fColId, collision2.globalIndex(), cache); + auto sliceParticle1 = Partition1->sliceByCached(o2::aod::femtobase::stored::collisionId, collision1.globalIndex(), cache); + auto sliceParticle2 = Partition2->sliceByCached(o2::aod::femtobase::stored::collisionId, collision2.globalIndex(), cache); if (sliceParticle1.size() == 0 || sliceParticle2.size() == 0) { continue; } @@ -284,8 +284,8 @@ void processMixedEvent(T1& Collisions, // continue; // } // CprManager.setMagField(collision1.magField()); -// auto sliceParticle1 = Partition1->sliceByCached(o2::aod::femtobase::stored::fColId, collision1.globalIndex(), cache); -// auto sliceParticle2 = Partition2->sliceByCached(o2::aod::femtobase::stored::fColId, collision2.globalIndex(), cache); +// auto sliceParticle1 = Partition1->sliceByCached(o2::aod::femtobase::stored::collisionId, collision1.globalIndex(), cache); +// auto sliceParticle2 = Partition2->sliceByCached(o2::aod::femtobase::stored::collisionId, collision2.globalIndex(), cache); // if (sliceParticle1.size() == 0 || sliceParticle2.size() == 0) { // continue; // } diff --git a/PWGCF/Femto/Core/trackBuilder.h b/PWGCF/Femto/Core/trackBuilder.h index 826ccbbc9ca..dbf670459eb 100644 --- a/PWGCF/Femto/Core/trackBuilder.h +++ b/PWGCF/Femto/Core/trackBuilder.h @@ -375,7 +375,7 @@ class TrackSelection : public BaseSelectionevaluateObservable(kTpcKaon, Track.tpcNSigmaKa()); this->evaluateObservable(kTpcProton, Track.tpcNSigmaPr()); this->evaluateObservable(kTpcDeuteron, Track.tpcNSigmaDe()); - this->evaluateObservable(kTpctofTriton, Track.tpcNSigmaTr()); + this->evaluateObservable(kTpcTriton, Track.tpcNSigmaTr()); this->evaluateObservable(kTpcHelium, Track.tpcNSigmaHe()); // tof pid @@ -506,8 +506,8 @@ class TrackBuilder track.pt() * track.sign(), track.eta(), track.phi()); + indexMap.emplace(track.globalIndex(), trackProducts.producedTracks.lastIndex()); } - if (mProduceTrackMasks) { if constexpr (type == modes::Track::kPrimaryTrack) { trackProducts.producedTrackMasks(mTrackSelection.getBitmask()); @@ -515,7 +515,6 @@ class TrackBuilder trackProducts.producedTrackMasks(static_cast(0u)); } } - if (mProduceTrackDcas) { trackProducts.producedTrackDcas(track.dcaXY(), track.dcaZ()); } @@ -533,7 +532,6 @@ class TrackBuilder track.beta(), track.mass()); } - if (mProduceElectronPids) { if constexpr (type == modes::Track::kPrimaryTrack) { trackProducts.producedElectronPids(track.itsNSigmaEl(), track.tpcNSigmaEl(), track.tofNSigmaEl()); @@ -583,7 +581,6 @@ class TrackBuilder trackProducts.producedHeliumPids(0, track.tpcNSigmaHe(), track.tofNSigmaHe()); } } - indexMap.emplace(track.globalIndex(), trackProducts.producedTracks.lastIndex()); } template @@ -643,8 +640,8 @@ class TrackBuilderDerivedToDerived template bool collisionHasTooFewTracks(T1& col, T2& /*trackTable*/, T3& partitionTrack1, T4& partitionTrack2, T5& cache) { - auto trackSlice1 = partitionTrack1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); - auto trackSlice2 = partitionTrack2->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto trackSlice1 = partitionTrack1->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); + auto trackSlice2 = partitionTrack2->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (trackSlice1.size() >= mLimitTrack1 && trackSlice2.size() >= mLimitTrack2) { return false; } @@ -654,8 +651,8 @@ class TrackBuilderDerivedToDerived template void processTracks(T1& col, T2& /*trackTable*/, T3& partitionTrack1, T4& partitionTrack2, T5& indexMap, T6& cache, T7& newTrackTable, T8& newCollisionTable) { - auto trackSlice1 = partitionTrack1->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); - auto trackSlice2 = partitionTrack2->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto trackSlice1 = partitionTrack1->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); + auto trackSlice2 = partitionTrack2->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& track : trackSlice1) { this->fillTrack(track, newTrackTable, newCollisionTable, indexMap); diff --git a/PWGCF/Femto/Core/v0Builder.h b/PWGCF/Femto/Core/v0Builder.h index cd64c5eadec..0364c3c5a0a 100644 --- a/PWGCF/Femto/Core/v0Builder.h +++ b/PWGCF/Femto/Core/v0Builder.h @@ -330,8 +330,8 @@ template class V0Builder { public: - V0Builder() {} - virtual ~V0Builder() = default; + V0Builder() = default; + ~V0Builder() = default; template void init(T1& config, T2& filter, T3& table, T4& initContext) @@ -395,7 +395,7 @@ class V0Builder } template - void fillLambda(T1& collisionProducts, T2& v0products, T3 const& v0, float sign, int posDaughterIndex, int negDaughterIndex) + void fillLambda(T1& collisionProducts, T2& v0products, T3 const& v0, float sign, int32_t posDaughterIndex, int32_t negDaughterIndex) { float mass, massAnti; if (sign > 0.f) { @@ -500,7 +500,7 @@ class V0BuilderDerivedToDerived template bool collisionHasTooFewLambdas(T1& col, T2& /*lambdaTable*/, T3& partitionLambda, T4& cache) { - auto lambdaSlice = partitionLambda->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto lambdaSlice = partitionLambda->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (lambdaSlice.size() >= mLimitLambda) { return false; } @@ -510,7 +510,7 @@ class V0BuilderDerivedToDerived template bool collisionHasTooFewK0shorts(T1& col, T2& /*k0shortTable*/, T3& partitionK0short, T4& cache) { - auto k0shortSlice = partitionK0short->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto k0shortSlice = partitionK0short->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); if (k0shortSlice.size() >= mLimitK0short) { return false; } @@ -520,7 +520,7 @@ class V0BuilderDerivedToDerived template void processLambdas(T1& col, T2& /*lambdaTable*/, T3& /*oldTrackTable*/, T4& partitionLambda, T5& trackBuilder, T6& indexMap, T7& cache, T8& newLambdaTable, T9& newTrackTable, T10& newCollisionTable) { - auto lambdaSlice = partitionLambda->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto lambdaSlice = partitionLambda->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& lambda : lambdaSlice) { @@ -544,7 +544,7 @@ class V0BuilderDerivedToDerived template void processK0shorts(T1& col, T2& /*k0shortTable*/, T3& /*oldTrackTable*/, T4& partitionK0short, T5& trackBuilder, T6& indexMap, T7& cache, T8& newK0shortTable, T9& newTrackTable, T10& newCollisionTable) { - auto k0shortSlice = partitionK0short->sliceByCached(o2::aod::femtobase::stored::fColId, col.globalIndex(), cache); + auto k0shortSlice = partitionK0short->sliceByCached(o2::aod::femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& k0short : k0shortSlice) { diff --git a/PWGCF/Femto/Core/v0HistManager.h b/PWGCF/Femto/Core/v0HistManager.h index e8247cdae82..f402b8e0fab 100644 --- a/PWGCF/Femto/Core/v0HistManager.h +++ b/PWGCF/Femto/Core/v0HistManager.h @@ -259,7 +259,6 @@ class V0HistManager template void fill(T1 const& v0candidate, T2 const& tracks) { - auto posDaughter = v0candidate.template posDau_as(); mPosDauManager.fill(posDaughter, tracks); auto negDaughter = v0candidate.template negDau_as(); @@ -311,6 +310,7 @@ class V0HistManager mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kK0shortMassVsLambdaMass, HistTable)), v0candidate.massK0short(), massLambda); mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kK0shortMassVsAntiLambdaMass, HistTable)), v0candidate.massK0short(), massAntiLambda); } + if constexpr (modes::isEqual(v0, modes::V0::kK0short)) { mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kMassLambda, HistTable)), v0candidate.massLambda()); mHistogramRegistry->fill(HIST(v0Prefix) + HIST(QaDir) + HIST(getHistName(kMassAntiLambda, HistTable)), v0candidate.massAntiLambda()); diff --git a/PWGCF/Femto/DataModel/FemtoTables.h b/PWGCF/Femto/DataModel/FemtoTables.h index 2d288f13cbb..fb0d7d85a47 100644 --- a/PWGCF/Femto/DataModel/FemtoTables.h +++ b/PWGCF/Femto/DataModel/FemtoTables.h @@ -31,7 +31,6 @@ namespace o2::aod { - namespace femtocollisions { DECLARE_SOA_COLUMN(CollisionMask, collisionMask, femtodatatypes::CollisionMaskType); //! Bitmask for collision selections @@ -55,8 +54,8 @@ DECLARE_SOA_TABLE_STAGED_VERSIONED(FCols_001, "FCOL", 1, //! femto collisions femtocollisions::Cent, femtocollisions::MagField); using FCols = FCols_001; +using FCol = FCols::iterator; using StoredFCols = StoredFCols_001; -using FCol = FCols::iterator; // needed so we can define the index column further down properly // table for collisions selections DECLARE_SOA_TABLE_STAGED_VERSIONED(FColMasks_001, "FCOLMASK", 1, //! track masks @@ -101,13 +100,14 @@ namespace femtobase namespace stored { // static columns -DECLARE_SOA_INDEX_COLUMN(FCol, fCol); //! collision index of femto collision table -DECLARE_SOA_COLUMN(SignedPt, signedPt, float); //! signed pt -DECLARE_SOA_COLUMN(Pt, pt, float); //! pt -DECLARE_SOA_COLUMN(Eta, eta, float); //! eta -DECLARE_SOA_COLUMN(Phi, phi, float); //! phi -DECLARE_SOA_COLUMN(Mass, mass, float); //! mass of particle -DECLARE_SOA_COLUMN(MassAnti, massAnti, float); //! mass of antiparticle +// +DECLARE_SOA_INDEX_COLUMN(Collision, collision); //! collision index of femto collision table +DECLARE_SOA_COLUMN(SignedPt, signedPt, float); //! signed pt +DECLARE_SOA_COLUMN(Pt, pt, float); //! pt +DECLARE_SOA_COLUMN(Eta, eta, float); //! eta +DECLARE_SOA_COLUMN(Phi, phi, float); //! phi +DECLARE_SOA_COLUMN(Mass, mass, float); //! mass of particle +DECLARE_SOA_COLUMN(MassAnti, massAnti, float); //! mass of antiparticle } // namespace stored namespace dynamic @@ -227,7 +227,7 @@ DECLARE_SOA_DYNAMIC_COLUMN(TpctofNSigmaHe, tpctofNSigmaHe, [](float tpc, float t // table for basic track information DECLARE_SOA_TABLE_STAGED_VERSIONED(FTracks_001, "FTRACK", 1, //! femto tracks o2::soa::Index<>, - femtobase::stored::FColId, + femtobase::stored::CollisionId, femtobase::stored::SignedPt, femtobase::stored::Eta, femtobase::stored::Phi, @@ -239,6 +239,7 @@ DECLARE_SOA_TABLE_STAGED_VERSIONED(FTracks_001, "FTRACK", 1, //! femto tracks femtobase::dynamic::Pz, femtobase::dynamic::Theta); using FTracks = FTracks_001; +using FTrack = FTracks::iterator; using StoredFTracks = StoredFTracks_001; // table for track selections and PID selections @@ -337,7 +338,7 @@ DECLARE_SOA_INDEX_COLUMN_FULL(NegDau, negDau, int32_t, FTracks, "_NegDau"); //! // table for phis DECLARE_SOA_TABLE_STAGED_VERSIONED(FPhis_001, "FPHI", 1, //! femto phis o2::soa::Index<>, - femtobase::stored::FColId, + femtobase::stored::CollisionId, femtobase::stored::Pt, femtobase::stored::Eta, femtobase::stored::Phi, @@ -357,7 +358,7 @@ using FPhiMasks = FPhiMasks_001; // table for kstars DECLARE_SOA_TABLE_STAGED_VERSIONED(FKstar0s_001, "FKSTAR0", 1, //! femto k0star o2::soa::Index<>, - femtobase::stored::FColId, + femtobase::stored::CollisionId, femtobase::stored::SignedPt, //! +1 for k0star and -1 for k0starbar femtobase::stored::Eta, femtobase::stored::Phi, @@ -378,7 +379,7 @@ using FKstar0Masks = FKstar0Masks_001; DECLARE_SOA_TABLE_STAGED_VERSIONED(FRho0s_001, "FRHO0", 1, //! femto rho0s o2::soa::Index<>, - femtobase::stored::FColId, + femtobase::stored::CollisionId, femtobase::stored::Pt, femtobase::stored::Eta, femtobase::stored::Phi, @@ -424,7 +425,7 @@ DECLARE_SOA_INDEX_COLUMN_FULL(NegDau, negDau, int32_t, FTracks, "_NegDau"); //! // table for basic lambda information DECLARE_SOA_TABLE_STAGED_VERSIONED(FLambdas_001, "FLAMBDA", 1, //! femto lambdas o2::soa::Index<>, - femtobase::stored::FColId, + femtobase::stored::CollisionId, femtobase::stored::SignedPt, // use sign to differentiate between lambda (+1) and antilambda (-1) femtobase::stored::Eta, femtobase::stored::Phi, @@ -462,7 +463,7 @@ using FLambdaExtras = FLambdaExtras_001; // table for basic k0short information DECLARE_SOA_TABLE_STAGED_VERSIONED(FK0shorts_001, "FK0SHORT", 1, //! femto k0shorts o2::soa::Index<>, - femtobase::stored::FColId, + femtobase::stored::CollisionId, femtobase::stored::Pt, femtobase::stored::Eta, femtobase::stored::Phi, @@ -516,7 +517,7 @@ DECLARE_SOA_INDEX_COLUMN_FULL(ChaDau, chaDau, int32_t, FTracks, "_ChaDau"); //! // table for basic sigma minus information DECLARE_SOA_TABLE_STAGED_VERSIONED(FSigmas_001, "FSIGMA", 1, o2::soa::Index<>, - femtobase::stored::FColId, // use sign to differentiate between sigma minus (-1) and anti sigma minus (+1) + femtobase::stored::CollisionId, // use sign to differentiate between sigma minus (-1) and anti sigma minus (+1) femtobase::stored::SignedPt, femtobase::stored::Eta, femtobase::stored::Phi, @@ -570,7 +571,7 @@ DECLARE_SOA_INDEX_COLUMN_FULL(Bachelor, bachelor, int32_t, FTracks, "_Bachelor") DECLARE_SOA_TABLE_STAGED_VERSIONED(FXis_001, "FXI", 1, //! femto xis o2::soa::Index<>, - femtobase::stored::FColId, + femtobase::stored::CollisionId, femtobase::stored::SignedPt, femtobase::stored::Eta, femtobase::stored::Phi, @@ -604,7 +605,7 @@ using FXiExtras = FXiExtras_001; DECLARE_SOA_TABLE_STAGED_VERSIONED(FOmegas_001, "FOMEGA", 1, //! femto omegas o2::soa::Index<>, - femtobase::stored::FColId, + femtobase::stored::CollisionId, femtobase::stored::SignedPt, femtobase::stored::Eta, femtobase::stored::Phi, diff --git a/PWGCF/Femto/TableProducer/femtoProducer.cxx b/PWGCF/Femto/TableProducer/femtoProducer.cxx index 06ee87b2a7c..457706ac058 100644 --- a/PWGCF/Femto/TableProducer/femtoProducer.cxx +++ b/PWGCF/Femto/TableProducer/femtoProducer.cxx @@ -197,29 +197,35 @@ struct FemtoProducer { LOG(fatal) << "At least one cascade table is enabled, but wrong process function is enabled. Breaking..."; } if ((lambdaBuilder.fillAnyTable() || antilambdaBuilder.fillAnyTable() || k0shortBuilder.fillAnyTable()) && (!doprocessTracksV0sCascadesRun3pp && !doprocessTracksV0sRun3pp && !doprocessTracksV0sCascadesKinksRun3pp)) { - LOG(info) << "At least one v0 table is enabled, but wrong process function is enabled. Breaking..."; + LOG(fatal) << "At least one v0 table is enabled, but wrong process function is enabled. Breaking..."; } - if (sigmaBuilder.fillAnyTable() && !doprocessTracksKinksRun3pp && !doprocessTracksV0sCascadesKinksRun3pp) { + if (sigmaBuilder.fillAnyTable() && (!doprocessTracksKinksRun3pp && !doprocessTracksV0sCascadesKinksRun3pp)) { LOG(fatal) << "At least one kink table is enabled, but wrong process function is enabled. Breaking..."; } } - // Core implementation, parameterized by builders to call - template - void processTracks(T1 const& col, T2 const& /* bcs*/, T3 const& tracks, T4 const& tracksWithItsPid) + // Core implementations + template + bool processCollisions(T1 const& col, T2 const& /* bcs*/, T3 const& tracks) { auto bc = col.template bc_as(); collisionBuilder.initCollision(bc, col, tracks, ccdb, hRegistry); if (!collisionBuilder.checkCollision(col)) { - return; + return false; } collisionBuilder.fillCollision(collisionBuilderProducts, col); + return true; + } - // tracks - indexMapTracks.clear(); + template + void processTracks(T1 const& tracksWithItsPid) + { trackBuilder.fillTracks(tracksWithItsPid, trackBuilderProducts, collisionBuilderProducts, indexMapTracks); + } - // resonances + template + void processResonances(T1 const& col, T2 const& /*tracks*/) + { auto groupPositiveTracks = partitionPositiveDaughters->sliceByCached(o2::aod::track::collisionId, col.globalIndex(), cache); auto groupNegativeTracks = partitionNegativeDaughters->sliceByCached(o2::aod::track::collisionId, col.globalIndex(), cache); rho0Builder.fillResonances(collisionBuilderProducts, trackBuilderProducts, twoTrackResonanceBuilderProducts, groupPositiveTracks, groupNegativeTracks, trackBuilder, indexMapTracks); @@ -229,40 +235,25 @@ struct FemtoProducer { } // add v0s - template - void processTracksV0s(T1 const& col, T2 const& bcs, T3 const& tracks, T4 const& tracksWithItsPid, T5 const& v0s) + template + void processV0s(T1 const& tracks, T2 const& v0s) { - processTracks(col, bcs, tracks, tracksWithItsPid); lambdaBuilder.fillV0s(collisionBuilderProducts, trackBuilderProducts, v0builderProducts, v0s, tracks, trackBuilder, indexMapTracks); antilambdaBuilder.fillV0s(collisionBuilderProducts, trackBuilderProducts, v0builderProducts, v0s, tracks, trackBuilder, indexMapTracks); k0shortBuilder.fillV0s(collisionBuilderProducts, trackBuilderProducts, v0builderProducts, v0s, tracks, trackBuilder, indexMapTracks); } // add kinks - template - void processTracksKinks(T1 const& col, T2 const& bcs, T3 const& tracks, T4 const& tracksWithItsPid, T5 const& kinks) + template + void processKinks(T1 const& tracks, T2 const& kinks) { - processTracks(col, bcs, tracks, tracksWithItsPid); sigmaBuilder.fillKinks(collisionBuilderProducts, trackBuilderProducts, kinkBuilderProducts, kinks, tracks, trackBuilder, indexMapTracks); } // add cascades - template - void processTracksV0sCascades(T1 const& col, T2 const& bcs, T3 const& tracks, T4 const& tracksWithItsPid, T5 const& v0s, T6 const& cascades) + template + void processCascades(T1 const& col, T2 const& tracks, T3 const& cascades) { - processTracksV0s(col, bcs, tracks, tracksWithItsPid, v0s); - xiBuilder.fillCascades(collisionBuilderProducts, trackBuilderProducts, cascadeBuilderProducts, - cascades, tracks, col, trackBuilder, indexMapTracks); - omegaBuilder.fillCascades(collisionBuilderProducts, trackBuilderProducts, cascadeBuilderProducts, - cascades, tracks, col, trackBuilder, indexMapTracks); - } - - // add kinks - template - void processTracksV0sCascadesKinks(T1 const& col, T2 const& bcs, T3 const& tracks, T4 const& tracksWithItsPid, T5 const& v0s, T6 const& cascades, T7 const& kinks) - { - processTracksV0s(col, bcs, tracks, tracksWithItsPid, v0s); - sigmaBuilder.fillKinks(collisionBuilderProducts, trackBuilderProducts, kinkBuilderProducts, kinks, tracks, trackBuilder, indexMapTracks); xiBuilder.fillCascades(collisionBuilderProducts, trackBuilderProducts, cascadeBuilderProducts, cascades, tracks, col, trackBuilder, indexMapTracks); omegaBuilder.fillCascades(collisionBuilderProducts, trackBuilderProducts, cascadeBuilderProducts, @@ -274,10 +265,14 @@ struct FemtoProducer { BCsWithTimestamps const& bcs, consumeddata::Run3FullPidTracks const& tracks) { - // its pid information is generated dynamically, so we need to add it here + if (!processCollisions(col, bcs, tracks)) { + return; + } + indexMapTracks.clear(); auto tracksWithItsPid = o2::soa::Attach(tracks); - processTracks(col, bcs, tracks, tracksWithItsPid); + processTracks(tracksWithItsPid); + processResonances(col, tracks); } PROCESS_SWITCH(FemtoProducer, processTracksRun3pp, "Process tracks", true); @@ -287,10 +282,15 @@ struct FemtoProducer { consumeddata::Run3FullPidTracks const& tracks, consumeddata::Run3PpVzeros const& v0s) { - // its pid information is generated dynamically, so we need to add it here + if (!processCollisions(col, bcs, tracks)) { + return; + } + indexMapTracks.clear(); auto tracksWithItsPid = o2::soa::Attach(tracks); - processTracksV0s(col, bcs, tracks, tracksWithItsPid, v0s); + processTracks(tracksWithItsPid); + processResonances(col, tracks); + processV0s(tracks, v0s); }; PROCESS_SWITCH(FemtoProducer, processTracksV0sRun3pp, "Process tracks and v0s", false); @@ -300,10 +300,15 @@ struct FemtoProducer { consumeddata::Run3FullPidTracks const& tracks, consumeddata::Run3PpKinks const& kinks) { - // its pid information is generated dynamically, so we need to add it here + if (!processCollisions(col, bcs, tracks)) { + return; + } + indexMapTracks.clear(); auto tracksWithItsPid = o2::soa::Attach(tracks); - processTracksKinks(col, bcs, tracks, tracksWithItsPid, kinks); + processTracks(tracksWithItsPid); + processResonances(col, tracks); + processKinks(tracks, kinks); } PROCESS_SWITCH(FemtoProducer, processTracksKinksRun3pp, "Process tracks and kinks", false); @@ -314,10 +319,16 @@ struct FemtoProducer { consumeddata::Run3PpVzeros const& v0s, consumeddata::Run3PpCascades const& cascades) { - // its pid information is generated dynamically, so we need to add it here + if (!processCollisions(col, bcs, tracks)) { + return; + } + indexMapTracks.clear(); auto tracksWithItsPid = o2::soa::Attach(tracks); - processTracksV0sCascades(col, bcs, tracks, tracksWithItsPid, v0s, cascades); + processTracks(tracksWithItsPid); + processResonances(col, tracks); + processV0s(tracks, v0s); + processCascades(col, tracks, cascades); } PROCESS_SWITCH(FemtoProducer, processTracksV0sCascadesRun3pp, "Provide Tracks, V0s and Cascades for Run3", false); @@ -329,10 +340,17 @@ struct FemtoProducer { consumeddata::Run3PpCascades const& cascades, consumeddata::Run3PpKinks const& kinks) { - // its pid information is generated dynamically, so we need to add it here + if (!processCollisions(col, bcs, tracks)) { + return; + } + indexMapTracks.clear(); auto tracksWithItsPid = o2::soa::Attach(tracks); - processTracksV0sCascadesKinks(col, bcs, tracks, tracksWithItsPid, v0s, cascades, kinks); + processTracks(tracksWithItsPid); + processResonances(col, tracks); + processV0s(tracks, v0s); + processKinks(tracks, kinks); + processCascades(col, tracks, cascades); } PROCESS_SWITCH(FemtoProducer, processTracksV0sCascadesKinksRun3pp, "Provide Tracks, V0s and Cascades for Run3", false); }; diff --git a/PWGCF/Femto/TableProducer/femtoProducerDerivedToDerived.cxx b/PWGCF/Femto/TableProducer/femtoProducerDerivedToDerived.cxx index d3806ae5f78..bbeac637531 100644 --- a/PWGCF/Femto/TableProducer/femtoProducerDerivedToDerived.cxx +++ b/PWGCF/Femto/TableProducer/femtoProducerDerivedToDerived.cxx @@ -67,7 +67,7 @@ struct FemtoProducerDerivedToDerived { Partition trackPartition1 = MAKE_TRACK_PARTITION(trackSelections1); Partition trackPartition2 = MAKE_TRACK_PARTITION(trackSelections2); - Preslice perColTracks = femtobase::stored::fColId; + Preslice perColTracks = femtobase::stored::collisionId; // v0 builder v0builder::V0BuilderDerivedToDerived v0Builder; @@ -76,11 +76,11 @@ struct FemtoProducerDerivedToDerived { v0builder::ConfLambdaSelection1 lambdaSelection1; Partition lambdaPartition = MAKE_LAMBDA_PARTITION(lambdaSelection1); - Preslice perColLambdas = femtobase::stored::fColId; + Preslice perColLambdas = femtobase::stored::collisionId; v0builder::ConfK0shortSelection1 k0shortSelection1; Partition k0shortPartition = MAKE_K0SHORT_PARTITION(k0shortSelection1); - Preslice perColK0shorts = femtobase::stored::fColId; + Preslice perColK0shorts = femtobase::stored::collisionId; std::unordered_map indexMapTracks; // for mapping tracks to lambdas, cascades and resonances diff --git a/PWGCF/Femto/Tasks/femtoCascadeQa.cxx b/PWGCF/Femto/Tasks/femtoCascadeQa.cxx index 984094e065e..a9cfcc78b9d 100644 --- a/PWGCF/Femto/Tasks/femtoCascadeQa.cxx +++ b/PWGCF/Femto/Tasks/femtoCascadeQa.cxx @@ -68,7 +68,7 @@ struct FemtoCascadeQa { // setup for xis cascadebuilder::ConfXiSelection confXiSelection; Partition xiPartition = MAKE_CASCADE_PARTITION(confXiSelection); - Preslice preColXis = aod::femtobase::stored::fColId; + Preslice preColXis = aod::femtobase::stored::collisionId; cascadehistmanager::ConfXiBinning confXiBinning; cascadehistmanager::ConfXiQaBinning confXiQaBinning; @@ -84,7 +84,7 @@ struct FemtoCascadeQa { // setup for omegas cascadebuilder::ConfOmegaSelection confOmegaSelection; Partition omegaPartition = MAKE_CASCADE_PARTITION(confOmegaSelection); - Preslice preColOmegas = aod::femtobase::stored::fColId; + Preslice preColOmegas = aod::femtobase::stored::collisionId; cascadehistmanager::ConfOmegaBinning confOmegaBinning; cascadehistmanager::ConfOmegaQaBinning confOmegaQaBinning; @@ -135,7 +135,7 @@ struct FemtoCascadeQa { void processXis(FilteredCollision const& col, Xis const& /*xis*/, Tracks const& tracks) { colHistManager.fill(col); - auto xiSlice = xiPartition->sliceByCached(femtobase::stored::fColId, col.globalIndex(), cache); + auto xiSlice = xiPartition->sliceByCached(femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& xi : xiSlice) { xiHistManager.fill(xi, tracks); } @@ -145,7 +145,7 @@ struct FemtoCascadeQa { void processOmegas(FilteredCollision const& col, Omegas const& /*omegas*/, Tracks const& tracks) { colHistManager.fill(col); - auto omegaSlice = omegaPartition->sliceByCached(femtobase::stored::fColId, col.globalIndex(), cache); + auto omegaSlice = omegaPartition->sliceByCached(femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& omega : omegaSlice) { omegaHistManager.fill(omega, tracks); } diff --git a/PWGCF/Femto/Tasks/femtoKinkQa.cxx b/PWGCF/Femto/Tasks/femtoKinkQa.cxx index febd696e3fe..2b4316159f8 100644 --- a/PWGCF/Femto/Tasks/femtoKinkQa.cxx +++ b/PWGCF/Femto/Tasks/femtoKinkQa.cxx @@ -71,7 +71,7 @@ struct FemtoKinkQa { kinkbuilder::ConfSigmaSelection1 confSigmaSelection; Partition sigmaPartition = MAKE_SIGMA_PARTITION(confSigmaSelection); - Preslice perColSigmas = aod::femtobase::stored::fColId; + Preslice perColSigmas = aod::femtobase::stored::collisionId; kinkhistmanager::ConfSigmaBinning1 confSigmaBinning; kinkhistmanager::ConfSigmaQaBinning1 confSigmaQaBinning; @@ -103,7 +103,7 @@ struct FemtoKinkQa { void processSigma(FilteredCollision const& col, Sigmas const& /*sigmas*/, Tracks const& tracks) { colHistManager.fill(col); - auto sigmaSlice = sigmaPartition->sliceByCached(femtobase::stored::fColId, col.globalIndex(), cache); + auto sigmaSlice = sigmaPartition->sliceByCached(femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& sigma : sigmaSlice) { sigmaHistManager.fill(sigma, tracks); } diff --git a/PWGCF/Femto/Tasks/femtoPairTrackCascade.cxx b/PWGCF/Femto/Tasks/femtoPairTrackCascade.cxx index ee7d9d5e409..f033eca7dc8 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackCascade.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackCascade.cxx @@ -71,7 +71,7 @@ struct FemtoPairTrackCascade { trackbuilder::ConfTrackSelection1 trackSelection; trackhistmanager::ConfTrackBinning1 confTrackBinning; Partition trackPartition = MAKE_TRACK_PARTITION(trackSelection); - Preslice perColTracks = aod::femtobase::stored::fColId; + Preslice perColTracks = aod::femtobase::stored::collisionId; // setup for daughters/bachelor trackhistmanager::ConfCascadePosDauBinning confPosDauBinning; @@ -82,13 +82,13 @@ struct FemtoPairTrackCascade { cascadebuilder::ConfXiSelection xiSelection; cascadehistmanager::ConfXiBinning confXiBinning; Partition xiPartition = MAKE_CASCADE_PARTITION(xiSelection); - Preslice perColXis = aod::femtobase::stored::fColId; + Preslice perColXis = aod::femtobase::stored::collisionId; // setup omegas cascadebuilder::ConfOmegaSelection omegaSelection; cascadehistmanager::ConfOmegaBinning confOmegaBinning; Partition omegaPartition = MAKE_CASCADE_PARTITION(omegaSelection); - Preslice perColOmegas = aod::femtobase::stored::fColId; + Preslice perColOmegas = aod::femtobase::stored::collisionId; // setup pairs pairhistmanager::ConfPairBinning confPairBinning; diff --git a/PWGCF/Femto/Tasks/femtoPairTrackKink.cxx b/PWGCF/Femto/Tasks/femtoPairTrackKink.cxx index d0fd689fe21..e5a049824d6 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackKink.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackKink.cxx @@ -71,7 +71,7 @@ struct FemtoPairTrackKink { trackbuilder::ConfTrackSelection1 trackSelection; trackhistmanager::ConfTrackBinning1 confTrackBinning; Partition trackPartition = MAKE_TRACK_PARTITION(trackSelection); - Preslice perColTracks = aod::femtobase::stored::fColId; + Preslice perColTracks = aod::femtobase::stored::collisionId; // setup for daughters trackhistmanager::ConfKinkChaDauBinning confChaDauBinning; @@ -80,7 +80,7 @@ struct FemtoPairTrackKink { kinkbuilder::ConfSigmaSelection1 sigmaSelection; kinkhistmanager::ConfSigmaBinning1 confSigmaBinning; Partition sigmaPartition = MAKE_SIGMA_PARTITION(sigmaSelection); - Preslice perColSigmas = aod::femtobase::stored::fColId; + Preslice perColSigmas = aod::femtobase::stored::collisionId; // setup pairs pairhistmanager::ConfPairBinning confPairBinning; diff --git a/PWGCF/Femto/Tasks/femtoPairTrackTrack.cxx b/PWGCF/Femto/Tasks/femtoPairTrackTrack.cxx index 517478ed117..1e96f2617d5 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackTrack.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackTrack.cxx @@ -72,7 +72,7 @@ struct FemtoPairTrackTrack { Partition trackPartition1 = MAKE_TRACK_PARTITION(trackSelections1); Partition trackPartition2 = MAKE_TRACK_PARTITION(trackSelections2); - Preslice perColReco = aod::femtobase::stored::fColId; + Preslice perColReco = aod::femtobase::stored::collisionId; // setup pairs pairhistmanager::ConfPairBinning confPairBinning; diff --git a/PWGCF/Femto/Tasks/femtoPairTrackTwoTrackResonance.cxx b/PWGCF/Femto/Tasks/femtoPairTrackTwoTrackResonance.cxx index 73a340cde8a..516499cd801 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackTwoTrackResonance.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackTwoTrackResonance.cxx @@ -72,7 +72,7 @@ struct FemtoPairTrackTwoTrackResonance { trackbuilder::ConfTrackSelection1 trackSelection; trackhistmanager::ConfTrackBinning1 confTrackBinning; Partition trackPartition = MAKE_TRACK_PARTITION(trackSelection); - Preslice perColTracks = aod::femtobase::stored::fColId; + Preslice perColTracks = aod::femtobase::stored::collisionId; // setup for daughters trackhistmanager::ConfResonancePosDauBinning confPosDauBinning; @@ -82,19 +82,19 @@ struct FemtoPairTrackTwoTrackResonance { twotrackresonancebuilder::ConfPhiSelection phiSelection; twotrackresonancehistmanager::ConfPhiBinning confPhiBinning; Partition phiPartition = MAKE_RESONANCE_0_PARTITON(phiSelection); - Preslice perColPhis = aod::femtobase::stored::fColId; + Preslice perColPhis = aod::femtobase::stored::collisionId; // setup kstar0 twotrackresonancebuilder::ConfKstar0Selection kstar0Selection; twotrackresonancehistmanager::ConfKstar0Binning confKstar0Binning; Partition kstar0Partition = MAKE_RESONANCE_1_PARTITON(kstar0Selection); - Preslice perColKstar0s = aod::femtobase::stored::fColId; + Preslice perColKstar0s = aod::femtobase::stored::collisionId; // rho0s twotrackresonancebuilder::ConfRho0Selection rho0Selection; twotrackresonancehistmanager::ConfRho0Binning confRho0Binning; Partition rho0Partition = MAKE_RESONANCE_0_PARTITON(rho0Selection); - Preslice perColRho0s = aod::femtobase::stored::fColId; + Preslice perColRho0s = aod::femtobase::stored::collisionId; // setup pairs pairhistmanager::ConfPairBinning confPairBinning; diff --git a/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx b/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx index 64fcb671314..b792421c058 100644 --- a/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx +++ b/PWGCF/Femto/Tasks/femtoPairTrackV0.cxx @@ -71,7 +71,7 @@ struct FemtoPairTrackV0 { trackbuilder::ConfTrackSelection1 trackSelection; trackhistmanager::ConfTrackBinning1 confTrackBinning; Partition trackPartition = MAKE_TRACK_PARTITION(trackSelection); - Preslice perColTracks = aod::femtobase::stored::fColId; + Preslice perColTracks = aod::femtobase::stored::collisionId; // setup for daughters trackhistmanager::ConfV0PosDauBinning confPosDauBinning; @@ -81,13 +81,13 @@ struct FemtoPairTrackV0 { v0builder::ConfLambdaSelection1 lambdaSelection; v0histmanager::ConfLambdaBinning1 confLambdaBinning; Partition lambdaPartition = MAKE_LAMBDA_PARTITION(lambdaSelection); - Preslice perColLambdas = aod::femtobase::stored::fColId; + Preslice perColLambdas = aod::femtobase::stored::collisionId; // setup k0shorts v0builder::ConfK0shortSelection1 k0shortSelection; v0histmanager::ConfK0shortBinning1 confK0shortBinning; Partition k0shortPartition = MAKE_K0SHORT_PARTITION(k0shortSelection); - Preslice perColk0shorts = aod::femtobase::stored::fColId; + Preslice perColk0shorts = aod::femtobase::stored::collisionId; // setup pairs pairhistmanager::ConfPairBinning confPairBinning; diff --git a/PWGCF/Femto/Tasks/femtoPairV0V0.cxx b/PWGCF/Femto/Tasks/femtoPairV0V0.cxx index bda347ad110..0f2da302f7e 100644 --- a/PWGCF/Femto/Tasks/femtoPairV0V0.cxx +++ b/PWGCF/Femto/Tasks/femtoPairV0V0.cxx @@ -75,13 +75,13 @@ struct FemtoPairV0V0 { v0builder::ConfLambdaSelection1 lambdaSelection; v0histmanager::ConfLambdaBinning1 confLambdaBinning; Partition lambdaPartition = MAKE_LAMBDA_PARTITION(lambdaSelection); - Preslice perColLambdas = aod::femtobase::stored::fColId; + Preslice perColLambdas = aod::femtobase::stored::collisionId; // setup k0shorts v0builder::ConfK0shortSelection1 k0shortSelection; v0histmanager::ConfK0shortBinning1 confK0shortBinning; Partition k0shortPartition = MAKE_K0SHORT_PARTITION(k0shortSelection); - Preslice perColk0shorts = aod::femtobase::stored::fColId; + Preslice perColk0shorts = aod::femtobase::stored::collisionId; // setup pairs pairhistmanager::ConfPairBinning confPairBinning; diff --git a/PWGCF/Femto/Tasks/femtoTrackQa.cxx b/PWGCF/Femto/Tasks/femtoTrackQa.cxx index cfe319e91fa..4ae2deb4cc9 100644 --- a/PWGCF/Femto/Tasks/femtoTrackQa.cxx +++ b/PWGCF/Femto/Tasks/femtoTrackQa.cxx @@ -67,7 +67,7 @@ struct FemtoTrackQa { trackhistmanager::TrackHistManager trackHistManager; Partition trackPartition = MAKE_TRACK_PARTITION(trackSelections); - Preslice perColReco = aod::femtobase::stored::fColId; + Preslice perColReco = aod::femtobase::stored::collisionId; HistogramRegistry hRegistry{"FemtoTrackQA", {}, OutputObjHandlingPolicy::AnalysisObject}; @@ -83,7 +83,7 @@ struct FemtoTrackQa { void process(FilteredCollision const& col, Tracks const& tracks) { colHistManager.fill(col); - auto trackSlice = trackPartition->sliceByCached(femtobase::stored::fColId, col.globalIndex(), cache); + auto trackSlice = trackPartition->sliceByCached(femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& track : trackSlice) { trackHistManager.fill(track, tracks); } diff --git a/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx b/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx index 527f0647672..fdc2d45accc 100644 --- a/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx +++ b/PWGCF/Femto/Tasks/femtoTwotrackresonanceQa.cxx @@ -23,14 +23,14 @@ #include "PWGCF/Femto/DataModel/FemtoTables.h" #include "Framework/ASoA.h" +#include "Framework/AnalysisHelpers.h" #include "Framework/AnalysisTask.h" #include "Framework/Configurable.h" #include "Framework/Expressions.h" #include "Framework/HistogramRegistry.h" -#include "Framework/runDataProcessing.h" -#include "Framework/AnalysisHelpers.h" -#include "Framework/OutputObjHeader.h" #include "Framework/InitContext.h" +#include "Framework/OutputObjHeader.h" +#include "Framework/runDataProcessing.h" #include #include @@ -69,7 +69,7 @@ struct FemtoTwotrackresonanceQa { // setup for phis twotrackresonancebuilder::ConfPhiSelection confPhiSelection; Partition phiPartition = MAKE_RESONANCE_0_PARTITON(confPhiSelection); - Preslice perColPhis = aod::femtobase::stored::fColId; + Preslice perColPhis = aod::femtobase::stored::collisionId; twotrackresonancehistmanager::ConfPhiBinning confPhiBinning; twotrackresonancehistmanager::TwoTrackResonanceHistManager< @@ -83,7 +83,7 @@ struct FemtoTwotrackresonanceQa { // setup for rho0s twotrackresonancebuilder::ConfRho0Selection confRho0Selection; Partition rho0Partition = MAKE_RESONANCE_0_PARTITON(confRho0Selection); - Preslice perColRhos = aod::femtobase::stored::fColId; + Preslice perColRhos = aod::femtobase::stored::collisionId; twotrackresonancehistmanager::ConfRho0Binning confRho0Binning; twotrackresonancehistmanager::TwoTrackResonanceHistManager< @@ -97,7 +97,7 @@ struct FemtoTwotrackresonanceQa { // setup for kstar0s twotrackresonancebuilder::ConfKstar0Selection confKstar0Selection; Partition kstar0Partition = MAKE_RESONANCE_1_PARTITON(confKstar0Selection); - Preslice perColKstars = aod::femtobase::stored::fColId; + Preslice perColKstars = aod::femtobase::stored::collisionId; twotrackresonancehistmanager::ConfKstar0Binning confKstar0Binning; twotrackresonancehistmanager::TwoTrackResonanceHistManager< @@ -147,7 +147,7 @@ struct FemtoTwotrackresonanceQa { void processPhis(FilteredCollision const& col, Phis const& /*phis*/, Tracks const& tracks) { colHistManager.fill(col); - auto phiSlice = phiPartition->sliceByCached(femtobase::stored::fColId, col.globalIndex(), cache); + auto phiSlice = phiPartition->sliceByCached(femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& phi : phiSlice) { phiHistManager.fill(phi, tracks); } @@ -157,7 +157,7 @@ struct FemtoTwotrackresonanceQa { void processRho0s(FilteredCollision const& col, Rho0s const& /*rho0s*/, Tracks const& tracks) { colHistManager.fill(col); - auto rho0Slice = rho0Partition->sliceByCached(femtobase::stored::fColId, col.globalIndex(), cache); + auto rho0Slice = rho0Partition->sliceByCached(femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& rho0 : rho0Slice) { rho0HistManager.fill(rho0, tracks); } @@ -167,7 +167,7 @@ struct FemtoTwotrackresonanceQa { void processKstar0s(FilteredCollision const& col, Kstar0s const& /*kstar0s*/, Tracks const& tracks) { colHistManager.fill(col); - auto kstar0Slice = kstar0Partition->sliceByCached(femtobase::stored::fColId, col.globalIndex(), cache); + auto kstar0Slice = kstar0Partition->sliceByCached(femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& kstar0 : kstar0Slice) { kstar0HistManager.fill(kstar0, tracks); } diff --git a/PWGCF/Femto/Tasks/femtoV0Qa.cxx b/PWGCF/Femto/Tasks/femtoV0Qa.cxx index 2b290ee93b6..27cafaa761c 100644 --- a/PWGCF/Femto/Tasks/femtoV0Qa.cxx +++ b/PWGCF/Femto/Tasks/femtoV0Qa.cxx @@ -46,7 +46,6 @@ using namespace o2::analysis::femto; struct FemtoV0Qa { using Collisions = o2::soa::Join; - using Collision = Collisions::iterator; using FilteredCollisions = o2::soa::Filtered; using FilteredCollision = FilteredCollisions::iterator; @@ -68,7 +67,7 @@ struct FemtoV0Qa { v0builder::ConfLambdaSelection1 confLambdaSelection; Partition lambdaPartition = MAKE_LAMBDA_PARTITION(confLambdaSelection); - Preslice perColLambdas = aod::femtobase::stored::fColId; + Preslice perColLambdas = aod::femtobase::stored::collisionId; v0histmanager::ConfLambdaBinning1 confLambdaBinning; v0histmanager::ConfLambdaQaBinning1 confLambdaQaBinning; @@ -84,7 +83,7 @@ struct FemtoV0Qa { v0builder::ConfK0shortSelection1 confK0shortSelection; Partition k0shortPartition = MAKE_K0SHORT_PARTITION(confK0shortSelection); - Preslice perColK0shorts = aod::femtobase::stored::fColId; + Preslice perColK0shorts = aod::femtobase::stored::collisionId; v0histmanager::ConfK0shortBinning1 confK0shortBinning; v0histmanager::ConfK0shortQaBinning1 confK0shortQaBinning; @@ -129,20 +128,20 @@ struct FemtoV0Qa { } }; - void processK0short(FilteredCollision const& col, K0shorts const& /*k0shorts*/, Tracks const& tracks) + void processK0short(FilteredCollision const& col, Tracks const& tracks, K0shorts const& /*k0shorts*/) { colHistManager.fill(col); - auto k0shortSlice = k0shortPartition->sliceByCached(femtobase::stored::fColId, col.globalIndex(), cache); + auto k0shortSlice = k0shortPartition->sliceByCached(femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& k0short : k0shortSlice) { k0shortHistManager.fill(k0short, tracks); } } PROCESS_SWITCH(FemtoV0Qa, processK0short, "Process k0shorts", false); - void processLambda(FilteredCollision const& col, Lambdas const& /*lambdas*/, Tracks const& tracks) + void processLambda(FilteredCollision const& col, Tracks const& tracks, Lambdas const& /*lambdas*/) { colHistManager.fill(col); - auto lambdaSlice = lambdaPartition->sliceByCached(femtobase::stored::fColId, col.globalIndex(), cache); + auto lambdaSlice = lambdaPartition->sliceByCached(femtobase::stored::collisionId, col.globalIndex(), cache); for (auto const& lambda : lambdaSlice) { lambdaHistManager.fill(lambda, tracks); }