From 66a737d53818b70dffa03141f5232c1fb36beff5 Mon Sep 17 00:00:00 2001 From: sawan <124118453+sawankumawat@users.noreply.github.com> Date: Tue, 4 Aug 2026 15:49:28 +0530 Subject: [PATCH 1/2] Updated rapidity check and fixed PxPyPz Vector --- PWGLF/Tasks/Resonances/higherMassResonances.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGLF/Tasks/Resonances/higherMassResonances.cxx b/PWGLF/Tasks/Resonances/higherMassResonances.cxx index 1e8c7358f73..d9d4d72f9fb 100644 --- a/PWGLF/Tasks/Resonances/higherMassResonances.cxx +++ b/PWGLF/Tasks/Resonances/higherMassResonances.cxx @@ -957,7 +957,7 @@ struct HigherMassResonances { motherRot = daughterRot + daughterVec2; auto prrot = getCosThetaPhi(motherRot, daughterRot, kHelicity); - if (motherRot.Rapidity() < config.rapidityMotherData) + if (std::abs(motherRot.Rapidity()) < config.rapidityMotherData) hglue.fill(HIST("h3glueInvMassRot"), eventMultiplicity, motherRot.Pt(), motherRot.M(), prrot.first, prrot.second); } } else { @@ -981,7 +981,7 @@ struct HigherMassResonances { auto prrot = getCosThetaPhi(motherRot, daughterRot, kCollinsSoper); - if (motherRot.Rapidity() < config.rapidityMotherData) + if (std::abs(motherRot.Rapidity()) < config.rapidityMotherData) hglue.fill(HIST("h3glueInvMassRot"), eventMultiplicity, motherRot.Pt(), motherRot.M(), prrot.first, prrot.second); } } else { @@ -1202,7 +1202,7 @@ struct HigherMassResonances { // double pTcorrRot = std::abs(daughterRot.Pt() + daughter2.Pt()) / motherRot.Pt(); double pTcorrRot = (motherRot.Pt() - daughterRot.Pt() != 0.) ? daughterRot.Pt() / (motherRot.Pt() - daughterRot.Pt()) : 0.; - if (motherRot.Rapidity() < config.rapidityMotherData) + if (std::abs(motherRot.Rapidity()) < config.rapidityMotherData) hglue.fill(HIST("h3glueInvMassRot"), multiplicity, motherRot.Pt(), motherRot.M(), deltaMass, deltaRvalue, pTcorrRot); } } @@ -1366,7 +1366,7 @@ struct HigherMassResonances { motherRot = daughterRot + daughter2; - if (motherRot.Rapidity() < config.rapidityMotherData) { + if (std::abs(motherRot.Rapidity()) < config.rapidityMotherData) { hglue.fill(HIST("h3glueInvMassEPRot"), multiplicity, motherRot.Pt(), motherRot.M(), RecoDecay::constrainAngle(2.0 * motherRot.Phi() - 2.0 * eps[0])); } } @@ -1599,7 +1599,7 @@ struct HigherMassResonances { } } if (static_cast(passKs.size()) == config.noOfDaughters) { - lResonanceGen = ROOT::Math::PxPyPzEVector(mcParticle.pt(), mcParticle.eta(), mcParticle.phi(), mcParticle.e()); + lResonanceGen = ROOT::Math::PxPyPzEVector(mcParticle.px(), mcParticle.py(), mcParticle.pz(), mcParticle.e()); lResonanceGen1 = daughter1 + daughter2; mother2 = ROOT::Math::PxPyPzMVector(lResonanceGen1.Px(), lResonanceGen1.Py(), lResonanceGen1.Pz(), lResonanceGen1.M()); mother3 = ROOT::Math::PxPyPzMVector(lResonanceGen.Px(), lResonanceGen.Py(), lResonanceGen.Pz(), lResonanceGen.M()); @@ -2038,7 +2038,7 @@ struct HigherMassResonances { motherRot = daughterRot + daughter2; // double pTcorrRot = std::abs(daughterRot.Pt() + daughter2.Pt()) / motherRot.Pt(); double pTcorrRot = (motherRot.Pt() - daughterRot.Pt() != 0.) ? daughterRot.Pt() / (motherRot.Pt() - daughterRot.Pt()) : 0.; - if (motherRot.Rapidity() < config.rapidityMotherData) + if (std::abs(motherRot.Rapidity()) < config.rapidityMotherData) hglue.fill(HIST("h3glueInvMassRot"), multiplicity, motherRot.Pt(), motherRot.M(), deltaMass, deltaRvalue, pTcorrRot); } } From d85dd912e9c6e040fcffe808d7191958402a1c90 Mon Sep 17 00:00:00 2001 From: sawan <124118453+sawankumawat@users.noreply.github.com> Date: Tue, 4 Aug 2026 23:01:38 +0530 Subject: [PATCH 2/2] Fix segmentation fault by moving O2DatabasePDG service out of ConfigurableGroup Fix segmentation fault by moving O2DatabasePDG service out of ConfigurableGroup --- PWGLF/Tasks/Resonances/higherMassResonances.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/Resonances/higherMassResonances.cxx b/PWGLF/Tasks/Resonances/higherMassResonances.cxx index d9d4d72f9fb..e2208bea15a 100644 --- a/PWGLF/Tasks/Resonances/higherMassResonances.cxx +++ b/PWGLF/Tasks/Resonances/higherMassResonances.cxx @@ -212,10 +212,10 @@ struct HigherMassResonances { int refAId = 0; int refBId = 0; float minQvecAmp = 1e-5; - Service pdgDB{}; } config; // Service PDGdatabase; + Service pdgDB{}; TRandom* rn = new TRandom(); // variables declaration @@ -1519,7 +1519,7 @@ struct HigherMassResonances { bool isINELgt0true = false; - if (pwglf::isINELgtNmc(mcParticles, 0, config.pdgDB)) { + if (pwglf::isINELgtNmc(mcParticles, 0, pdgDB)) { isINELgt0true = true; } if (config.isINELgt0 && !isINELgt0true) { @@ -1679,7 +1679,7 @@ struct HigherMassResonances { bool isINELgt0true = false; - if (pwglf::isINELgtNmc(mcParticles, 0, config.pdgDB)) { + if (pwglf::isINELgtNmc(mcParticles, 0, pdgDB)) { isINELgt0true = true; } if (config.isINELgt0 && !isINELgt0true) {