another fix

This commit is contained in:
Jan Kieseler
2023-10-09 12:04:04 +02:00
parent 9cd1a93ced
commit 5699245dd2
+1 -1
View File
@@ -79,7 +79,7 @@ void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
// This function is called at the begining of event
G4double rand = 0;
while(rand > 1 || rand < 0)
while(rand > 1 || rand <= 0)
rand = G4INCL::Random::shoot();
partEnergy = rand*(maxPartEnergy-minPartEnergy)+minPartEnergy;