Skip to content

Commit 66a737d

Browse files
authored
Updated rapidity check and fixed PxPyPz Vector
1 parent e3eb95f commit 66a737d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

PWGLF/Tasks/Resonances/higherMassResonances.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ struct HigherMassResonances {
957957
motherRot = daughterRot + daughterVec2;
958958

959959
auto prrot = getCosThetaPhi(motherRot, daughterRot, kHelicity);
960-
if (motherRot.Rapidity() < config.rapidityMotherData)
960+
if (std::abs(motherRot.Rapidity()) < config.rapidityMotherData)
961961
hglue.fill(HIST("h3glueInvMassRot"), eventMultiplicity, motherRot.Pt(), motherRot.M(), prrot.first, prrot.second);
962962
}
963963
} else {
@@ -981,7 +981,7 @@ struct HigherMassResonances {
981981

982982
auto prrot = getCosThetaPhi(motherRot, daughterRot, kCollinsSoper);
983983

984-
if (motherRot.Rapidity() < config.rapidityMotherData)
984+
if (std::abs(motherRot.Rapidity()) < config.rapidityMotherData)
985985
hglue.fill(HIST("h3glueInvMassRot"), eventMultiplicity, motherRot.Pt(), motherRot.M(), prrot.first, prrot.second);
986986
}
987987
} else {
@@ -1202,7 +1202,7 @@ struct HigherMassResonances {
12021202
// double pTcorrRot = std::abs(daughterRot.Pt() + daughter2.Pt()) / motherRot.Pt();
12031203
double pTcorrRot = (motherRot.Pt() - daughterRot.Pt() != 0.) ? daughterRot.Pt() / (motherRot.Pt() - daughterRot.Pt()) : 0.;
12041204

1205-
if (motherRot.Rapidity() < config.rapidityMotherData)
1205+
if (std::abs(motherRot.Rapidity()) < config.rapidityMotherData)
12061206
hglue.fill(HIST("h3glueInvMassRot"), multiplicity, motherRot.Pt(), motherRot.M(), deltaMass, deltaRvalue, pTcorrRot);
12071207
}
12081208
}
@@ -1366,7 +1366,7 @@ struct HigherMassResonances {
13661366

13671367
motherRot = daughterRot + daughter2;
13681368

1369-
if (motherRot.Rapidity() < config.rapidityMotherData) {
1369+
if (std::abs(motherRot.Rapidity()) < config.rapidityMotherData) {
13701370
hglue.fill(HIST("h3glueInvMassEPRot"), multiplicity, motherRot.Pt(), motherRot.M(), RecoDecay::constrainAngle(2.0 * motherRot.Phi() - 2.0 * eps[0]));
13711371
}
13721372
}
@@ -1599,7 +1599,7 @@ struct HigherMassResonances {
15991599
}
16001600
}
16011601
if (static_cast<int>(passKs.size()) == config.noOfDaughters) {
1602-
lResonanceGen = ROOT::Math::PxPyPzEVector(mcParticle.pt(), mcParticle.eta(), mcParticle.phi(), mcParticle.e());
1602+
lResonanceGen = ROOT::Math::PxPyPzEVector(mcParticle.px(), mcParticle.py(), mcParticle.pz(), mcParticle.e());
16031603
lResonanceGen1 = daughter1 + daughter2;
16041604
mother2 = ROOT::Math::PxPyPzMVector(lResonanceGen1.Px(), lResonanceGen1.Py(), lResonanceGen1.Pz(), lResonanceGen1.M());
16051605
mother3 = ROOT::Math::PxPyPzMVector(lResonanceGen.Px(), lResonanceGen.Py(), lResonanceGen.Pz(), lResonanceGen.M());
@@ -2038,7 +2038,7 @@ struct HigherMassResonances {
20382038
motherRot = daughterRot + daughter2;
20392039
// double pTcorrRot = std::abs(daughterRot.Pt() + daughter2.Pt()) / motherRot.Pt();
20402040
double pTcorrRot = (motherRot.Pt() - daughterRot.Pt() != 0.) ? daughterRot.Pt() / (motherRot.Pt() - daughterRot.Pt()) : 0.;
2041-
if (motherRot.Rapidity() < config.rapidityMotherData)
2041+
if (std::abs(motherRot.Rapidity()) < config.rapidityMotherData)
20422042
hglue.fill(HIST("h3glueInvMassRot"), multiplicity, motherRot.Pt(), motherRot.M(), deltaMass, deltaRvalue, pTcorrRot);
20432043
}
20442044
}

0 commit comments

Comments
 (0)