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/2] 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/2] 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)