Message: Infinite loop while generating Cerenkov photons Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Infinite loop while generating Cerenkov photons 

Forum: Processes Involving Optical Photons
Date: 26 Sep, 2017
From: Emanuele Leonardi <Emanuele Leonardi>

Starting from the OpNovice example I am trying to simulate the optical properties of a PbF2 crystal.

I defined the RINDEX and ABSLENGTH properties of the PbF2 material in the 1.6-5 eV energy range and then used the standard gun to send a 100MeV photon on the front end of a 30x30x140 mm3 crystal.

In several occasions the simulation enters an infinite loop while generating Cerenkov photons.

According to gdb, the location where this happens is inside the code:

(gdb) backtrace

#0  CLHEP::RanecuEngine::flat() () at /mnt/build/jenkins/workspace/g4-clhep-2/COMPILER/gcc49/label/slc6/
#1  0x00007ffff2f4bb7f in G4Cerenkov::PostStepDoIt(G4Track const&, G4Step const&) () at /afs/
#2  0x00007ffff49492d9 in G4SteppingManager::InvokePSDIP(unsigned long) () at /afs/
#3  0x00007ffff494975b in G4SteppingManager::InvokePostStepDoItProcs() () at /afs/

Looking at the code, this corresponds to the lines:

      // Generate new G4Track object:

      G4double NumberOfPhotons, N;

      do {
         rand = G4UniformRand();
         NumberOfPhotons = MeanNumberOfPhotons1 - rand *
         N = G4UniformRand() *
        // Loop checking, 07-Aug-2015, Vladimir Ivanchenko
      } while (N > NumberOfPhotons);

Is there something wrong in the way I set up the simulation?

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Infinite loop while generating Cerenkov photons   (Daren Sawkey - 27 Sep, 2017)
1 Ok: Re: Infinite loop while generating Cerenkov photons   (Emanuele Leonardi - 28 Sep, 2017)
2 None: Re: Infinite loop while generating Cerenkov photons   (Porosev Viacheslav - 06 Oct, 2017)
 Add Message Add Message
to: "Infinite loop while generating Cerenkov photons"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews