From 7782c18d2c3c7e80118c82f3c054498f218cb3ba Mon Sep 17 00:00:00 2001 From: Ankur Yadav Date: Mon, 13 Apr 2026 00:01:32 +0200 Subject: [PATCH 1/5] Declared all Qvector tables in a produceGroup. Added a process function to fill Qvector tables for Dielectrons. Fill RefFlow and QvectorExtra table with FT0C cumulants if the cfgFT0CCumulant is true. --- PWGDQ/TableProducer/tableMaker_withAssoc.cxx | 60 ++++++++++++++++++-- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx index a857be78aa8..37a485a9c8a 100644 --- a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx +++ b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx @@ -186,8 +186,6 @@ struct TableMaker { Produces eventExtended; Produces eventVtxCov; Produces eventInfo; - Produces eventQvectorCentr; - Produces eventQvectorCentrExtra; Produces zdc; Produces fit; Produces multPV; @@ -208,6 +206,14 @@ struct TableMaker { Produces mftTrackExtra; Produces mftAssoc; + // Q-vector related tables, to be filled only if the user selects the corresponding option; since they are not needed for the skimming, we keep them in a separate group to avoid filling them when not needed + struct : ProducesGroup { + Produces eventQvectorCentr; + Produces eventQvectorCentrExtra; + Produces eventQvectorExtra; + Produces eventRefFlow; + } qvecGroup; + OutputObj fOutputList{"output"}; //! the histogram manager output list OutputObj fStatsList{"Statistics"}; //! skimming statistics @@ -288,6 +294,12 @@ struct TableMaker { Configurable fConfigSaveElectronSample{"cfgSaveElectronSample", false, "If true, only save electron sample"}; } fConfigPostCalibTPC; + // + struct : ConfigurableGroup { + Configurable fConfigFT0CCumulant{"cfgFT0CCumulant", false, + "If true, compute RefFlow cumulants from FT0C amplitudes (requires FT0s subscription)"}; + } fConfigQvector; + struct : ConfigurableGroup { // Track related options Configurable fPropTrack{"cfgPropTrack", true, "Propagate tracks to associated collision to recalculate DCA and momentum vector"}; @@ -468,7 +480,7 @@ struct TableMaker { // Check whether we have to define barrel or muon histograms bool enableBarrelHistos = (context.mOptions.get("processPPWithFilter") || context.mOptions.get("processPPWithFilterBarrelOnly") || context.mOptions.get("processPPBarrelOnly") || - context.mOptions.get("processPbPb") || context.mOptions.get("processPbPbBarrelOnly") || context.mOptions.get("processPbPbBarrelOnlyWithV0Bits") || context.mOptions.get("processPbPbBarrelOnlyWithV0BitsNoTOF")) || + context.mOptions.get("processPbPb") || context.mOptions.get("processPbPbBarrelOnly") || context.mOptions.get("processPbPbBarrelOnlyWithQvect") || context.mOptions.get("processPbPbBarrelOnlyWithV0Bits") || context.mOptions.get("processPbPbBarrelOnlyWithV0BitsNoTOF")) || context.mOptions.get("processPbPbWithFilterBarrelOnly") || context.mOptions.get("processPPBarrelOnlyWithV0s") || context.mOptions.get("processPbPbBarrelOnlyNoTOF"); bool enableMuonHistos = (context.mOptions.get("processPPWithFilter") || context.mOptions.get("processPPWithFilterMuonOnly") || context.mOptions.get("processPPWithFilterMuonMFT") || context.mOptions.get("processPPMuonOnly") || context.mOptions.get("processPPRealignedMuonOnly") || context.mOptions.get("processPPMuonMFT") || context.mOptions.get("processPPMuonMFTWithMultsExtra") || @@ -1178,9 +1190,36 @@ struct TableMaker { eventInfo(collision.globalIndex()); if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) { - eventQvectorCentr(collision.qvecFT0ARe(), collision.qvecFT0AIm(), collision.qvecFT0CRe(), collision.qvecFT0CIm(), collision.qvecFT0MRe(), collision.qvecFT0MIm(), collision.qvecFV0ARe(), collision.qvecFV0AIm(), collision.qvecTPCposRe(), collision.qvecTPCposIm(), collision.qvecTPCnegRe(), collision.qvecTPCnegIm(), + qvecGroup.eventQvectorCentr(collision.qvecFT0ARe(), collision.qvecFT0AIm(), collision.qvecFT0CRe(), collision.qvecFT0CIm(), collision.qvecFT0MRe(), collision.qvecFT0MIm(), collision.qvecFV0ARe(), collision.qvecFV0AIm(), collision.qvecTPCposRe(), collision.qvecTPCposIm(), collision.qvecTPCnegRe(), collision.qvecTPCnegIm(), collision.sumAmplFT0A(), collision.sumAmplFT0C(), collision.sumAmplFT0M(), collision.sumAmplFV0A(), collision.nTrkTPCpos(), collision.nTrkTPCneg()); - eventQvectorCentrExtra(collision.qvecTPCallRe(), collision.qvecTPCallIm(), collision.nTrkTPCall()); + qvecGroup.eventQvectorCentrExtra(collision.qvecTPCallRe(), collision.qvecTPCallIm(), collision.nTrkTPCall()); + + if (fConfigQvector.fConfigFT0CCumulant) { + // FT0C cumulants for RefFlow and QvectorExtra + float S11C = collision.sumAmplFT0C(); + float S12C = 0.f; + if constexpr (!std::is_same_v, std::nullptr_t>) { + if (collision.has_foundFT0()) { + auto ft0 = collision.foundFT0(); + for (auto amp : ft0.amplitudeC()) { + if (amp > 0.f) { + S12C += amp * amp; + } + } + } + } + float S21C = S11C * S11C; + float M11REF = S21C - S12C; + std::complex Q21C(collision.qvecFT0CRe() * S11C, collision.qvecFT0CIm() * S11C); + float CORR2REF = (std::norm(Q21C) - S12C) / M11REF; + + if (std::isnan(M11REF) || std::isinf(M11REF) || std::isnan(CORR2REF) || std::isinf(CORR2REF)) { + M11REF = 0.f; + CORR2REF = 0.f; + } + qvecGroup.eventRefFlow(M11REF, -9999, -9999, CORR2REF, -9999, -9999, VarManager::fgValues[VarManager::kCentFT0C]); + qvecGroup.eventQvectorExtra(-9999, -9999, -9999, -9999, S11C, S12C, -9999, -9999); + } } if constexpr ((TEventFillMap & VarManager::ObjTypes::Zdc) > 0) { @@ -1926,6 +1965,16 @@ struct TableMaker { fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); } + // produce the barrel only DQ skimmed data model typically for Pb-Pb (with centrality), no subscribtion to the DQ event filter + void processPbPbBarrelOnlyWithQvect(MyEventsWithCentAndMultsQvect const& collisions, MyBCs const& bcs, + MyBarrelTracksWithCov const& tracksBarrel, + TrackAssoc const& trackAssocs, aod::FT0s& ft0s) + { + computeOccupancyEstimators(collisions, tracksPosWithCov, tracksNegWithCov, presliceWithCov, bcs); + computeCollMergingTag(collisions, tracksBarrel, presliceWithCov); + fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, ft0s, nullptr, nullptr); + } + // produce the barrel only DQ skimmed data model typically for Pb-Pb (with centrality), no TOF void processPbPbBarrelOnlyNoTOF(MyEventsWithCentAndMults const& collisions, MyBCs const& bcs, MyBarrelTracksWithCovNoTOF const& tracksBarrel, @@ -2027,6 +2076,7 @@ struct TableMaker { PROCESS_SWITCH(TableMaker, processPPMuonMFTWithMultsExtra, "Build muon + mft DQ skimmed data model typically for pp/p-Pb and UPC Pb-Pb", false); PROCESS_SWITCH(TableMaker, processPbPb, "Build full DQ skimmed data model typically for Pb-Pb, w/o event filtering", false); PROCESS_SWITCH(TableMaker, processPbPbBarrelOnly, "Build barrel only DQ skimmed data model typically for Pb-Pb, w/o event filtering", false); + PROCESS_SWITCH(TableMaker, processPbPbBarrelOnlyWithQvect, "Build barrel only DQ skimmed data model typically for Pb-Pb, w/o event filtering with event properties and flow", false); PROCESS_SWITCH(TableMaker, processPbPbBarrelOnlyNoTOF, "Build barrel only DQ skimmed data model typically for Pb-Pb, w/o event filtering, no TOF", false); PROCESS_SWITCH(TableMaker, processPbPbWithFilterBarrelOnly, "Build barrel only DQ skimmed data model typically for UPC Pb-Pb, w/ event filtering", false); PROCESS_SWITCH(TableMaker, processPbPbBarrelOnlyWithV0Bits, "Build barrel only DQ skimmed data model typically for Pb-Pb, w/ V0 bits, w/o event filtering", false); From 63a7bcaea5b4d86a6cf594e31d48102a4dfa9723 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 13 Apr 2026 09:27:44 +0000 Subject: [PATCH 2/5] Please consider the following formatting changes --- PWGDQ/TableProducer/tableMaker_withAssoc.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx index 37a485a9c8a..1c5628f7f05 100644 --- a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx +++ b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx @@ -294,10 +294,10 @@ struct TableMaker { Configurable fConfigSaveElectronSample{"cfgSaveElectronSample", false, "If true, only save electron sample"}; } fConfigPostCalibTPC; - // + // struct : ConfigurableGroup { Configurable fConfigFT0CCumulant{"cfgFT0CCumulant", false, - "If true, compute RefFlow cumulants from FT0C amplitudes (requires FT0s subscription)"}; + "If true, compute RefFlow cumulants from FT0C amplitudes (requires FT0s subscription)"}; } fConfigQvector; struct : ConfigurableGroup { @@ -1191,7 +1191,7 @@ struct TableMaker { if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) { qvecGroup.eventQvectorCentr(collision.qvecFT0ARe(), collision.qvecFT0AIm(), collision.qvecFT0CRe(), collision.qvecFT0CIm(), collision.qvecFT0MRe(), collision.qvecFT0MIm(), collision.qvecFV0ARe(), collision.qvecFV0AIm(), collision.qvecTPCposRe(), collision.qvecTPCposIm(), collision.qvecTPCnegRe(), collision.qvecTPCnegIm(), - collision.sumAmplFT0A(), collision.sumAmplFT0C(), collision.sumAmplFT0M(), collision.sumAmplFV0A(), collision.nTrkTPCpos(), collision.nTrkTPCneg()); + collision.sumAmplFT0A(), collision.sumAmplFT0C(), collision.sumAmplFT0M(), collision.sumAmplFV0A(), collision.nTrkTPCpos(), collision.nTrkTPCneg()); qvecGroup.eventQvectorCentrExtra(collision.qvecTPCallRe(), collision.qvecTPCallIm(), collision.nTrkTPCall()); if (fConfigQvector.fConfigFT0CCumulant) { @@ -1212,7 +1212,7 @@ struct TableMaker { float M11REF = S21C - S12C; std::complex Q21C(collision.qvecFT0CRe() * S11C, collision.qvecFT0CIm() * S11C); float CORR2REF = (std::norm(Q21C) - S12C) / M11REF; - + if (std::isnan(M11REF) || std::isinf(M11REF) || std::isnan(CORR2REF) || std::isinf(CORR2REF)) { M11REF = 0.f; CORR2REF = 0.f; @@ -1967,8 +1967,8 @@ struct TableMaker { // produce the barrel only DQ skimmed data model typically for Pb-Pb (with centrality), no subscribtion to the DQ event filter void processPbPbBarrelOnlyWithQvect(MyEventsWithCentAndMultsQvect const& collisions, MyBCs const& bcs, - MyBarrelTracksWithCov const& tracksBarrel, - TrackAssoc const& trackAssocs, aod::FT0s& ft0s) + MyBarrelTracksWithCov const& tracksBarrel, + TrackAssoc const& trackAssocs, aod::FT0s& ft0s) { computeOccupancyEstimators(collisions, tracksPosWithCov, tracksNegWithCov, presliceWithCov, bcs); computeCollMergingTag(collisions, tracksBarrel, presliceWithCov); From 7defc816255fb0367666c5ebc9c5e37cd3d97822 Mon Sep 17 00:00:00 2001 From: Ankur Yadav Date: Mon, 13 Apr 2026 17:38:40 +0200 Subject: [PATCH 3/5] Qvector-tables shall be filled for all PbPb processes (except for processPbPbWithFilterBarrelOnly). Added a configurable for Qvector calibration path. The tables shall only be filled if the calibrations are available --- PWGDQ/TableProducer/tableMaker_withAssoc.cxx | 126 ++++++++++--------- 1 file changed, 70 insertions(+), 56 deletions(-) diff --git a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx index 1c5628f7f05..a88ce2fce35 100644 --- a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx +++ b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx @@ -294,10 +294,10 @@ struct TableMaker { Configurable fConfigSaveElectronSample{"cfgSaveElectronSample", false, "If true, only save electron sample"}; } fConfigPostCalibTPC; - // + // struct : ConfigurableGroup { - Configurable fConfigFT0CCumulant{"cfgFT0CCumulant", false, - "If true, compute RefFlow cumulants from FT0C amplitudes (requires FT0s subscription)"}; + Configurable fConfigFT0CCumulant{"cfgFT0CCumulant", false, "If true, compute RefFlow cumulants from FT0C amplitudes (requires FT0s subscription)"}; + Configurable fConfigQvecCalibPath{"cfgQvecCalibPath","Analysis/EventPlane/QVecCorrections","CCDB path for qvector calibration objects; used only to check availability per run"}; } fConfigQvector; struct : ConfigurableGroup { @@ -335,6 +335,7 @@ struct TableMaker { bool fDoDetailedQA = false; // Bool to set detailed QA true, if QA is set true int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc. + bool fQvectCalibAvailable = false; // Whether the Q-vector calibration is available for the current run // maps used to store index info; NOTE: std::map are sorted in ascending order by default (needed for track to collision indices) std::map fCollIndexMap; // key: old collision index, value: skimmed collision index @@ -480,7 +481,7 @@ struct TableMaker { // Check whether we have to define barrel or muon histograms bool enableBarrelHistos = (context.mOptions.get("processPPWithFilter") || context.mOptions.get("processPPWithFilterBarrelOnly") || context.mOptions.get("processPPBarrelOnly") || - context.mOptions.get("processPbPb") || context.mOptions.get("processPbPbBarrelOnly") || context.mOptions.get("processPbPbBarrelOnlyWithQvect") || context.mOptions.get("processPbPbBarrelOnlyWithV0Bits") || context.mOptions.get("processPbPbBarrelOnlyWithV0BitsNoTOF")) || + context.mOptions.get("processPbPb") || context.mOptions.get("processPbPbBarrelOnly") || context.mOptions.get("processPbPbBarrelOnlyWithV0Bits") || context.mOptions.get("processPbPbBarrelOnlyWithV0BitsNoTOF")) || context.mOptions.get("processPbPbWithFilterBarrelOnly") || context.mOptions.get("processPPBarrelOnlyWithV0s") || context.mOptions.get("processPbPbBarrelOnlyNoTOF"); bool enableMuonHistos = (context.mOptions.get("processPPWithFilter") || context.mOptions.get("processPPWithFilterMuonOnly") || context.mOptions.get("processPPWithFilterMuonMFT") || context.mOptions.get("processPPMuonOnly") || context.mOptions.get("processPPRealignedMuonOnly") || context.mOptions.get("processPPMuonMFT") || context.mOptions.get("processPPMuonMFTWithMultsExtra") || @@ -1190,38 +1191,39 @@ struct TableMaker { eventInfo(collision.globalIndex()); if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) { - qvecGroup.eventQvectorCentr(collision.qvecFT0ARe(), collision.qvecFT0AIm(), collision.qvecFT0CRe(), collision.qvecFT0CIm(), collision.qvecFT0MRe(), collision.qvecFT0MIm(), collision.qvecFV0ARe(), collision.qvecFV0AIm(), collision.qvecTPCposRe(), collision.qvecTPCposIm(), collision.qvecTPCnegRe(), collision.qvecTPCnegIm(), - collision.sumAmplFT0A(), collision.sumAmplFT0C(), collision.sumAmplFT0M(), collision.sumAmplFV0A(), collision.nTrkTPCpos(), collision.nTrkTPCneg()); - qvecGroup.eventQvectorCentrExtra(collision.qvecTPCallRe(), collision.qvecTPCallIm(), collision.nTrkTPCall()); - - if (fConfigQvector.fConfigFT0CCumulant) { - // FT0C cumulants for RefFlow and QvectorExtra - float S11C = collision.sumAmplFT0C(); - float S12C = 0.f; - if constexpr (!std::is_same_v, std::nullptr_t>) { - if (collision.has_foundFT0()) { - auto ft0 = collision.foundFT0(); - for (auto amp : ft0.amplitudeC()) { - if (amp > 0.f) { - S12C += amp * amp; + if (fQvectCalibAvailable) { + qvecGroup.eventQvectorCentr(collision.qvecFT0ARe(), collision.qvecFT0AIm(), collision.qvecFT0CRe(), collision.qvecFT0CIm(), collision.qvecFT0MRe(), collision.qvecFT0MIm(), collision.qvecFV0ARe(), collision.qvecFV0AIm(), collision.qvecTPCposRe(), collision.qvecTPCposIm(), collision.qvecTPCnegRe(), collision.qvecTPCnegIm(), + collision.sumAmplFT0A(), collision.sumAmplFT0C(), collision.sumAmplFT0M(), collision.sumAmplFV0A(), collision.nTrkTPCpos(), collision.nTrkTPCneg()); + qvecGroup.eventQvectorCentrExtra(collision.qvecTPCallRe(), collision.qvecTPCallIm(), collision.nTrkTPCall()); + + if (fConfigQvector.fConfigFT0CCumulant) { + // FT0C cumulants for RefFlow and QvectorExtra + float S11C = collision.sumAmplFT0C(); + float S12C = 0.f; + if constexpr (!std::is_same_v, std::nullptr_t>) { + if (collision.has_foundFT0()) { + auto ft0 = collision.foundFT0(); + for (auto amp : ft0.amplitudeC()) { + if (amp > 0.f) { + S12C += amp * amp; + } } } } + float S21C = S11C * S11C; + float M11REF = S21C - S12C; + std::complex Q21C(collision.qvecFT0CRe() * S11C, collision.qvecFT0CIm() * S11C); + float CORR2REF = (std::norm(Q21C) - S12C) / M11REF; + + if (std::isnan(M11REF) || std::isinf(M11REF) || std::isnan(CORR2REF) || std::isinf(CORR2REF)) { + M11REF = 0.f; + CORR2REF = 0.f; + } + qvecGroup.eventRefFlow(M11REF, -9999, -9999, CORR2REF, -9999, -9999, VarManager::fgValues[VarManager::kCentFT0C]); + qvecGroup.eventQvectorExtra(-9999, -9999, -9999, -9999, S11C, S12C, -9999, -9999); } - float S21C = S11C * S11C; - float M11REF = S21C - S12C; - std::complex Q21C(collision.qvecFT0CRe() * S11C, collision.qvecFT0CIm() * S11C); - float CORR2REF = (std::norm(Q21C) - S12C) / M11REF; - - if (std::isnan(M11REF) || std::isinf(M11REF) || std::isnan(CORR2REF) || std::isinf(CORR2REF)) { - M11REF = 0.f; - CORR2REF = 0.f; - } - qvecGroup.eventRefFlow(M11REF, -9999, -9999, CORR2REF, -9999, -9999, VarManager::fgValues[VarManager::kCentFT0C]); - qvecGroup.eventQvectorExtra(-9999, -9999, -9999, -9999, S11C, S12C, -9999, -9999); } } - if constexpr ((TEventFillMap & VarManager::ObjTypes::Zdc) > 0) { if constexpr ((TEventFillMap & VarManager::ObjTypes::RapidityGapFilter) > 0) { // The DQRapidityGapFilter contains the index of the bc we want to get ZDC info from @@ -1771,6 +1773,29 @@ struct TableMaker { } std::map metadataRCT, header; header = fCCDBApi.retrieveHeaders(Form("RCT/Info/RunInformation/%i", bcs.begin().runNumber()), metadataRCT, -1); + + // Check if qvector calibration objects are available in CCDB for this run + if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) { + std::map metadataQvect; + const std::array subfolders = {"v2", "v3", "v4"}; + bool anyFound = false; + for (const auto& sub : subfolders) { + std::string fullPath = fConfigQvector.fConfigQvecCalibPath.value + "/" + sub; + auto headers = fCCDBApi.retrieveHeaders(fullPath, metadataQvect, bcs.begin().timestamp()); + if (headers.empty()) { + LOG(warn) << "Qvector calibration not found at CCDB path '" << fullPath + << "' for run " << bcs.begin().runNumber(); + } else { + anyFound = true; + } + } + fQvectCalibAvailable = anyFound; + if (!fQvectCalibAvailable) { + LOG(warn) << "No qvector calibration found in any subfolder under '" + << fConfigQvector.fConfigQvecCalibPath.value + << "' — qvector tables will not be filled for this run."; + } + } uint64_t sor = std::atol(header["SOR"].c_str()); uint64_t eor = std::atol(header["EOR"].c_str()); VarManager::SetSORandEOR(sor, eor); @@ -1946,43 +1971,33 @@ struct TableMaker { } // produce the full DQ skimmed data model typically for Pb-Pb (with centrality), no subscribtion to the DQ event filter - void processPbPb(MyEventsWithCentAndMults const& collisions, MyBCs const& bcs, + void processPbPb(MyEventsWithCentAndMultsQvect const& collisions, MyBCs const& bcs, MyBarrelTracksWithCov const& tracksBarrel, MyMuonsWithCov const& muons, MFTTracks const& mftTracks, TrackAssoc const& trackAssocs, FwdTrackAssoc const& fwdTrackAssocs, - MFTTrackAssoc const& mftAssocs) + MFTTrackAssoc const& mftAssocs, aod::FT0s& ft0s, aod::FV0As& fv0as, aod::FDDs& fdds) { - fullSkimming(collisions, bcs, nullptr, tracksBarrel, muons, mftTracks, trackAssocs, fwdTrackAssocs, mftAssocs, nullptr, nullptr, nullptr, nullptr); + fullSkimming(collisions, bcs, nullptr, tracksBarrel, muons, mftTracks, trackAssocs, fwdTrackAssocs, mftAssocs, nullptr, ft0s, fv0as, fdds); } // produce the barrel only DQ skimmed data model typically for Pb-Pb (with centrality), no subscribtion to the DQ event filter - void processPbPbBarrelOnly(MyEventsWithCentAndMults const& collisions, MyBCs const& bcs, + void processPbPbBarrelOnly(MyEventsWithCentAndMultsQvect const& collisions, MyBCs const& bcs, MyBarrelTracksWithCov const& tracksBarrel, - TrackAssoc const& trackAssocs) + TrackAssoc const& trackAssocs, aod::FT0s& ft0s, aod::FV0As& fv0as, aod::FDDs& fdds) { computeOccupancyEstimators(collisions, tracksPosWithCov, tracksNegWithCov, presliceWithCov, bcs); computeCollMergingTag(collisions, tracksBarrel, presliceWithCov); - fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); - } - - // produce the barrel only DQ skimmed data model typically for Pb-Pb (with centrality), no subscribtion to the DQ event filter - void processPbPbBarrelOnlyWithQvect(MyEventsWithCentAndMultsQvect const& collisions, MyBCs const& bcs, - MyBarrelTracksWithCov const& tracksBarrel, - TrackAssoc const& trackAssocs, aod::FT0s& ft0s) - { - computeOccupancyEstimators(collisions, tracksPosWithCov, tracksNegWithCov, presliceWithCov, bcs); - computeCollMergingTag(collisions, tracksBarrel, presliceWithCov); - fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, ft0s, nullptr, nullptr); + fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, ft0s, fv0as, fdds); } // produce the barrel only DQ skimmed data model typically for Pb-Pb (with centrality), no TOF - void processPbPbBarrelOnlyNoTOF(MyEventsWithCentAndMults const& collisions, MyBCs const& bcs, + void processPbPbBarrelOnlyNoTOF(MyEventsWithCentAndMultsQvect const& collisions, MyBCs const& bcs, MyBarrelTracksWithCovNoTOF const& tracksBarrel, - TrackAssoc const& trackAssocs) + TrackAssoc const& trackAssocs, aod::FT0s& ft0s, aod::FV0As& fv0as, aod::FDDs& fdds) { computeOccupancyEstimators(collisions, tracksPosWithCovNoTOF, tracksNegWithCovNoTOF, presliceWithCovNoTOF, bcs); computeCollMergingTag(collisions, tracksBarrel, presliceWithCovNoTOF); - fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); + fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, ft0s, fv0as, fdds); } // produce the barrel-only DQ skimmed data model typically for UPC Pb-Pb (no centrality), subscribe to the DQ rapidity gap event filter (filter-PbPb) @@ -1996,23 +2011,23 @@ struct TableMaker { } // produce the barrel only DQ skimmed data model typically for Pb-Pb (with centrality), no subscribtion to the DQ event filter - void processPbPbBarrelOnlyWithV0Bits(MyEventsWithCentAndMults const& collisions, MyBCs const& bcs, + void processPbPbBarrelOnlyWithV0Bits(MyEventsWithCentAndMultsQvect const& collisions, MyBCs const& bcs, MyBarrelTracksWithV0Bits const& tracksBarrel, - TrackAssoc const& trackAssocs) + TrackAssoc const& trackAssocs, aod::FT0s& ft0s, aod::FV0As& fv0as, aod::FDDs& fdds) { computeOccupancyEstimators(collisions, tracksPos, tracksNeg, preslice, bcs); computeCollMergingTag(collisions, tracksBarrel, preslice); - fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); + fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, ft0s, fv0as, fdds); } // produce the barrel only DQ skimmed data model typically for Pb-Pb (with centrality), no subscribtion to the DQ event filter - void processPbPbBarrelOnlyWithV0BitsNoTOF(MyEventsWithCentAndMults const& collisions, MyBCs const& bcs, + void processPbPbBarrelOnlyWithV0BitsNoTOF(MyEventsWithCentAndMultsQvect const& collisions, MyBCs const& bcs, MyBarrelTracksWithV0BitsNoTOF const& tracksBarrel, - TrackAssoc const& trackAssocs) + TrackAssoc const& trackAssocs, aod::FT0s& ft0s, aod::FV0As& fv0as, aod::FDDs& fdds) { computeOccupancyEstimators(collisions, tracksPosNoTOF, tracksNegNoTOF, presliceNoTOF, bcs); computeCollMergingTag(collisions, tracksBarrel, presliceNoTOF); - fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr); + fullSkimming(collisions, bcs, nullptr, tracksBarrel, nullptr, nullptr, trackAssocs, nullptr, nullptr, nullptr, ft0s, fv0as, fdds); } // produce the muon only DQ skimmed data model typically for Pb-Pb (with centrality), no subscribtion to the DQ event filter @@ -2076,7 +2091,6 @@ struct TableMaker { PROCESS_SWITCH(TableMaker, processPPMuonMFTWithMultsExtra, "Build muon + mft DQ skimmed data model typically for pp/p-Pb and UPC Pb-Pb", false); PROCESS_SWITCH(TableMaker, processPbPb, "Build full DQ skimmed data model typically for Pb-Pb, w/o event filtering", false); PROCESS_SWITCH(TableMaker, processPbPbBarrelOnly, "Build barrel only DQ skimmed data model typically for Pb-Pb, w/o event filtering", false); - PROCESS_SWITCH(TableMaker, processPbPbBarrelOnlyWithQvect, "Build barrel only DQ skimmed data model typically for Pb-Pb, w/o event filtering with event properties and flow", false); PROCESS_SWITCH(TableMaker, processPbPbBarrelOnlyNoTOF, "Build barrel only DQ skimmed data model typically for Pb-Pb, w/o event filtering, no TOF", false); PROCESS_SWITCH(TableMaker, processPbPbWithFilterBarrelOnly, "Build barrel only DQ skimmed data model typically for UPC Pb-Pb, w/ event filtering", false); PROCESS_SWITCH(TableMaker, processPbPbBarrelOnlyWithV0Bits, "Build barrel only DQ skimmed data model typically for Pb-Pb, w/ V0 bits, w/o event filtering", false); From 4ee4ed2b60fa515e1295b616e8a3e6c2485e1ce0 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 13 Apr 2026 16:05:15 +0000 Subject: [PATCH 4/5] Please consider the following formatting changes --- PWGDQ/TableProducer/tableMaker_withAssoc.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx index a88ce2fce35..755c4fa841a 100644 --- a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx +++ b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx @@ -294,10 +294,10 @@ struct TableMaker { Configurable fConfigSaveElectronSample{"cfgSaveElectronSample", false, "If true, only save electron sample"}; } fConfigPostCalibTPC; - // + // struct : ConfigurableGroup { Configurable fConfigFT0CCumulant{"cfgFT0CCumulant", false, "If true, compute RefFlow cumulants from FT0C amplitudes (requires FT0s subscription)"}; - Configurable fConfigQvecCalibPath{"cfgQvecCalibPath","Analysis/EventPlane/QVecCorrections","CCDB path for qvector calibration objects; used only to check availability per run"}; + Configurable fConfigQvecCalibPath{"cfgQvecCalibPath", "Analysis/EventPlane/QVecCorrections", "CCDB path for qvector calibration objects; used only to check availability per run"}; } fConfigQvector; struct : ConfigurableGroup { @@ -335,7 +335,7 @@ struct TableMaker { bool fDoDetailedQA = false; // Bool to set detailed QA true, if QA is set true int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc. - bool fQvectCalibAvailable = false; // Whether the Q-vector calibration is available for the current run + bool fQvectCalibAvailable = false; // Whether the Q-vector calibration is available for the current run // maps used to store index info; NOTE: std::map are sorted in ascending order by default (needed for track to collision indices) std::map fCollIndexMap; // key: old collision index, value: skimmed collision index @@ -1193,7 +1193,7 @@ struct TableMaker { if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) { if (fQvectCalibAvailable) { qvecGroup.eventQvectorCentr(collision.qvecFT0ARe(), collision.qvecFT0AIm(), collision.qvecFT0CRe(), collision.qvecFT0CIm(), collision.qvecFT0MRe(), collision.qvecFT0MIm(), collision.qvecFV0ARe(), collision.qvecFV0AIm(), collision.qvecTPCposRe(), collision.qvecTPCposIm(), collision.qvecTPCnegRe(), collision.qvecTPCnegIm(), - collision.sumAmplFT0A(), collision.sumAmplFT0C(), collision.sumAmplFT0M(), collision.sumAmplFV0A(), collision.nTrkTPCpos(), collision.nTrkTPCneg()); + collision.sumAmplFT0A(), collision.sumAmplFT0C(), collision.sumAmplFT0M(), collision.sumAmplFV0A(), collision.nTrkTPCpos(), collision.nTrkTPCneg()); qvecGroup.eventQvectorCentrExtra(collision.qvecTPCallRe(), collision.qvecTPCallIm(), collision.nTrkTPCall()); if (fConfigQvector.fConfigFT0CCumulant) { @@ -1214,7 +1214,7 @@ struct TableMaker { float M11REF = S21C - S12C; std::complex Q21C(collision.qvecFT0CRe() * S11C, collision.qvecFT0CIm() * S11C); float CORR2REF = (std::norm(Q21C) - S12C) / M11REF; - + if (std::isnan(M11REF) || std::isinf(M11REF) || std::isnan(CORR2REF) || std::isinf(CORR2REF)) { M11REF = 0.f; CORR2REF = 0.f; @@ -1773,7 +1773,7 @@ struct TableMaker { } std::map metadataRCT, header; header = fCCDBApi.retrieveHeaders(Form("RCT/Info/RunInformation/%i", bcs.begin().runNumber()), metadataRCT, -1); - + // Check if qvector calibration objects are available in CCDB for this run if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) { std::map metadataQvect; @@ -1782,10 +1782,10 @@ struct TableMaker { for (const auto& sub : subfolders) { std::string fullPath = fConfigQvector.fConfigQvecCalibPath.value + "/" + sub; auto headers = fCCDBApi.retrieveHeaders(fullPath, metadataQvect, bcs.begin().timestamp()); - if (headers.empty()) { - LOG(warn) << "Qvector calibration not found at CCDB path '" << fullPath - << "' for run " << bcs.begin().runNumber(); - } else { + if (headers.empty()) { + LOG(warn) << "Qvector calibration not found at CCDB path '" << fullPath + << "' for run " << bcs.begin().runNumber(); + } else { anyFound = true; } } From c08efdd22dc824880dfb06d6d5ac620a8bf11449 Mon Sep 17 00:00:00 2001 From: Ankur Yadav Date: Tue, 14 Apr 2026 11:06:07 +0200 Subject: [PATCH 5/5] Removed the ccdb check for q-vector calib objects from tableMaker_withAssoc. Just use a bool configurable to check if they exist --- PWGDQ/TableProducer/tableMaker_withAssoc.cxx | 28 ++------------------ 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx index 755c4fa841a..2c00522c77e 100644 --- a/PWGDQ/TableProducer/tableMaker_withAssoc.cxx +++ b/PWGDQ/TableProducer/tableMaker_withAssoc.cxx @@ -297,7 +297,7 @@ struct TableMaker { // struct : ConfigurableGroup { Configurable fConfigFT0CCumulant{"cfgFT0CCumulant", false, "If true, compute RefFlow cumulants from FT0C amplitudes (requires FT0s subscription)"}; - Configurable fConfigQvecCalibPath{"cfgQvecCalibPath", "Analysis/EventPlane/QVecCorrections", "CCDB path for qvector calibration objects; used only to check availability per run"}; + Configurable fConfigQvectCalibAvailable{"cfgQvectCalibAvailable", false, "If true, qvector calibration objects are available in CCDB for this run"}; } fConfigQvector; struct : ConfigurableGroup { @@ -335,7 +335,6 @@ struct TableMaker { bool fDoDetailedQA = false; // Bool to set detailed QA true, if QA is set true int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc. - bool fQvectCalibAvailable = false; // Whether the Q-vector calibration is available for the current run // maps used to store index info; NOTE: std::map are sorted in ascending order by default (needed for track to collision indices) std::map fCollIndexMap; // key: old collision index, value: skimmed collision index @@ -1191,7 +1190,7 @@ struct TableMaker { eventInfo(collision.globalIndex()); if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) { - if (fQvectCalibAvailable) { + if (fConfigQvector.fConfigQvectCalibAvailable) { qvecGroup.eventQvectorCentr(collision.qvecFT0ARe(), collision.qvecFT0AIm(), collision.qvecFT0CRe(), collision.qvecFT0CIm(), collision.qvecFT0MRe(), collision.qvecFT0MIm(), collision.qvecFV0ARe(), collision.qvecFV0AIm(), collision.qvecTPCposRe(), collision.qvecTPCposIm(), collision.qvecTPCnegRe(), collision.qvecTPCnegIm(), collision.sumAmplFT0A(), collision.sumAmplFT0C(), collision.sumAmplFT0M(), collision.sumAmplFV0A(), collision.nTrkTPCpos(), collision.nTrkTPCneg()); qvecGroup.eventQvectorCentrExtra(collision.qvecTPCallRe(), collision.qvecTPCallIm(), collision.nTrkTPCall()); @@ -1773,29 +1772,6 @@ struct TableMaker { } std::map metadataRCT, header; header = fCCDBApi.retrieveHeaders(Form("RCT/Info/RunInformation/%i", bcs.begin().runNumber()), metadataRCT, -1); - - // Check if qvector calibration objects are available in CCDB for this run - if constexpr ((TEventFillMap & VarManager::ObjTypes::CollisionQvectCentr) > 0) { - std::map metadataQvect; - const std::array subfolders = {"v2", "v3", "v4"}; - bool anyFound = false; - for (const auto& sub : subfolders) { - std::string fullPath = fConfigQvector.fConfigQvecCalibPath.value + "/" + sub; - auto headers = fCCDBApi.retrieveHeaders(fullPath, metadataQvect, bcs.begin().timestamp()); - if (headers.empty()) { - LOG(warn) << "Qvector calibration not found at CCDB path '" << fullPath - << "' for run " << bcs.begin().runNumber(); - } else { - anyFound = true; - } - } - fQvectCalibAvailable = anyFound; - if (!fQvectCalibAvailable) { - LOG(warn) << "No qvector calibration found in any subfolder under '" - << fConfigQvector.fConfigQvecCalibPath.value - << "' — qvector tables will not be filled for this run."; - } - } uint64_t sor = std::atol(header["SOR"].c_str()); uint64_t eor = std::atol(header["EOR"].c_str()); VarManager::SetSORandEOR(sor, eor);