This commit is contained in:
Jan Kieseler
2023-10-09 12:27:54 +02:00
parent 5699245dd2
commit 1f208212a6
+2
View File
@@ -83,6 +83,8 @@ void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
rand = G4INCL::Random::shoot();
partEnergy = rand*(maxPartEnergy-minPartEnergy)+minPartEnergy;
G4cout << "shooting with " << partEnergy << " GeV" << G4endl;
auto particleDefinition
= G4ParticleTable::GetParticleTable()->FindParticle(partSpecies);
if(particleDefinition == nullptr){