From bbd2fa389751fb42f5bbf1816a2b545f9137a53d Mon Sep 17 00:00:00 2001 From: oussama3030 Date: Fri, 28 Aug 2026 15:58:58 +0200 Subject: [PATCH 1/3] Added L* MC information to the sigmaanalysis task --- PWGLF/DataModel/LFSigmaTables.h | 32 +++++++ .../Strangeness/sigma0builder.cxx | 30 ++++--- .../Tasks/Resonances/k892hadronphotonBkg.cxx | 85 ++++++++++++++++--- PWGLF/Tasks/Strangeness/sigmaanalysis.cxx | 46 ++++++++-- 4 files changed, 163 insertions(+), 30 deletions(-) diff --git a/PWGLF/DataModel/LFSigmaTables.h b/PWGLF/DataModel/LFSigmaTables.h index 4d8d08ba6a9..e11567b2d7a 100644 --- a/PWGLF/DataModel/LFSigmaTables.h +++ b/PWGLF/DataModel/LFSigmaTables.h @@ -107,6 +107,22 @@ DECLARE_SOA_DYNAMIC_COLUMN(OPAngle, opAngle, return v1.Angle(v2); }); +// Armenteros-Podolanski variables (photon = positive daughter, lambda = negative daughter) +DECLARE_SOA_DYNAMIC_COLUMN(LStarAlpha, lStarAlpha, //! Armenteros Alpha + [](float photonPx, float photonPy, float photonPz, float lambdaPx, float lambdaPy, float lambdaPz) -> float { + float momTot = RecoDecay::p(photonPx + lambdaPx, photonPy + lambdaPy, photonPz + lambdaPz); + float lQlNeg = RecoDecay::dotProd(std::array{lambdaPx, lambdaPy, lambdaPz}, std::array{photonPx + lambdaPx, photonPy + lambdaPy, photonPz + lambdaPz}) / momTot; + float lQlPos = RecoDecay::dotProd(std::array{photonPx, photonPy, photonPz}, std::array{photonPx + lambdaPx, photonPy + lambdaPy, photonPz + lambdaPz}) / momTot; + return (lQlPos - lQlNeg) / (lQlPos + lQlNeg); + }); + +DECLARE_SOA_DYNAMIC_COLUMN(LStarQtArm, lStarQtarm, //! Armenteros Qt + [](float photonPx, float photonPy, float photonPz, float lambdaPx, float lambdaPy, float lambdaPz) -> float { + float momTot = RecoDecay::p2(photonPx + lambdaPx, photonPy + lambdaPy, photonPz + lambdaPz); + float dp = RecoDecay::dotProd(std::array{lambdaPx, lambdaPy, lambdaPz}, std::array{photonPx + lambdaPx, photonPy + lambdaPy, photonPz + lambdaPz}); + return std::sqrt(RecoDecay::p2(lambdaPx, lambdaPy, lambdaPz) - dp * dp / momTot); // qtarm + }); + // Photon DECLARE_SOA_DYNAMIC_COLUMN(PhotonPt, photonPt, //! Transverse momentum in GeV/c [](float photonPx, float photonPy) -> float { @@ -179,6 +195,8 @@ DECLARE_SOA_TABLE(Sigma0Cores, "AOD", "SIGMA0CORES", sigma0Core::Eta, sigma0Core::Radius, sigma0Core::OPAngle, + sigma0Core::LStarAlpha, + sigma0Core::LStarQtArm, sigma0Core::PhotonPt, sigma0Core::PhotonP, @@ -656,6 +674,12 @@ DECLARE_SOA_DYNAMIC_COLUMN(IsSigma0, isSigma0, DECLARE_SOA_DYNAMIC_COLUMN(IsAntiSigma0, isAntiSigma0, //! IsASigma0 [](int pdgCode) -> bool { return pdgCode == PDG_t::kSigma0Bar; }); //-3212 +DECLARE_SOA_DYNAMIC_COLUMN(IsLambdaStar, isLambdaStar, //! IsLambdaStar + [](int pdgCode) -> bool { return pdgCode == 3124; }); // PYTHIA8 code for Lambda(1520) + +DECLARE_SOA_DYNAMIC_COLUMN(IsAntiLambdaStar, isAntiLambdaStar, //! IsAntiLambdaStar + [](int pdgCode) -> bool { return pdgCode == -3124; }); // PYTHIA8 code for AntiLambda(1520) + DECLARE_SOA_DYNAMIC_COLUMN(MCPx, mcpx, //! Sigma0 px [](float photonMCPx, float lambdaMCPx) -> float { return photonMCPx + lambdaMCPx; }); DECLARE_SOA_DYNAMIC_COLUMN(MCPy, mcpy, //! Sigma0 py @@ -686,6 +710,11 @@ DECLARE_SOA_DYNAMIC_COLUMN(Sigma0MCY, sigma0MCY, return RecoDecay::y(std::array{photonMCPx + lambdaMCPx, photonMCPy + lambdaMCPy, photonMCPz + lambdaMCPz}, o2::constants::physics::MassSigma0); }); +DECLARE_SOA_DYNAMIC_COLUMN(LambdaStarMCY, lambdaStarMCY, + [](float photonMCPx, float photonMCPy, float photonMCPz, float lambdaMCPx, float lambdaMCPy, float lambdaMCPz) -> float { + return RecoDecay::y(std::array{photonMCPx + lambdaMCPx, photonMCPy + lambdaMCPy, photonMCPz + lambdaMCPz}, o2::constants::physics::MassLambda1520); + }); + DECLARE_SOA_DYNAMIC_COLUMN(MCPhi, mcphi, //! Phi in the range [0, 2pi) [](float photonMCPx, float photonMCPy, float lambdaMCPx, float lambdaMCPy) -> float { return RecoDecay::phi(photonMCPx + lambdaMCPx, photonMCPy + lambdaMCPy); }); @@ -767,6 +796,8 @@ DECLARE_SOA_TABLE(Sigma0MCCores, "AOD", "SIGMA0MCCORES", // Dynamic columns sigma0MCCore::IsSigma0, sigma0MCCore::IsAntiSigma0, + sigma0MCCore::IsLambdaStar, + sigma0MCCore::IsAntiLambdaStar, sigma0MCCore::MCPx, sigma0MCCore::MCPy, @@ -775,6 +806,7 @@ DECLARE_SOA_TABLE(Sigma0MCCores, "AOD", "SIGMA0MCCORES", sigma0MCCore::MCP, sigma0MCCore::Sigma0MCMass, sigma0MCCore::Sigma0MCY, + sigma0MCCore::LambdaStarMCY, sigma0MCCore::MCPhi, sigma0MCCore::MCEta, sigma0MCCore::MCOPAngle, diff --git a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx index e43f0424ebd..214259f75c4 100644 --- a/PWGLF/TableProducer/Strangeness/sigma0builder.cxx +++ b/PWGLF/TableProducer/Strangeness/sigma0builder.cxx @@ -841,6 +841,8 @@ struct sigma0builder { bool IsSigma0 = false; bool IsAntiSigma0 = false; bool IsKStar = false; + bool IsLambdaStar = false; + bool IsAntiLambdaStar = false; bool IsProducedByGenerator = false; bool IsSterile = false; int MCProcess = -1; @@ -914,8 +916,9 @@ struct sigma0builder { auto v02MC = v02.template v0MCCore_as>(); // Sanity check: Is V0Pair <-> Mother assignment correct? + int expectedPairPDG = doLambdaStar ? 3124 : PDG_t::kSigma0; bool fIsSigma0 = false; - if ((v01MC.pdgCode() == PDG_t::kGamma) && (v01MC.pdgCodeMother() == PDG_t::kSigma0) && (v02MC.pdgCode() == PDG_t::kLambda0) && (v02MC.pdgCodeMother() == PDG_t::kSigma0) && (v01.motherMCPartId() == v02.motherMCPartId())) + if ((v01MC.pdgCode() == PDG_t::kGamma) && (v01MC.pdgCodeMother() == expectedPairPDG) && (v02MC.pdgCode() == PDG_t::kLambda0) && (v02MC.pdgCodeMother() == expectedPairPDG) && (v01.motherMCPartId() == v02.motherMCPartId())) fIsSigma0 = true; bool fIsKStar = false; @@ -1066,11 +1069,11 @@ struct sigma0builder { } } // Check association correctness - if (fIsSigma0 && (MCinfo.V0PairPDGCode == PDG_t::kSigma0)) + if (fIsSigma0 && (MCinfo.V0PairPDGCode == expectedPairPDG)) histos.fill(HIST("MCQA/hSigma0MCCheck"), 1); // match - if (fIsSigma0 && !(MCinfo.V0PairPDGCode == PDG_t::kSigma0)) + if (fIsSigma0 && !(MCinfo.V0PairPDGCode == expectedPairPDG)) histos.fill(HIST("MCQA/hSigma0MCCheck"), 2); // mismatch - if (!fIsSigma0 && (MCinfo.V0PairPDGCode == PDG_t::kSigma0)) + if (!fIsSigma0 && (MCinfo.V0PairPDGCode == expectedPairPDG)) histos.fill(HIST("MCQA/hSigma0MCCheck"), 3); // mismatch // Check association correctness @@ -1627,6 +1630,8 @@ struct sigma0builder { GenInfo.IsSigma0 = mcParticle.pdgCode() == PDG_t::kSigma0; // PDG_t::kSigma0 GenInfo.IsAntiSigma0 = mcParticle.pdgCode() == PDG_t::kSigma0Bar; //-3212 GenInfo.IsKStar = std::abs(mcParticle.pdgCode()) == o2::constants::physics::Pdg::kK0Star892; // 313; + GenInfo.IsLambdaStar = mcParticle.pdgCode() == 3124; // 102134 (PYTHIA8) + GenInfo.IsAntiLambdaStar = mcParticle.pdgCode() == -3124; // -102134 GenInfo.IsProducedByGenerator = mcParticle.producedByGenerator(); GenInfo.MCProcess = mcParticle.getProcess(); GenInfo.MCPt = mcParticle.pt(); @@ -1637,7 +1642,7 @@ struct sigma0builder { GenInfo.MCCollId = mcParticle.mcCollisionId(); // save this reference, please // Checking decay mode if sigma0 or pi0 (it is easier here) - if (GenInfo.IsSigma0 || GenInfo.IsAntiSigma0 || GenInfo.IsPi0 || GenInfo.IsKStar) { + if (GenInfo.IsSigma0 || GenInfo.IsAntiSigma0 || GenInfo.IsPi0 || GenInfo.IsKStar || GenInfo.IsLambdaStar || GenInfo.IsAntiLambdaStar) { // This is a costly operation, so we do it only for pi0s and sigma0s auto const& daughters = mcParticle.template daughters_as(); @@ -1647,7 +1652,7 @@ struct sigma0builder { auto const& GenMothersList = mcParticle.template mothers_as(); GenInfo.PDGCodeMother = (!GenMothersList.empty()) ? GenMothersList.front().pdgCode() : 0; - if ((GenInfo.IsSigma0 || GenInfo.IsAntiSigma0) && genSelections.doQA) { + if ((doLambdaStar ? (GenInfo.IsLambdaStar || GenInfo.IsAntiLambdaStar) : (GenInfo.IsSigma0 || GenInfo.IsAntiSigma0)) && genSelections.doQA) { histos.fill(HIST("GenQA/h2dSigma0MCSourceVsPDGMother"), GenInfo.IsProducedByGenerator, GenInfo.PDGCodeMother); // Checking decay modes and getting daughter pTs @@ -1710,7 +1715,7 @@ struct sigma0builder { histos.fill(HIST("GenQA/hGenSpeciesKStar"), 0); // Checking decay mode - if (GenInfo.IsSigma0 || GenInfo.IsAntiSigma0) { + if (doLambdaStar ? (GenInfo.IsLambdaStar || GenInfo.IsAntiLambdaStar) : (GenInfo.IsSigma0 || GenInfo.IsAntiSigma0)) { histos.fill(HIST("GenQA/hSigma0NDau"), GenInfo.NDaughters); histos.fill(HIST("GenQA/h2dSigma0NDauVsProcess"), GenInfo.NDaughters, GenInfo.MCProcess); @@ -1730,7 +1735,7 @@ struct sigma0builder { histos.fill(HIST("GenQA/h2DGenSigma0TypeVsProducedByGen"), typeIndex, genIndex); // Fill histograms - if (GenInfo.IsSigma0) { + if (doLambdaStar ? GenInfo.IsLambdaStar : GenInfo.IsSigma0) { histos.fill(HIST("GenQA/hGenSpecies"), 2); histos.fill(HIST("GenQA/hGenSigma0"), GenInfo.MCPt); histos.fill(HIST("GenQA/h3dGenSigma0_pTMap"), GenInfo.MCPt, GenInfo.MCDau1Pt, GenInfo.MCDau2Pt); @@ -1739,7 +1744,7 @@ struct sigma0builder { if (GenInfo.IsPrimary) histos.fill(HIST("GenQA/hPrimarySigma0s"), 1); } - if (GenInfo.IsAntiSigma0) { + if (doLambdaStar ? GenInfo.IsAntiLambdaStar : GenInfo.IsAntiSigma0) { histos.fill(HIST("GenQA/hGenSpecies"), 3); histos.fill(HIST("GenQA/hGenAntiSigma0"), GenInfo.MCPt); histos.fill(HIST("GenQA/h3dGenASigma0_pTMap"), GenInfo.MCPt, GenInfo.MCDau1Pt, GenInfo.MCDau2Pt); @@ -1816,9 +1821,10 @@ struct sigma0builder { pi0GenCollRefs(MCGenInfo.MCCollId); // link to stramccollision table } - // Sigma0/ASigma0 - if (fillSigma0Tables && (MCGenInfo.IsSigma0 || MCGenInfo.IsAntiSigma0)) { - sigma0Gens(MCGenInfo.IsSigma0, MCGenInfo.IsProducedByGenerator, MCGenInfo.MCPt, mcParticle.y()); + // Sigma0/ASigma0 (Lambda(1520)/ALambda(1520)) + bool fIsGenSigma0Like = doLambdaStar ? (MCGenInfo.IsLambdaStar || MCGenInfo.IsAntiLambdaStar) : (MCGenInfo.IsSigma0 || MCGenInfo.IsAntiSigma0); + if (fillSigma0Tables && fIsGenSigma0Like) { + sigma0Gens(doLambdaStar ? MCGenInfo.IsLambdaStar : MCGenInfo.IsSigma0, MCGenInfo.IsProducedByGenerator, MCGenInfo.MCPt, mcParticle.y()); sigma0GenCollRefs(MCGenInfo.MCCollId); // link to stramccollision table } diff --git a/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx b/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx index 239897406f0..7b1eff82351 100644 --- a/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx +++ b/PWGLF/Tasks/Resonances/k892hadronphotonBkg.cxx @@ -81,6 +81,8 @@ struct k892hadronphotonBkg { Configurable doPPAnalysis{"doPPAnalysis", true, "if in pp, set to true"}; + Configurable doArm{"doArm", true, "Fill the 3D Armenteros histograms"}; + // For ML Selection Configurable useMLScores{"useMLScores", false, "use ML scores to select candidates"}; @@ -244,6 +246,8 @@ struct k892hadronphotonBkg { ConfigurableAxis axisKStarMass{"axisKStarMass", {500, 0.6f, 1.6f}, "M_{K^{*}} (GeV/c^{2})"}; ConfigurableAxis axisLambdaStarMass{"axisLambdaStarMass", {500, 1.1f, 2.1f}, "M_{#Lambda(1520)} (GeV/c^{2})"}; ConfigurableAxis axisIRBinning{"axisIRBinning", {151, -10, 1500}, "Binning for the interaction rate (kHz)"}; + ConfigurableAxis axisAPAlpha{"axisAPAlpha", {220, -1.1f, 1.1f}, "Resonance AP alpha (#gamma = positive leg)"}; + ConfigurableAxis axisAPQt{"axisAPQt", {220, 0.0f, 1.1f}, "Resonance AP q_{T} (GeV/c)"}; ConfigurableAxis axisCandSel{"axisCandSel", {15, 0.5f, +15.5f}, "Candidate Selection"}; } axisConfig; @@ -312,11 +316,19 @@ struct k892hadronphotonBkg { histos.add("KStarBkg/h2dRotKStarMassVsPt", "h2dRotKStarMassVsPt", kTH2D, {axisConfig.axisKStarMass, axisConfig.axisPt}); histos.add("KStarBkg/h3dRotKStarMassVsPt", "h3dRotKStarMassVsPt", kTH3D, {axisConfig.axisCentrality, axisConfig.axisPt, axisConfig.axisKStarMass}); histos.add("KStarBkg/h3dRotKStarPtVsOPAngle", "h3dRotKStarPtVsOPAngle", kTH3D, {{140, 0.f, 7.f}, axisConfig.axisPt, axisConfig.axisKStarMass}); + if (doArm) { + histos.add("KStarBkg/h3dRotKStarPtVsAPAlpha", "h3dRotKStarPtVsAPAlpha", kTH3D, {axisConfig.axisAPAlpha, axisConfig.axisPt, axisConfig.axisKStarMass}); + histos.add("KStarBkg/h3dRotKStarPtVsAPQt", "h3dRotKStarPtVsAPQt", kTH3D, {axisConfig.axisAPQt, axisConfig.axisPt, axisConfig.axisKStarMass}); + } } if (kstarBkgConfig.doEvtMixing) { histos.add("KStarBkg/h2dMixedKStarMassVsPt", "h2dMixedKStarMassVsPt", kTH2D, {axisConfig.axisKStarMass, axisConfig.axisPt}); histos.add("KStarBkg/h3dMixedKStarMassVsPt", "h3dMixedKStarMassVsPt", kTH3D, {axisConfig.axisCentrality, axisConfig.axisPt, axisConfig.axisKStarMass}); histos.add("KStarBkg/h3dMixedKStarPtVsOPAngle", "h3dMixedKStarPtVsOPAngle", kTH3D, {{140, 0.f, 7.f}, axisConfig.axisPt, axisConfig.axisKStarMass}); + if (doArm) { + histos.add("KStarBkg/h3dMixedKStarPtVsAPAlpha", "h3dMixedKStarPtVsAPAlpha", kTH3D, {axisConfig.axisAPAlpha, axisConfig.axisPt, axisConfig.axisKStarMass}); + histos.add("KStarBkg/h3dMixedKStarPtVsAPQt", "h3dMixedKStarPtVsAPQt", kTH3D, {axisConfig.axisAPQt, axisConfig.axisPt, axisConfig.axisKStarMass}); + } } // Lambda(1520) -> Lambda + gamma @@ -328,11 +340,19 @@ struct k892hadronphotonBkg { histos.add("LambdaStarBkg/h2dRotLambdaStarMassVsPt", "h2dRotLambdaStarMassVsPt", kTH2D, {axisConfig.axisLambdaStarMass, axisConfig.axisPt}); histos.add("LambdaStarBkg/h3dRotLambdaStarMassVsPt", "h3dRotLambdaStarMassVsPt", kTH3D, {axisConfig.axisCentrality, axisConfig.axisPt, axisConfig.axisLambdaStarMass}); histos.add("LambdaStarBkg/h3dRotLambdaStarPtVsOPAngle", "h3dRotLambdaStarPtVsOPAngle", kTH3D, {{140, 0.f, 7.f}, axisConfig.axisPt, axisConfig.axisLambdaStarMass}); + if (doArm) { + histos.add("LambdaStarBkg/h3dRotLambdaStarPtVsAPAlpha", "h3dRotLambdaStarPtVsAPAlpha", kTH3D, {axisConfig.axisAPAlpha, axisConfig.axisPt, axisConfig.axisLambdaStarMass}); + histos.add("LambdaStarBkg/h3dRotLambdaStarPtVsAPQt", "h3dRotLambdaStarPtVsAPQt", kTH3D, {axisConfig.axisAPQt, axisConfig.axisPt, axisConfig.axisLambdaStarMass}); + } } if (lstarBkgConfig.doEvtMixing) { histos.add("LambdaStarBkg/h2dMixedLambdaStarMassVsPt", "h2dMixedLambdaStarMassVsPt", kTH2D, {axisConfig.axisLambdaStarMass, axisConfig.axisPt}); histos.add("LambdaStarBkg/h3dMixedLambdaStarMassVsPt", "h3dMixedLambdaStarMassVsPt", kTH3D, {axisConfig.axisCentrality, axisConfig.axisPt, axisConfig.axisLambdaStarMass}); histos.add("LambdaStarBkg/h3dMixedLambdaStarPtVsOPAngle", "h3dMixedLambdaStarPtVsOPAngle", kTH3D, {{140, 0.f, 7.f}, axisConfig.axisPt, axisConfig.axisLambdaStarMass}); + if (doArm) { + histos.add("LambdaStarBkg/h3dMixedLambdaStarPtVsAPAlpha", "h3dMixedLambdaStarPtVsAPAlpha", kTH3D, {axisConfig.axisAPAlpha, axisConfig.axisPt, axisConfig.axisLambdaStarMass}); + histos.add("LambdaStarBkg/h3dMixedLambdaStarPtVsAPQt", "h3dMixedLambdaStarPtVsAPQt", kTH3D, {axisConfig.axisAPQt, axisConfig.axisPt, axisConfig.axisLambdaStarMass}); + } } } @@ -755,6 +775,27 @@ struct k892hadronphotonBkg { return true; } + //_______________________________________________ + // Armenteros-Podolanski variables of the (photon + hadron) pair. + static float armenterosAlpha(std::array const& photonP, + std::array const& hadronP) + { + const std::array momRes{photonP[0] + hadronP[0], photonP[1] + hadronP[1], photonP[2] + hadronP[2]}; + const double momTot = RecoDecay::p(momRes); + const double lQlNeg = RecoDecay::dotProd(hadronP, momRes) / momTot; + const double lQlPos = RecoDecay::dotProd(photonP, momRes) / momTot; + return (lQlPos - lQlNeg) / (lQlPos + lQlNeg); + } + + static float armenterosQt(std::array const& photonP, + std::array const& hadronP) + { + const std::array momRes{photonP[0] + hadronP[0], photonP[1] + hadronP[1], photonP[2] + hadronP[2]}; + const double momTot2 = RecoDecay::p2(momRes); + const double dp = RecoDecay::dotProd(hadronP, momRes); + return std::sqrt(RecoDecay::p2(hadronP) - dp * dp / momTot2); + } + //_______________________________________________ // Compute same-event rotational background within a single collision. template @@ -800,10 +841,10 @@ struct k892hadronphotonBkg { ROOT::Math::PtEtaPhiMVector hRot(hadron.pt(), hadron.eta(), hadron.phi() + theta, HadronMass); ROOT::Math::PtEtaPhiMVector gRot(photon.pt(), photon.eta(), photon.phi() + theta, o2::constants::physics::MassGamma); - auto reso = pGamma + hRot; - if (rotGamma) { - reso = gRot + pHadron; - } + const auto& gammaLeg = rotGamma ? gRot : pGamma; + const auto& hadronLeg = rotGamma ? pHadron : hRot; + + auto reso = gammaLeg + hadronLeg; float rapidity = RecoDecay::y(std::array{static_cast(reso.Px()), static_cast(reso.Py()), @@ -812,22 +853,32 @@ struct k892hadronphotonBkg { if (std::abs(rapidity) > maxRap) continue; - // Opening angle between photon and rotated hadron (QA only, not used as a cut) - double cosOA = pGamma.Vect().Dot(hRot.Vect()) / (pGamma.P() * hRot.P()); - if (rotGamma) { - cosOA = gRot.Vect().Dot(pHadron.Vect()) / (gRot.P() * pHadron.P()); - } - + // Opening angle between photon and hadron + double cosOA = gammaLeg.Vect().Dot(hadronLeg.Vect()) / (gammaLeg.P() * hadronLeg.P()); double openAngle = std::acos(cosOA); + // Armenteros-Podolanski of the rotated pair + const std::array gammaMom{static_cast(gammaLeg.Px()), static_cast(gammaLeg.Py()), static_cast(gammaLeg.Pz())}; + const std::array hadronMom{static_cast(hadronLeg.Px()), static_cast(hadronLeg.Py()), static_cast(hadronLeg.Pz())}; + const float apAlpha = armenterosAlpha(gammaMom, hadronMom); + const float apQt = armenterosQt(gammaMom, hadronMom); + if constexpr (resonance == kResoKStar) { histos.fill(HIST("KStarBkg/h2dRotKStarMassVsPt"), reso.M(), reso.Pt()); histos.fill(HIST("KStarBkg/h3dRotKStarMassVsPt"), centrality, reso.Pt(), reso.M()); histos.fill(HIST("KStarBkg/h3dRotKStarPtVsOPAngle"), openAngle, reso.Pt(), reso.M()); + if (doArm) { + histos.fill(HIST("KStarBkg/h3dRotKStarPtVsAPAlpha"), apAlpha, reso.Pt(), reso.M()); + histos.fill(HIST("KStarBkg/h3dRotKStarPtVsAPQt"), apQt, reso.Pt(), reso.M()); + } } else { histos.fill(HIST("LambdaStarBkg/h2dRotLambdaStarMassVsPt"), reso.M(), reso.Pt()); histos.fill(HIST("LambdaStarBkg/h3dRotLambdaStarMassVsPt"), centrality, reso.Pt(), reso.M()); histos.fill(HIST("LambdaStarBkg/h3dRotLambdaStarPtVsOPAngle"), openAngle, reso.Pt(), reso.M()); + if (doArm) { + histos.fill(HIST("LambdaStarBkg/h3dRotLambdaStarPtVsAPAlpha"), apAlpha, reso.Pt(), reso.M()); + histos.fill(HIST("LambdaStarBkg/h3dRotLambdaStarPtVsAPQt"), apQt, reso.Pt(), reso.M()); + } } } } @@ -885,14 +936,28 @@ struct k892hadronphotonBkg { if (std::abs(rapidity) > maxRap) continue; + // Armenteros-Podolanski of the mixed pair + const std::array gammaMom{photon.px(), photon.py(), photon.pz()}; + const std::array hadronMom{hadron.px(), hadron.py(), hadron.pz()}; + const float apAlpha = armenterosAlpha(gammaMom, hadronMom); + const float apQt = armenterosQt(gammaMom, hadronMom); + if constexpr (resonance == kResoKStar) { histos.fill(HIST("KStarBkg/h2dMixedKStarMassVsPt"), mass, pt); histos.fill(HIST("KStarBkg/h3dMixedKStarMassVsPt"), centrality, pt, mass); histos.fill(HIST("KStarBkg/h3dMixedKStarPtVsOPAngle"), openAngle, pt, mass); + if (doArm) { + histos.fill(HIST("KStarBkg/h3dMixedKStarPtVsAPAlpha"), apAlpha, pt, mass); + histos.fill(HIST("KStarBkg/h3dMixedKStarPtVsAPQt"), apQt, pt, mass); + } } else { histos.fill(HIST("LambdaStarBkg/h2dMixedLambdaStarMassVsPt"), mass, pt); histos.fill(HIST("LambdaStarBkg/h3dMixedLambdaStarMassVsPt"), centrality, pt, mass); histos.fill(HIST("LambdaStarBkg/h3dMixedLambdaStarPtVsOPAngle"), openAngle, pt, mass); + if (doArm) { + histos.fill(HIST("LambdaStarBkg/h3dMixedLambdaStarPtVsAPAlpha"), apAlpha, pt, mass); + histos.fill(HIST("LambdaStarBkg/h3dMixedLambdaStarPtVsAPQt"), apQt, pt, mass); + } } } } diff --git a/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx b/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx index c7bff11c752..c461eabc8fd 100644 --- a/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx @@ -443,6 +443,8 @@ struct sigmaanalysis { histos.add(histodir + "/Sigma0/hDCAPairDau", "hDCAPairDau", kTH1D, {axisDCAdau}); histos.add(histodir + "/Sigma0/h3dMass", "h3dMass", kTH3D, {axisCentrality, axisPt, axisSigmaMass}); histos.add(histodir + "/Sigma0/h3dOPAngleVsMass", "h3dOPAngleVsMass", kTH3D, {{140, 0.0f, +7.0f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/Sigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/Sigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); histos.add(histodir + "/ASigma0/hMass", "hMass", kTH1D, {axisSigmaMass}); histos.add(histodir + "/ASigma0/hPt", "hPt", kTH1D, {axisPt}); @@ -452,6 +454,8 @@ struct sigmaanalysis { histos.add(histodir + "/ASigma0/hDCAPairDau", "hDCAPairDau", kTH1D, {axisDCAdau}); histos.add(histodir + "/ASigma0/h3dMass", "h3dMass", kTH3D, {axisCentrality, axisPt, axisSigmaMass}); histos.add(histodir + "/ASigma0/h3dOPAngleVsMass", "h3dOPAngleVsMass", kTH3D, {{140, 0.0f, +7.0f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/ASigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/ASigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); // Process MC if (doprocessMonteCarlo || doprocessMonteCarloWithEMCal) { @@ -490,6 +494,8 @@ struct sigmaanalysis { histos.add(histodir + "/MC/Sigma0/h2dMCProcessVsGenRadius", "h2dMCProcessVsGenRadius", kTH2D, {{50, -0.5f, 49.5f}, axisV0PairRadius}); histos.add(histodir + "/MC/Sigma0/h3dMass", "h3dMass", kTH3D, {axisCentrality, axisPt, axisSigmaMass}); histos.add(histodir + "/MC/Sigma0/h3dMCProcess", "h3dMCProcess", kTH3D, {{50, -0.5f, 49.5f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/MC/Sigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/MC/Sigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); histos.add(histodir + "/MC/ASigma0/hPt", "hPt", kTH1D, {axisPt}); histos.add(histodir + "/MC/ASigma0/hMCPt", "hMCPt", kTH1D, {axisPt}); @@ -501,6 +507,11 @@ struct sigmaanalysis { histos.add(histodir + "/MC/ASigma0/h2dMCProcessVsGenRadius", "h2dMCProcessVsGenRadius", kTH2D, {{50, -0.5f, 49.5f}, axisV0PairRadius}); histos.add(histodir + "/MC/ASigma0/h3dMass", "h3dMass", kTH3D, {axisCentrality, axisPt, axisSigmaMass}); histos.add(histodir + "/MC/ASigma0/h3dMCProcess", "h3dMCProcess", kTH3D, {{50, -0.5f, 49.5f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/MC/ASigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/MC/ASigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + + histos.add(histodir + "/MC/LambdaStar/h3dMCPtvsOPAngle_Sig", "h3dMCPtvsOPAngle_Sig", kTH3D, {{140, 0.f, 7.f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/MC/LambdaStar/h3dMCPtvsOPAngle_Bkg", "h3dMCPtvsOPAngle_Bkg", kTH3D, {{140, 0.f, 7.f}, axisPt, axisSigmaMass}); // pT Resolution: if (fillResoQAhistos) { @@ -1040,14 +1051,14 @@ struct sigmaanalysis { //_______________________________________ // Sigma and AntiSigma MC association - if (sigma.isSigma0()) { + if (doLambdaStar ? sigma.isLambdaStar() : sigma.isSigma0()) { histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dSigma0RadiusResolution"), sigma.mcpt(), sigma.radius() - sigma.mcradius()); // pT resolution if (sigma.mcpt() > 0) { histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dSigma0PtResolution"), sigma.mcpt(), (sigma.pt() / sigma.mcpt()) - 1.f); // pT resolution histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dSigma0InvPtResolution"), 1.f / sigma.mcpt(), 1.f / sigma.pt() - 1.f / sigma.mcpt()); // pT resolution } } - if (sigma.isAntiSigma0()) { + if (doLambdaStar ? sigma.isAntiLambdaStar() : sigma.isAntiSigma0()) { histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dASigma0RadiusResolution"), sigma.mcpt(), sigma.radius() - sigma.mcradius()); // pT resolution if (sigma.mcpt() > 0) histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dAntiSigma0PtResolution"), 1.f / sigma.mcpt(), 1.f / sigma.pt() - 1.f / sigma.mcpt()); // pT resolution @@ -1061,8 +1072,8 @@ struct sigmaanalysis { // Check whether it is before or after selections static constexpr std::string_view MainDir[] = {"BeforeSel", "AfterSel"}; - bool fIsSigma = sigma.isSigma0(); - bool fIsAntiSigma = sigma.isAntiSigma0(); + bool fIsSigma = doLambdaStar ? sigma.isLambdaStar() : sigma.isSigma0(); + bool fIsAntiSigma = doLambdaStar ? sigma.isAntiLambdaStar() : sigma.isAntiSigma0(); int PhotonPDGCode = sigma.photonPDGCode(); int PhotonPDGCodeMother = sigma.photonPDGCodeMother(); int LambdaPDGCode = sigma.lambdaPDGCode(); @@ -1199,6 +1210,9 @@ struct sigmaanalysis { histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/hDCAPairDau"), sigma.dcadaughters()); histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/h3dMass"), centrality, sigma.pt(), sigma.sigma0Mass()); histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/h3dOPAngleVsMass"), sigma.opAngle(), sigma.pt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.pt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.pt(), sigma.sigma0Mass()); + } else { if (fillSelhistos) { histos.fill(HIST(MainDir[mode]) + HIST("/Lambda/h2dTPCvsTOFNSigma_ALambdaPr"), sigma.lambdaNegPrTPCNSigma(), sigma.aLambdaPrTOFNSigma()); @@ -1218,6 +1232,8 @@ struct sigmaanalysis { histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/hDCAPairDau"), sigma.dcadaughters()); histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/h3dMass"), centrality, sigma.pt(), sigma.sigma0Mass()); histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/h3dOPAngleVsMass"), sigma.opAngle(), sigma.pt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.pt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.pt(), sigma.sigma0Mass()); } //_______________________________________ @@ -1266,7 +1282,7 @@ struct sigmaanalysis { } //_______________________________________ // Sigma0 MC association - if (sigma.isSigma0()) { + if (doLambdaStar ? sigma.isLambdaStar() : sigma.isSigma0()) { histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/hPt"), sigma.pt()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/hMCPt"), sigma.mcpt()); @@ -1274,6 +1290,8 @@ struct sigmaanalysis { histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/h2dMCPtVsPhotonMCPt"), sigma.mcpt(), sigma.photonmcpt()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/hMass"), sigma.sigma0Mass()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/h3dMass"), centrality, sigma.mcpt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.mcpt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.mcpt(), sigma.sigma0Mass()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/hMCProcess"), sigma.mcprocess()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/hGenRadius"), sigma.mcradius()); @@ -1283,7 +1301,7 @@ struct sigmaanalysis { //_______________________________________ // AntiSigma0 MC association - if (sigma.isAntiSigma0()) { + if (doLambdaStar ? sigma.isAntiLambdaStar() : sigma.isAntiSigma0()) { histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/hPt"), sigma.pt()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/hMCPt"), sigma.mcpt()); @@ -1291,6 +1309,8 @@ struct sigmaanalysis { histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h2dMCPtVsPhotonMCPt"), sigma.mcpt(), sigma.photonmcpt()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/hMass"), sigma.sigma0Mass()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h3dMass"), centrality, sigma.mcpt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.mcpt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.mcpt(), sigma.sigma0Mass()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/hMCProcess"), sigma.mcprocess()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/hGenRadius"), sigma.mcradius()); @@ -1298,6 +1318,15 @@ struct sigmaanalysis { histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h3dMCProcess"), sigma.mcprocess(), sigma.mcpt(), sigma.sigma0Mass()); } + if (doLambdaStar) { + if (sigma.isAntiLambdaStar() || sigma.isLambdaStar()) { + histos.fill(HIST(MainDir[mode]) + HIST("/MC/LambdaStar/h3dMCPtvsOPAngle_Sig"), sigma.mcopAngle(), sigma.mcpt(), sigma.sigma0Mass()); + } + + if (!sigma.isAntiLambdaStar() && !sigma.isLambdaStar()) { + histos.fill(HIST(MainDir[mode]) + HIST("/MC/LambdaStar/h3dMCPtvsOPAngle_Bkg"), sigma.mcopAngle(), sigma.mcpt(), sigma.sigma0Mass()); + } + } // For background studies: if (fillBkgQAhistos) runBkgAnalysis(sigma); @@ -1621,7 +1650,7 @@ struct sigmaanalysis { // Sigma0 specific selections float rapidity = doLambdaStar ? cand.lambdaStarY() : cand.sigma0Y(); if constexpr (requires { cand.sigma0MCY(); }) { // If MC - rapidity = cand.sigma0MCY(); + rapidity = doLambdaStar ? cand.lambdaStarMCY() : cand.sigma0MCY(); } // Rapidity @@ -1667,7 +1696,8 @@ struct sigmaanalysis { // if MC if constexpr (requires { sigma0.isSigma0(); sigma0.isAntiSigma0(); }) { - if (doMCAssociation && !(sigma0.isSigma0() || sigma0.isAntiSigma0())) + bool fIsMCAssociated = doLambdaStar ? (sigma0.isLambdaStar() || sigma0.isAntiLambdaStar()) : (sigma0.isSigma0() || sigma0.isAntiSigma0()); + if (doMCAssociation && !fIsMCAssociated) continue; if (selRecoFromGenerator && !sigma0.isProducedByGenerator()) From 57d6c62b1b624025ec8b405a5dcf6c484ca89fb2 Mon Sep 17 00:00:00 2001 From: oussama3030 Date: Fri, 28 Aug 2026 16:08:16 +0200 Subject: [PATCH 2/3] added a guard against arm 3d histos --- PWGLF/Tasks/Strangeness/sigmaanalysis.cxx | 49 +++++++++++++++-------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx b/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx index c461eabc8fd..9630a0b5958 100644 --- a/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx @@ -91,6 +91,7 @@ struct sigmaanalysis { // Species Configurable doLambdaStar{"doLambdaStar", false, "Build Lambda(1520) instead of Sigma0"}; + Configurable doArm{"doArm", true, "Fill the 3D Armenteros histograms"}; // Event level Configurable doPPAnalysis{"doPPAnalysis", true, "if in pp, set to true"}; @@ -443,8 +444,10 @@ struct sigmaanalysis { histos.add(histodir + "/Sigma0/hDCAPairDau", "hDCAPairDau", kTH1D, {axisDCAdau}); histos.add(histodir + "/Sigma0/h3dMass", "h3dMass", kTH3D, {axisCentrality, axisPt, axisSigmaMass}); histos.add(histodir + "/Sigma0/h3dOPAngleVsMass", "h3dOPAngleVsMass", kTH3D, {{140, 0.0f, +7.0f}, axisPt, axisSigmaMass}); - histos.add(histodir + "/Sigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); - histos.add(histodir + "/Sigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + if (doArm) { + histos.add(histodir + "/Sigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/Sigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + } histos.add(histodir + "/ASigma0/hMass", "hMass", kTH1D, {axisSigmaMass}); histos.add(histodir + "/ASigma0/hPt", "hPt", kTH1D, {axisPt}); @@ -454,8 +457,10 @@ struct sigmaanalysis { histos.add(histodir + "/ASigma0/hDCAPairDau", "hDCAPairDau", kTH1D, {axisDCAdau}); histos.add(histodir + "/ASigma0/h3dMass", "h3dMass", kTH3D, {axisCentrality, axisPt, axisSigmaMass}); histos.add(histodir + "/ASigma0/h3dOPAngleVsMass", "h3dOPAngleVsMass", kTH3D, {{140, 0.0f, +7.0f}, axisPt, axisSigmaMass}); - histos.add(histodir + "/ASigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); - histos.add(histodir + "/ASigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + if (doArm) { + histos.add(histodir + "/ASigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/ASigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + } // Process MC if (doprocessMonteCarlo || doprocessMonteCarloWithEMCal) { @@ -494,8 +499,10 @@ struct sigmaanalysis { histos.add(histodir + "/MC/Sigma0/h2dMCProcessVsGenRadius", "h2dMCProcessVsGenRadius", kTH2D, {{50, -0.5f, 49.5f}, axisV0PairRadius}); histos.add(histodir + "/MC/Sigma0/h3dMass", "h3dMass", kTH3D, {axisCentrality, axisPt, axisSigmaMass}); histos.add(histodir + "/MC/Sigma0/h3dMCProcess", "h3dMCProcess", kTH3D, {{50, -0.5f, 49.5f}, axisPt, axisSigmaMass}); - histos.add(histodir + "/MC/Sigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); - histos.add(histodir + "/MC/Sigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + if (doArm) { + histos.add(histodir + "/MC/Sigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/MC/Sigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + } histos.add(histodir + "/MC/ASigma0/hPt", "hPt", kTH1D, {axisPt}); histos.add(histodir + "/MC/ASigma0/hMCPt", "hMCPt", kTH1D, {axisPt}); @@ -507,8 +514,10 @@ struct sigmaanalysis { histos.add(histodir + "/MC/ASigma0/h2dMCProcessVsGenRadius", "h2dMCProcessVsGenRadius", kTH2D, {{50, -0.5f, 49.5f}, axisV0PairRadius}); histos.add(histodir + "/MC/ASigma0/h3dMass", "h3dMass", kTH3D, {axisCentrality, axisPt, axisSigmaMass}); histos.add(histodir + "/MC/ASigma0/h3dMCProcess", "h3dMCProcess", kTH3D, {{50, -0.5f, 49.5f}, axisPt, axisSigmaMass}); - histos.add(histodir + "/MC/ASigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); - histos.add(histodir + "/MC/ASigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + if (doArm) { + histos.add(histodir + "/MC/ASigma0/h3dAlphaVsMass", "h3dAlphaVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + histos.add(histodir + "/MC/ASigma0/h3dQtarmVsMass", "h3dQtarmVsMass", kTH3D, {{100, -5.0f, +5.0f}, axisPt, axisSigmaMass}); + } histos.add(histodir + "/MC/LambdaStar/h3dMCPtvsOPAngle_Sig", "h3dMCPtvsOPAngle_Sig", kTH3D, {{140, 0.f, 7.f}, axisPt, axisSigmaMass}); histos.add(histodir + "/MC/LambdaStar/h3dMCPtvsOPAngle_Bkg", "h3dMCPtvsOPAngle_Bkg", kTH3D, {{140, 0.f, 7.f}, axisPt, axisSigmaMass}); @@ -1210,8 +1219,10 @@ struct sigmaanalysis { histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/hDCAPairDau"), sigma.dcadaughters()); histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/h3dMass"), centrality, sigma.pt(), sigma.sigma0Mass()); histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/h3dOPAngleVsMass"), sigma.opAngle(), sigma.pt(), sigma.sigma0Mass()); - histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.pt(), sigma.sigma0Mass()); - histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.pt(), sigma.sigma0Mass()); + if (doArm) { + histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.pt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/Sigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.pt(), sigma.sigma0Mass()); + } } else { if (fillSelhistos) { @@ -1232,8 +1243,10 @@ struct sigmaanalysis { histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/hDCAPairDau"), sigma.dcadaughters()); histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/h3dMass"), centrality, sigma.pt(), sigma.sigma0Mass()); histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/h3dOPAngleVsMass"), sigma.opAngle(), sigma.pt(), sigma.sigma0Mass()); - histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.pt(), sigma.sigma0Mass()); - histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.pt(), sigma.sigma0Mass()); + if (doArm) { + histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.pt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/ASigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.pt(), sigma.sigma0Mass()); + } } //_______________________________________ @@ -1290,8 +1303,10 @@ struct sigmaanalysis { histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/h2dMCPtVsPhotonMCPt"), sigma.mcpt(), sigma.photonmcpt()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/hMass"), sigma.sigma0Mass()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/h3dMass"), centrality, sigma.mcpt(), sigma.sigma0Mass()); - histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.mcpt(), sigma.sigma0Mass()); - histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.mcpt(), sigma.sigma0Mass()); + if (doArm) { + histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.mcpt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.mcpt(), sigma.sigma0Mass()); + } histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/hMCProcess"), sigma.mcprocess()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/Sigma0/hGenRadius"), sigma.mcradius()); @@ -1309,8 +1324,10 @@ struct sigmaanalysis { histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h2dMCPtVsPhotonMCPt"), sigma.mcpt(), sigma.photonmcpt()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/hMass"), sigma.sigma0Mass()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h3dMass"), centrality, sigma.mcpt(), sigma.sigma0Mass()); - histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.mcpt(), sigma.sigma0Mass()); - histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.mcpt(), sigma.sigma0Mass()); + if (doArm) { + histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h3dAlphaVsMass"), sigma.lStarAlpha(), sigma.mcpt(), sigma.sigma0Mass()); + histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/h3dQtarmVsMass"), sigma.lStarQtarm(), sigma.mcpt(), sigma.sigma0Mass()); + } histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/hMCProcess"), sigma.mcprocess()); histos.fill(HIST(MainDir[mode]) + HIST("/MC/ASigma0/hGenRadius"), sigma.mcradius()); From 24aa75c121372e2e6827bfb39b76f8deccd70023 Mon Sep 17 00:00:00 2001 From: oussama3030 Date: Fri, 28 Aug 2026 16:27:49 +0200 Subject: [PATCH 3/3] adressed linter --- PWGLF/Tasks/Strangeness/sigmaanalysis.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx b/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx index 9630a0b5958..e4dda52dda6 100644 --- a/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/sigmaanalysis.cxx @@ -788,12 +788,11 @@ struct sigmaanalysis { if (eventSelections.maxIR >= 0 && interactionRate > eventSelections.maxIR) { return false; } - if (fillHists) + if (fillHists) { histos.fill(HIST("hEventSelection"), 19 /* Above max IR */); - - // Fill centrality histogram after event selection - if (fillHists) + // Fill centrality histogram after event selection histos.fill(HIST("hEventCentrality"), centrality); + } histos.fill(HIST("hCentralityVsNch"), centrality, collision.multNTracksPVeta1()); return true; @@ -914,7 +913,7 @@ struct sigmaanalysis { fillGeneratedEventProperties(mcCollisions, collisions); std::vector listBestCollisionIdx = getListOfRecoCollIndices(mcCollisions, collisions); - for (auto& genParticle : genParticles) { + for (const auto& genParticle : genParticles) { float centrality = 100.5f; // Has MC collision