From 3c3881e4d438307990a4caaea1ac821cba7e43c8 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 18 Jun 2025 22:28:49 +0000 Subject: [PATCH] Please consider the following formatting changes --- .../TableProducer/correlatorLcScHadrons.cxx | 90 +++++++++---------- PWGHF/HFC/Utils/utilsCorrelations.h | 7 +- 2 files changed, 49 insertions(+), 48 deletions(-) diff --git a/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx b/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx index 5629f9a14a7..95ff7d0217f 100644 --- a/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx +++ b/PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx @@ -93,19 +93,19 @@ struct HfCorrelatorLcScHadronsSelection { if (doSelLcCollision) { for (const auto& candidate : candidates) { - if constexpr (isCandSc) { - int8_t chargeCand = candidate.charge(); + if constexpr (isCandSc) { + int8_t chargeCand = candidate.charge(); - if (chargeCand == chargeScZero) { - yCand = hfHelper.ySc0(candidate); - } else { - yCand = hfHelper.yScPlusPlus(candidate); - } + if (chargeCand == chargeScZero) { + yCand = hfHelper.ySc0(candidate); + } else { + yCand = hfHelper.yScPlusPlus(candidate); + } + + } else { + yCand = hfHelper.yLc(candidate); + } - } else { - yCand = hfHelper.yLc(candidate); - } - if (std::abs(yCand) > yCandMax || candidate.pt() < ptCandMin) { isCandFound = false; continue; @@ -132,7 +132,7 @@ struct HfCorrelatorLcScHadronsSelection { for (const auto& particle : mcParticles) { isCandFound = matchCandAndMass(particle, massCand); - if (!isCandFound){ + if (!isCandFound) { continue; } @@ -150,31 +150,31 @@ struct HfCorrelatorLcScHadronsSelection { /// Code to select collisions with at least one Lc - for real data and data-like analysis void processLcSelection(SelCollisions::iterator const& collision, - CandsLcDataFiltered const& candidates) + CandsLcDataFiltered const& candidates) { - selectionCollision(collision,candidates); + selectionCollision(collision, candidates); } PROCESS_SWITCH(HfCorrelatorLcScHadronsSelection, processLcSelection, "Process Lc Collision Selection for Data and Mc", true); - void processScSelection(SelCollisions::iterator const& collision, - aod::HfCandSc const& candidates) + void processScSelection(SelCollisions::iterator const& collision, + aod::HfCandSc const& candidates) { - selectionCollision(collision,candidates); + selectionCollision(collision, candidates); } PROCESS_SWITCH(HfCorrelatorLcScHadronsSelection, processScSelection, "Process Sc Collision Selection for Data and Mc", false); - void processLcSelectionMcRec(SelCollisions::iterator const& collision, + void processLcSelectionMcRec(SelCollisions::iterator const& collision, CandsLcMcRecFiltered const& candidates) { - selectionCollision(collision,candidates); + selectionCollision(collision, candidates); } -PROCESS_SWITCH(HfCorrelatorLcScHadronsSelection, processLcSelectionMcRec, "Process Lc Selection McRec", false); + PROCESS_SWITCH(HfCorrelatorLcScHadronsSelection, processLcSelectionMcRec, "Process Lc Selection McRec", false); void processScSelectionMcRec(SelCollisions::iterator const& collision, - CandsScMcRec const& candidates) - { - selectionCollision(collision,candidates); - } + CandsScMcRec const& candidates) + { + selectionCollision(collision, candidates); + } PROCESS_SWITCH(HfCorrelatorLcScHadronsSelection, processScSelectionMcRec, "Process Sc Selection McRec", false); void processLcSelectionMcGen(aod::McCollision const&, @@ -254,12 +254,12 @@ struct HfCorrelatorLcScHadrons { bool isSignal = false; TRandom3* rnd = new TRandom3(0); - //std::vector outputMl = {-1., -1., -1.}; + // std::vector outputMl = {-1., -1., -1.}; std::vector outputMlPKPi = {-1., -1., -1.}; std::vector outputMlPiKP = {-1., -1., -1.}; // Event Mixing for the Data Mode - //using SelCollisionsWithSc = soa::Join; + // using SelCollisionsWithSc = soa::Join; using SelCollisions = soa::Filtered>; using SelCollisionsMc = soa::Filtered>; // collisionFilter applied @@ -867,7 +867,8 @@ struct HfCorrelatorLcScHadrons { } template - void doSameEventMcGen(CollisionType const& mcCollision, PartType const& mcParticles){ + void doSameEventMcGen(CollisionType const& mcCollision, PartType const& mcParticles) + { int counterCharmCand = 0; registry.fill(HIST("hMcEvtCount"), 0); @@ -883,9 +884,8 @@ struct HfCorrelatorLcScHadrons { for (const auto& particle : mcParticles) { double massCand = -999.0; - bool isCandFound = isCandSc ? matchCandAndMass(particle, massCand) : - matchCandAndMass(particle, massCand); - if (!isCandFound){ + bool isCandFound = isCandSc ? matchCandAndMass(particle, massCand) : matchCandAndMass(particle, massCand); + if (!isCandFound) { continue; } double yCand = RecoDecay::y(particle.pVector(), massCand); @@ -899,10 +899,10 @@ struct HfCorrelatorLcScHadrons { registry.fill(HIST("hPhiMcGen"), RecoDecay::constrainAngle(particle.phi(), -PIHalf)); registry.fill(HIST("hYMcGen"), yCand); - int8_t chargeLc = pdg->GetParticle(particle.pdgCode())->Charge(); // Retrieve charge - if (chargeLc != 0){ - chargeLc = chargeLc / std::abs(chargeLc); - } + int8_t chargeLc = pdg->GetParticle(particle.pdgCode())->Charge(); // Retrieve charge + if (chargeLc != 0) { + chargeLc = chargeLc / std::abs(chargeLc); + } isPrompt = particle.originMcGen() == RecoDecay::OriginType::Prompt; isNonPrompt = particle.originMcGen() == RecoDecay::OriginType::NonPrompt; @@ -920,8 +920,8 @@ struct HfCorrelatorLcScHadrons { listDaughters.clear(); const size_t expectedDaughters = isCandSc ? 4 : 3; - if (isCandSc){ - if (massCand == o2::constants::physics::MassSigmaC0 || massCand == o2::constants::physics::MassSigmaCStar0){ + if (isCandSc) { + if (massCand == o2::constants::physics::MassSigmaC0 || massCand == o2::constants::physics::MassSigmaCStar0) { std::array arrDaughSc0PDG = {kProton, -kKPlus, kPiPlus, kPiMinus}; RecoDecay::getDaughters(particle, &listDaughters, arrDaughSc0PDG, 2); } else { @@ -929,10 +929,10 @@ struct HfCorrelatorLcScHadrons { RecoDecay::getDaughters(particle, &listDaughters, arrDaughScPlusPDG, 2); } } else { - std::array arrDaughLcPDG = {kProton, -kKPlus, kPiPlus}; - RecoDecay::getDaughters(particle, &listDaughters, arrDaughLcPDG, 2); + std::array arrDaughLcPDG = {kProton, -kKPlus, kPiPlus}; + RecoDecay::getDaughters(particle, &listDaughters, arrDaughLcPDG, 2); } - + int counterDaughters = 0; std::vector prongsId(expectedDaughters); if (listDaughters.size() == expectedDaughters) { @@ -954,9 +954,9 @@ struct HfCorrelatorLcScHadrons { if (std::find(prongsId.begin(), prongsId.end(), particleAssoc.globalIndex()) != prongsId.end()) { if (!storeAutoCorrelationFlag) { - continue; - } - correlationStatus = true; + continue; + } + correlationStatus = true; } if ((std::abs(particleAssoc.pdgCode()) != kElectron) && (std::abs(particleAssoc.pdgCode()) != kMuonMinus) && (std::abs(particleAssoc.pdgCode()) != kPiPlus) && (std::abs(particle.pdgCode()) != kKPlus) && (std::abs(particleAssoc.pdgCode()) != kProton)) { @@ -1083,14 +1083,14 @@ struct HfCorrelatorLcScHadrons { /// Lc-Hadron correlation pair builder - for Mc Gen-level analysis void processMcGenLc(SelCollisionsMc::iterator const& mcCollision, - CandidatesLcMcGen const& mcParticles) + CandidatesLcMcGen const& mcParticles) { doSameEventMcGen(mcCollision, mcParticles); } PROCESS_SWITCH(HfCorrelatorLcScHadrons, processMcGenLc, "Process Mc Gen Lc mode", false); - void processMcGenSc(SelCollisionsMc::iterator const& mcCollision, - CandidatesScMcGen const& mcParticles) + void processMcGenSc(SelCollisionsMc::iterator const& mcCollision, + CandidatesScMcGen const& mcParticles) { doSameEventMcGen(mcCollision, mcParticles); } diff --git a/PWGHF/HFC/Utils/utilsCorrelations.h b/PWGHF/HFC/Utils/utilsCorrelations.h index af77bd4c124..61e91710344 100644 --- a/PWGHF/HFC/Utils/utilsCorrelations.h +++ b/PWGHF/HFC/Utils/utilsCorrelations.h @@ -28,7 +28,7 @@ #include "Common/DataModel/PIDResponseTPC.h" #include "Common/DataModel/PIDResponseTOF.h" -//HfHelper hfHelper; +// HfHelper hfHelper; namespace o2::analysis::hf_correlations { @@ -126,7 +126,8 @@ bool passPIDSelection(Atrack const& track, SpeciesContainer const mPIDspecies, } template -bool matchCandAndMass(McParticle const& particle, double& massCand) { +bool matchCandAndMass(McParticle const& particle, double& massCand) +{ const auto pdgCand = std::abs(particle.pdgCode()); const auto matchGenFlag = std::abs(particle.flagMcMatchGen()); @@ -157,7 +158,7 @@ bool matchCandAndMass(McParticle const& particle, double& massCand) { case BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi): massCand = o2::constants::physics::MassSigmaCStarPlusPlus; return true; - + case BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi): massCand = o2::constants::physics::MassSigmaCStarPlusPlus; return true;