56 : params(opticalParameters)
59 G4bool toBeBroadcasted =
false;
60 fDir =
new G4UIdirectory(
"/process/optical/", toBeBroadcasted);
62 "Commands related to the optical physics simulation engine.");
65 new G4UIdirectory(
"/process/optical/cerenkov/", toBeBroadcasted);
66 fCerenkovDir->
SetGuidance(
"Cerenkov process commands");
68 new G4UIdirectory(
"/process/optical/scintillation/", toBeBroadcasted);
69 fScintDir->
SetGuidance(
"Scintillation process commands");
70 fWlsDir =
new G4UIdirectory(
"/process/optical/wls/", toBeBroadcasted);
71 fWlsDir->
SetGuidance(
"Wave length shifting process commands");
72 fWls2Dir =
new G4UIdirectory(
"/process/optical/wls2/", toBeBroadcasted);
73 fWls2Dir->
SetGuidance(
"Second Wave length shifting process commands");
75 new G4UIdirectory(
"/process/optical/boundary/", toBeBroadcasted);
76 fBoundaryDir->
SetGuidance(
"Boundary scattering commands");
77 fMieDir =
new G4UIdirectory(
"/process/optical/mie/", toBeBroadcasted);
78 fMieDir->
SetGuidance(
"Mie scattering process commands");
79 fAbsDir =
new G4UIdirectory(
"/process/optical/absorption/", toBeBroadcasted);
80 fAbsDir->
SetGuidance(
"absorption process commands");
81 fRaylDir =
new G4UIdirectory(
"/process/optical/rayleigh/", toBeBroadcasted);
82 fRaylDir->
SetGuidance(
"Rayleigh scattering commands");
86 new G4UIcommand(
"/process/optical/processActivation",
this);
88 "Activate/deactivate the specified optical process");
96 par->SetParameterCandidates(candidates);
97 par->SetGuidance(
"the process name");
100 par->SetDefaultValue(
true);
101 par->SetGuidance(
"activation flag");
106 fVerboseCmd->
SetGuidance(
"Set default verbose level for optical processes");
112 fDumpCmd =
new G4UIcommand(
"/process/optical/printParameters",
this);
113 fDumpCmd->
SetGuidance(
"Print all optical parameters.");
116 fCerenkovMaxPhotonsCmd =
118 fCerenkovMaxPhotonsCmd->
SetGuidance(
"Set maximum number of photons per step");
120 fCerenkovMaxPhotonsCmd->
SetRange(
"CerenkovMaxPhotons>=0");
123 fCerenkovMaxBetaChangeCmd =
126 "Set maximum change of beta of parent particle per step (in percent)");
127 fCerenkovMaxBetaChangeCmd->
SetParameterName(
"CerenkovMaxBetaChange",
false);
128 fCerenkovMaxBetaChangeCmd->
SetRange(
"CerenkovMaxBetaChange>=0");
131 fCerenkovStackPhotonsCmd =
134 "Set whether or not to stack secondary Cerenkov photons");
138 "/process/optical/cerenkov/setTrackSecondariesFirst",
this);
140 "Whether to track secondary Cerenkov photons before the primary.");
144 fCerenkovVerboseLevelCmd =
146 fCerenkovVerboseLevelCmd->
SetGuidance(
"Verbose level for Cerenkov process.");
148 fCerenkovVerboseLevelCmd->
SetRange(
"verbose >= 0 && verbose <= 2");
154 "/process/optical/scintillation/setByParticleType",
this);
156 "Activate/Inactivate scintillation process by particle type");
158 "ScintillationByParticleTypeActivation",
false);
164 "Activate/Inactivate scintillation TrackInformation");
169 "/process/optical/scintillation/setFiniteRiseTime",
this);
171 "Set option of a finite rise-time for G4Scintillation");
173 "If set, the G4Scintillation process expects the user to have set the");
175 "constant material property SCINTILLATIONRISETIME{1,2,3}");
180 "/process/optical/scintillation/setStackPhotons",
this);
182 "Set whether or not to stack secondary Scintillation photons");
188 "/process/optical/scintillation/setTrackSecondariesFirst",
this);
190 "Whether to track scintillation secondaries before primary.");
194 fScintVerboseLevelCmd =
197 "Verbose level for scintillation process.");
199 fScintVerboseLevelCmd->
SetRange(
"verbose >= 0 && verbose <= 2");
206 "Set the WLS time profile (delta or exponential)");
211 fWLSVerboseLevelCmd =
213 fWLSVerboseLevelCmd->
SetGuidance(
"Verbose level for WLS process.");
215 fWLSVerboseLevelCmd->
SetRange(
"verbose >= 0 && verbose <= 2");
220 fWLS2TimeProfileCmd =
223 "Set the WLS2 time profile (delta or exponential)");
228 fWLS2VerboseLevelCmd =
230 fWLS2VerboseLevelCmd->
SetGuidance(
"Verbose level for WLS2 process.");
232 fWLS2VerboseLevelCmd->
SetRange(
"verbose >= 0 && verbose <= 2");
237 fBoundaryInvokeSDCmd =
240 "Set option for calling InvokeSD in G4OpBoundaryProcess");
244 fBoundaryVerboseLevelCmd =
246 fBoundaryVerboseLevelCmd->
SetGuidance(
"Verbose level for boundary process.");
248 fBoundaryVerboseLevelCmd->
SetRange(
"verbose >= 0 && verbose <= 2");
253 fAbsorptionVerboseLevelCmd =
256 "Verbose level for absorption process.");
258 fAbsorptionVerboseLevelCmd->
SetRange(
"verbose >= 0 && verbose <= 2");
263 fRayleighVerboseLevelCmd =
265 fRayleighVerboseLevelCmd->
SetGuidance(
"Verbose level for Rayleigh process.");
267 fRayleighVerboseLevelCmd->
SetRange(
"verbose >= 0 && verbose <= 2");
272 fMieVerboseLevelCmd =
274 fMieVerboseLevelCmd->
SetGuidance(
"Verbose level for Mie process.");
276 fMieVerboseLevelCmd->
SetRange(
"verbose >= 0 && verbose <= 2");
291 delete fActivateProcessCmd;
294 delete fCerenkovMaxPhotonsCmd;
295 delete fCerenkovMaxBetaChangeCmd;
296 delete fCerenkovStackPhotonsCmd;
297 delete fCerenkovTrackSecondariesFirstCmd;
298 delete fCerenkovVerboseLevelCmd;
299 delete fScintByParticleTypeCmd;
300 delete fScintTrackInfoCmd;
301 delete fScintStackPhotonsCmd;
302 delete fScintVerboseLevelCmd;
303 delete fScintFiniteRiseTimeCmd;
304 delete fScintTrackSecondariesFirstCmd;
305 delete fWLSTimeProfileCmd;
306 delete fWLSVerboseLevelCmd;
307 delete fWLS2TimeProfileCmd;
308 delete fWLS2VerboseLevelCmd;
309 delete fAbsorptionVerboseLevelCmd;
310 delete fRayleighVerboseLevelCmd;
311 delete fMieVerboseLevelCmd;
312 delete fBoundaryVerboseLevelCmd;
313 delete fBoundaryInvokeSDCmd;
320 G4bool physicsModified =
true;
323 if(command == fActivateProcessCmd)
325 std::istringstream is(newValue.data());
332 else if(command == fVerboseCmd)
336 else if(command == fDumpCmd)
340 else if(command == fCerenkovMaxPhotonsCmd)
347 else if(command == fCerenkovMaxBetaChangeCmd)
352 else if(command == fCerenkovStackPhotonsCmd)
357 else if(command == fCerenkovTrackSecondariesFirstCmd)
362 else if(command == fCerenkovVerboseLevelCmd)
367 else if(command == fScintByParticleTypeCmd)
372 else if(command == fScintTrackInfoCmd)
376 else if(command == fScintFiniteRiseTimeCmd)
381 else if(command == fScintStackPhotonsCmd)
386 else if(command == fScintTrackSecondariesFirstCmd)
391 else if(command == fScintVerboseLevelCmd)
396 else if(command == fWLSTimeProfileCmd)
400 else if(command == fWLSVerboseLevelCmd)
404 else if(command == fWLS2TimeProfileCmd)
408 else if(command == fWLS2VerboseLevelCmd)
412 else if(command == fAbsorptionVerboseLevelCmd)
417 else if(command == fRayleighVerboseLevelCmd)
422 else if(command == fMieVerboseLevelCmd)
426 else if(command == fBoundaryVerboseLevelCmd)
431 else if(command == fBoundaryInvokeSDCmd)