Skip to content

Commit c709410

Browse files
authored
[PWGLF] Selection of phi decay channel in GenMC for closure test (#9551)
1 parent db83606 commit c709410

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

PWGLF/Tasks/Strangeness/phik0shortanalysis.cxx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ struct Phik0shortanalysis {
141141
// Configurable for RecMC
142142
Configurable<bool> cfgiskNoITSROFrameBorder{"cfgiskNoITSROFrameBorder", false, "kNoITSROFrameBorder request on RecMC collisions"};
143143

144+
// Configurable for MC closure
145+
Configurable<bool> cfgisGenMCForClosure{"cfgisGenMCForClosure", false, "isGenMCForClosure"};
146+
144147
// Constants
145148
double massKa = o2::constants::physics::MassKPlus;
146149
double massPi = o2::constants::physics::MassPiPlus;
@@ -1657,6 +1660,20 @@ struct Phik0shortanalysis {
16571660
for (const auto& mcParticle2 : mcParticles) {
16581661
if (mcParticle2.pdgCode() != 333)
16591662
continue;
1663+
if (cfgisGenMCForClosure) {
1664+
auto kDaughters = mcParticle2.daughters_as<aod::McParticles>();
1665+
if (kDaughters.size() != 2)
1666+
continue;
1667+
bool isPosKaon = false, isNegKaon = false;
1668+
for (const auto& kDaughter : kDaughters) {
1669+
if (kDaughter.pdgCode() == 321)
1670+
isPosKaon = true;
1671+
if (kDaughter.pdgCode() == -321)
1672+
isNegKaon = true;
1673+
}
1674+
if (!isPosKaon || !isNegKaon)
1675+
continue;
1676+
}
16601677

16611678
if (std::abs(mcParticle2.y()) > cfgYAcceptance)
16621679
continue;
@@ -1723,6 +1740,20 @@ struct Phik0shortanalysis {
17231740
for (const auto& mcParticle2 : mcParticles) {
17241741
if (mcParticle2.pdgCode() != 333)
17251742
continue;
1743+
if (cfgisGenMCForClosure) {
1744+
auto kDaughters = mcParticle2.daughters_as<aod::McParticles>();
1745+
if (kDaughters.size() != 2)
1746+
continue;
1747+
bool isPosKaon = false, isNegKaon = false;
1748+
for (const auto& kDaughter : kDaughters) {
1749+
if (kDaughter.pdgCode() == 321)
1750+
isPosKaon = true;
1751+
if (kDaughter.pdgCode() == -321)
1752+
isNegKaon = true;
1753+
}
1754+
if (!isPosKaon || !isNegKaon)
1755+
continue;
1756+
}
17261757

17271758
if (std::abs(mcParticle2.y()) > cfgYAcceptance)
17281759
continue;

0 commit comments

Comments
 (0)