Skip to content

Commit 1613545

Browse files
authored
Ignore nuclei isospin only if equal to 9.
1 parent e358016 commit 1613545

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Generators/src/GeneratorPythia8.cxx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -654,14 +654,12 @@ Bool_t
654654
// first particle is system
655655
auto particle = event[iparticle];
656656
auto pdg = particle.id();
657-
#if PYTHIA_VERSION_INTEGER >= 8313
658657
// Select nuclei (A PDG id code for nuclei is on the form 100ZZZAAAI)
659658
if (std::abs(pdg) > 1000000000) {
660-
// Ignore isospin
661-
pdg /= 10;
662-
pdg *= 10;
659+
// Ignore isospin if equal to 9
660+
auto pdgNoI = (pdg/10)*10;
661+
if (std::abs(pdg-pdgNoI) == 9) pdg=pdgNoI;
663662
}
664-
#endif
665663
auto st = o2::mcgenstatus::MCGenStatusEncoding(particle.statusHepMC(), //
666664
particle.status()) //
667665
.fullEncoding;

0 commit comments

Comments
 (0)