diff --git a/PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt b/PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt index 14dc66b22f0..2afcf9e4afc 100644 --- a/PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt +++ b/PWGCF/EbyEFluctuations/Tasks/CMakeLists.txt @@ -73,3 +73,8 @@ o2physics_add_dpl_workflow(v0pt-had-pi-ka-prot SOURCES v0ptHadPiKaProt.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(part-num-fluc + SOURCES partNumFluc.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGCFCore + COMPONENT_NAME Analysis) diff --git a/PWGCF/EbyEFluctuations/Tasks/partNumFluc.cxx b/PWGCF/EbyEFluctuations/Tasks/partNumFluc.cxx new file mode 100644 index 00000000000..7230fcbd76d --- /dev/null +++ b/PWGCF/EbyEFluctuations/Tasks/partNumFluc.cxx @@ -0,0 +1,1684 @@ +// Copyright 2019-2020 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 partNumFluc.cxx +/// \brief Task for particle number fluctuation analysis +/// \author Fan Si + +#include "Common/DataModel/Centrality.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/McCollisionExtra.h" +#include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/PIDResponse.h" +#include "Common/DataModel/TrackSelectionTables.h" + +#include "CCDB/BasicCCDBManager.h" +#include "CommonConstants/MathConstants.h" +#include "CommonConstants/PhysicsConstants.h" +#include "Framework/ASoA.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace o2; +using namespace o2::framework; +using namespace o2::framework::expressions; + +namespace o2 +{ +namespace aod +{ +using JoinedCollisions = soa::Join; +using JoinedTracks = soa::Join; +using JoinedCollisionsWithMc = soa::Join; +using JoinedTracksWithMc = soa::Join; +using JoinedMcCollisions = soa::Join; +} // namespace aod +} // namespace o2 + +namespace fluctuation_calculator_base +{ +inline constexpr std::int8_t kMaxOrder = 8; +inline constexpr std::uint8_t kNExponentPairs = 36; +inline constexpr std::uint16_t kNOrderVectors = 342; +inline constexpr std::array, kNExponentPairs> kExponentPairs = {{{1, 1}, {2, 1}, {2, 2}, {3, 1}, {3, 2}, {3, 3}, {4, 1}, {4, 2}, {4, 3}, {4, 4}, {5, 1}, {5, 2}, {5, 3}, {5, 4}, {5, 5}, {6, 1}, {6, 2}, {6, 3}, {6, 4}, {6, 5}, {6, 6}, {7, 1}, {7, 2}, {7, 3}, {7, 4}, {7, 5}, {7, 6}, {7, 7}, {8, 1}, {8, 2}, {8, 3}, {8, 4}, {8, 5}, {8, 6}, {8, 7}, {8, 8}}}; +inline constexpr std::array, kNOrderVectors> kOrderVectors = {{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, + {0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}}; +} // namespace fluctuation_calculator_base + +class FluctuationCalculatorTrack +{ + public: + FluctuationCalculatorTrack() : mQs{} {} + virtual ~FluctuationCalculatorTrack() {} + + double getProductFast(const std::int32_t orderVectorIndex, const double weight = 1.) const + { + double product = 1.; + for (std::int32_t const& iExponentPair : std::views::iota(0, static_cast(fluctuation_calculator_base::kNExponentPairs))) { + if (fluctuation_calculator_base::kOrderVectors[orderVectorIndex][iExponentPair]) { + product *= std::pow(mQs[iExponentPair], fluctuation_calculator_base::kOrderVectors[orderVectorIndex][iExponentPair]); + } + } + return product * weight; + } + void init() { mQs.fill(0.); } + void fill(const double charge, const double efficiency, const double weight = 1.) + { + for (std::int32_t const& iExponentPair : std::views::iota(0, static_cast(fluctuation_calculator_base::kNExponentPairs))) { + mQs[iExponentPair] += std::pow(charge, fluctuation_calculator_base::kExponentPairs[iExponentPair].first) / std::pow(efficiency, fluctuation_calculator_base::kExponentPairs[iExponentPair].second) * weight; + } + } + + protected: + std::array mQs; +}; + +struct QuantityHolderEvent { + std::int32_t runNumber = 0; + std::int32_t runIndex = 0; + std::int32_t nGlobalTracks = 0; + std::int32_t nPvContributors = 0; + std::int32_t nTofBeta = 0; + double meanDcaXy = 0.; + double meanSquareDcaXy = 0.; + double meanDcaZ = 0.; + double meanSquareDcaZ = 0.; + double vz = 0.; + double centrality = 0.; + std::int32_t subgroupIndex = 0; + std::int32_t nChP = 0; + std::int32_t nChM = 0; + std::int32_t nKaP = 0; + std::int32_t nKaM = 0; + std::int32_t nPrP = 0; + std::int32_t nPrM = 0; + std::vector mcParticleIndicesMatchedTpcPiP; + std::vector mcParticleIndicesMatchedTpcPiM; + std::vector mcParticleIndicesMatchedTpcKaP; + std::vector mcParticleIndicesMatchedTpcKaM; + std::vector mcParticleIndicesMatchedTpcPrP; + std::vector mcParticleIndicesMatchedTpcPrM; + std::vector mcParticleIndicesMatchedTpcTofPiP; + std::vector mcParticleIndicesMatchedTpcTofPiM; + std::vector mcParticleIndicesMatchedTpcTofKaP; + std::vector mcParticleIndicesMatchedTpcTofKaM; + std::vector mcParticleIndicesMatchedTpcTofPrP; + std::vector mcParticleIndicesMatchedTpcTofPrM; + + void clear() + { + runNumber = runIndex = nGlobalTracks = nPvContributors = nTofBeta = 0; + meanDcaXy = meanSquareDcaXy = meanDcaZ = meanSquareDcaZ = vz = centrality = 0.; + nChP = nChM = nKaP = nKaM = nPrP = nPrM = 0; + mcParticleIndicesMatchedTpcPiP.clear(); + mcParticleIndicesMatchedTpcPiM.clear(); + mcParticleIndicesMatchedTpcKaP.clear(); + mcParticleIndicesMatchedTpcKaM.clear(); + mcParticleIndicesMatchedTpcPrP.clear(); + mcParticleIndicesMatchedTpcPrM.clear(); + mcParticleIndicesMatchedTpcTofPiP.clear(); + mcParticleIndicesMatchedTpcTofPiM.clear(); + mcParticleIndicesMatchedTpcTofKaP.clear(); + mcParticleIndicesMatchedTpcTofKaM.clear(); + mcParticleIndicesMatchedTpcTofPrP.clear(); + mcParticleIndicesMatchedTpcTofPrM.clear(); + } +}; + +struct QuantityHolderTrack { + std::int32_t sign = 0; + double pt = 0.; + double eta = 0.; + double phi = 0.; + double ptOverQ = 0.; + double pOverQ = 0.; + double rapidityPi = 0.; + double rapidityKa = 0.; + double rapidityPr = 0.; + bool hasTpcPid = false; + double tpcNSigmaPi = 0.; + double tpcNSigmaKa = 0.; + double tpcNSigmaPr = 0.; + bool hasTofPid = false; + double tofNSigmaPi = 0.; + double tofNSigmaKa = 0.; + double tofNSigmaPr = 0.; + double tpcTofNSigmaPi = 0.; + double tpcTofNSigmaKa = 0.; + double tpcTofNSigmaPr = 0.; + std::int32_t mcParticleId = 0; + + void clear() + { + sign = 0; + pt = eta = phi = ptOverQ = pOverQ = rapidityPi = rapidityKa = rapidityPr = 0.; + hasTpcPid = false; + tpcNSigmaPi = tpcNSigmaKa = tpcNSigmaPr = 0.; + hasTofPid = false; + tofNSigmaPi = tofNSigmaKa = tofNSigmaPr = tpcTofNSigmaPi = tpcTofNSigmaKa = tpcTofNSigmaPr = 0.; + mcParticleId = 0; + } +}; + +struct QuantityHolderMcParticle { + std::int32_t globalIndex = 0; + std::int32_t pdgCode = 0; + double pt = 0.; + double eta = 0.; + + void clear() + { + globalIndex = pdgCode = 0; + pt = eta = 0.; + } +}; + +struct PartNumFluc { + Service ccdb; + + Configurable cfgFlagQaRun{"cfgFlagQaRun", false, "Run QA flag"}; + Configurable cfgFlagQaEvent{"cfgFlagQaEvent", false, "Event QA flag"}; + Configurable cfgFlagQaCentrality{"cfgFlagQaCentrality", false, "Centrality QA flag"}; + Configurable cfgFlagQaTrack{"cfgFlagQaTrack", false, "Track QA flag"}; + Configurable cfgFlagQaPid{"cfgFlagQaPid", false, "PID QA flag"}; + Configurable cfgFlagQaAcceptance{"cfgFlagQaAcceptance", false, "Acceptance QA flag"}; + Configurable cfgFlagAnalysisFluctuationCh{"cfgFlagAnalysisFluctuationCh", false, "Charge number fLuctuation analysis flag"}; + Configurable cfgFlagAnalysisFluctuationKa{"cfgFlagAnalysisFluctuationKa", false, "Kaon number fLuctuation analysis flag"}; + Configurable cfgFlagAnalysisFluctuationPr{"cfgFlagAnalysisFluctuationPr", false, "(Anti)proton number fLuctuation analysis flag"}; + Configurable cfgFlagCalculationEfficiency{"cfgFlagCalculationEfficiency", true, "Efficiency calculation flag"}; + + Configurable> cfgListRun{"cfgListRun", {551759, 551760, 551761, 551780, 551843, 551856, 551874, 551875, 551877, 551889, 551890, 551894, 551921, 551922, 551923, 551924, 551925, 551926, 551931, 551943, 551958, 551977, 551979, 551982, 551983, 551989, 551992, 551993, 551997, 552005, 552029, 552080, 552102, 552103, 552138, 552139, 552140, 552141, 552142, 552156, 552176, 552177, 552178, 552179, 552197, 552198, 552200, 552201, 552203, 552204, 552205, 552206, 552283, 552285, 552304, 552340, 552341, 552353, 552369, 552381, 552382, 552383, 552384, 552400, 552401, 552402, 552403}, "List of run numbers"}; + Configurable> cfgListRunBad{"cfgListRunBad", {}, "List of bad run numbers"}; + + Configurable cfgFlagEventSel{"cfgFlagEventSel", 0b00000000001111110100000000000000000000000000000000ULL, "Event selection flag"}; + Configurable cfgCutMaxAbsVertexZ{"cfgCutMaxAbsVertexZ", 6., "Maximum absolute vertex z position (cm)"}; + Configurable cfgCutMinNPvContributorsDeviation{"cfgCutMinNPvContributorsDeviation", -4, "Minimum nPvContributors deviation from nGlobalTracks"}; + + Configurable cfgFlagPvContributor{"cfgFlagPvContributor", true, "Flag of requiring PV contributor"}; + Configurable cfgCutMinItsNCls{"cfgCutMinItsNCls", 5, "Minimum number of clusters ITS"}; + Configurable cfgCutMaxItsChi2NCls{"cfgCutMaxItsChi2NCls", 30., "Maximum chi2 per cluster ITS"}; + Configurable cfgCutMinTpcNCls{"cfgCutMinTpcNCls", 55, "Minimum number of clusters TPC"}; // 50, 60 + Configurable cfgCutMaxTpcChi2NCls{"cfgCutMaxTpcChi2NCls", 3.5, "Maximum chi2 per cluster TPC"}; // 3., 4. + Configurable cfgCutMaxTpcNClsSharedRatio{"cfgCutMaxTpcNClsSharedRatio", 0.2, "Maximum ratio of shared clusters over clusters TPC"}; + Configurable cfgCutMinTpcNClsCrossedRows{"cfgCutMinTpcNClsCrossedRows", 75, "Minimum number of crossed rows TPC"}; // 70, 80 + Configurable cfgCutMinTpcNClsCrossedRowsRatio{"cfgCutMinTpcNClsCrossedRowsRatio", 0.8, "Minimum ratio of crossed rows over findable clusters TPC"}; + Configurable> cfgParSigmaDcaXy{"cfgParSigmaDcaXy", {0.0015, 0.005, 1.1}, "Parameters of sigma of DCAxy (cm) in [0]+[1]*pt^[2]"}; + Configurable cfgCutMaxAbsNSigmaDcaXy{"cfgCutMaxAbsNSigmaDcaXy", 6., "Maximum absolute nSigma of DCAxy (cm)"}; // 5., 7. + Configurable cfgCutMaxAbsDcaZ{"cfgCutMaxAbsDcaZ", 0.2, "Maximum absolute DCAz (cm)"}; // 0.15, 0.25 + Configurable cfgCutMinPt{"cfgCutMinPt", 0.4, "Minimum pT (GeV/c)"}; + Configurable cfgCutMaxPt{"cfgCutMaxPt", 2., "Maximum pT (GeV/c)"}; + Configurable cfgCutMaxAbsEta{"cfgCutMaxAbsEta", 0.8, "Maximum absolute eta"}; + Configurable cfgThresholdPtTofPi{"cfgThresholdPtTofPi", 0.5, "pT (GeV/c) threshold for TOF pions"}; + Configurable cfgThresholdPtTofKa{"cfgThresholdPtTofKa", 0.5, "pT (GeV/c) threshold for TOF kaons"}; + Configurable cfgThresholdPtTofPr{"cfgThresholdPtTofPr", 0.8, "pT (GeV/c) threshold for TOF (anti)protons"}; + Configurable cfgCutMaxAbsNSigmaPid{"cfgCutMaxAbsNSigmaPid", 2., "Maximum absolute nSigma for PID"}; // 1.5, 2.5 + + Configurable cfgNCentralityBins{"cfgNCentralityBins", 20, "Number of centrality bins in fluctuation analysis"}; + Configurable cfgNSubgroups{"cfgNSubgroups", 20, "Number of subgroups in fluctuation analysis"}; + + Configurable cfgCcdbPathEfficiencyFile{"cfgCcdbPathEfficiencyFile", "Users/f/fasi/test", "Path of the efficiency file in CCDB"}; + + const TProfile3D* pVzPtEtaEfficiencyTpcPiP = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcPiM = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcKaP = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcKaM = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcPrP = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcPrM = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcTofPiP = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcTofPiM = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcTofKaP = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcTofKaM = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcTofPrP = nullptr; + const TProfile3D* pVzPtEtaEfficiencyTpcTofPrM = nullptr; + + std::unique_ptr fluctuationCalculatorTrackChP; + std::unique_ptr fluctuationCalculatorTrackChM; + std::unique_ptr fluctuationCalculatorTrackChT; + std::unique_ptr fluctuationCalculatorTrackChN; + std::unique_ptr fluctuationCalculatorTrackKaP; + std::unique_ptr fluctuationCalculatorTrackKaM; + std::unique_ptr fluctuationCalculatorTrackKaT; + std::unique_ptr fluctuationCalculatorTrackKaN; + std::unique_ptr fluctuationCalculatorTrackPrP; + std::unique_ptr fluctuationCalculatorTrackPrM; + std::unique_ptr fluctuationCalculatorTrackPrT; + std::unique_ptr fluctuationCalculatorTrackPrN; + + QuantityHolderEvent quantityHolderEvent; + QuantityHolderTrack quantityHolderTrack; + QuantityHolderMcParticle quantityHolderMcParticle; + + HistogramRegistry hrCalculationEfficiency{"hrCalculationEfficiency", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry hrAnalysisFluctuation{"hrAnalysisFluctuation", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry hrQaAcceptance{"hrQaAcceptance", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry hrQaPid{"hrQaPid", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry hrQaTrack{"hrQaTrack", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry hrQaCentrality{"hrQaCentrality", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry hrQaEvent{"hrQaEvent", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry hrQaRun{"hrQaRun", {}, OutputObjHandlingPolicy::AnalysisObject}; + HistogramRegistry hrCounter{"hrCounter", {}, OutputObjHandlingPolicy::AnalysisObject}; + + Filter filterCollision = (aod::evsel::sel8 == true); + Filter filterfTrack = requireGlobalTrackWoPtEtaInFilter(); + Filter filterfMcCollision = (aod::mccollisionprop::numRecoCollision > 0); + + void init(InitContext&) + { + assert(doprocessRaw ^ doprocessMc); + + ccdb->setURL("https://alice-ccdb.cern.ch"); + ccdb->setCaching(true); + ccdb->setLocalObjectValidityChecking(); + ccdb->setFatalWhenNull(false); + + hrCounter.add("hNEvents", ";;No. of Events", {HistType::kTH1D, {{10 + aod::evsel::kNsel, -0.5, 9.5 + static_cast(aod::evsel::kNsel), "Selection"}}}); + + if (doprocessRaw) { + if (cfgFlagQaRun.value) { + LOG(info) << "Enabling run QA"; + + HistogramConfigSpec hcsQaRun(HistType::kTProfile, {{static_cast(cfgListRun.value.size()), -0.5, cfgListRun.value.size() - 0.5, "Run Index"}}); + hrQaRun.add("QaRun/pRunIndexVx", ";;#LT#it{V}_{#it{x}}#GT (cm)", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexVy", ";;#LT#it{V}_{#it{y}}#GT (cm)", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexVz", ";;#LT#it{V}_{#it{z}}#GT (cm)", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexMultFv0a", ";;FV0A #LTMultiplicity#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexMultFt0a", ";;FT0A #LTMultiplicity#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexMultFt0c", ";;FT0C #LTMultiplicity#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexNGlobalTracks", ";;#LTnGlobalTracks#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexNPvContributors", ";;#LTnPvContributors#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexNTofBeta", ";;#LTnTofBeta#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexMeanDcaXy", ";;#LT#LTDCA_{#it{xy}}#GT_{event}#GT (cm)", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexSigmaDcaXy", ";;#LT#it{#sigma}(DCA_{#it{xy}})_{event}#GT (cm)", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexMeanDcaZ", ";;#LT#LTDCA_{#it{z}}#GT_{event}#GT (cm)", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexSigmaDcaZ", ";;#LT#it{#sigma}(DCA_{#it{z}})_{event}#GT (cm)", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexItsNCls", ";;ITS #LTnClusters#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexItsChi2NCls", ";;ITS #LT#it{#chi}^{2}/nClusters#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTpcNCls", ";;TPC #LTnClusters#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTpcChi2NCls", ";;TPC #LT#it{#chi}^{2}/nClusters#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTpcNClsSharedRatio", ";;TPC #LTnSharedClusters/nClusters#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTpcNClsCrossedRows", ";;TPC #LTnCrossedRows#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTpcNClsCrossedRowsRatio", ";;TPC #LTnCrossedRows/nFindableClusters#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexDcaXy", ";;#LTDCA_{#it{xy}}#GT (cm)", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexDcaZ", ";;#LTDCA_{#it{z}}#GT (cm)", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexPt", ";;#LT#it{p}_{T}#GT (GeV/#it{c})", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexEta", ";;#LT#it{#eta}#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexPhi", ";;#LT#it{#varphi}#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTpcDeDx", ";;TPC #LTd#it{E}/d#it{x}#GT (a.u.)", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTpcNSigmaPi", ";;TPC #LT#it{n}#it{#sigma}_{#pi}#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTpcNSigmaKa", ";;TPC #LT#it{n}#it{#sigma}_{K}#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTpcNSigmaPr", ";;TPC #LT#it{n}#it{#sigma}_{p}#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTofInverseBeta", ";;TOF #LT1/#it{#beta}#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTofNSigmaPi", ";;TOF #LT#it{n}#it{#sigma}_{#pi}#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTofNSigmaKa", ";;TOF #LT#it{n}#it{#sigma}_{K}#GT", hcsQaRun); + hrQaRun.add("QaRun/pRunIndexTofNSigmaPr", ";;TOF #LT#it{n}#it{#sigma}_{p}#GT", hcsQaRun); + } + + if (cfgFlagQaEvent.value) { + LOG(info) << "Enabling event QA"; + + AxisSpec asRunIndex(static_cast(cfgListRun.value.size()), -0.5, cfgListRun.value.size() - 0.5, "Run Index"); + AxisSpec asNGlobalTracks(160, -0.5, 159.5, "nGlobalTracks"); + hrQaEvent.add("QaEvent/hRunIndexVxVy", "", {HistType::kTHnSparseF, {asRunIndex, {150, -0.15, 0.15, "#it{V}_{#it{x}} (cm)"}, {150, -0.15, 0.15, "#it{V}_{#it{y}} (cm)"}}}); + hrQaEvent.add("QaEvent/hRunIndexVz", "", {HistType::kTH2F, {asRunIndex, {300, -15., 15., "#it{V}_{#it{z}} (cm)"}}}); + hrQaEvent.add("QaEvent/hRunIndexNTofBetaNGlobalTracks", "", {HistType::kTHnSparseF, {asRunIndex, {40, -0.5, 39.5, "nTofBeta"}, asNGlobalTracks}}); + hrQaEvent.add("QaEvent/hRunIndexNPvContributorsNGlobalTracks", "", {HistType::kTHnSparseF, {asRunIndex, {160, -0.5, 159.5, "nPvContributors"}, asNGlobalTracks}}); + hrQaEvent.add("QaEvent/hRunIndexNGlobalTracksMeanDcaXy", "", {HistType::kTHnSparseF, {asRunIndex, asNGlobalTracks, {200, -0.5, 0.5, "#LTDCA_{#it{xy}}#GT_{event} (cm)"}}}); + hrQaEvent.add("QaEvent/pRunIndexNGlobalTracksMeanDcaXy", ";;#LT#LTDCA_{#it{xy}}#GT_{event}#GT (cm)", {HistType::kTProfile2D, {asRunIndex, asNGlobalTracks}}); + hrQaEvent.add("QaEvent/hRunIndexNGlobalTracksMeanDcaXy_nPvContributorsCut", "", {HistType::kTHnSparseF, {asRunIndex, asNGlobalTracks, {200, -2., 2., "#LTDCA_{#it{z}}#GT_{event} (cm)"}}}); + hrQaEvent.add("QaEvent/pRunIndexNGlobalTracksMeanDcaXy_nPvContributorsCut", ";;#LT#LTDCA_{#it{xy}}#GT_{event}#GT (cm)", {HistType::kTProfile2D, {asRunIndex, asNGlobalTracks}}); + hrQaEvent.add("QaEvent/hRunIndexNGlobalTracksMeanDcaZ", "", {HistType::kTHnSparseF, {asRunIndex, asNGlobalTracks, {200, -2., 2., "#LTDCA_{#it{z}}#GT_{event} (cm)"}}}); + hrQaEvent.add("QaEvent/pRunIndexNGlobalTracksMeanDcaZ", ";;#LT#LTDCA_{#it{z}}#GT_{event}#GT (cm)", {HistType::kTProfile2D, {asRunIndex, asNGlobalTracks}}); + hrQaEvent.add("QaEvent/hRunIndexNGlobalTracksMeanDcaZ_nPvContributorsCut", "", {HistType::kTHnSparseF, {asRunIndex, asNGlobalTracks, {200, -2., 2., "#LTDCA_{#it{z}}#GT_{event} (cm)"}}}); + hrQaEvent.add("QaEvent/pRunIndexNGlobalTracksMeanDcaZ_nPvContributorsCut", ";;#LT#LTDCA_{#it{z}}#GT_{event}#GT (cm)", {HistType::kTProfile2D, {asRunIndex, asNGlobalTracks}}); + } + + if (cfgFlagQaCentrality.value) { + LOG(info) << "Enabling centrality QA"; + + AxisSpec asQaCentrality(20, 0., 100., "Centrality (%)"); + hrQaCentrality.add("QaCentrality/hCentralityFv0a", "", {HistType::kTHnSparseF, {asQaCentrality, {2400, 0., 24000., "FV0A Multiplicity"}}}); + hrQaCentrality.add("QaCentrality/hCentralityFt0a", "", {HistType::kTHnSparseF, {asQaCentrality, {1600, 0., 8000., "FT0A Multiplicity"}}}); + hrQaCentrality.add("QaCentrality/hCentralityFt0c", "", {HistType::kTHnSparseF, {asQaCentrality, {400, 0., 2000., "FT0C Multiplicity"}}}); + hrQaCentrality.add("QaCentrality/hCentralityFt0m", "", {HistType::kTHnSparseF, {asQaCentrality, {2000, 0., 10000., "FT0A+FT0C Multiplicity"}}}); + } + + if (cfgFlagQaTrack.value) { + LOG(info) << "Enabling track QA"; + + AxisSpec asPt(250, 0., 2.5, "#it{p}_{T} (GeV/#it{c})"); + hrQaTrack.add("QaTrack/hItsNCls", "", {HistType::kTH1D, {{10, -0.5, 9.5, "ITS nClusters"}}}); + hrQaTrack.add("QaTrack/hItsChi2NCls", "", {HistType::kTH1D, {{80, 0., 40., "ITS #it{#chi}^{2}/nClusters"}}}); + hrQaTrack.add("QaTrack/hTpcNClsNClsSharedNClsFindableNClsCrossedRows", "", {HistType::kTHnSparseF, {{180, -0.5, 179.5, "TPC nClusters"}, {180, -0.5, 179.5, "TPC nSharedClusters"}, {180, -0.5, 179.5, "TPC nFindableClusters"}, {180, -0.5, 179.5, "TPC nCrossedRows"}}}); + hrQaTrack.add("QaTrack/hTpcChi2NCls", "", {HistType::kTH1D, {{100, 0., 5., "TPC #it{#chi}^{2}/nClusters"}}}); + hrQaTrack.add("QaTrack/hPtDcaXy", "", {HistType::kTH2D, {asPt, {200, -0.5, 0.5, "DCA_{#it{xy}} (cm)"}}}); + hrQaTrack.add("QaTrack/hPtDcaXy_pvContributor", "", {HistType::kTH2D, {asPt, {200, -0.5, 0.5, "DCA_{#it{xy}} (cm)"}}}); + hrQaTrack.add("QaTrack/hPtDcaZ", "", {HistType::kTH2D, {asPt, {200, -2., 2., "DCA_{#it{z}} (cm)"}}}); + hrQaTrack.add("QaTrack/hPtDcaZ_pvContributor", "", {HistType::kTH2D, {asPt, {200, -0.5, 0.5, "DCA_{#it{xy}} (cm)"}}}); + } + + if (cfgFlagQaPid.value) { + LOG(info) << "Enabling PID QA"; + + AxisSpec asPOverQ(140, -3.5, 3.5, "#it{p}/#it{q} (GeV/#it{c})"); + AxisSpec asPtOverQ(80, -2., 2., "#it{p}_{T}/#it{q} (GeV/#it{c})"); + AxisSpec asEta(60, -1.5, 1.5, "#it{#eta}"); + HistogramConfigSpec hcsQaPid(HistType::kTH3F, {asPtOverQ, asEta, {200, -10., 10.}}); + hrQaPid.add("QaPid/hPOverQEtaTpcLnDeDx", "", {HistType::kTH3F, {asPOverQ, asEta, {240, 3., 9., "TPC ln(d#it{E}/d#it{x} (a.u.))"}}}); + hrQaPid.add("QaPid/hPtOverQEtaTpcNSigmaPi", ";;;TPC #it{n}#it{#sigma}_{#pi}", hcsQaPid); + hrQaPid.add("QaPid/hPtOverQEtaTpcNSigmaPi_tofPi", ";;;TPC #it{n}#it{#sigma}_{#pi}", hcsQaPid); + hrQaPid.add("QaPid/hPtOverQEtaTpcNSigmaKa", ";;;TPC #it{n}#it{#sigma}_{K}", hcsQaPid); + hrQaPid.add("QaPid/hPtOverQEtaTpcNSigmaKa_tofKa", ";;;TPC #it{n}#it{#sigma}_{K}", hcsQaPid); + hrQaPid.add("QaPid/hPtOverQEtaTpcNSigmaPr", ";;;TPC #it{n}#it{#sigma}_{p}", hcsQaPid); + hrQaPid.add("QaPid/hPtOverQEtaTpcNSigmaPr_tofPr", ";;;TPC #it{n}#it{#sigma}_{p}", hcsQaPid); + hrQaPid.add("QaPid/hPOverQEtaTofInverseBeta", "", {HistType::kTH3F, {asPOverQ, asEta, {120, 0.5, 3.5, "TOF 1/#it{#beta}"}}}); + hrQaPid.add("QaPid/hPtOverQEtaTofNSigmaPi_tpcPi", ";;;TOF #it{n}#it{#sigma}_{#pi}", hcsQaPid); + hrQaPid.add("QaPid/hPtOverQEtaTofNSigmaKa_tpcKa", ";;;TOF #it{n}#it{#sigma}_{K}", hcsQaPid); + hrQaPid.add("QaPid/hPtOverQEtaTofNSigmaPr_tpcPr", ";;;TOF #it{n}#it{#sigma}_{p}", hcsQaPid); + hrQaPid.add("QaPid/hPtOverQEtaTpcTofNSigmaPi", ";;;TPC-TOF #it{n}#it{#sigma}_{#pi}", hcsQaPid); + hrQaPid.add("QaPid/hPtOverQEtaTpcTofNSigmaKa", ";;;TPC-TOF #it{n}#it{#sigma}_{K}", hcsQaPid); + hrQaPid.add("QaPid/hPtOverQEtaTpcTofNSigmaPr", ";;;TPC-TOF #it{n}#it{#sigma}_{p}", hcsQaPid); + } + + if (cfgFlagQaAcceptance.value) { + LOG(info) << "Enabling acceptance QA"; + + AxisSpec asPt(250, 0., 2.5, "#it{p}_{T} (GeV/#it{c})"); + HistogramConfigSpec hcsQaAcceptanceEta(HistType::kTH2D, {{300, -1.5, 1.5, "#it{#eta}"}, asPt}); + HistogramConfigSpec hcsQaAcceptancePhi(HistType::kTH1D, {{360, 0., constants::math::TwoPI, "#it{#varphi} (rad)"}}); + HistogramConfigSpec hcsQaAcceptanceY(HistType::kTH2D, {{300, -1.5, 1.5, "#it{y}"}, asPt}); + hrQaAcceptance.add("QaAcceptance/hEtaPt_tpc", "", hcsQaAcceptanceEta); + hrQaAcceptance.add("QaAcceptance/hPhi_tpc", "", hcsQaAcceptancePhi); + hrQaAcceptance.add("QaAcceptance/hYPt_tpc_pi", "", hcsQaAcceptanceY); + hrQaAcceptance.add("QaAcceptance/hYPt_tpc_ka", "", hcsQaAcceptanceY); + hrQaAcceptance.add("QaAcceptance/hYPt_tpc_pr", "", hcsQaAcceptanceY); + hrQaAcceptance.add("QaAcceptance/hYPt_tpc_pr_tighter", "", hcsQaAcceptanceY); + hrQaAcceptance.add("QaAcceptance/hEtaPt_tpcTof", "", hcsQaAcceptanceEta); + hrQaAcceptance.add("QaAcceptance/hPhi_tpcTof", "", hcsQaAcceptancePhi); + hrQaAcceptance.add("QaAcceptance/hYPt_tpcTof_pi", "", hcsQaAcceptanceY); + hrQaAcceptance.add("QaAcceptance/hYPt_tpcTof_ka", "", hcsQaAcceptanceY); + hrQaAcceptance.add("QaAcceptance/hYPt_tpcTof_pr", "", hcsQaAcceptanceY); + } + + if (cfgFlagAnalysisFluctuationCh.value || cfgFlagAnalysisFluctuationKa.value || cfgFlagAnalysisFluctuationPr.value) { + gRandom->SetSeed(0); + + HistogramConfigSpec hcsAnalysisFluctuation(HistType::kTH3F, {{cfgNCentralityBins.value, 0., 100., "Centrality (%)"}, {60, -0.5, 59.5}, {60, -0.5, 59.5}}); + HistogramConfigSpec hcsFluctuationCalculator(HistType::kTH3D, {{cfgNCentralityBins.value, 0., 100., "Centrality (%)"}, {cfgNSubgroups.value, -0.5, cfgNSubgroups.value - 0.5, "Subgroup Index"}, {fluctuation_calculator_base::kNOrderVectors, -0.5, fluctuation_calculator_base::kNOrderVectors - 0.5, "Order Vector Index"}}); + + const TList* const efficiencyList(ccdb->getForTimeStamp(cfgCcdbPathEfficiencyFile.value, -1)); + if (cfgFlagAnalysisFluctuationCh.value) { + pVzPtEtaEfficiencyTpcPiP = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcPiP")); + assert(pVzPtEtaEfficiencyTpcPiP && pVzPtEtaEfficiencyTpcPiP->IsA() == TProfile3D::Class()); + pVzPtEtaEfficiencyTpcPiM = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcPiM")); + assert(pVzPtEtaEfficiencyTpcPiM && pVzPtEtaEfficiencyTpcPiM->IsA() == TProfile3D::Class()); + pVzPtEtaEfficiencyTpcTofPiP = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcTofPiP")); + assert(pVzPtEtaEfficiencyTpcTofPiP && pVzPtEtaEfficiencyTpcTofPiP->IsA() == TProfile3D::Class()); + pVzPtEtaEfficiencyTpcTofPiM = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcTofPiM")); + assert(pVzPtEtaEfficiencyTpcTofPiM && pVzPtEtaEfficiencyTpcTofPiM->IsA() == TProfile3D::Class()); + } + if (cfgFlagAnalysisFluctuationCh.value || cfgFlagAnalysisFluctuationKa.value) { + pVzPtEtaEfficiencyTpcKaP = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcKaP")); + assert(pVzPtEtaEfficiencyTpcKaP && pVzPtEtaEfficiencyTpcKaP->IsA() == TProfile3D::Class()); + pVzPtEtaEfficiencyTpcKaM = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcKaM")); + assert(pVzPtEtaEfficiencyTpcKaM && pVzPtEtaEfficiencyTpcKaM->IsA() == TProfile3D::Class()); + pVzPtEtaEfficiencyTpcTofKaP = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcTofKaP")); + assert(pVzPtEtaEfficiencyTpcTofKaP && pVzPtEtaEfficiencyTpcTofKaP->IsA() == TProfile3D::Class()); + pVzPtEtaEfficiencyTpcTofKaM = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcTofKaM")); + assert(pVzPtEtaEfficiencyTpcTofKaM && pVzPtEtaEfficiencyTpcTofKaM->IsA() == TProfile3D::Class()); + } + if (cfgFlagAnalysisFluctuationCh.value || cfgFlagAnalysisFluctuationPr.value) { + pVzPtEtaEfficiencyTpcPrP = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcPrP")); + assert(pVzPtEtaEfficiencyTpcPrP && pVzPtEtaEfficiencyTpcPrP->IsA() == TProfile3D::Class()); + pVzPtEtaEfficiencyTpcPrM = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcPrM")); + assert(pVzPtEtaEfficiencyTpcPrM && pVzPtEtaEfficiencyTpcPrM->IsA() == TProfile3D::Class()); + pVzPtEtaEfficiencyTpcTofPrP = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcTofPrP")); + assert(pVzPtEtaEfficiencyTpcTofPrP && pVzPtEtaEfficiencyTpcTofPrP->IsA() == TProfile3D::Class()); + pVzPtEtaEfficiencyTpcTofPrM = static_cast(efficiencyList->FindObject("pVzPtEtaEfficiencyTpcTofPrM")); + assert(pVzPtEtaEfficiencyTpcTofPrM && pVzPtEtaEfficiencyTpcTofPrM->IsA() == TProfile3D::Class()); + } + + if (cfgFlagAnalysisFluctuationCh.value) { + LOG(info) << "Enabling charge number fluctuation analysis"; + + fluctuationCalculatorTrackChP = std::make_unique(); + fluctuationCalculatorTrackChM = std::make_unique(); + fluctuationCalculatorTrackChT = std::make_unique(); + fluctuationCalculatorTrackChN = std::make_unique(); + + hrAnalysisFluctuation.add("AnalysisFluctuation/hCentralityNChPNChM", ";;No. of h^{+};No. of h^{#minus}", hcsAnalysisFluctuation); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorChP", "", hcsFluctuationCalculator); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorChM", "", hcsFluctuationCalculator); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorChT", "", hcsFluctuationCalculator); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorChN", "", hcsFluctuationCalculator); + } + + if (cfgFlagAnalysisFluctuationKa.value) { + LOG(info) << "Enabling kaon number fluctuation analysis"; + + fluctuationCalculatorTrackKaP = std::make_unique(); + fluctuationCalculatorTrackKaM = std::make_unique(); + fluctuationCalculatorTrackKaT = std::make_unique(); + fluctuationCalculatorTrackKaN = std::make_unique(); + + hrAnalysisFluctuation.add("AnalysisFluctuation/hCentralityNKaPNKaM", ";;No. of K^{+};No. of K^{#minus}", hcsAnalysisFluctuation); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorKaP", "", hcsFluctuationCalculator); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorKaM", "", hcsFluctuationCalculator); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorKaT", "", hcsFluctuationCalculator); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorKaN", "", hcsFluctuationCalculator); + } + + if (cfgFlagAnalysisFluctuationPr.value) { + LOG(info) << "Enabling (anti)proton number fluctuation analysis"; + + fluctuationCalculatorTrackPrP = std::make_unique(); + fluctuationCalculatorTrackPrM = std::make_unique(); + fluctuationCalculatorTrackPrT = std::make_unique(); + fluctuationCalculatorTrackPrN = std::make_unique(); + + hrAnalysisFluctuation.add("AnalysisFluctuation/hCentralityNPrPNPrM", ";;No. of p;No. of #bar{p}", hcsAnalysisFluctuation); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorPrP", "", hcsFluctuationCalculator); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorPrM", "", hcsFluctuationCalculator); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorPrT", "", hcsFluctuationCalculator); + hrAnalysisFluctuation.add("AnalysisFluctuation/hFluctuationCalculatorPrN", "", hcsFluctuationCalculator); + } + } + } else if (doprocessMc) { + if (cfgFlagCalculationEfficiency.value) { + LOG(info) << "Enabling efficiency calculation"; + + quantityHolderEvent.mcParticleIndicesMatchedTpcPiP.reserve(60); + quantityHolderEvent.mcParticleIndicesMatchedTpcPiM.reserve(60); + quantityHolderEvent.mcParticleIndicesMatchedTpcKaP.reserve(30); + quantityHolderEvent.mcParticleIndicesMatchedTpcKaM.reserve(30); + quantityHolderEvent.mcParticleIndicesMatchedTpcPrP.reserve(30); + quantityHolderEvent.mcParticleIndicesMatchedTpcPrM.reserve(30); + quantityHolderEvent.mcParticleIndicesMatchedTpcTofPiP.reserve(40); + quantityHolderEvent.mcParticleIndicesMatchedTpcTofPiM.reserve(40); + quantityHolderEvent.mcParticleIndicesMatchedTpcTofKaP.reserve(20); + quantityHolderEvent.mcParticleIndicesMatchedTpcTofKaM.reserve(20); + quantityHolderEvent.mcParticleIndicesMatchedTpcTofPrP.reserve(20); + quantityHolderEvent.mcParticleIndicesMatchedTpcTofPrM.reserve(20); + + HistogramConfigSpec hcsCalculationEfficiency(HistType::kTProfile3D, {{4, -cfgCutMaxAbsVertexZ.value, cfgCutMaxAbsVertexZ.value, "#it{V}_{#it{z}} (cm)"}, {25, 0., 2.5, "#it{p}_{T} (GeV/#it{c})"}, {30, -1.5, 1.5, "#it{#eta}"}}); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcPiP", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcPiM", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcKaP", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcKaM", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcPrP", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcPrM", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofPiP", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofPiM", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofKaP", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofKaM", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofPrP", "", hcsCalculationEfficiency); + hrCalculationEfficiency.add("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofPrM", "", hcsCalculationEfficiency); + } + } + + if (cfgListRun.value.empty()) { + LOG(info) << "No run process enabled."; + } else { + for (std::int32_t const& run : cfgListRun.value) { + LOG(info) << "Enabling processing run: " << run; + } + } + + if (cfgListRunBad.value.empty()) { + LOG(info) << "No run rejection enabled."; + } else { + for (std::int32_t const& runBad : cfgListRunBad.value) { + LOG(info) << "Enabling rejecting run: " << runBad; + } + } + + if ((cfgFlagEventSel.value & ((1ULL << aod::evsel::kNsel) - 1)) == 0) { + LOG(info) << "No event selection bit enabled."; + } else { + for (std::int32_t const& iEvSel : std::views::iota(0, aod::evsel::kNsel)) { + if ((cfgFlagEventSel.value >> iEvSel) & 1) { + LOG(info) << "Enabling event selection bit: " << aod::evsel::selectionLabels[iEvSel]; + } + } + } + } + + template + bool isPi() + { + if constexpr (doRequiringTof && doRejectingOthers) { + return (std::fabs(quantityHolderTrack.tpcTofNSigmaPi) < std::min(cfgCutMaxAbsNSigmaPid.value, std::min(std::fabs(quantityHolderTrack.tpcTofNSigmaKa), std::fabs(quantityHolderTrack.tpcTofNSigmaPr)))); + } + if constexpr (doRequiringTof && !doRejectingOthers) { + return (std::fabs(quantityHolderTrack.tpcTofNSigmaPi) < cfgCutMaxAbsNSigmaPid.value); + } + if constexpr (!doRequiringTof && doRejectingOthers) { + return (std::fabs(quantityHolderTrack.tpcNSigmaPi) < std::min(cfgCutMaxAbsNSigmaPid.value, std::min(std::fabs(quantityHolderTrack.tpcNSigmaKa), std::fabs(quantityHolderTrack.tpcNSigmaPr)))); + } + return (std::fabs(quantityHolderTrack.tpcNSigmaPi) < cfgCutMaxAbsNSigmaPid.value); + } + + template + bool isKa() + { + if constexpr (doRequiringTof && doRejectingOthers) { + return (std::fabs(quantityHolderTrack.tpcTofNSigmaKa) < std::min(cfgCutMaxAbsNSigmaPid.value, std::min(std::fabs(quantityHolderTrack.tpcTofNSigmaPi), std::fabs(quantityHolderTrack.tpcTofNSigmaPr)))); + } + if constexpr (doRequiringTof && !doRejectingOthers) { + return (std::fabs(quantityHolderTrack.tpcTofNSigmaKa) < cfgCutMaxAbsNSigmaPid.value); + } + if constexpr (!doRequiringTof && doRejectingOthers) { + return (std::fabs(quantityHolderTrack.tpcNSigmaKa) < std::min(cfgCutMaxAbsNSigmaPid.value, std::min(std::fabs(quantityHolderTrack.tpcNSigmaPi), std::fabs(quantityHolderTrack.tpcNSigmaPr)))); + } + return (std::fabs(quantityHolderTrack.tpcNSigmaKa) < cfgCutMaxAbsNSigmaPid.value); + } + + template + bool isPr() + { + if constexpr (doRequiringTof && doRejectingOthers) { + return (std::fabs(quantityHolderTrack.tpcTofNSigmaPr) < std::min(cfgCutMaxAbsNSigmaPid.value, std::min(std::fabs(quantityHolderTrack.tpcTofNSigmaPi), std::fabs(quantityHolderTrack.tpcTofNSigmaKa)))); + } + if constexpr (doRequiringTof && !doRejectingOthers) { + return (std::fabs(quantityHolderTrack.tpcTofNSigmaPr) < cfgCutMaxAbsNSigmaPid.value); + } + if constexpr (!doRequiringTof && doRejectingOthers) { + return (std::fabs(quantityHolderTrack.tpcNSigmaPr) < std::min(cfgCutMaxAbsNSigmaPid.value, std::min(std::fabs(quantityHolderTrack.tpcNSigmaPi), std::fabs(quantityHolderTrack.tpcNSigmaKa)))); + } + return (std::fabs(quantityHolderTrack.tpcNSigmaPr) < cfgCutMaxAbsNSigmaPid.value); + } + + bool isGoodMomentum() + { + return (cfgCutMinPt.value < quantityHolderTrack.pt && quantityHolderTrack.pt < cfgCutMaxPt.value && std::fabs(quantityHolderTrack.eta) < cfgCutMaxAbsEta.value); + } + + template + bool isGoodTrack(const T& track) + { + if ((cfgFlagPvContributor.value && !track.isPVContributor())) { + return false; + } + if (!(track.itsNCls() > cfgCutMinItsNCls.value)) { + return false; + } + if (!(track.itsChi2NCl() < cfgCutMaxItsChi2NCls.value)) { + return false; + } + if (!(track.tpcNClsFound() > cfgCutMinTpcNCls.value)) { + return false; + } + if (!(track.tpcChi2NCl() < cfgCutMaxTpcChi2NCls.value)) { + return false; + } + if (!(track.tpcFractionSharedCls() < cfgCutMaxTpcNClsSharedRatio.value)) { + return false; + } + if (!(track.tpcNClsCrossedRows() > cfgCutMinTpcNClsCrossedRows.value)) { + return false; + } + if (!(track.tpcCrossedRowsOverFindableCls() > cfgCutMinTpcNClsCrossedRowsRatio.value)) { + return false; + } + if (!(std::fabs(track.dcaXY()) < cfgCutMaxAbsNSigmaDcaXy.value * (cfgParSigmaDcaXy.value[0] + cfgParSigmaDcaXy.value[1] * std::pow(track.pt(), cfgParSigmaDcaXy.value[2])))) { + return false; + } + if (!(std::fabs(track.dcaZ()) < cfgCutMaxAbsDcaZ.value)) { + return false; + } + return true; + } + + template + bool initTrack(const T& track) + { + quantityHolderTrack.clear(); + quantityHolderTrack.sign = track.sign(); + quantityHolderTrack.pt = track.pt(); + quantityHolderTrack.eta = track.eta(); + quantityHolderTrack.phi = track.phi(); + quantityHolderTrack.ptOverQ = quantityHolderTrack.pt / quantityHolderTrack.sign; + quantityHolderTrack.pOverQ = track.p() / quantityHolderTrack.sign; + quantityHolderTrack.rapidityPi = track.rapidity(constants::physics::MassPiPlus); + quantityHolderTrack.rapidityKa = track.rapidity(constants::physics::MassKPlus); + quantityHolderTrack.rapidityPr = track.rapidity(constants::physics::MassProton); + quantityHolderTrack.hasTpcPid = (track.hasTPC() && track.tpcSignal() > 0.); + quantityHolderTrack.tpcNSigmaPi = track.tpcNSigmaPi(); + quantityHolderTrack.tpcNSigmaKa = track.tpcNSigmaKa(); + quantityHolderTrack.tpcNSigmaPr = track.tpcNSigmaPr(); + quantityHolderTrack.hasTofPid = (track.hasTOF() && track.beta() > 0.); + quantityHolderTrack.tofNSigmaPi = track.tofNSigmaPi(); + quantityHolderTrack.tofNSigmaKa = track.tofNSigmaKa(); + quantityHolderTrack.tofNSigmaPr = track.tofNSigmaPr(); + quantityHolderTrack.tpcTofNSigmaPi = std::sqrt(std::pow(quantityHolderTrack.tpcNSigmaPi, 2.) + std::pow(quantityHolderTrack.tofNSigmaPi, 2.)); + quantityHolderTrack.tpcTofNSigmaKa = std::sqrt(std::pow(quantityHolderTrack.tpcNSigmaKa, 2.) + std::pow(quantityHolderTrack.tofNSigmaKa, 2.)); + quantityHolderTrack.tpcTofNSigmaPr = std::sqrt(std::pow(quantityHolderTrack.tpcNSigmaPr, 2.) + std::pow(quantityHolderTrack.tofNSigmaPr, 2.)); + if constexpr (doProcessingMc) { + quantityHolderTrack.mcParticleId = track.mcParticleId(); + } + + if constexpr (doInitingEvent) { + quantityHolderEvent.nGlobalTracks++; + if (track.isPVContributor()) { + quantityHolderEvent.nPvContributors++; + } + if (quantityHolderTrack.hasTofPid) { + quantityHolderEvent.nTofBeta++; + } + quantityHolderEvent.meanDcaXy += track.dcaXY(); + quantityHolderEvent.meanSquareDcaXy += std::pow(track.dcaXY(), 2.); + quantityHolderEvent.meanDcaZ += track.dcaZ(); + quantityHolderEvent.meanSquareDcaZ += std::pow(track.dcaZ(), 2.); + } + + if constexpr (!doProcessingMc && doInitingEvent) { + if (cfgFlagQaRun.value) { + hrQaRun.fill(HIST("QaRun/pRunIndexItsNCls"), quantityHolderEvent.runIndex, track.itsNCls()); + hrQaRun.fill(HIST("QaRun/pRunIndexItsChi2NCls"), quantityHolderEvent.runIndex, track.itsChi2NCl()); + hrQaRun.fill(HIST("QaRun/pRunIndexTpcNCls"), quantityHolderEvent.runIndex, track.tpcNClsFound()); + hrQaRun.fill(HIST("QaRun/pRunIndexTpcChi2NCls"), quantityHolderEvent.runIndex, track.tpcChi2NCl()); + hrQaRun.fill(HIST("QaRun/pRunIndexTpcNClsSharedRatio"), quantityHolderEvent.runIndex, track.tpcFractionSharedCls()); + hrQaRun.fill(HIST("QaRun/pRunIndexTpcNClsCrossedRows"), quantityHolderEvent.runIndex, track.tpcNClsCrossedRows()); + hrQaRun.fill(HIST("QaRun/pRunIndexTpcNClsCrossedRowsRatio"), quantityHolderEvent.runIndex, track.tpcCrossedRowsOverFindableCls()); + hrQaRun.fill(HIST("QaRun/pRunIndexDcaXy"), quantityHolderEvent.runIndex, track.dcaXY()); + hrQaRun.fill(HIST("QaRun/pRunIndexDcaZ"), quantityHolderEvent.runIndex, track.dcaZ()); + hrQaRun.fill(HIST("QaRun/pRunIndexPt"), quantityHolderEvent.runIndex, quantityHolderTrack.pt); + hrQaRun.fill(HIST("QaRun/pRunIndexEta"), quantityHolderEvent.runIndex, quantityHolderTrack.eta); + hrQaRun.fill(HIST("QaRun/pRunIndexPhi"), quantityHolderEvent.runIndex, quantityHolderTrack.phi); + if (quantityHolderTrack.hasTpcPid) { + hrQaRun.fill(HIST("QaRun/pRunIndexTpcDeDx"), quantityHolderEvent.runIndex, track.tpcSignal()); + hrQaRun.fill(HIST("QaRun/pRunIndexTpcNSigmaPi"), quantityHolderEvent.runIndex, quantityHolderTrack.tpcNSigmaPi); + hrQaRun.fill(HIST("QaRun/pRunIndexTpcNSigmaKa"), quantityHolderEvent.runIndex, quantityHolderTrack.tpcNSigmaKa); + hrQaRun.fill(HIST("QaRun/pRunIndexTpcNSigmaPr"), quantityHolderEvent.runIndex, quantityHolderTrack.tpcNSigmaPr); + } + if (quantityHolderTrack.hasTofPid) { + hrQaRun.fill(HIST("QaRun/pRunIndexTofInverseBeta"), quantityHolderEvent.runIndex, 1. / track.beta()); + hrQaRun.fill(HIST("QaRun/pRunIndexTofNSigmaPi"), quantityHolderEvent.runIndex, quantityHolderTrack.tofNSigmaPi); + hrQaRun.fill(HIST("QaRun/pRunIndexTofNSigmaKa"), quantityHolderEvent.runIndex, quantityHolderTrack.tofNSigmaKa); + hrQaRun.fill(HIST("QaRun/pRunIndexTofNSigmaPr"), quantityHolderEvent.runIndex, quantityHolderTrack.tofNSigmaPr); + } + } + } + + if constexpr (!doProcessingMc && !doInitingEvent) { + if (cfgFlagQaTrack.value) { + hrQaTrack.fill(HIST("QaTrack/hItsNCls"), track.itsNCls()); + hrQaTrack.fill(HIST("QaTrack/hItsChi2NCls"), track.itsChi2NCl()); + hrQaTrack.fill(HIST("QaTrack/hTpcNClsNClsSharedNClsFindableNClsCrossedRows"), track.tpcNClsFound(), track.tpcNClsShared(), track.tpcNClsFindable(), track.tpcNClsCrossedRows()); + hrQaTrack.fill(HIST("QaTrack/hTpcChi2NCls"), track.tpcChi2NCl()); + hrQaTrack.fill(HIST("QaTrack/hPtDcaXy"), quantityHolderTrack.pt, track.dcaXY()); + hrQaTrack.fill(HIST("QaTrack/hPtDcaZ"), quantityHolderTrack.pt, track.dcaZ()); + if (track.isPVContributor()) { + hrQaTrack.fill(HIST("QaTrack/hPtDcaXy_pvContributor"), quantityHolderTrack.pt, track.dcaXY()); + hrQaTrack.fill(HIST("QaTrack/hPtDcaZ_pvContributor"), quantityHolderTrack.pt, track.dcaZ()); + } + } + } + + if (!isGoodTrack(track)) { + return false; + } + + if constexpr (doProcessingMc && doInitingEvent) { + if (cfgFlagCalculationEfficiency.value) { + if (quantityHolderTrack.hasTpcPid) { + if (isPi()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcPiP.push_back(quantityHolderTrack.mcParticleId); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcPiM.push_back(quantityHolderTrack.mcParticleId); + } + } + if (isKa()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcKaP.push_back(quantityHolderTrack.mcParticleId); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcKaM.push_back(quantityHolderTrack.mcParticleId); + } + } + if (isPr()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcPrP.push_back(quantityHolderTrack.mcParticleId); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcPrM.push_back(quantityHolderTrack.mcParticleId); + } + } + if (quantityHolderTrack.hasTofPid) { + if (isPi()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcTofPiP.push_back(quantityHolderTrack.mcParticleId); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcTofPiM.push_back(quantityHolderTrack.mcParticleId); + } + } + if (isKa()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcTofKaP.push_back(quantityHolderTrack.mcParticleId); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcTofKaM.push_back(quantityHolderTrack.mcParticleId); + } + } + if (isPr()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcTofPrP.push_back(quantityHolderTrack.mcParticleId); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.mcParticleIndicesMatchedTpcTofPrM.push_back(quantityHolderTrack.mcParticleId); + } + } + } + } + } + } + + if constexpr (!doProcessingMc && !doInitingEvent) { + if (cfgFlagQaPid.value) { + if (quantityHolderTrack.hasTpcPid) { + hrQaPid.fill(HIST("QaPid/hPOverQEtaTpcLnDeDx"), quantityHolderTrack.pOverQ, quantityHolderTrack.eta, std::log(track.tpcSignal())); + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTpcNSigmaPi"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tpcNSigmaPi); + if (std::fabs(quantityHolderTrack.tofNSigmaPi) < cfgCutMaxAbsNSigmaPid.value) { + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTpcNSigmaPi_tofPi"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tpcNSigmaPi); + } + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTpcNSigmaKa"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tpcNSigmaKa); + if (std::fabs(quantityHolderTrack.tofNSigmaKa) < cfgCutMaxAbsNSigmaPid.value) { + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTpcNSigmaKa_tofKa"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tpcNSigmaKa); + } + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTpcNSigmaPr"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tpcNSigmaPr); + if (std::fabs(quantityHolderTrack.tofNSigmaPr) < cfgCutMaxAbsNSigmaPid.value) { + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTpcNSigmaPr_tofPr"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tpcNSigmaPr); + } + if (track.beta() > 0.) { + hrQaPid.fill(HIST("QaPid/hPOverQEtaTofInverseBeta"), quantityHolderTrack.pOverQ, quantityHolderTrack.eta, 1. / track.beta()); + if (std::fabs(quantityHolderTrack.tpcNSigmaPi) < cfgCutMaxAbsNSigmaPid.value) { + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTofNSigmaPi_tpcPi"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tofNSigmaPi); + } + if (std::fabs(quantityHolderTrack.tpcNSigmaKa) < cfgCutMaxAbsNSigmaPid.value) { + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTofNSigmaKa_tpcKa"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tofNSigmaKa); + } + if (std::fabs(quantityHolderTrack.tpcNSigmaPr) < cfgCutMaxAbsNSigmaPid.value) { + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTofNSigmaPr_tpcPr"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tofNSigmaPr); + } + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTpcTofNSigmaPi"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tpcTofNSigmaPi); + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTpcTofNSigmaKa"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tpcTofNSigmaKa); + hrQaPid.fill(HIST("QaPid/hPtOverQEtaTpcTofNSigmaPr"), quantityHolderTrack.ptOverQ, quantityHolderTrack.eta, quantityHolderTrack.tpcTofNSigmaPr); + } + } + } + + if (cfgFlagQaAcceptance.value) { + if ((quantityHolderTrack.eta > 0. && quantityHolderEvent.vz > cfgCutMaxAbsVertexZ.value - 0.5) || (quantityHolderTrack.eta < 0. && quantityHolderEvent.vz < -cfgCutMaxAbsVertexZ.value + 0.5)) { + if (quantityHolderTrack.hasTpcPid) { + hrQaAcceptance.fill(HIST("QaAcceptance/hEtaPt_tpc"), quantityHolderTrack.eta, quantityHolderTrack.pt); + hrQaAcceptance.fill(HIST("QaAcceptance/hPhi_tpc"), quantityHolderTrack.phi); + if (isPi()) { + hrQaAcceptance.fill(HIST("QaAcceptance/hYPt_tpc_pi"), quantityHolderTrack.rapidityPi, quantityHolderTrack.pt); + } + if (isKa()) { + hrQaAcceptance.fill(HIST("QaAcceptance/hYPt_tpc_ka"), quantityHolderTrack.rapidityKa, quantityHolderTrack.pt); + } + if (isPr()) { + hrQaAcceptance.fill(HIST("QaAcceptance/hYPt_tpc_pr"), quantityHolderTrack.rapidityPr, quantityHolderTrack.pt); + if (track.tpcNClsCrossedRows() > cfgCutMinTpcNClsCrossedRows.value + 10) { + hrQaAcceptance.fill(HIST("QaAcceptance/hYPt_tpc_pr_tighter"), quantityHolderTrack.rapidityPr, quantityHolderTrack.pt); + } + } + if (quantityHolderTrack.hasTofPid) { + hrQaAcceptance.fill(HIST("QaAcceptance/hEtaPt_tpcTof"), quantityHolderTrack.eta, quantityHolderTrack.pt); + hrQaAcceptance.fill(HIST("QaAcceptance/hPhi_tpcTof"), quantityHolderTrack.phi); + if (isPi()) { + hrQaAcceptance.fill(HIST("QaAcceptance/hYPt_tpcTof_pi"), quantityHolderTrack.rapidityPi, quantityHolderTrack.pt); + } + if (isKa()) { + hrQaAcceptance.fill(HIST("QaAcceptance/hYPt_tpcTof_ka"), quantityHolderTrack.rapidityKa, quantityHolderTrack.pt); + } + if (isPr()) { + hrQaAcceptance.fill(HIST("QaAcceptance/hYPt_tpcTof_pr"), quantityHolderTrack.rapidityPr, quantityHolderTrack.pt); + } + } + } + } + } + } + + return true; + } + + template + bool initEvent(const C& collision, const Ts& tracks) + { + quantityHolderEvent.clear(); + + hrCounter.fill(HIST("hNEvents"), 0.); + + if (!collision.has_foundBC()) { + hrCounter.fill(HIST("hNEvents"), 2.); + return false; + } + + const auto& bc = collision.template bc_as(); + quantityHolderEvent.runNumber = bc.runNumber(); + quantityHolderEvent.runIndex = std::distance(cfgListRun.value.begin(), std::ranges::find(cfgListRun.value, quantityHolderEvent.runNumber)); + + if (std::ranges::find(cfgListRun.value, quantityHolderEvent.runNumber) == cfgListRun.value.end() || std::ranges::find(cfgListRunBad.value, quantityHolderEvent.runNumber) != cfgListRunBad.value.end()) { + hrCounter.fill(HIST("hNEvents"), 2.); + return false; + } + + for (std::int32_t const& iEvSel : std::views::iota(0, aod::evsel::kNsel)) { + if (((cfgFlagEventSel.value >> iEvSel) & 1) && !collision.selection_bit(iEvSel)) { + hrCounter.fill(HIST("hNEvents"), 3); + hrCounter.fill(HIST("hNEvents"), 10 + iEvSel); + return false; + } + } + + quantityHolderEvent.vz = collision.posZ(); + + if constexpr (!doProcessingMc) { + if (cfgFlagQaEvent.value) { + hrQaEvent.fill(HIST("QaEvent/hRunIndexVxVy"), quantityHolderEvent.runIndex, collision.posX(), collision.posY()); + hrQaEvent.fill(HIST("QaEvent/hRunIndexVz"), quantityHolderEvent.runIndex, quantityHolderEvent.vz); + } + } + + if (!(std::fabs(quantityHolderEvent.vz) < cfgCutMaxAbsVertexZ.value)) { + hrCounter.fill(HIST("hNEvents"), 4); + return false; + } + + if constexpr (!doProcessingMc) { + if (cfgFlagQaRun.value) { + hrQaRun.fill(HIST("QaRun/pRunIndexVx"), quantityHolderEvent.runIndex, collision.posX()); + hrQaRun.fill(HIST("QaRun/pRunIndexVy"), quantityHolderEvent.runIndex, collision.posY()); + hrQaRun.fill(HIST("QaRun/pRunIndexVz"), quantityHolderEvent.runIndex, quantityHolderEvent.vz); + hrQaRun.fill(HIST("QaRun/pRunIndexMultFv0a"), quantityHolderEvent.runIndex, collision.multZeqFV0A()); + hrQaRun.fill(HIST("QaRun/pRunIndexMultFt0a"), quantityHolderEvent.runIndex, collision.multZeqFT0A()); + hrQaRun.fill(HIST("QaRun/pRunIndexMultFt0c"), quantityHolderEvent.runIndex, collision.multZeqFT0C()); + } + } + + for (const auto& track : tracks) { + initTrack(track); + } + if (quantityHolderEvent.nGlobalTracks > 0.) { + quantityHolderEvent.meanDcaXy /= quantityHolderEvent.nGlobalTracks; + quantityHolderEvent.meanSquareDcaXy /= quantityHolderEvent.nGlobalTracks; + quantityHolderEvent.meanDcaZ /= quantityHolderEvent.nGlobalTracks; + quantityHolderEvent.meanSquareDcaZ /= quantityHolderEvent.nGlobalTracks; + } + + if constexpr (!doProcessingMc) { + if (cfgFlagQaRun.value) { + hrQaRun.fill(HIST("QaRun/pRunIndexNGlobalTracks"), quantityHolderEvent.runIndex, quantityHolderEvent.nGlobalTracks); + hrQaRun.fill(HIST("QaRun/pRunIndexNPvContributors"), quantityHolderEvent.runIndex, quantityHolderEvent.nPvContributors); + hrQaRun.fill(HIST("QaRun/pRunIndexNTofBeta"), quantityHolderEvent.runIndex, quantityHolderEvent.nTofBeta); + if (quantityHolderEvent.nGlobalTracks > 0) { + hrQaRun.fill(HIST("QaRun/pRunIndexMeanDcaXy"), quantityHolderEvent.runIndex, quantityHolderEvent.meanDcaXy); + hrQaRun.fill(HIST("QaRun/pRunIndexSigmaDcaXy"), quantityHolderEvent.runIndex, std::sqrt(quantityHolderEvent.meanSquareDcaXy - std::pow(quantityHolderEvent.meanDcaXy, 2.))); + hrQaRun.fill(HIST("QaRun/pRunIndexMeanDcaZ"), quantityHolderEvent.runIndex, quantityHolderEvent.meanDcaZ); + hrQaRun.fill(HIST("QaRun/pRunIndexSigmaDcaZ"), quantityHolderEvent.runIndex, std::sqrt(quantityHolderEvent.meanSquareDcaZ - std::pow(quantityHolderEvent.meanDcaZ, 2.))); + } + } + } + + if constexpr (!doProcessingMc) { + if (cfgFlagQaEvent.value) { + hrQaEvent.fill(HIST("QaEvent/hRunIndexNTofBetaNGlobalTracks"), quantityHolderEvent.runIndex, quantityHolderEvent.nTofBeta, quantityHolderEvent.nGlobalTracks); + hrQaEvent.fill(HIST("QaEvent/hRunIndexNPvContributorsNGlobalTracks"), quantityHolderEvent.runIndex, quantityHolderEvent.nPvContributors, quantityHolderEvent.nGlobalTracks); + if (quantityHolderEvent.nGlobalTracks > 0) { + hrQaEvent.fill(HIST("QaEvent/hRunIndexNGlobalTracksMeanDcaXy"), quantityHolderEvent.runIndex, quantityHolderEvent.nGlobalTracks, quantityHolderEvent.meanDcaXy); + hrQaEvent.fill(HIST("QaEvent/pRunIndexNGlobalTracksMeanDcaXy"), quantityHolderEvent.runIndex, quantityHolderEvent.nGlobalTracks, quantityHolderEvent.meanDcaXy); + hrQaEvent.fill(HIST("QaEvent/hRunIndexNGlobalTracksMeanDcaZ"), quantityHolderEvent.runIndex, quantityHolderEvent.nGlobalTracks, quantityHolderEvent.meanDcaZ); + hrQaEvent.fill(HIST("QaEvent/pRunIndexNGlobalTracksMeanDcaZ"), quantityHolderEvent.runIndex, quantityHolderEvent.nGlobalTracks, quantityHolderEvent.meanDcaZ); + } + } + } + + if (!(quantityHolderEvent.nPvContributors - quantityHolderEvent.nGlobalTracks > cfgCutMinNPvContributorsDeviation.value)) { + hrCounter.fill(HIST("hNEvents"), 5); + return false; + } + + hrCounter.fill(HIST("hNEvents"), 1.); + + if constexpr (!doProcessingMc) { + if (cfgFlagQaEvent.value) { + if (quantityHolderEvent.nGlobalTracks > 0) { + hrQaEvent.fill(HIST("QaEvent/hRunIndexNGlobalTracksMeanDcaXy_nPvContributorsCut"), quantityHolderEvent.runIndex, quantityHolderEvent.nGlobalTracks, quantityHolderEvent.meanDcaXy); + hrQaEvent.fill(HIST("QaEvent/pRunIndexNGlobalTracksMeanDcaXy_nPvContributorsCut"), quantityHolderEvent.runIndex, quantityHolderEvent.nGlobalTracks, quantityHolderEvent.meanDcaXy); + hrQaEvent.fill(HIST("QaEvent/hRunIndexNGlobalTracksMeanDcaZ_nPvContributorsCut"), quantityHolderEvent.runIndex, quantityHolderEvent.nGlobalTracks, quantityHolderEvent.meanDcaZ); + hrQaEvent.fill(HIST("QaEvent/pRunIndexNGlobalTracksMeanDcaZ_nPvContributorsCut"), quantityHolderEvent.runIndex, quantityHolderEvent.nGlobalTracks, quantityHolderEvent.meanDcaZ); + } + } + } + + quantityHolderEvent.centrality = collision.centFT0M(); + + if constexpr (!doProcessingMc) { + if (cfgFlagQaCentrality.value) { + hrQaCentrality.fill(HIST("QaCentrality/hCentralityFv0a"), collision.centFV0A(), collision.multZeqFV0A()); + hrQaCentrality.fill(HIST("QaCentrality/hCentralityFt0a"), collision.centFT0A(), collision.multZeqFT0A()); + hrQaCentrality.fill(HIST("QaCentrality/hCentralityFt0c"), collision.centFT0C(), collision.multZeqFT0C()); + hrQaCentrality.fill(HIST("QaCentrality/hCentralityFt0m"), quantityHolderEvent.centrality, collision.multZeqFT0A() + collision.multZeqFT0C()); + } + } + + return true; + } + + void processRaw(const soa::Filtered::iterator& collision, const soa::Filtered& tracks, const aod::BCsWithTimestamps&) + { + if (!initEvent(collision, tracks)) { + return; + } + + if (!cfgFlagQaTrack.value && !cfgFlagQaPid.value && !cfgFlagQaAcceptance.value && !cfgFlagAnalysisFluctuationCh.value && !cfgFlagAnalysisFluctuationKa.value && !cfgFlagAnalysisFluctuationPr.value) { + return; + } + + if (cfgFlagAnalysisFluctuationCh.value || cfgFlagAnalysisFluctuationKa.value || cfgFlagAnalysisFluctuationPr.value) { + quantityHolderEvent.subgroupIndex = gRandom->Integer(cfgNSubgroups.value); + if (cfgFlagAnalysisFluctuationCh.value) { + fluctuationCalculatorTrackChP->init(); + fluctuationCalculatorTrackChM->init(); + fluctuationCalculatorTrackChT->init(); + fluctuationCalculatorTrackChN->init(); + } + if (cfgFlagAnalysisFluctuationKa.value) { + fluctuationCalculatorTrackKaP->init(); + fluctuationCalculatorTrackKaM->init(); + fluctuationCalculatorTrackKaT->init(); + fluctuationCalculatorTrackKaN->init(); + } + if (cfgFlagAnalysisFluctuationPr.value) { + fluctuationCalculatorTrackPrP->init(); + fluctuationCalculatorTrackPrM->init(); + fluctuationCalculatorTrackPrT->init(); + fluctuationCalculatorTrackPrN->init(); + } + } + for (const auto& track : tracks) { + if (!initTrack(track)) { + continue; + } + + if (cfgFlagAnalysisFluctuationCh.value) { + if (isGoodMomentum() && quantityHolderTrack.hasTpcPid) { + if (quantityHolderTrack.pt < cfgThresholdPtTofPi.value) { + if (isPi()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.nChP++; + + const double efficiency = pVzPtEtaEfficiencyTpcPiP->GetBinContent(pVzPtEtaEfficiencyTpcPiP->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcPiP->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcPiP->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChP->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(1., efficiency); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.nChM++; + + const double efficiency = pVzPtEtaEfficiencyTpcPiM->GetBinContent(pVzPtEtaEfficiencyTpcPiM->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcPiM->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcPiM->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChM->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(-1., efficiency); + } + } + } else if (quantityHolderTrack.hasTofPid) { + if (isPi()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.nChP++; + + const double efficiency = pVzPtEtaEfficiencyTpcTofPiP->GetBinContent(pVzPtEtaEfficiencyTpcTofPiP->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcTofPiP->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcTofPiP->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChP->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(1., efficiency); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.nChM++; + + const double efficiency = pVzPtEtaEfficiencyTpcTofPiM->GetBinContent(pVzPtEtaEfficiencyTpcTofPiM->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcTofPiM->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcTofPiM->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChM->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(-1., efficiency); + } + } + } + if (quantityHolderTrack.pt < cfgThresholdPtTofKa.value) { + if (isKa()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.nChP++; + + const double efficiency = pVzPtEtaEfficiencyTpcKaP->GetBinContent(pVzPtEtaEfficiencyTpcKaP->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcKaP->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcKaP->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChP->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(1., efficiency); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.nChM++; + + const double efficiency = pVzPtEtaEfficiencyTpcKaM->GetBinContent(pVzPtEtaEfficiencyTpcKaM->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcKaM->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcKaM->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChM->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(-1., efficiency); + } + } + } else if (quantityHolderTrack.hasTofPid) { + if (isKa()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.nChP++; + + const double efficiency = pVzPtEtaEfficiencyTpcTofKaP->GetBinContent(pVzPtEtaEfficiencyTpcTofKaP->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcTofKaP->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcTofKaP->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChP->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(1., efficiency); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.nChM++; + + const double efficiency = pVzPtEtaEfficiencyTpcTofKaM->GetBinContent(pVzPtEtaEfficiencyTpcTofKaM->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcTofKaM->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcTofKaM->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChM->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(-1., efficiency); + } + } + } + if (quantityHolderTrack.pt < cfgThresholdPtTofPr.value) { + if (isPr()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.nChP++; + + const double efficiency = pVzPtEtaEfficiencyTpcPrP->GetBinContent(pVzPtEtaEfficiencyTpcPrP->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcPrP->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcPrP->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChP->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(1., efficiency); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.nChM++; + + const double efficiency = pVzPtEtaEfficiencyTpcPrM->GetBinContent(pVzPtEtaEfficiencyTpcPrM->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcPrM->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcPrM->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChM->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(-1., efficiency); + } + } + } else if (quantityHolderTrack.hasTofPid) { + if (isPr()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.nChP++; + + const double efficiency = pVzPtEtaEfficiencyTpcTofPrP->GetBinContent(pVzPtEtaEfficiencyTpcTofPrP->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcTofPrP->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcTofPrP->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChP->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(1., efficiency); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.nChM++; + + const double efficiency = pVzPtEtaEfficiencyTpcTofPrM->GetBinContent(pVzPtEtaEfficiencyTpcTofPrM->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcTofPrM->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcTofPrM->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackChM->fill(1., efficiency); + fluctuationCalculatorTrackChT->fill(1., efficiency); + fluctuationCalculatorTrackChN->fill(-1., efficiency); + } + } + } + } + } + + if (cfgFlagAnalysisFluctuationKa.value) { + if (isGoodMomentum() && quantityHolderTrack.hasTpcPid) { + if (quantityHolderTrack.pt < cfgThresholdPtTofKa.value) { + if (isKa()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.nKaP++; + + const double efficiency = pVzPtEtaEfficiencyTpcKaP->GetBinContent(pVzPtEtaEfficiencyTpcKaP->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcKaP->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcKaP->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackKaP->fill(1., efficiency); + fluctuationCalculatorTrackKaT->fill(1., efficiency); + fluctuationCalculatorTrackKaN->fill(1., efficiency); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.nKaM++; + + const double efficiency = pVzPtEtaEfficiencyTpcKaM->GetBinContent(pVzPtEtaEfficiencyTpcKaM->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcKaM->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcKaM->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackKaM->fill(1., efficiency); + fluctuationCalculatorTrackKaT->fill(1., efficiency); + fluctuationCalculatorTrackKaN->fill(-1., efficiency); + } + } + } else if (quantityHolderTrack.hasTofPid) { + if (isKa()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.nKaP++; + + const double efficiency = pVzPtEtaEfficiencyTpcTofKaP->GetBinContent(pVzPtEtaEfficiencyTpcTofKaP->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcTofKaP->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcTofKaP->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackKaP->fill(1., efficiency); + fluctuationCalculatorTrackKaT->fill(1., efficiency); + fluctuationCalculatorTrackKaN->fill(1., efficiency); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.nKaM++; + + const double efficiency = pVzPtEtaEfficiencyTpcTofKaM->GetBinContent(pVzPtEtaEfficiencyTpcTofKaM->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcTofKaM->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcTofKaM->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackKaM->fill(1., efficiency); + fluctuationCalculatorTrackKaT->fill(1., efficiency); + fluctuationCalculatorTrackKaN->fill(-1., efficiency); + } + } + } + } + } + + if (cfgFlagAnalysisFluctuationPr.value) { + if (isGoodMomentum() && quantityHolderTrack.hasTpcPid) { + if (quantityHolderTrack.pt < cfgThresholdPtTofPr.value) { + if (isPr()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.nPrP++; + + const double efficiency = pVzPtEtaEfficiencyTpcPrP->GetBinContent(pVzPtEtaEfficiencyTpcPrP->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcPrP->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcPrP->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackPrP->fill(1., efficiency); + fluctuationCalculatorTrackPrT->fill(1., efficiency); + fluctuationCalculatorTrackPrN->fill(1., efficiency); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.nPrM++; + + const double efficiency = pVzPtEtaEfficiencyTpcPrM->GetBinContent(pVzPtEtaEfficiencyTpcPrM->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcPrM->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcPrM->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackPrM->fill(1., efficiency); + fluctuationCalculatorTrackPrT->fill(1., efficiency); + fluctuationCalculatorTrackPrN->fill(-1., efficiency); + } + } + } else if (quantityHolderTrack.hasTofPid) { + if (isPr()) { + if (quantityHolderTrack.sign == 1) { + quantityHolderEvent.nPrP++; + + const double efficiency = pVzPtEtaEfficiencyTpcTofPrP->GetBinContent(pVzPtEtaEfficiencyTpcTofPrP->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcTofPrP->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcTofPrP->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackPrP->fill(1., efficiency); + fluctuationCalculatorTrackPrT->fill(1., efficiency); + fluctuationCalculatorTrackPrN->fill(1., efficiency); + } else if (quantityHolderTrack.sign == -1) { + quantityHolderEvent.nPrM++; + + const double efficiency = pVzPtEtaEfficiencyTpcTofPrM->GetBinContent(pVzPtEtaEfficiencyTpcTofPrM->GetXaxis()->FindBin(quantityHolderEvent.vz), pVzPtEtaEfficiencyTpcTofPrM->GetYaxis()->FindBin(quantityHolderTrack.pt), pVzPtEtaEfficiencyTpcTofPrM->GetZaxis()->FindBin(quantityHolderTrack.eta)); + + fluctuationCalculatorTrackPrM->fill(1., efficiency); + fluctuationCalculatorTrackPrT->fill(1., efficiency); + fluctuationCalculatorTrackPrN->fill(-1., efficiency); + } + } + } + } + } + } + if (cfgFlagAnalysisFluctuationCh.value) { + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hCentralityNChPNChM"), quantityHolderEvent.centrality, quantityHolderEvent.nChP, quantityHolderEvent.nChM); + for (std::int32_t const& iOrderVector : std::views::iota(0, static_cast(fluctuation_calculator_base::kNOrderVectors))) { + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorChP"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackChP->getProductFast(iOrderVector)); + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorChM"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackChM->getProductFast(iOrderVector)); + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorChT"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackChT->getProductFast(iOrderVector)); + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorChN"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackChN->getProductFast(iOrderVector)); + } + } + if (cfgFlagAnalysisFluctuationKa.value) { + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hCentralityNKaPNKaM"), quantityHolderEvent.centrality, quantityHolderEvent.nKaP, quantityHolderEvent.nKaM); + for (std::int32_t const& iOrderVector : std::views::iota(0, static_cast(fluctuation_calculator_base::kNOrderVectors))) { + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorKaP"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackKaP->getProductFast(iOrderVector)); + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorKaM"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackKaM->getProductFast(iOrderVector)); + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorKaT"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackKaT->getProductFast(iOrderVector)); + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorKaN"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackKaN->getProductFast(iOrderVector)); + } + } + if (cfgFlagAnalysisFluctuationPr.value) { + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hCentralityNPrPNPrM"), quantityHolderEvent.centrality, quantityHolderEvent.nPrP, quantityHolderEvent.nPrM); + for (std::int32_t const& iOrderVector : std::views::iota(0, static_cast(fluctuation_calculator_base::kNOrderVectors))) { + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorPrP"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackPrP->getProductFast(iOrderVector)); + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorPrM"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackPrM->getProductFast(iOrderVector)); + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorPrT"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackPrT->getProductFast(iOrderVector)); + hrAnalysisFluctuation.fill(HIST("AnalysisFluctuation/hFluctuationCalculatorPrN"), quantityHolderEvent.centrality, quantityHolderEvent.subgroupIndex, iOrderVector, fluctuationCalculatorTrackPrN->getProductFast(iOrderVector)); + } + } + } + PROCESS_SWITCH(PartNumFluc, processRaw, "Process raw data", false); + + Preslice presliceTracksPerCollision = aod::track::collisionId; + void processMc(const soa::Filtered::iterator& mcCollision, const aod::McParticles& mcParticles, const soa::SmallGroups& collisions, const soa::Filtered& tracksUngrouped, const aod::BCsWithTimestamps&) + { + for (const auto& collision : collisions) { + if (collision.globalIndex() != mcCollision.bestCollisionIndex()) { + continue; + } + + const auto& tracks = tracksUngrouped.sliceBy(presliceTracksPerCollision, collision.globalIndex()); + + if (!initEvent(collision, tracks)) { + return; + } + + for (const auto& mcParticle : mcParticles) { + quantityHolderMcParticle.clear(); + quantityHolderMcParticle.globalIndex = mcParticle.globalIndex(); + quantityHolderMcParticle.pdgCode = mcParticle.pdgCode(); + quantityHolderMcParticle.pt = mcParticle.pt(); + quantityHolderMcParticle.eta = mcParticle.eta(); + + if (!mcParticle.isPhysicalPrimary()) { + continue; + } + + if (cfgFlagCalculationEfficiency.value) { + switch (quantityHolderMcParticle.pdgCode) { + case PDG_t::kPiPlus: + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcPiP"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcPiP, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcPiP.end() ? 1. : 0.); + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofPiP"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcTofPiP, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcTofPiP.end() ? 1. : 0.); + break; + case PDG_t::kPiMinus: + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcPiM"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcPiM, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcPiM.end() ? 1. : 0.); + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofPiM"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcTofPiM, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcTofPiM.end() ? 1. : 0.); + break; + case PDG_t::kKPlus: + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcKaP"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcKaP, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcKaP.end() ? 1. : 0.); + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofKaP"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcTofKaP, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcTofKaP.end() ? 1. : 0.); + break; + case PDG_t::kKMinus: + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcKaM"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcKaM, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcKaM.end() ? 1. : 0.); + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofKaM"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcTofKaM, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcTofKaM.end() ? 1. : 0.); + break; + case PDG_t::kProton: + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcPrP"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcPrP, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcPrP.end() ? 1. : 0.); + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofPrP"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcTofPrP, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcTofPrP.end() ? 1. : 0.); + break; + case PDG_t::kProtonBar: + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcPrM"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcPrM, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcPrM.end() ? 1. : 0.); + hrCalculationEfficiency.fill(HIST("CalculationEfficiency/pVzPtEtaEfficiencyTpcTofPrM"), quantityHolderEvent.vz, quantityHolderMcParticle.pt, quantityHolderMcParticle.eta, std::ranges::find(quantityHolderEvent.mcParticleIndicesMatchedTpcTofPrM, quantityHolderMcParticle.globalIndex) != quantityHolderEvent.mcParticleIndicesMatchedTpcTofPrM.end() ? 1. : 0.); + break; + default: + break; + } + } + } + } + } + PROCESS_SWITCH(PartNumFluc, processMc, "Process MC data", true); +}; + +WorkflowSpec defineDataProcessing(const ConfigContext& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc)}; +}