Turning off Optical Photon Processes

Hello folks,

I am a very new user of Geant4 and am learning all of the uses and capabilities of the program. I am currently using version 10.07.00 and am running into trouble trying to turn off Optical Photon Processes. Specifically the absorption process. Even more specifically in the GUI, as this is the only way I was instructed how.

I am trying to observe the Cerenkov photons created, but it appears that the material is absorbing all of the photons. I have tried to increase the absorption length to a much higher value but run into segmentation faults. So, my next idea was to turn off absorption altogether. I will try to attach a few photos regarding my error codes as well as the problem that I am facing. Any insights would be greatly appreciated.

This is the code I am running followed by the error that I am receiving.

/process/optical/processActivation OpAbsorption false
illegal application state – command refused:“/process/optical/processActivation OpAbsorption false”

The processActivation command only works in the PreInit application state. This means it needs to be called before the

/run/initialize

command.

The macros for visualizing the examples, vis.mac, have /run/initialize in them. You can put the processActivation command in vis.mac, before /run/initialize.

As for the segmentation faults, the only thing I’m aware of that may be causing them is that if more optical photons are produced than will fit in memory. I don’t know what absorption length has to do with this though.

It worked! I really appreciate the help. It may have been a silly question but I have virtually no background in coding. I am just trying to figure the software out! I can not figure out why it crashes with high absorption values, but for now, this will do what I need it to.

You can post the relevant parts of DetectorConstruction (where you specify material properties) and I’ll have a look.