Skip to content

Commit

Permalink
Merge pull request #42968 from sarafiorendi/fix_particle_factory_124X
Browse files Browse the repository at this point in the history
[12_4_X] Fix condition to add anti-particle to G4ParticleTable
  • Loading branch information
cmsbuild authored Oct 9, 2023
2 parents 88ebdac + 97b511c commit 9192746
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SimG4Core/CustomPhysics/src/CustomParticleFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void CustomParticleFactory::getMassTable(std::ifstream *configFile) {
}
if (sign == -1 && pdgId != 25 && pdgId != 35 && pdgId != 36 && pdgId != 37 && pdgId != 1000039) {
tmp = "anti_" + name;
if (nullptr != theParticleTable->FindParticle(-pdgId)) {
if (theParticleTable->FindParticle(-pdgId) == nullptr) {
edm::LogVerbatim("SimG4CoreCustomPhysics")
<< "CustomParticleFactory: Calling addCustomParticle for antiparticle with pdgId: " << -pdgId << ", mass "
<< mass << " GeV, name " << tmp;
Expand Down

0 comments on commit 9192746

Please sign in to comment.