From 3721baf9e53c933166e57fabfc389520c98e5862 Mon Sep 17 00:00:00 2001 From: Chiara De Martin Date: Mon, 7 Sep 2026 18:27:02 +0200 Subject: [PATCH 1/5] fix invariant mass definition --- .../TableProducer/Strangeness/cascadeflow.cxx | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx index 7db5fc99876..973cc5e90a3 100644 --- a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx +++ b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx @@ -150,15 +150,15 @@ constexpr int cutDir[nCutScores] = {CutSmaller, CutNot}; // CutSmaller selects v auto vecCutDir = std::vector{cutDir, cutDir + nCutScores}; // default values for the cuts -constexpr double cuts[nBinsPt][nCutScores] = { // background, signal - {0., 0.9}, - {0., 0.9}, - {0., 0.9}, - {0., 0.9}, - {0., 0.9}, - {0., 0.9}, - {0., 0.9}, - {0., 0.9}}; +constexpr double cuts[nBinsPt][nCutScores] = {// background, signal + {0., 0.9}, + {0., 0.9}, + {0., 0.9}, + {0., 0.9}, + {0., 0.9}, + {0., 0.9}, + {0., 0.9}, + {0., 0.9}}; // row labels static const std::vector labelsPt = { @@ -2253,31 +2253,31 @@ struct cascadeFlow { histos.fill(HIST("hLambdaPhi"), v0.phi()); histos.fill(HIST("hlambdaminuspsiT0C"), lambdaminuspsiT0C); + double invMassLambda = 0; + if (chargeIndex == 0) + invMassLambda = v0.mLambda(); + else if (chargeIndex == 1) + invMassLambda = v0.mAntiLambda(); + else + invMassLambda = v0.mLambda(); + if (fillingConfigs.isFillTHNLambda) { if (fillingConfigs.isFillTHN_V2) - histos.get(HIST("hLambdaV2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), v0.mLambda(), v2CEP); + histos.get(HIST("hLambdaV2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), invMassLambda, v2CEP); if (fillingConfigs.isFillTHN_Pz) { - // histos.get(HIST("hLambdaPzs2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), v0.mLambda(), pzs2Lambda); - histos.get(HIST("hLambdaPzs2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), v0.mLambda(), pzs2Lambda, centWeight); + // histos.get(HIST("hLambdaPzs2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), invMassLambda, pzs2Lambda); + histos.get(HIST("hLambdaPzs2"))->Fill(collisionCentrality, chargeIndex, v0.pt(), invMassLambda, pzs2Lambda, centWeight); } if (fillingConfigs.isFillTHN_Acc) - histos.get(HIST("hLambdaCos2Theta"))->Fill(collisionCentrality, chargeIndex, v0.eta(), v0.pt(), v0.mLambda(), cos2ThetaLambda); + histos.get(HIST("hLambdaCos2Theta"))->Fill(collisionCentrality, chargeIndex, v0.eta(), v0.pt(), invMassLambda, cos2ThetaLambda); } if (fillingConfigs.isFillTHNLambda_PzVsPsi) { if (fillingConfigs.isFillTHN_Pz) - histos.get(HIST("hLambdaPzVsPsi"))->Fill(collisionCentrality, chargeIndex, v0.pt(), v0.mLambda(), cosThetaLambda, 2 * lambdaminuspsiT0C, centWeight); + histos.get(HIST("hLambdaPzVsPsi"))->Fill(collisionCentrality, chargeIndex, v0.pt(), invMassLambda, cosThetaLambda, 2 * lambdaminuspsiT0C, centWeight); if (fillingConfigs.isFillTHN_Acc) - histos.get(HIST("hLambdaCos2ThetaVsPsi"))->Fill(collisionCentrality, chargeIndex, v0.eta(), v0.pt(), v0.mLambda(), cos2ThetaLambda, 2 * lambdaminuspsiT0C); + histos.get(HIST("hLambdaCos2ThetaVsPsi"))->Fill(collisionCentrality, chargeIndex, v0.eta(), v0.pt(), invMassLambda, cos2ThetaLambda, 2 * lambdaminuspsiT0C); } - double invMassLambda = 0; - if (chargeIndex == 0) - invMassLambda = v0.mLambda(); - else if (chargeIndex == 1) - invMassLambda = v0.mAntiLambda(); - else - invMassLambda = v0.mLambda(); - // mass selection if (invMassLambda < V0Configs.MinMassLambdaInTree || invMassLambda > V0Configs.MaxMassLambdaInTree) continue; From b5dad6e03e8d24b12e258f04c13192d4dae628c4 Mon Sep 17 00:00:00 2001 From: Chiara De Martin Date: Mon, 7 Sep 2026 18:45:59 +0200 Subject: [PATCH 2/5] remove unused variables, initilise some variables --- .../TableProducer/Strangeness/cascadeflow.cxx | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx index 973cc5e90a3..6293e333089 100644 --- a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx +++ b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx @@ -425,10 +425,8 @@ struct cascadeFlow { // return false; // } - if (isFillHisto) - histos.fill(HIST("hNEvents"), 8.5); - if (isFillHisto) { + histos.fill(HIST("hNEvents"), 8.5); histos.fill(HIST("hEventNchCorrelation"), collision.multNTracksPVeta1(), collision.multNTracksGlobal()); histos.fill(HIST("hEventPVcontributorsVsCentrality"), collision.centFT0C(), collision.multNTracksPVeta1()); histos.fill(HIST("hEventGlobalTracksVsCentrality"), collision.centFT0C(), collision.multNTracksGlobal()); @@ -568,13 +566,12 @@ struct cascadeFlow { int currentRunNumber = -999; int lastRunNumber = -999; - TProfile3D* shiftprofile; - TProfile3D* shiftprofileFT0C; - TProfile3D* shiftprofileFV0A; - TProfile3D* shiftprofileFT0A; - TProfile3D* shiftprofileTPCL; - TProfile3D* shiftprofileTPCR; - std::string fullCCDBShiftCorrPath; + TProfile3D* shiftprofile = nullptr; + TProfile3D* shiftprofileFT0C = nullptr; + TProfile3D* shiftprofileFV0A = nullptr; + TProfile3D* shiftprofileFT0A = nullptr; + TProfile3D* shiftprofileTPCL = nullptr; + TProfile3D* shiftprofileTPCR = nullptr; std::string fullCCDBShiftCorrPathFT0C; std::string fullCCDBShiftCorrPathFV0A; std::string fullCCDBShiftCorrPathFT0A; @@ -640,16 +637,16 @@ struct cascadeFlow { } // objects to use for acceptance correction - TH2F* hAcceptanceXi; - TH2F* hAcceptanceOmega; - TH2F* hAcceptanceLambda; - TH2F* hAcceptancePrimaryLambda; + TH2F* hAcceptanceXi = nullptr; + TH2F* hAcceptanceOmega = nullptr; + TH2F* hAcceptanceLambda = nullptr; + TH2F* hAcceptancePrimaryLambda = nullptr; // objects to use for resolution correction - TH1F* hReso; + TH1F* hReso = nullptr; // objects to use for centrality weight - TH1F* hCentWeight; + TH1F* hCentWeight = nullptr; HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; HistogramRegistry histosMCGen{"histosMCGen", {}, OutputObjHandlingPolicy::AnalysisObject, false, true}; @@ -1480,7 +1477,7 @@ struct cascadeFlow { // polarization variables double masses[2]{o2::constants::physics::MassXiMinus, o2::constants::physics::MassOmegaMinus}; ROOT::Math::PxPyPzMVector cascadeVector[2], lambdaVector, protonVector; - float cosThetaStarLambda[2], cosThetaStarProton; + double cosThetaStarLambda[2], cosThetaStarProton; double massLambda = casc.mLambda(); if (fillingConfigs.isFillNominalMass) @@ -1805,7 +1802,7 @@ struct cascadeFlow { // polarization variables double masses[nParticles]{o2::constants::physics::MassXiMinus, o2::constants::physics::MassOmegaMinus}; ROOT::Math::PxPyPzMVector cascadeVector[nParticles], lambdaVector, protonVector; - float cosThetaStarLambda[nParticles], cosThetaStarProton; + double cosThetaStarLambda[nParticles], cosThetaStarProton; double massLambda = casc.mLambda(); if (fillingConfigs.isFillNominalMass) @@ -2134,7 +2131,6 @@ struct cascadeFlow { centWeight = hCentWeight->GetBinContent(centBin); } - std::vector bdtScore[nParticles]; for (auto const& v0 : V0s) { /// Add some minimal cuts for single track variables (min number of TPC clusters) From 502afcc29e9f39cfa0041e53f2fe7e1d5358ff3f Mon Sep 17 00:00:00 2001 From: Chiara De Martin Date: Wed, 9 Sep 2026 10:59:17 +0200 Subject: [PATCH 3/5] bug fixes --- PWGLF/TableProducer/Strangeness/cascadeflow.cxx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx index 6293e333089..15c8697e7c1 100644 --- a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx +++ b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx @@ -417,15 +417,8 @@ struct cascadeFlow { return false; } - if (isFillHisto) + if (isFillHisto){ histos.fill(HIST("hNEvents"), 7.5); - - // TVX in TRD - // if (isNoTVXinTRD && collision.alias_bit(kTVXinTRD)){ - // return false; - // } - - if (isFillHisto) { histos.fill(HIST("hNEvents"), 8.5); histos.fill(HIST("hEventNchCorrelation"), collision.multNTracksPVeta1(), collision.multNTracksGlobal()); histos.fill(HIST("hEventPVcontributorsVsCentrality"), collision.centFT0C(), collision.multNTracksPVeta1()); @@ -566,7 +559,6 @@ struct cascadeFlow { int currentRunNumber = -999; int lastRunNumber = -999; - TProfile3D* shiftprofile = nullptr; TProfile3D* shiftprofileFT0C = nullptr; TProfile3D* shiftprofileFV0A = nullptr; TProfile3D* shiftprofileFT0A = nullptr; @@ -1229,8 +1221,8 @@ struct cascadeFlow { continue; } - float sigmaRangeXi[2]{getNsigmaMass(cascadev2::Xi, casc.pt(), sideBandStart), getNsigmaMass(cascadev2::Xi, casc.pt(), sideBandEnd)}; - float sigmaRangeOmega[2]{getNsigmaMass(cascadev2::Omega, casc.pt(), sideBandStart), getNsigmaMass(cascadev2::Omega, casc.pt(), sideBandEnd)}; + const float sigmaRangeXi[2]{getNsigmaMass(cascadev2::Xi, casc.pt(), sideBandStart), getNsigmaMass(cascadev2::Xi, casc.pt(), sideBandEnd)}; + const float sigmaRangeOmega[2]{getNsigmaMass(cascadev2::Omega, casc.pt(), sideBandStart), getNsigmaMass(cascadev2::Omega, casc.pt(), sideBandEnd)}; if ((std::abs(casc.mXi() - constants::physics::MassXiMinus) < sigmaRangeXi[0] || std::abs(casc.mXi() - constants::physics::MassXiMinus) > sigmaRangeXi[1]) && From fec28b06466514ec0ca8e1202d89f47d1a2db78a Mon Sep 17 00:00:00 2001 From: Chiara De Martin Date: Wed, 9 Sep 2026 11:14:32 +0200 Subject: [PATCH 4/5] bug fixes --- .../TableProducer/Strangeness/cascadeflow.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx index 15c8697e7c1..abcda83fa48 100644 --- a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx +++ b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx @@ -417,7 +417,7 @@ struct cascadeFlow { return false; } - if (isFillHisto){ + if (isFillHisto) { histos.fill(HIST("hNEvents"), 7.5); histos.fill(HIST("hNEvents"), 8.5); histos.fill(HIST("hEventNchCorrelation"), collision.multNTracksPVeta1(), collision.multNTracksGlobal()); @@ -1393,7 +1393,7 @@ struct cascadeFlow { bool isCascCandidate = 0; isCascCandidate = IsCascAccepted(casc, negExtra, posExtra, bachExtra, counter); histos.fill(HIST("hCascade"), counter); - histos.fill(HIST("hCascadeDauSel"), (int)isCascCandidate); + histos.fill(HIST("hCascadeDauSel"), static_cast(isCascCandidate)); if (!isCascCandidate) continue; @@ -1724,7 +1724,7 @@ struct cascadeFlow { bool isCascCandidate = 0; isCascCandidate = IsCascAccepted(casc, negExtra, posExtra, bachExtra, counter); histos.fill(HIST("hCascade"), counter); - histos.fill(HIST("hCascadeDauSel"), (int)isCascCandidate); + histos.fill(HIST("hCascadeDauSel"), static_cast(isCascCandidate)); if (!isCascCandidate) continue; @@ -2170,11 +2170,11 @@ struct cascadeFlow { histos.fill(HIST("hLambdaCandidate"), 3); continue; // in case of ambiguity between Lambda and AntiLambda, I skip the particle; checked to be zero in range 1.105 - 1.125 } - if (v0.mLambda() > V0Configs.MinMassLambda && v0.mLambda() < V0Configs.MaxMassLambda) + if (v0.mLambda() > V0Configs.MinMassLambda && v0.mLambda() < V0Configs.MaxMassLambda) { chargeIndex = 0; - else if (v0.mAntiLambda() > V0Configs.MinMassLambda && v0.mAntiLambda() < V0Configs.MaxMassLambda) + } else if (v0.mAntiLambda() > V0Configs.MinMassLambda && v0.mAntiLambda() < V0Configs.MaxMassLambda) { chargeIndex = 1; - else { + } else { chargeIndex = 2; // these are bkg candidates histos.fill(HIST("hLambdaCandidate"), 4); } @@ -2199,7 +2199,7 @@ struct cascadeFlow { if (fillingConfigs.isFillNominalMass) massLambda = o2::constants::physics::MassLambda; - float cosThetaStarProton[nCharges]; + double cosThetaStarProton[nCharges] = {0}; ROOT::Math::PxPyPzMVector lambdaVector, protonVector[nCharges]; lambdaVector.SetCoordinates(v0.px(), v0.py(), v0.pz(), massLambda); ROOT::Math::Boost lambdaBoost{lambdaVector.BoostToCM()}; @@ -2380,7 +2380,7 @@ struct cascadeFlow { bool isCascCandidate = 0; isCascCandidate = IsCascAccepted(casc, negExtra, posExtra, bachExtra, counter); histos.fill(HIST("hCascade"), counter); - histos.fill(HIST("hCascadeDauSel"), (int)isCascCandidate); + histos.fill(HIST("hCascadeDauSel"), static_cast(isCascCandidate)); if (!isCascCandidate) continue; @@ -2539,7 +2539,7 @@ struct cascadeFlow { bool isCascCandidate = 0; isCascCandidate = IsCascAccepted(casc, negExtra, posExtra, bachExtra, counter); histos.fill(HIST("hCascade"), counter); - histos.fill(HIST("hCascadeDauSel"), (int)isCascCandidate); + histos.fill(HIST("hCascadeDauSel"), static_cast(isCascCandidate)); if (!isCascCandidate) continue; From b11c84c8cc764f8b9d780a2f5097267d4c52caac Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 9 Sep 2026 09:15:26 +0000 Subject: [PATCH 5/5] Please consider the following formatting changes --- .../TableProducer/Strangeness/cascadeflow.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx index abcda83fa48..2102b2aa681 100644 --- a/PWGLF/TableProducer/Strangeness/cascadeflow.cxx +++ b/PWGLF/TableProducer/Strangeness/cascadeflow.cxx @@ -150,15 +150,15 @@ constexpr int cutDir[nCutScores] = {CutSmaller, CutNot}; // CutSmaller selects v auto vecCutDir = std::vector{cutDir, cutDir + nCutScores}; // default values for the cuts -constexpr double cuts[nBinsPt][nCutScores] = {// background, signal - {0., 0.9}, - {0., 0.9}, - {0., 0.9}, - {0., 0.9}, - {0., 0.9}, - {0., 0.9}, - {0., 0.9}, - {0., 0.9}}; +constexpr double cuts[nBinsPt][nCutScores] = { // background, signal + {0., 0.9}, + {0., 0.9}, + {0., 0.9}, + {0., 0.9}, + {0., 0.9}, + {0., 0.9}, + {0., 0.9}, + {0., 0.9}}; // row labels static const std::vector labelsPt = {