From 5699245dd262d0e40acea9e73ae6fa6da0b62d62 Mon Sep 17 00:00:00 2001 From: Jan Kieseler Date: Mon, 9 Oct 2023 12:04:04 +0200 Subject: [PATCH] another fix --- src/PrimaryGeneratorAction.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PrimaryGeneratorAction.cc b/src/PrimaryGeneratorAction.cc index aacec9b..6e0b420 100644 --- a/src/PrimaryGeneratorAction.cc +++ b/src/PrimaryGeneratorAction.cc @@ -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;