From bfce2238555669ec915b3b26cb99a157c6913e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= <26327373+vkucera@users.noreply.github.com> Date: Fri, 23 Oct 2026 13:39:17 +0200 Subject: [PATCH] Remove HfHelper instances --- ALICE3/TableProducer/alice3-correlatorDDbar.cxx | 2 -- ALICE3/TableProducer/alice3HfSelector3Prong.cxx | 3 +-- .../TableProducer/alice3HfTreeCreator3Prong.cxx | 6 ++---- ALICE3/Tasks/alice3HfTask3Prong.cxx | 17 ++++++++--------- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/ALICE3/TableProducer/alice3-correlatorDDbar.cxx b/ALICE3/TableProducer/alice3-correlatorDDbar.cxx index 5603fb97348..bb1b54bd03e 100644 --- a/ALICE3/TableProducer/alice3-correlatorDDbar.cxx +++ b/ALICE3/TableProducer/alice3-correlatorDDbar.cxx @@ -89,8 +89,6 @@ struct alice3correlatorddbar { Configurable> binsPt{"binsPt", std::vector{o2::analysis::hf_cuts_d0_to_pi_k::vecBinsPt}, "pT bin limits for candidate mass plots and efficiency"}; Configurable> efficiencyD{"efficiencyD", std::vector{efficiencyDmeson_v}, "Efficiency values for D0 meson"}; - // HfHelper hfHelper; //not needed for now - Partition> selectedCandidates = aod::a3D0meson::y > -yCandMax&& aod::a3D0meson::y ptCandMin && (aod::a3D0Selection::isSelD0 >= selectionFlagD0 || aod::a3D0Selection::isSelD0bar >= selectionFlagD0bar); Partition> selectedCandidatesMC = aod::a3D0meson::y > -yCandMax&& aod::a3D0meson::y ptCandMin && (aod::a3D0Selection::isSelD0 >= selectionFlagD0 || aod::a3D0Selection::isSelD0bar >= selectionFlagD0bar); diff --git a/ALICE3/TableProducer/alice3HfSelector3Prong.cxx b/ALICE3/TableProducer/alice3HfSelector3Prong.cxx index 3669ffd834d..f502842ef02 100644 --- a/ALICE3/TableProducer/alice3HfSelector3Prong.cxx +++ b/ALICE3/TableProducer/alice3HfSelector3Prong.cxx @@ -93,7 +93,6 @@ struct Alice3HfSelector3Prong { Configurable timestampCCDB{"timestampCCDB", -1, "timestamp of the ONNX file for ML model used to query in CCDB"}; Configurable loadModelsFromCCDB{"loadModelsFromCCDB", false, "Flag to enable or disable the loading of models from CCDB"}; - HfHelperAlice3 hfHelper; o2::analysis::HfMlResponse3Prong mlResponse; o2::ccdb::CcdbApi ccdbApi; @@ -236,7 +235,7 @@ struct Alice3HfSelector3Prong { template bool selectionCandidateMass(int const ptBin, const TCandidate& cand) { - const float massCand = hfHelper.getCandMass(cand); + const float massCand = HfHelperAlice3::getCandMass(cand); // cut on mass window if (std::abs(massCand - MassReference) > cuts->get(ptBin, "m")) { return false; diff --git a/ALICE3/TableProducer/alice3HfTreeCreator3Prong.cxx b/ALICE3/TableProducer/alice3HfTreeCreator3Prong.cxx index 7a97f1420ff..bc456974afb 100644 --- a/ALICE3/TableProducer/alice3HfTreeCreator3Prong.cxx +++ b/ALICE3/TableProducer/alice3HfTreeCreator3Prong.cxx @@ -272,8 +272,6 @@ struct Alice3HfTreeCreator3Prong { Configurable downSampleFactor{"downSampleFactor", 1., "Fraction of cands to keep"}; Configurable ptMaxForDownSample{"ptMaxForDownSample", 10., "Maximum pt for the application of the downsampling factor"}; - HfHelperAlice3 hfHelper; - using CandsLcRec = soa::Filtered>; using CandsLcRecWMl = soa::Filtered>; using CandsMcGen = soa::Join; @@ -399,7 +397,7 @@ struct Alice3HfTreeCreator3Prong { rowCandKine3Ps( cand.ptProng0(), cand.ptProng1(), cand.ptProng2(), cand.pt(), RecoDecay::p(cand.px(), cand.py(), cand.pz()), cand.eta(), cand.phi(), - hfHelper.getCandMass(cand), hfHelper.getCandY(cand), hfHelper.getCandEnergy(cand)); + HfHelperAlice3::getCandMass(cand), HfHelperAlice3::getCandY(cand), HfHelperAlice3::getCandEnergy(cand)); } if (fillTables.fillDaugKineInfo) { rowDaugMoms( @@ -442,7 +440,7 @@ struct Alice3HfTreeCreator3Prong { { for (const auto& part : parts) { if (fillTables.fillCandGenKineInfo) { - rowCand3PGen(part.pt(), part.eta(), part.phi(), hfHelper.getCandY(part)); + rowCand3PGen(part.pt(), part.eta(), part.phi(), HfHelperAlice3::getCandY(part)); } if (fillTables.fillMcMatchGenInfo) { rowCand3PMcMatchGen(part.flagMcGen(), part.originMcGen()); diff --git a/ALICE3/Tasks/alice3HfTask3Prong.cxx b/ALICE3/Tasks/alice3HfTask3Prong.cxx index 823d054395a..8901ae6e8a9 100644 --- a/ALICE3/Tasks/alice3HfTask3Prong.cxx +++ b/ALICE3/Tasks/alice3HfTask3Prong.cxx @@ -58,7 +58,6 @@ struct Alice3HfTask3Prong { Configurable ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"}; Configurable ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"}; - HfHelperAlice3 hfHelper; SliceCache cache; Service ccdb; @@ -271,7 +270,7 @@ struct Alice3HfTask3Prong { for (const auto& candidate : candidates) { registry.fill(HIST("MC/rec/hCandidateCounter"), 1.); /// rapidity selection - if (yCandRecoMax >= 0. && std::abs(hfHelper.getCandY(candidate)) > yCandRecoMax) { + if (yCandRecoMax >= 0. && std::abs(HfHelperAlice3::getCandY(candidate)) > yCandRecoMax) { continue; } registry.fill(HIST("MC/rec/hCandidateCounter"), 2.); @@ -311,7 +310,7 @@ struct Alice3HfTask3Prong { if (candidate.isSelMassHypo0()) { registry.fill(HIST("hSelectionStatus"), 0., pt); - double mass = hfHelper.getCandMass(candidate); + double mass = HfHelperAlice3::getCandMass(candidate); /// Fill histograms fillHistogramsRecSig(candidate, mass, false); if (originType == RecoDecay::OriginType::Prompt) { @@ -334,7 +333,7 @@ struct Alice3HfTask3Prong { if (fillSwapMassHypo) { if (candidate.isSelMassHypo1()) { registry.fill(HIST("hSelectionStatus"), 1., pt); - double mass = hfHelper.getCandMass(candidate); + double mass = HfHelperAlice3::getCandMass(candidate); /// Fill histograms fillHistogramsRecSig(candidate, mass, true); if (originType == RecoDecay::OriginType::Prompt) { @@ -357,12 +356,12 @@ struct Alice3HfTask3Prong { } } else { // Background if (candidate.isSelMassHypo0()) { - double mass = hfHelper.getCandMass(candidate); + double mass = HfHelperAlice3::getCandMass(candidate); fillHistogramsRecSig(candidate, mass, false); } if (fillSwapMassHypo) { if (candidate.isSelMassHypo1()) { - double mass = hfHelper.getCandMass(candidate); + double mass = HfHelperAlice3::getCandMass(candidate); fillHistogramsRecSig(candidate, mass, true); } } @@ -385,10 +384,10 @@ struct Alice3HfTask3Prong { static constexpr auto histoSuffix = HIST("Gen") + HIST(SignalSuffixes[SignalType]); registry.fill(histoPrefix + HIST("hPt") + histoSuffix, particle.pt()); registry.fill(histoPrefix + HIST("hEta") + histoSuffix, particle.eta()); - registry.fill(histoPrefix + HIST("hY") + histoSuffix, hfHelper.getCandY(particle)); + registry.fill(histoPrefix + HIST("hY") + histoSuffix, HfHelperAlice3::getCandY(particle)); registry.fill(histoPrefix + HIST("hPhi") + histoSuffix, particle.phi()); registry.fill(histoPrefix + HIST("hEtaVsPt") + histoSuffix, particle.eta(), particle.pt()); - registry.fill(histoPrefix + HIST("hYVsPt") + histoSuffix, hfHelper.getCandY(particle), particle.pt()); + registry.fill(histoPrefix + HIST("hYVsPt") + histoSuffix, HfHelperAlice3::getCandY(particle), particle.pt()); registry.fill(histoPrefix + HIST("hPhiVsPt") + histoSuffix, particle.phi(), particle.pt()); if (particle.has_daughters()) { const auto firstDauIdx = particle.daughtersIds().front(); @@ -424,7 +423,7 @@ struct Alice3HfTask3Prong { // MC gen. for (const auto& particle : mcParticles) { if (std::abs(particle.flagMcGen()) == selectedPdg) { - double yGen = hfHelper.getCandY(particle); + double yGen = HfHelperAlice3::getCandY(particle); if (yCandGenMax >= 0. && std::abs(yGen) > yCandGenMax) { continue; }