From 76fabcf9a570f29e15e65331be8ed44353febec2 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 28 Aug 2025 12:38:50 +0000 Subject: [PATCH] Please consider the following formatting changes --- .../DataModel/DerivedDataCorrelationTables.h | 28 +++++------ .../correlatorFlowCharmHadrons.cxx | 50 +++++++++---------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h index e551fe9c5c1..d48cd0f9d10 100644 --- a/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h +++ b/PWGHF/HFC/DataModel/DerivedDataCorrelationTables.h @@ -49,20 +49,20 @@ using HfcRedCollision = HfcRedCollisions::iterator; namespace hf_candidate_reduced { -DECLARE_SOA_INDEX_COLUMN(HfcRedCollision, hfcRedCollision); //! ReducedCollision index -DECLARE_SOA_INDEX_COLUMN(HfcRedFlowColl, hfcRedFlowColl); //! ReducedCollision index -DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Prong 0 index -DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Prong 1 index -DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Prong2 index -DECLARE_SOA_COLUMN(PhiCand, phiCand, float); //! Phi of the candidate -DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candidate -DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate -DECLARE_SOA_COLUMN(InvMassDs, invMassDs, float); //! Invariant mass of Ds candidate -DECLARE_SOA_COLUMN(InvMassCharmHad, invMassCharmHad, float); //! Invariant mass of CharmHad candidate -DECLARE_SOA_COLUMN(BdtScorePrompt, bdtScorePrompt, float); //! BDT output score for prompt hypothesis -DECLARE_SOA_COLUMN(BdtScoreBkg, bdtScoreBkg, float); //! BDT output score for backgronud hypothesis -DECLARE_SOA_COLUMN(BdtScore0, bdtScore0, float); //! First BDT output score -DECLARE_SOA_COLUMN(BdtScore1, bdtScore1, float); //! Second BDT output score +DECLARE_SOA_INDEX_COLUMN(HfcRedCollision, hfcRedCollision); //! ReducedCollision index +DECLARE_SOA_INDEX_COLUMN(HfcRedFlowColl, hfcRedFlowColl); //! ReducedCollision index +DECLARE_SOA_COLUMN(Prong0Id, prong0Id, int); //! Prong 0 index +DECLARE_SOA_COLUMN(Prong1Id, prong1Id, int); //! Prong 1 index +DECLARE_SOA_COLUMN(Prong2Id, prong2Id, int); //! Prong2 index +DECLARE_SOA_COLUMN(PhiCand, phiCand, float); //! Phi of the candidate +DECLARE_SOA_COLUMN(EtaCand, etaCand, float); //! Eta of the candidate +DECLARE_SOA_COLUMN(PtCand, ptCand, float); //! Pt of the candidate +DECLARE_SOA_COLUMN(InvMassDs, invMassDs, float); //! Invariant mass of Ds candidate +DECLARE_SOA_COLUMN(InvMassCharmHad, invMassCharmHad, float); //! Invariant mass of CharmHad candidate +DECLARE_SOA_COLUMN(BdtScorePrompt, bdtScorePrompt, float); //! BDT output score for prompt hypothesis +DECLARE_SOA_COLUMN(BdtScoreBkg, bdtScoreBkg, float); //! BDT output score for backgronud hypothesis +DECLARE_SOA_COLUMN(BdtScore0, bdtScore0, float); //! First BDT output score +DECLARE_SOA_COLUMN(BdtScore1, bdtScore1, float); //! Second BDT output score } // namespace hf_candidate_reduced DECLARE_SOA_TABLE(DsCandReduceds, "AOD", "DSCANDREDUCED", //! Table with Ds candidate info soa::Index<>, diff --git a/PWGHF/HFC/TableProducer/correlatorFlowCharmHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorFlowCharmHadrons.cxx index 861178bc8a9..38540eb6424 100644 --- a/PWGHF/HFC/TableProducer/correlatorFlowCharmHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorFlowCharmHadrons.cxx @@ -47,7 +47,7 @@ using namespace o2; using namespace o2::hf_centrality; using namespace o2::hf_evsel; -enum DecayChannel { +enum DecayChannel { DplusToPiKPi = 0, DsToKKPi, DsToPiKK @@ -106,7 +106,8 @@ struct HfCorrelatorFlowCharmHadrons { HistogramRegistry registry{"registry", {}}; - void init(InitContext&) { + void init(InitContext&) + { if (doprocessDplus || doprocessDplusWithMl) { massCharm = o2::constants::physics::MassDPlus; } else if (doprocessDs || doprocessDsWithMl) { @@ -159,32 +160,32 @@ struct HfCorrelatorFlowCharmHadrons { if constexpr (channel == DecayChannel::DsToKKPi) { return hfHelper.invMassDsToKKPi(candidate); } - if constexpr (channel == DecayChannel::DsToPiKK){ + if constexpr (channel == DecayChannel::DsToPiKK) { return hfHelper.invMassDsToPiKK(candidate); } - if constexpr (channel == DecayChannel::DplusToPiKPi){ + if constexpr (channel == DecayChannel::DplusToPiKPi) { return hfHelper.invMassDplusToPiKPi(candidate); } return -1.; } - + /// Get charm hadron bdt scores /// \param candidate is the charm hadron candidate template std::vector getCandMlScores(const TCand& candidate) { - std::vector outputMl{ -999., -999. }; + std::vector outputMl{-999., -999.}; if constexpr (channel == DecayChannel::DsToKKPi) { for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) { outputMl[iclass] = candidate.mlProbDsToKKPi()[classMl->at(iclass)]; } } - if constexpr (channel == DecayChannel::DsToPiKK){ + if constexpr (channel == DecayChannel::DsToPiKK) { for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) { outputMl[iclass] = candidate.mlProbDsToPiKK()[classMl->at(iclass)]; } } - if constexpr (channel == DecayChannel::DplusToPiKPi){ + if constexpr (channel == DecayChannel::DplusToPiKPi) { for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) { outputMl[iclass] = candidate.mlProbDplusToPiKPi()[classMl->at(iclass)]; } @@ -204,7 +205,7 @@ struct HfCorrelatorFlowCharmHadrons { } double massCand = getCandMass(candidate); rowCharmCandidates(indexRedColl, candidate.phi(), candidate.eta(), candidate.pt(), massCand, candidate.prong0Id(), candidate.prong1Id(), candidate.prong2Id()); - + if constexpr (applyMl) { std::vector outputMl = getCandMlScores(candidate); rowCharmCandidatesMl(indexRedColl, outputMl[0], outputMl[1]); @@ -236,10 +237,10 @@ struct HfCorrelatorFlowCharmHadrons { auto thisCollId = coll.globalIndex(); auto candsCThisColl = candsDplus.sliceBy(candsDplusPerColl, thisCollId); if (forceCharmInCollision && candsCThisColl.size() < 1) { - continue; + continue; } if (!checkAndFillCollision(coll)) { - continue; + continue; } auto trackIdsThisColl = tracks.sliceBy(trackIndicesPerColl, thisCollId); fillCharmHadronTables(candsCThisColl); @@ -247,21 +248,21 @@ struct HfCorrelatorFlowCharmHadrons { } } PROCESS_SWITCH(HfCorrelatorFlowCharmHadrons, processDplus, "Process Dplus candidates", true); - + // Dplus with ML selections void processDplusWithMl(CollsWithCentMult const& colls, CandDplusDataWMl const& candsDplus, TracksData const& tracks) - { - for (const auto& coll : colls) { - auto thisCollId = coll.globalIndex(); - auto candsCThisColl = candsDplus.sliceBy(candsDplusPerColl, thisCollId); - if (forceCharmInCollision && candsCThisColl.size() < 1) { - continue; - } - if (!checkAndFillCollision(coll)) { - continue; - } + { + for (const auto& coll : colls) { + auto thisCollId = coll.globalIndex(); + auto candsCThisColl = candsDplus.sliceBy(candsDplusPerColl, thisCollId); + if (forceCharmInCollision && candsCThisColl.size() < 1) { + continue; + } + if (!checkAndFillCollision(coll)) { + continue; + } auto trackIdsThisColl = tracks.sliceBy(trackIndicesPerColl, thisCollId); fillCharmHadronTables(candsCThisColl); fillTracksTables(trackIdsThisColl); @@ -279,10 +280,10 @@ struct HfCorrelatorFlowCharmHadrons { auto candsDsToKKPi = selectedDsToKKPi->sliceByCached(aod::hf_cand::collisionId, thisCollId, cache); auto candsDsToPiKK = selectedDsToPiKK->sliceByCached(aod::hf_cand::collisionId, thisCollId, cache); if (forceCharmInCollision && candsDsToKKPi.size() < 1 && candsDsToPiKK.size() < 1) { - continue; + continue; } if (!checkAndFillCollision(coll)) { - continue; + continue; } auto trackIdsThisColl = tracks.sliceBy(trackIndicesPerColl, thisCollId); fillCharmHadronTables(candsDsToPiKK); @@ -314,7 +315,6 @@ struct HfCorrelatorFlowCharmHadrons { } } PROCESS_SWITCH(HfCorrelatorFlowCharmHadrons, processDsWithMl, "Process Ds candidates with ML info", false); - }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)