Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions PWGLF/Tasks/Strangeness/phik0shortanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ struct Phik0shortanalysis {
// Configurable for RecMC
Configurable<bool> cfgiskNoITSROFrameBorder{"cfgiskNoITSROFrameBorder", false, "kNoITSROFrameBorder request on RecMC collisions"};

// Configurable for MC closure
Configurable<bool> cfgisGenMCForClosure{"cfgisGenMCForClosure", false, "isGenMCForClosure"};

// Constants
double massKa = o2::constants::physics::MassKPlus;
double massPi = o2::constants::physics::MassPiPlus;
Expand Down Expand Up @@ -1657,6 +1660,20 @@ struct Phik0shortanalysis {
for (const auto& mcParticle2 : mcParticles) {
if (mcParticle2.pdgCode() != 333)
continue;
if (cfgisGenMCForClosure) {
auto kDaughters = mcParticle2.daughters_as<aod::McParticles>();
if (kDaughters.size() != 2)
continue;
bool isPosKaon = false, isNegKaon = false;
for (const auto& kDaughter : kDaughters) {
if (kDaughter.pdgCode() == 321)
isPosKaon = true;
if (kDaughter.pdgCode() == -321)
isNegKaon = true;
}
if (!isPosKaon || !isNegKaon)
continue;
}

if (std::abs(mcParticle2.y()) > cfgYAcceptance)
continue;
Expand Down Expand Up @@ -1723,6 +1740,20 @@ struct Phik0shortanalysis {
for (const auto& mcParticle2 : mcParticles) {
if (mcParticle2.pdgCode() != 333)
continue;
if (cfgisGenMCForClosure) {
auto kDaughters = mcParticle2.daughters_as<aod::McParticles>();
if (kDaughters.size() != 2)
continue;
bool isPosKaon = false, isNegKaon = false;
for (const auto& kDaughter : kDaughters) {
if (kDaughter.pdgCode() == 321)
isPosKaon = true;
if (kDaughter.pdgCode() == -321)
isNegKaon = true;
}
if (!isPosKaon || !isNegKaon)
continue;
}

if (std::abs(mcParticle2.y()) > cfgYAcceptance)
continue;
Expand Down
Loading