File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments