Message: How to turn off scintillation and Cerenkov? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question How to turn off scintillation and Cerenkov? 

Forum: Processes Involving Optical Photons
Date: 28 Jul, 2009
From: Kareem Kazkaz <Kareem Kazkaz>

Hello everyone.

I am trying to turn the Scintillation and Cerenkov processes off via messengers, so that I do not have to recompile my simulation. The physics list itself uses both Scintillation and Cerenkov processes. I use the following bit of code:

// Turn the optical processes on or off
G4cout << "useOpticalProcesses = " << useOpticalProcesses << G4endl;
if( useOpticalProcesses ) {
    UI->ApplyCommand( "/process/activate Scintillation" );
    UI->ApplyCommand( "/process/activate Cerenkov" );
} else {
    UI->ApplyCommand( "/process/inactivate Scintillation" );
    UI->ApplyCommand( "/process/inactivate Cerenkov" );
}
// Finally, run the beamOn command
stringstream command;
command << "/run/beamOn " << numEvents;
UI->ApplyCommand( command.str() );

When I run this simulation, if useOpticalProcesses is set to false, I get the error message "G4ProcessTable::Insert : arguments are 0 pointer" repeated many, many times. The simulation then quits in a bus error.

I have tried commenting out this code and entering the "/process/inactivate" lines by hand, with the same result. Any ideas what might be causing GEANT4 to crash like this?

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

1 Feedback: Re: How to turn off scintillation and Cerenkov?   (Gumplinger Peter - 28 Jul, 2009)
(_ None: Re: How to turn off scintillation and Cerenkov?   (Kareem Kazkaz - 29 Jul, 2009)
(_ None: Re: How to turn off scintillation and Cerenkov?   (Kareem Kazkaz - 29 Jul, 2009)
 Add Message Add Message
to: "How to turn off scintillation and Cerenkov?"

 Subscribe Subscribe

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