File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -654,10 +654,16 @@ Bool_t
654654 // first particle is system
655655 auto particle = event[iparticle];
656656 auto pdg = particle.id ();
657+ // Select nuclei (A PDG id code for nuclei is on the form 100ZZZAAAI)
658+ if (std::abs (pdg) > 1000000000 ) {
659+ // Ignore isospin
660+ pdg /= 10 ;
661+ pdg *= 10 ;
662+ }
657663 auto st = o2::mcgenstatus::MCGenStatusEncoding (particle.statusHepMC (), //
658664 particle.status ()) //
659665 .fullEncoding ;
660- mParticles .push_back (TParticle (particle. id () , // Particle type
666+ mParticles .push_back (TParticle (pdg , // Particle type
661667 st, // status
662668 particle.mother1 () - 1 , // first mother
663669 particle.mother2 () - 1 , // second mother
@@ -776,7 +782,11 @@ void GeneratorPythia8::updateHeader(o2::dataformats::MCEventHeader* eventHeader)
776782 hiinfo->nAbsProj () + hiinfo->nDiffProj ());
777783 eventHeader->putInfo <int >(Key::nPartTarget,
778784 hiinfo->nAbsTarg () + hiinfo->nDiffTarg ());
785+ #if PYTHIA_VERSION_INTEGER >= 8313
786+ eventHeader->putInfo <int >(Key::nCollHard, hiinfo->nCollND ());
787+ #else
779788 eventHeader->putInfo <int >(Key::nCollHard, hiinfo->nCollNDTot ());
789+ #endif
780790 }
781791}
782792
You can’t perform that action at this time.
0 commit comments