Calling the following commands in PreInit fails: /process/optical/processActivation Scintillation false /process/optical/setTrackSecondariesFirst Cerenkov false The command sets the same value, whether it is called with true or false, this value depends on the platform (we have plaforms where we get systematically true and others with false). The problem is in G4OpticalPhysicsMessenger::SetNewValue where the false|true string is passed to G4int and then G4bool: std::istringstream is(newValue.data()); G4String pn; G4int flag; is >> pn >> flag; The code should be: G4String pn; G4String flag; is >> pn >> flag; ... G4bool value = G4UIcommand::ConvertToBool(flag); fOpticalPhysics->SetTrackSecondariesFirst(fSelectedProcessIndex,value); Also with the changes in this class in 10.01, it is not anymore possible to set the verbose level to optical processes in PreInit phase. As the verbose level of the G4OpticalPhysics builder is passed to built optical processes, we have no way to configure this builder in PreInit phase in such a way to get called PrintStatistics() without activating verbosity of the processes as well. Could be either setting of verbosity level to processing in PreInit phase restored, or PrintStatistics() made public so that it can be called from the user code?
I have made the changes suggested by Ivana in G4OpticalPhysicsMessenger::SetNewValue They are included with tag pays-ctor-em-V10-02-02 from Feb, 26, 2016
When checking the fix, I realised that the verbose level of the G4OpticalPhysics builder is not propagated to built optical processes, and so we can set a higher builder verbose level to the builder to get printing the selected parameters (calling PrintStatistics()) without getting the debug information from the processes. So restoring the commands for setting the verbosity level to processing in PreInit phase is not needed. Thank you.