Skip to content

Commit e4fe95b

Browse files
committed
Preparation for Pythia8314
1 parent 5b5f1d9 commit e4fe95b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Generators/src/GeneratorPythia8.cxx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)