Skip to content

Commit 7be1cfd

Browse files
authored
Skip Chi0c and Chi1c transport by default for EPOS4 (#2078)
1 parent c02c68f commit 7be1cfd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

MC/config/examples/epos4/generator_EPOS4.C

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ class GeneratorEPOS4 : public o2::eventgen::GeneratorHepMC
1515
LOG(error) << "Failed to import particles from HepMC event!";
1616
return false;
1717
}
18-
// Remove charmonia chi_0c and chi_1c from the particles list (incompatible with default G4 physics list)
18+
// Skip transport of charmonia chi_0c and chi_1c (incompatible with default G4 physics list)
1919
// These are not decayed by EPOS4 (no daughters)
2020
if (!mEnChi)
2121
{
2222
for (int a = 0; a < mParticles.size(); ++a) {
2323
if (mParticles[a].GetPdgCode() == 10441 || mParticles[a].GetPdgCode() == 20443)
2424
{
25-
LOG(debug) << "Removing charmonium state " << mParticles[a].GetPdgCode() << " from particles list";
26-
mParticles.erase(mParticles.begin() + a);
27-
--a; // Adjust index after erasing
25+
LOG(debug) << "Setting charmonium state " << mParticles[a].GetPdgCode() << " with index " << a << " not to be transported";
26+
mParticles[a].SetBit(ParticleStatus::kToBeDone, false);
2827
}
2928
}
3029
}
@@ -34,7 +33,7 @@ class GeneratorEPOS4 : public o2::eventgen::GeneratorHepMC
3433
void setChiFlag(bool &flag) {
3534
mEnChi = flag;
3635
if (!flag) {
37-
LOG(info) << "Charmonium states chi_0c and chi_1c will be removed from the particles list";
36+
LOG(info) << "Charmonium states chi_0c and chi_1c will not be transported.";
3837
}
3938
}
4039

0 commit comments

Comments
 (0)