Simulation freezes when index of refraction of World air material is set to its proper value

Hello GEANT4 users,
I’ve created a simple MC containing a plexiglass tank filled with water in an air world volume. I have an monoenergetic beam of 6MeV photon incident on the water tank. I am interested in simulating the Cherenkov spectrum generated under these conditions but I’ve noticed some strange behavior. If I set the index of refraction of the air (world) volume to it’s proper value of 1.00029, the simulation just hangs or freezes when an optical photon event occurs.

I have gotten it to run by setting the index of refraction of air to 1.09 but this is clearly the wrong value for air and I’m concerned it will adversely affect the results of my simulation. Has anyone noticed such behavior? I suspect it has to do with my energy cut specifications but I am sort of a newbie. Another thought is that I have to somehow explicitly define the properties of my plexiglass/air interface.

I will include the salient snippets of my code below. Any suggestions or help would be greatly appreciated.
Thanks,
Joe

image

Optical material properties need to be specified in order of increasing energy. In future Geant4 versions not doing so will give an error.

I have to ask though… Specifying the energy values as you do:
1.23… *eV /0.2, 1.23…*eV / 0.9
is highly unusual (to me at least). Several users who have asked this question, though, specify the energy values this way. Why do you do so? What code are you using?

Hi Daren,
Thanks so much for your response. I found the energy specified that way on a post on the G4 forum (although at this point I don’t remember which one). What is the preferred (correct) way to do it? I know you said it’s supposed to be in order of increasing energy but an example would be very helpful.
Cheers,
Joe

Hi Joe, have a look at the examples included in Geant4. From the source directory, go to examples/extended/optical. Start with OpNovice.

Thanks I’ll have a look.
Cheers,
Joe

Hi Daren,
Thanks for the suggestions. The changes seem to work swimmingly and I managed to learn a lot from the optical example as well. Here is a snippet of the updated code for future reference so other people can see the correct way to implement this.
I just have a few follow-up questions/statements if you don’t mind.

(1) The Energy/index of refraction arrays have to be the same dimensionality correct? They are basically specifying a dispersion relation for that particular material if I am understanding this correctly.
(2) I excluded the Mie scattering and boundary properties of the detector interfaces. I guess the only drawback is that the simulation isn’t as realistic? I also excluded any scintillation properties of my detector setup since I’m primarily interested in Cerenkov.

Thanks again for all your help.
Joe



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.