Skip to content

Commit f07cf36

Browse files
authored
[PWGLF] Modified pt-correlation cut (#14556)
1 parent f3d6d5c commit f07cf36

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

PWGLF/Tasks/Resonances/higherMassResonances.cxx

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ struct HigherMassResonances {
408408

409409
hMChists.add("MCcorrections/hGenNo", "Generated collisions before and after event selection", kTH1F, {{5, 0.0f, 5.0f}});
410410
hMChists.add("MCcorrections/hSignalLossDenominator3", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
411+
hMChists.add("MCcorrections/hSignalLossDenominator4", "Kstar generated before event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
411412
hMChists.add("MCcorrections/hSignalLossNumerator3", "Kstar generated after event selection", kTH2F, {{ptAxis}, {multiplicityAxis}});
412413
hMChists.add("MCcorrections/hMultvsCent", "Kstar generated after event selection", kTH2F, {{multiplicityAxis}, {multiplicityAxis}});
413414
}
@@ -1134,7 +1135,8 @@ struct HigherMassResonances {
11341135

11351136
motherRot = daughterRot + daughter2;
11361137

1137-
double pTcorrRot = std::abs(daughterRot.Pt() + daughter2.Pt()) / motherRot.Pt();
1138+
// double pTcorrRot = std::abs(daughterRot.Pt() + daughter2.Pt()) / motherRot.Pt();
1139+
double pTcorrRot = (motherRot.Pt() - daughterRot.Pt() != 0.) ? daughterRot.Pt() / (motherRot.Pt() - daughterRot.Pt()) : 0.;
11381140

11391141
if (motherRot.Rapidity() < config.rapidityMotherData)
11401142
hglue.fill(HIST("h3glueInvMassRot"), multiplicity, motherRot.Pt(), motherRot.M(), deltaMass, deltaRvalue, pTcorrRot);
@@ -1255,7 +1257,8 @@ struct HigherMassResonances {
12551257
if (config.qAOptimisation) {
12561258
double deltaRvalue = std::sqrt(TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) * TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) + (daughter1.eta() - daughter2.eta()) * (daughter1.eta() - daughter2.eta()));
12571259
const double deltaMass = deltaM(t1.mK0Short(), t2.mK0Short());
1258-
const double ptCorr = std::abs(daughter1.Pt() + daughter2.Pt()) / mother.Pt();
1260+
// const double ptCorr = std::abs(daughter1.Pt() + daughter2.Pt()) / mother.Pt();
1261+
const double ptCorr = (mother.Pt() - daughter1.Pt() != 0.) ? daughter1.Pt() / (mother.Pt() - daughter1.Pt()) : 0.;
12591262
if (std::abs(mother.Rapidity()) < config.rapidityMotherData) {
12601263
hglue.fill(HIST("h3glueInvMassME"), multiplicity, mother.Pt(), mother.M(), deltaMass, deltaRvalue, ptCorr);
12611264
}
@@ -1479,6 +1482,32 @@ struct HigherMassResonances {
14791482
hMChists.fill(HIST("MCcorrections/hSignalLossNumerator2"), mcPart.pt(), multiplicity1);
14801483
hMChists.fill(HIST("MCcorrections/hSignalLossNumerator3"), mcPart.pt(), multMC);
14811484
}
1485+
1486+
auto kDaughters = mcPart.daughters_as<aod::McParticles>();
1487+
if (kDaughters.size() != config.noOfDaughters) {
1488+
continue;
1489+
}
1490+
1491+
for (const auto& kCurrentDaughter : kDaughters) {
1492+
// int daupdg = std::abs(kCurrentDaughter.pdgCode());
1493+
1494+
if (!kCurrentDaughter.isPhysicalPrimary()) {
1495+
continue;
1496+
}
1497+
if (std::abs(kCurrentDaughter.pdgCode()) == PDG_t::kK0Short) {
1498+
passKs.push_back(true);
1499+
if (passKs.size() == 1) {
1500+
daughter1 = ROOT::Math::PxPyPzMVector(kCurrentDaughter.px(), kCurrentDaughter.py(), kCurrentDaughter.pz(), o2::constants::physics::MassK0Short);
1501+
} else if (static_cast<int>(passKs.size()) == config.noOfDaughters) {
1502+
daughter2 = ROOT::Math::PxPyPzMVector(kCurrentDaughter.px(), kCurrentDaughter.py(), kCurrentDaughter.pz(), o2::constants::physics::MassK0Short);
1503+
}
1504+
}
1505+
}
1506+
if (static_cast<int>(passKs.size()) == config.noOfDaughters) {
1507+
lResonanceGen1 = daughter1 + daughter2;
1508+
hMChists.fill(HIST("MCcorrections/hSignalLossDenominator4"), lResonanceGen1.pt(), multiplicity1);
1509+
}
1510+
passKs.clear();
14821511
} // end loop on gen particles
14831512
}
14841513
PROCESS_SWITCH(HigherMassResonances, processEvtLossSigLossMC, "Process Signal Loss, Event Loss", false);
@@ -1772,7 +1801,8 @@ struct HigherMassResonances {
17721801
daughterRot = ROOT::Math::PxPyPzMVector(daughter1.Px() * std::cos(theta2) - daughter1.Py() * std::sin(theta2), daughter1.Px() * std::sin(theta2) + daughter1.Py() * std::cos(theta2), daughter1.Pz(), daughter1.M());
17731802

17741803
motherRot = daughterRot + daughter2;
1775-
double pTcorrRot = std::abs(daughterRot.Pt() + daughter2.Pt()) / motherRot.Pt();
1804+
// double pTcorrRot = std::abs(daughterRot.Pt() + daughter2.Pt()) / motherRot.Pt();
1805+
double pTcorrRot = (motherRot.Pt() - daughterRot.Pt() != 0.) ? daughterRot.Pt() / (motherRot.Pt() - daughterRot.Pt()) : 0.;
17761806
if (motherRot.Rapidity() < config.rapidityMotherData)
17771807
hglue.fill(HIST("h3glueInvMassRot"), multiplicity, motherRot.Pt(), motherRot.M(), deltaMass, deltaRvalue, pTcorrRot);
17781808
}
@@ -1840,7 +1870,8 @@ struct HigherMassResonances {
18401870
if (config.qAOptimisation) {
18411871
double deltaRvalue = std::sqrt(TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) * TVector2::Phi_mpi_pi(daughter1.phi() - daughter2.phi()) + (daughter1.eta() - daughter2.eta()) * (daughter1.eta() - daughter2.eta()));
18421872
const double deltaMass = deltaM(t1.mK0Short(), t2.mK0Short());
1843-
const double ptCorr = std::abs(daughter1.Pt() + daughter2.Pt()) / mother.Pt();
1873+
// const double ptCorr = std::abs(daughter1.Pt() + daughter2.Pt()) / mother.Pt();
1874+
const double ptCorr = (mother.Pt() - daughter1.Pt() != 0.) ? daughter1.Pt() / (mother.Pt() - daughter1.Pt()) : 0.;
18441875
if (std::abs(mother.Rapidity()) < config.rapidityMotherData) {
18451876
hglue.fill(HIST("h3glueInvMassME"), multiplicity, mother.Pt(), mother.M(), deltaMass, deltaRvalue, ptCorr);
18461877
}

0 commit comments

Comments
 (0)