From 97de1b54a37a8097d8afe053c95dee7e17d78752 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 1 Jun 2026 11:16:02 +0000 Subject: [PATCH] Please consider the following formatting changes --- PWGLF/DataModel/LFLambda1405Table.h | 8 +-- PWGLF/TableProducer/Common/kinkBuilder.cxx | 30 ++++---- PWGLF/Tasks/Resonances/lambda1405analysis.cxx | 68 ++++++++++--------- 3 files changed, 55 insertions(+), 51 deletions(-) diff --git a/PWGLF/DataModel/LFLambda1405Table.h b/PWGLF/DataModel/LFLambda1405Table.h index cb472f5fc58..31721f634e3 100644 --- a/PWGLF/DataModel/LFLambda1405Table.h +++ b/PWGLF/DataModel/LFLambda1405Table.h @@ -49,8 +49,8 @@ DECLARE_SOA_COLUMN(NSigmaTPCPiDau, nSigmaTPCPiDau, float); //! Number of sigma DECLARE_SOA_COLUMN(NSigmaTOFPiDau, nSigmaTOFPiDau, float); //! Number of sigmas for the lambda1405 pion daughter in TOF // Flow columns -DECLARE_SOA_COLUMN(ScalarProd, scalarProd, float); //! Scalar product of the candidate -DECLARE_SOA_COLUMN(Centrality, centrality, float); //! Centrality of the candidate +DECLARE_SOA_COLUMN(ScalarProd, scalarProd, float); //! Scalar product of the candidate +DECLARE_SOA_COLUMN(Centrality, centrality, float); //! Centrality of the candidate // MC Columns DECLARE_SOA_COLUMN(PtMC, ptMC, float); //! pT of the candidate in MC @@ -73,8 +73,8 @@ DECLARE_SOA_TABLE(Lambda1405Cands, "AOD", "LAMBDA1405", lambda1405::NSigmaTPCPiDau, lambda1405::NSigmaTOFPiDau); DECLARE_SOA_TABLE(Lambda1405Flow, "AOD", "LAMBDA1405FLOW", - o2::soa::Index<>, - lambda1405::Pt, + o2::soa::Index<>, + lambda1405::Pt, lambda1405::Mass, lambda1405::SigmaMinusMass, lambda1405::SigmaPlusMass, lambda1405::AlphaAPSigma, lambda1405::QtAPSigma, lambda1405::NSigmaTPCPiKink, lambda1405::NSigmaTOFPiKink, diff --git a/PWGLF/TableProducer/Common/kinkBuilder.cxx b/PWGLF/TableProducer/Common/kinkBuilder.cxx index 330e0f6315b..c06ba456e63 100644 --- a/PWGLF/TableProducer/Common/kinkBuilder.cxx +++ b/PWGLF/TableProducer/Common/kinkBuilder.cxx @@ -311,7 +311,7 @@ struct kinkBuilder { hSelKinkedTrackQA->GetXaxis()->SetBinLabel(11, "MothLastLayerRadiusCheck"); hMothDaughSignsInit = qaRegistry.add("hMothDaughSignsInit", "; Sign Mother; Sign Daughter", {HistType::kTH2F, {{3, -1.5, 1.5}, {3, -1.5, 1.5}}}); hMothDaughSignsFinal = qaRegistry.add("hMothDaughSignsFinal", "; Sign Mother; Sign Daughter", {HistType::kTH2F, {{3, -1.5, 1.5}, {3, -1.5, 1.5}}}); - hZDiff = qaRegistry.add("hZDiff", "; #Delta z (#mu m);(Q_{Mother}, Q_{Daughter})", HistType::kTH2F, {zDiffBins, {4, -0.5, 3.5}}); + hZDiff = qaRegistry.add("hZDiff", "; #Delta z (#mu m);(Q_{Mother}, Q_{Daughter})", HistType::kTH2F, {zDiffBins, {4, -0.5, 3.5}}); hZDiff->GetYaxis()->SetBinLabel(1, "(+,+)"); hZDiff->GetYaxis()->SetBinLabel(2, "(-,-)"); hZDiff->GetYaxis()->SetBinLabel(3, "(+,-)"); @@ -344,12 +344,12 @@ struct kinkBuilder { if (doprocessMc) { if (skipBkgCands) { - hRecCandidates = qaRegistry.add("hRecCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays-0.5}, absPtAxis}}); + hRecCandidates = qaRegistry.add("hRecCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays - 0.5}, absPtAxis}}); hRecCandidates->GetXaxis()->SetBinLabel(1, "#Sigma^{-} #rightarrow n#pi^{-}"); hRecCandidates->GetXaxis()->SetBinLabel(2, "#Sigma^{+} #rightarrow n#pi^{+}"); hRecCandidates->GetXaxis()->SetBinLabel(3, "#Sigma^{+} #rightarrow p#pi^{0}"); } - hGenCandidates = qaRegistry.add("hGenCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays-0.5}, absPtAxis}}); + hGenCandidates = qaRegistry.add("hGenCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays - 0.5}, absPtAxis}}); hGenCandidates->GetXaxis()->SetBinLabel(1, "#Sigma^{-} #rightarrow n#pi^{-}"); hGenCandidates->GetXaxis()->SetBinLabel(2, "#Sigma^{+} #rightarrow n#pi^{+}"); hGenCandidates->GetXaxis()->SetBinLabel(3, "#Sigma^{+} #rightarrow p#pi^{0}"); @@ -426,15 +426,15 @@ struct kinkBuilder { if (candidate.itsNClsInnerBarrel() != 0) return false; hSelDaugQA->Fill(4.f, isPositive); - + if (candidate.itsNCls() >= 4) return false; hSelDaugQA->Fill(5.f, isPositive); - + if (candidate.tpcNClsCrossedRows() <= 0.8 * candidate.tpcNClsFindable()) return false; hSelDaugQA->Fill(6.f, isPositive); - + if (candidate.tpcNClsFound() <= nTPCClusMinDaug) return false; hSelDaugQA->Fill(7.f, isPositive); @@ -452,7 +452,7 @@ struct kinkBuilder { auto trackDaug = tracks.rawIteratorAt(svCand.tr1Idx); // Fill Selections QA histo - int chargeCombSvCand = 2*unlikeSignBkg + (trackMoth.sign() == -1 ? 1 : 0); + int chargeCombSvCand = 2 * unlikeSignBkg + (trackMoth.sign() == -1 ? 1 : 0); hSelKinkedTrackQA->Fill(0.f, chargeCombSvCand); // all candidates bin hMothDaughSignsInit->Fill(trackMoth.sign(), trackDaug.sign()); @@ -630,8 +630,9 @@ struct kinkBuilder { LOG(info) << "Task initialized for run " << mRunNumber << " with magnetic field " << mBz << " kZG"; } - template - void buildSvPool(const TColls& collisions, const TTracks& tracks, const TAmbiTracks& ambiguousTracks, const aod::BCs& bcs) { + template + void buildSvPool(const TColls& collisions, const TTracks& tracks, const TAmbiTracks& ambiguousTracks, const aod::BCs& bcs) + { svCreator.clearPools(); svCreator.fillBC2Coll(collisions, bcs); @@ -685,15 +686,16 @@ struct kinkBuilder { } PROCESS_SWITCH(kinkBuilder, processData, "Data processing", false); - template - int matchKinkDecay(const TMother& motherPart, const aod::McParticles& mcParticles) { + template + int matchKinkDecay(const TMother& motherPart, const aod::McParticles& mcParticles) + { int pdgMother = motherPart.pdgCode(); int8_t sign = 0; int pdgCodeNeutralDaug{-1}, pdgCodeChargedDaug{-1}; std::array finState = {-1, -1}; switch (std::abs(pdgMother)) { case PDG_t::kSigmaMinus: { - // Swap the sign of the neutral decay products in case of anti-particles + // Swap the sign of the neutral decay products in case of anti-particles pdgCodeNeutralDaug = (pdgMother > 0) ? +PDG_t::kNeutron : -PDG_t::kNeutron; pdgCodeChargedDaug = (pdgMother > 0) ? +PDG_t::kPiMinus : +PDG_t::kPiPlus; finState = {pdgCodeChargedDaug, pdgCodeNeutralDaug}; // Both decay channels have the same neutral daughter @@ -711,7 +713,7 @@ struct kinkBuilder { case PDG_t::kSigmaPlus: { // Swap the sign of the neutral decay products in case of anti-particles pdgCodeNeutralDaug = (pdgMother > 0) ? +PDG_t::kNeutron : -PDG_t::kNeutron; - pdgCodeChargedDaug = (pdgMother > 0) ? +PDG_t::kPiPlus : +PDG_t::kPiMinus; + pdgCodeChargedDaug = (pdgMother > 0) ? +PDG_t::kPiPlus : +PDG_t::kPiMinus; finState = {pdgCodeChargedDaug, pdgCodeNeutralDaug}; // if constexpr (checkKinkDaugPdg) { // LOG(info) << "[kink] Matching Sigma+ decay with daughter PDG " << pdgDaug << " and neutral daughter PDG " << pdgCodeNeutralDaug; @@ -750,7 +752,7 @@ struct kinkBuilder { McRecoCollisionsCent const& mcRecoCollisions, aod::McParticles const& mcParticles, TracksFullMc const& tracksMc, - aod::AmbiguousTracks const& ambiTracksMc, + aod::AmbiguousTracks const& ambiTracksMc, aod::BCs const& bcs) { kinkCandidates.clear(); diff --git a/PWGLF/Tasks/Resonances/lambda1405analysis.cxx b/PWGLF/Tasks/Resonances/lambda1405analysis.cxx index 0511d02bcc9..a98035b7318 100644 --- a/PWGLF/Tasks/Resonances/lambda1405analysis.cxx +++ b/PWGLF/Tasks/Resonances/lambda1405analysis.cxx @@ -75,21 +75,21 @@ struct lambda1405candidate { float sigmaAlphaAP = -1; // Alpha of the Sigma float sigmaQtAP = -1; // qT of the Sigma float kinkPt = -1; // pT of the kink daughter - float kinkPiNSigTpc = -1; // Number of sigmas for the pion candidate from Sigma kink in Tpc - float kinkPiNSigTof = -1; // Number of sigmas for the pion candidate from Sigma kink in Tof - float kinkPrNSigTpc = -1; // Number of sigmas for the proton candidate from Sigma kink in Tpc - float kinkPrNSigTof = -1; // Number of sigmas for the proton candidate from Sigma kink in Tof + float kinkPiNSigTpc = -1; // Number of sigmas for the pion candidate from Sigma kink in Tpc + float kinkPiNSigTof = -1; // Number of sigmas for the pion candidate from Sigma kink in Tof + float kinkPrNSigTpc = -1; // Number of sigmas for the proton candidate from Sigma kink in Tpc + float kinkPrNSigTof = -1; // Number of sigmas for the proton candidate from Sigma kink in Tof float kinkDcaDauToPv = -1; // DCA of the kink daughter to the primary vertex float sigmaRadius = -1; // Radius of the Sigma decay vertex float piPt = -1; // pT of the pion daughter float bachPiNSigTpc = -1; // Number of sigmas for the pion candidate float bachPiNSigTof = -1; // Number of sigmas for the pion candidate using Tof - int kinkDauId = 0; // Id of the pion from Sigma decay in MC - int sigmaId = 0; // Id of the Sigma candidate in MC - int piId = 0; // Id of the pion candidate in MC + int kinkDauId = 0; // Id of the pion from Sigma decay in MC + int sigmaId = 0; // Id of the Sigma candidate in MC + int piId = 0; // Id of the pion candidate in MC - float scalarProd = -1; // Scalar product for flow analysis + float scalarProd = -1; // Scalar product for flow analysis }; struct lambda1405analysis { @@ -430,7 +430,8 @@ struct lambda1405analysis { } template - void fillHistosSigma(const lambda1405candidate& lambda1405Cand, const TCand& sigmaCand, const TTrack& kinkDauTrack) { + void fillHistosSigma(const lambda1405candidate& lambda1405Cand, const TCand& sigmaCand, const TTrack& kinkDauTrack) + { if (sigmaCand.mothSign() > 0) { rSigmaPlus.fill(HIST("hSigmaPlusMass"), sigmaCand.mSigmaPlus()); @@ -566,15 +567,15 @@ struct lambda1405analysis { auto kinkDauMom = std::array{sigmaCand.pxDaug(), sigmaCand.pyDaug(), sigmaCand.pzDaug()}; auto sigmaMom = std::array{sigmaCand.pxMoth(), sigmaCand.pyMoth(), sigmaCand.pzMoth()}; // Sigma properties - lambda1405Cand.sigmaId = sigmaCand.globalIndex(); + lambda1405Cand.sigmaId = sigmaCand.globalIndex(); lambda1405Cand.sigmaMinusMass = sigmaCand.mSigmaMinus(); - lambda1405Cand.sigmaPlusMass = sigmaCand.mSigmaPlus(); - lambda1405Cand.xiMinusMass = sigmaCand.mXiMinus(); - lambda1405Cand.sigmaSign = sigmaCand.mothSign(); - lambda1405Cand.sigmaAlphaAP = alphaAP(sigmaMom, kinkDauMom); - lambda1405Cand.sigmaQtAP = qtAP(sigmaMom, kinkDauMom); - lambda1405Cand.sigmaPt = sigmaCand.ptMoth(); - lambda1405Cand.sigmaRadius = sigmaRad; + lambda1405Cand.sigmaPlusMass = sigmaCand.mSigmaPlus(); + lambda1405Cand.xiMinusMass = sigmaCand.mXiMinus(); + lambda1405Cand.sigmaSign = sigmaCand.mothSign(); + lambda1405Cand.sigmaAlphaAP = alphaAP(sigmaMom, kinkDauMom); + lambda1405Cand.sigmaQtAP = qtAP(sigmaMom, kinkDauMom); + lambda1405Cand.sigmaPt = sigmaCand.ptMoth(); + lambda1405Cand.sigmaRadius = sigmaRad; lambda1405Cand.kinkDcaDauToPv = sigmaCand.dcaDaugPv(); if (lambda1405Cand.sigmaQtAP < cutSigmaQtAPMin || lambda1405Cand.sigmaQtAP > cutSigmaQtAPMax) { @@ -596,8 +597,8 @@ struct lambda1405analysis { } // Kink daughter properties - lambda1405Cand.kinkDauId = kinkDauTrack.globalIndex(); - lambda1405Cand.kinkPt = kinkDauTrack.pt(); + lambda1405Cand.kinkDauId = kinkDauTrack.globalIndex(); + lambda1405Cand.kinkPt = kinkDauTrack.pt(); lambda1405Cand.kinkPiNSigTpc = kinkDauTrack.tpcNSigmaPi(); lambda1405Cand.kinkPiNSigTof = kinkDauTrack.tofNSigmaPi(); lambda1405Cand.kinkPrNSigTpc = kinkDauTrack.tpcNSigmaPr(); @@ -620,8 +621,8 @@ struct lambda1405analysis { continue; } rSelections.fill(HIST("hSelectionsBachPi"), 5); // PID sel - rSelections.fill(HIST("hSelectionsL1405"), 2); // Bach Pi selection - + rSelections.fill(HIST("hSelectionsL1405"), 2); // Bach Pi selection + auto piMom = std::array{piTrack.px(), piTrack.py(), piTrack.pz()}; float invMass{-1.f}; if (lambda1405Cand.isSigmaMinus) { @@ -632,7 +633,7 @@ struct lambda1405analysis { if (invMass > cutUpperMass) { continue; } - rSelections.fill(HIST("hSelectionsL1405"), 3); // Upper mass selection + rSelections.fill(HIST("hSelectionsL1405"), 3); // Upper mass selection // Daughter Pi properties lambda1405Cand.piId = piTrack.globalIndex(); @@ -653,7 +654,7 @@ struct lambda1405analysis { lambda1405Cand.phi = std::atan2(lambda1405Cand.py, lambda1405Cand.px); lambda1405Cand.scalarProd = -1; fillHistosLambda1405(lambda1405Cand, piTrack); - rSelections.fill(HIST("hSelectionsL1405"), 4); // Accepted + rSelections.fill(HIST("hSelectionsL1405"), 4); // Accepted selectedCandidates.push_back(lambda1405Cand); } } @@ -785,8 +786,9 @@ struct lambda1405analysis { } PROCESS_SWITCH(lambda1405analysis, processDataWCentQVecs, "Data processing with centrality and Q vectors info", false); - template - int matchGenDecay(const TMother& motherPart, const aod::McParticles& mcParticles) { + template + int matchGenDecay(const TMother& motherPart, const aod::McParticles& mcParticles) + { LOG(info) << "Matching MC decay for particle with PDG code " << motherPart.pdgCode() << " and index " << motherPart.globalIndex(); int pdgMother = motherPart.pdgCode(); int8_t sign = 0; @@ -795,7 +797,7 @@ struct lambda1405analysis { // Match L(1405) --> n pi- pi+ final state std::array finalState; - if (pdgMother > 0) { // Change sign of neutral decay products + if (pdgMother > 0) { // Change sign of neutral decay products finalState = {PDG_t::kNeutron, PDG_t::kPiMinus, PDG_t::kPiPlus}; } else { finalState = {-PDG_t::kNeutron, PDG_t::kPiMinus, PDG_t::kPiPlus}; @@ -815,7 +817,7 @@ struct lambda1405analysis { } // Match L(1405) --> p pi0 pi+ final state, only possible for Sigma+ - if (pdgMother > 0) { // Change sign of neutral decay products + if (pdgMother > 0) { // Change sign of neutral decay products finalState = {PDG_t::kProton, PDG_t::kPi0, PDG_t::kPiMinus}; } else { finalState = {PDG_t::kProton, -PDG_t::kPi0, PDG_t::kPiMinus}; @@ -846,7 +848,7 @@ struct lambda1405analysis { constructCollCandidates(sigmaCand, tracksPerCol, selectedCandidates); LOG(info) << "Selected " << selectedCandidates.size() << " Lambda(1405) candidates in this collision"; for (const auto& lambda1405Cand : selectedCandidates) { - rLambda1405.fill(HIST("hRecoL1405"), 0., lambda1405Cand.pt()); // All reconstructed + rLambda1405.fill(HIST("hRecoL1405"), 0., lambda1405Cand.pt()); // All reconstructed // Do MC association auto mcLabPiKink = trackLabelsMC.rawIteratorAt(lambda1405Cand.kinkDauId); @@ -859,7 +861,7 @@ struct lambda1405analysis { << "Bachelor Pi MC assoc: " << mcLabPi.has_mcParticle(); continue; // Skip if no valid MC association } - rLambda1405.fill(HIST("hRecoL1405"), 1., lambda1405Cand.pt()); // All with associated MC particle + rLambda1405.fill(HIST("hRecoL1405"), 1., lambda1405Cand.pt()); // All with associated MC particle auto mcTrackKink = mcLabPiKink.mcParticle_as(); auto mcTrackSigma = mcLabSigma.mcParticle_as(); @@ -876,14 +878,14 @@ struct lambda1405analysis { << "isSigmaPlusToPrKink: " << isSigmaPlusToPrKink; continue; // Skip if not a valid Sigma kink decay } - rLambda1405.fill(HIST("hRecoL1405"), 2., lambda1405Cand.pt()); // Has kink decay in MC + rLambda1405.fill(HIST("hRecoL1405"), 2., lambda1405Cand.pt()); // Has kink decay in MC if (std::abs(mcTrackPi.pdgCode()) != 211) { LOG(info) << "Skipping candidate due to bachelor Pi not being a pion in MC: " << "Bachelor Pi PDG code: " << mcTrackPi.pdgCode(); continue; // Skip if not a valid pion candidate } - rLambda1405.fill(HIST("hRecoL1405"), 3., lambda1405Cand.pt()); // Has bach pi + rLambda1405.fill(HIST("hRecoL1405"), 3., lambda1405Cand.pt()); // Has bach pi if (!mcTrackSigma.has_mothers() || !mcTrackPi.has_mothers()) { LOG(info) << "Skipping candidate due to missing mothers in MC: " @@ -891,7 +893,7 @@ struct lambda1405analysis { << "Pi has mothers: " << mcTrackPi.has_mothers(); continue; // Skip if no mothers found } - rLambda1405.fill(HIST("hRecoL1405"), 4., lambda1405Cand.pt()); // Has mothers for Sigma and Pi + rLambda1405.fill(HIST("hRecoL1405"), 4., lambda1405Cand.pt()); // Has mothers for Sigma and Pi // check that labpi and labsigma have the same mother (a lambda1405 candidate) int lambda1405Id = -1; @@ -908,7 +910,7 @@ struct lambda1405analysis { LOG(info) << "Skipping candidate due to Sigma and pion not sharing the same lambda1405 candidate"; continue; // Skip if the Sigma and pion do not share the same lambda1405 candidate } - rLambda1405.fill(HIST("hRecoL1405"), 4., lambda1405Cand.pt()); // Has same mother + rLambda1405.fill(HIST("hRecoL1405"), 4., lambda1405Cand.pt()); // Has same mother auto lambda1405Mother = particlesMC.rawIteratorAt(lambda1405Id); float lambda1405Mass = std::sqrt(lambda1405Mother.e() * lambda1405Mother.e() - lambda1405Mother.p() * lambda1405Mother.p());