ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4OpticalPhysicsMessenger.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4OpticalPhysicsMessenger.cc
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 //----------------------------------------------------------------------------
28 //
29 // ClassName: G4OpticalPhysicsMessenger
30 //
31 // Author: P.Gumplinger 30.09.2009 //
32 //
33 // Modified: P.Gumplinger 29.09.2011
34 // (based on code from I. Hrivnacova)
35 //
36 //----------------------------------------------------------------------------
37 //
38 
40 #include "G4OpticalPhysics.hh"
41 
42 #include "G4UIcommand.hh"
43 #include "G4UIdirectory.hh"
44 
45 #include "G4UIcommand.hh"
46 #include "G4UIdirectory.hh"
47 #include "G4UIcmdWithABool.hh"
48 #include "G4UIcmdWithAString.hh"
49 #include "G4UIcmdWithADouble.hh"
50 #include "G4UIcmdWithAnInteger.hh"
52 #include "G4UIparameter.hh"
53 
54 
55 // Commands with '/defaults/' are duplicates and will be removed in
56 // the next major release of Geant4. Use commands with no /defaults/ instead
57 
58 
59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
60 
62  G4OpticalPhysics* opticalPhysics)
63  : G4UImessenger(),
64  fOpticalPhysics(opticalPhysics),
65  fSelectedProcessIndex(kNoProcess),
66  fActivateProcessCmd(nullptr),
67  fVerboseCmd(nullptr),
68  fTrackSecondariesFirstCmd(nullptr),
69 
70  fCerenkovMaxPhotonsCmd(nullptr),
71  fCerenkovMaxPhotons1Cmd(nullptr),
72  fCerenkovMaxBetaChangeCmd(nullptr),
73  fCerenkovMaxBetaChange1Cmd(nullptr),
74  fCerenkovStackPhotonsCmd(nullptr),
75  fCerenkovStackPhotons1Cmd(nullptr),
76  fCerenkovTrackSecondariesFirstCmd(nullptr),
77  fCerenkovVerbosityCmd(nullptr),
78 
79  fScintYieldFactorCmd(nullptr),
80  fScintYieldFactor1Cmd(nullptr),
81  fScintByParticleTypeCmd(nullptr),
82  fScintByParticleType1Cmd(nullptr),
83  fScintTrackInfoCmd(nullptr),
84  fScintTrackInfo1Cmd(nullptr),
85  fScintStackPhotonsCmd(nullptr),
86  fScintStackPhotons1Cmd(nullptr),
87  fScintTrackSecondariesFirstCmd(nullptr),
88  fScintFiniteRiseTimeCmd(nullptr),
89  fScintFiniteRiseTime1Cmd(nullptr),
90  fScintVerbosityCmd(nullptr),
91 
92  fWLSTimeProfileCmd(nullptr),
93  fWLSTimeProfile1Cmd(nullptr),
94  fWLSVerbosityCmd(nullptr),
95 
96  fBoundaryInvokeSDCmd(nullptr),
97  fBoundaryInvokeSD1Cmd(nullptr),
98  fBoundaryVerbosityCmd(nullptr),
99 
100  fAbsorptionVerbosityCmd(nullptr),
101  fRayleighVerbosityCmd(nullptr),
102  fMieVerbosityCmd(nullptr)
103 
104 {
105  G4bool toBeBroadcasted = false;
106  fDir = new G4UIdirectory("/process/optical/defaults/",toBeBroadcasted);
107  fDir->SetGuidance("DEPRECATED Commands related to the optical physics simulation engine.");
108  fDir2 = new G4UIdirectory("/process/optical/",toBeBroadcasted);
109  fDir2->SetGuidance("Commands related to the optical physics simulation engine.");
110 
111  CreateDirectory("/process/optical/defaults/cerenkov/", "DEPRECATED Cerenkov process commands");
112  CreateDirectory("/process/optical/defaults/scintillation/", "DEPRECATED Scintillation process commands");
113  CreateDirectory("/process/optical/defaults/wls/", "DEPRECATED Wave length shifting process commands");
114  CreateDirectory("/process/optical/defaults/boundary/", "DEPRECATED Boundary scattering commands");
115 
116  CreateDirectory("/process/optical/cerenkov/", "Cerenkov process commands");
117  CreateDirectory("/process/optical/scintillation/", "Scintillation process commands");
118  CreateDirectory("/process/optical/wls/", "Wave length shifting process commands");
119  CreateDirectory("/process/optical/boundary/", "Boundary scattering commands");
120  CreateDirectory("/process/optical/mie/", "Mie scattering process commands");
121  CreateDirectory("/process/optical/absorption/", "absorption process commands");
122  CreateDirectory("/process/optical/rayleigh/", "Rayleigh scattering commands");
123 
124  // general commands
125  fActivateProcessCmd= new G4UIcommand("/process/optical/processActivation", this);
126  fActivateProcessCmd->SetGuidance("Activate/deactivate the specified optical process");
127  G4UIparameter* par = new G4UIparameter("proc_name",'s',false);
128  G4String candidates;
129  for ( G4int i=0; i<kNoProcess; i++ ) {
130  candidates += G4OpticalProcessName(i);
131  candidates += G4String(" ");
132  }
133  par->SetParameterCandidates(candidates);
134  par->SetGuidance("the process name");
136  par = new G4UIparameter("flag",'b',true);
137  par->SetDefaultValue(true);
138  par->SetGuidance("activation flag");
141 
142  fTrackSecondariesFirstCmd = new G4UIcommand("/process/optical/setTrackSecondariesFirst", this);
143  fTrackSecondariesFirstCmd->SetGuidance("Activate/deactivate tracking of secondaries before finishing their parent track");
144  par = new G4UIparameter("proc_name",'s',false);
145  par->SetParameterCandidates(candidates);
147  par = new G4UIparameter("flag",'b',false);
148  par->SetDefaultValue(true);
151 
152  fVerboseCmd = new G4UIcmdWithAnInteger("/process/optical/verbose", this);
153  fVerboseCmd->SetGuidance("Set default verbosity level for optical processes");
154  fVerboseCmd->SetParameterName("ver", true);
156  fVerboseCmd->SetRange("ver>=0");
158 
160  fCerenkovMaxPhotons1Cmd = new G4UIcmdWithAnInteger("/process/optical/defaults/cerenkov/setMaxPhotons", this);
161  fCerenkovMaxPhotons1Cmd->SetGuidance("Set default maximum number of photons per step");
162  fCerenkovMaxPhotons1Cmd->SetGuidance("Note this command is used to set the default value,");
163  fCerenkovMaxPhotons1Cmd->SetGuidance("if process is not active command will not have effect.");
164  fCerenkovMaxPhotons1Cmd->SetGuidance("DEPRECATED: use /process/optical/cerenkov/setMaxPhotons instead.");
165  fCerenkovMaxPhotons1Cmd->SetParameterName("CerenkovMaxPhotons", false);
166  fCerenkovMaxPhotons1Cmd->SetRange("CerenkovMaxPhotons>=0");
168 
169  fCerenkovMaxPhotonsCmd = new G4UIcmdWithAnInteger("/process/optical/cerenkov/setMaxPhotons", this);
170  fCerenkovMaxPhotonsCmd->SetGuidance("Set default maximum number of photons per step");
171  fCerenkovMaxPhotonsCmd->SetGuidance("Note this command is used to set the default value,");
172  fCerenkovMaxPhotonsCmd->SetGuidance("if process is not active command will not have effect.");
173  fCerenkovMaxPhotonsCmd->SetParameterName("CerenkovMaxPhotons", false);
174  fCerenkovMaxPhotonsCmd->SetRange("CerenkovMaxPhotons>=0");
176 
177  fCerenkovMaxBetaChange1Cmd = new G4UIcmdWithADouble("/process/optical/defaults/cerenkov/setMaxBetaChange", this);
178  fCerenkovMaxBetaChange1Cmd->SetGuidance("Set default maximum change of beta of parent particle per step");
179  fCerenkovMaxBetaChange1Cmd->SetGuidance("Note this command is used to set the default value,");
180  fCerenkovMaxBetaChange1Cmd->SetGuidance("if process is not active command will not have effect.");
181  fCerenkovMaxBetaChange1Cmd->SetGuidance("DEPRECATED: use /process/optical/cerenkov/setMaxBetaChange instead.");
182  fCerenkovMaxBetaChange1Cmd->SetParameterName("CerenkovMaxBetaChange", false);
183  fCerenkovMaxBetaChange1Cmd->SetRange("CerenkovMaxBetaChange>=0");
185 
186  fCerenkovMaxBetaChangeCmd = new G4UIcmdWithADouble("/process/optical/cerenkov/setMaxBetaChange", this);
187  fCerenkovMaxBetaChangeCmd->SetGuidance("Set default maximum change of beta of parent particle per step");
188  fCerenkovMaxBetaChangeCmd->SetGuidance("Note this command is used to set the default value,");
189  fCerenkovMaxBetaChangeCmd->SetGuidance("if process is not active command will not have effect.");
190  fCerenkovMaxBetaChangeCmd->SetParameterName("CerenkovMaxBetaChange", false);
191  fCerenkovMaxBetaChangeCmd->SetRange("CerenkovMaxBetaChange>=0");
193 
194  fCerenkovStackPhotons1Cmd = new G4UIcmdWithABool("/process/optical/defaults/cerenkov/setStackPhotons", this);
195  fCerenkovStackPhotons1Cmd->SetGuidance("Set default whether or not to stack secondary Cerenkov photons");
196  fCerenkovStackPhotons1Cmd->SetGuidance("Note this command is used to set the default value,");
197  fCerenkovStackPhotons1Cmd->SetGuidance("if process is not active command will not have effect.");
198  fCerenkovStackPhotons1Cmd->SetGuidance("DEPRECATED: use /process/optical/cerenkov/setStackPhotons instead.");
199  fCerenkovStackPhotons1Cmd->SetParameterName("CerenkovStackPhotons", true);
201 
202  fCerenkovStackPhotonsCmd = new G4UIcmdWithABool("/process/optical/cerenkov/setStackPhotons", this);
203  fCerenkovStackPhotonsCmd->SetGuidance("Set default whether or not to stack secondary Cerenkov photons");
204  fCerenkovStackPhotonsCmd->SetGuidance("Note this command is used to set the default value,");
205  fCerenkovStackPhotonsCmd->SetGuidance("if process is not active command will not have effect.");
207 
208  fCerenkovTrackSecondariesFirstCmd = new G4UIcmdWithABool("/process/optical/cerenkov/setTrackSecondariesFirst", this);
209  fCerenkovTrackSecondariesFirstCmd->SetGuidance("Whether to track secondary Cerenkov photons before the primary.");
211 
212  fCerenkovVerbosityCmd = new G4UIcmdWithAnInteger("/process/optical/cerenkov/verbose", this);
213  fCerenkovVerbosityCmd->SetGuidance("Verbosity for Cerenkov process.");
214  fCerenkovVerbosityCmd->SetParameterName("verbosity", true);
215  fCerenkovVerbosityCmd->SetRange("verbosity >= 0 && verbosity <= 2");
217 
218  // Scintillation //////////////////////////
219  fScintYieldFactor1Cmd = new G4UIcmdWithADouble("/process/optical/defaults/scintillation/setYieldFactor", this);
220  fScintYieldFactor1Cmd->SetGuidance("Set scintillation yield factor");
221  fScintYieldFactor1Cmd->SetGuidance("Note this command is used to set the default value,");
222  fScintYieldFactor1Cmd->SetGuidance("if process is not active command will not have effect.");
223  fScintYieldFactor1Cmd->SetGuidance("DEPRECATED: use /process/optical/scintillation/setYieldFactorinstead.");
224  fScintYieldFactor1Cmd->SetParameterName("ScintillationYieldFactor", false);
225  fScintYieldFactor1Cmd->SetRange("ScintillationYieldFactor>=0");
227 
228  fScintYieldFactorCmd = new G4UIcmdWithADouble("/process/optical/scintillation/setYieldFactor", this);
229  fScintYieldFactorCmd->SetGuidance("Set scintillation yield factor");
230  fScintYieldFactorCmd->SetGuidance("Note this command is used to set the default value,");
231  fScintYieldFactorCmd->SetGuidance("if process is not active command will not have effect.");
232  fScintYieldFactorCmd->SetParameterName("ScintillationYieldFactor", false);
233  fScintYieldFactorCmd->SetRange("ScintillationYieldFactor>=0");
235 
236  fScintExcitationRatioCmd = new G4UIcmdWithADouble("/process/optical/scintillation/setExcitationRatio", this);
237  fScintExcitationRatioCmd->SetGuidance("Set scintillation excitation ratio");
238  fScintExcitationRatioCmd->SetGuidance("Note this command is used to set the default value,");
239  fScintExcitationRatioCmd->SetGuidance("if process is not active command will not have effect.");
240  fScintExcitationRatioCmd->SetParameterName("ExcitationRatio", false);
241  fScintExcitationRatioCmd->SetRange("ExcitationRatio >= 0 && ExcitationRatio <=1");
243 
244  fScintByParticleType1Cmd = new G4UIcmdWithABool("/process/optical/defaults/scintillation/setByParticleType", this);
245  fScintByParticleType1Cmd->SetGuidance("Activate/Inactivate scintillation process by particle type");
246  fScintByParticleType1Cmd->SetGuidance("Note this command is used to set the default value,");
247  fScintByParticleType1Cmd->SetGuidance("if process is not active command will not have effect.");
248  fScintByParticleType1Cmd->SetGuidance("DEPRECATED: use /process/optical/scintillation/setByParticleType instead.");
249  fScintByParticleType1Cmd->SetParameterName("ScintillationByParticleTypeActivation", false);
251 
252  fScintByParticleTypeCmd = new G4UIcmdWithABool("/process/optical/scintillation/setByParticleType", this);
253  fScintByParticleTypeCmd->SetGuidance("Activate/Inactivate scintillation process by particle type");
254  fScintByParticleTypeCmd->SetGuidance("Note this command is used to set the default value,");
255  fScintByParticleTypeCmd->SetGuidance("if process is not active command will not have effect.");
256  fScintByParticleTypeCmd->SetParameterName("ScintillationByParticleTypeActivation", false);
258 
259  fScintTrackInfo1Cmd = new G4UIcmdWithABool("/process/optical/defaults/scintillation/setTrackInfo", this);
260  fScintTrackInfo1Cmd->SetGuidance("Activate/Inactivate scintillation TrackInformation");
261  fScintTrackInfo1Cmd->SetGuidance("DEPRECATED: use /process/optical/scintillation/setTrackInfo instead.");
262  fScintTrackInfo1Cmd->SetParameterName("ScintillationTrackInfo", false);
264 
265  fScintTrackInfoCmd = new G4UIcmdWithABool("/process/optical/scintillation/setTrackInfo", this);
266  fScintTrackInfoCmd->SetGuidance("Activate/Inactivate scintillation TrackInformation");
267  fScintTrackInfoCmd->SetParameterName("ScintillationTrackInfo", false);
269 
270  fScintFiniteRiseTime1Cmd = new G4UIcmdWithABool("/process/optical/defaults/scintillation/setFiniteRiseTime", this);
271  fScintFiniteRiseTime1Cmd->SetGuidance("Set option of a finite rise-time for G4Scintillation");
272  fScintFiniteRiseTime1Cmd->SetGuidance("If set, the G4Scintillation process expects the user to have set the");
273  fScintFiniteRiseTime1Cmd->SetGuidance("constant material property FAST/SLOWSCINTILLATIONRISETIME");
274  fScintFiniteRiseTime1Cmd->SetGuidance("Note this command is used to set the default value,");
275  fScintFiniteRiseTime1Cmd->SetGuidance("if process is not active command will not have effect.");
276  fScintFiniteRiseTime1Cmd->SetGuidance("DEPRECATED: use /process/optical/scintillation/setFiniteRiseTime instead.");
277  fScintFiniteRiseTime1Cmd->SetParameterName("FiniteRiseTime", false);
279 
280  fScintFiniteRiseTimeCmd = new G4UIcmdWithABool("/process/optical/scintillation/setFiniteRiseTime", this);
281  fScintFiniteRiseTimeCmd->SetGuidance("Set option of a finite rise-time for G4Scintillation");
282  fScintFiniteRiseTimeCmd->SetGuidance("If set, the G4Scintillation process expects the user to have set the");
283  fScintFiniteRiseTimeCmd->SetGuidance("constant material property FAST/SLOWSCINTILLATIONRISETIME");
284  fScintFiniteRiseTimeCmd->SetGuidance("Note this command is used to set the default value,");
285  fScintFiniteRiseTimeCmd->SetGuidance("if process is not active command will not have effect.");
286  fScintFiniteRiseTimeCmd->SetParameterName("FiniteRiseTime", false);
288 
289  fScintStackPhotons1Cmd = new G4UIcmdWithABool("/process/optical/defaults/scintillation/setStackPhotons", this);
290  fScintStackPhotons1Cmd->SetGuidance("Set default whether or not to stack secondary Scintillation photons");
291  fScintStackPhotons1Cmd->SetGuidance("Note this command is used to set the default value,");
292  fScintStackPhotons1Cmd->SetGuidance("if process is not active command will not have effect.");
293  fScintStackPhotons1Cmd->SetGuidance("DEPRECATED: use /process/optical/scintillation/setStackPhotons instead.");
294  fScintStackPhotons1Cmd->SetParameterName("ScintillationStackPhotons", true);
296 
297  fScintStackPhotonsCmd = new G4UIcmdWithABool("/process/optical/scintillation/setStackPhotons", this);
298  fScintStackPhotonsCmd->SetGuidance("Set default whether or not to stack secondary Scintillation photons");
299  fScintStackPhotonsCmd->SetGuidance("Note this command is used to set the default value,");
300  fScintStackPhotonsCmd->SetGuidance("if process is not active command will not have effect.");
301  fScintStackPhotonsCmd->SetParameterName("ScintillationStackPhotons", true);
303 
304  fScintTrackSecondariesFirstCmd = new G4UIcmdWithABool("/process/optical/scintillation/setTrackSecondariesFirst", this);
305  fScintTrackSecondariesFirstCmd->SetGuidance("Whether to track scintillation secondaries before primary.");
307 
308  fScintVerbosityCmd = new G4UIcmdWithAnInteger("/process/optical/scintillation/verbose", this);
309  fScintVerbosityCmd->SetGuidance("Verbosity for scintillation process.");
310  fScintVerbosityCmd->SetParameterName("verbosity", true);
311  fScintVerbosityCmd->SetRange("verbosity >= 0 && verbosity <= 2");
313 
314  // WLS //////////////////////////////////
315  fWLSTimeProfile1Cmd = new G4UIcmdWithAString("/process/optical/defaults/wls/setTimeProfile", this);
316  fWLSTimeProfile1Cmd->SetGuidance("Set the WLS time profile (delta or exponential)");
317  fWLSTimeProfile1Cmd->SetGuidance("DEPRECATED: use /process/optical/wls/setTimeProfile instead.");
318  fWLSTimeProfile1Cmd->SetParameterName("WLSTimeProfile", false);
319  fWLSTimeProfile1Cmd->SetCandidates("delta exponential");
321 
322  fWLSTimeProfileCmd = new G4UIcmdWithAString("/process/optical/wls/setTimeProfile", this);
323  fWLSTimeProfileCmd->SetGuidance("Set the WLS time profile (delta or exponential)");
324  fWLSTimeProfileCmd->SetParameterName("WLSTimeProfile", false);
325  fWLSTimeProfileCmd->SetCandidates("delta exponential");
327 
328  fWLSVerbosityCmd = new G4UIcmdWithAnInteger("/process/optical/wls/verbose", this);
329  fWLSVerbosityCmd->SetGuidance("Verbosity for WLS process.");
330  fWLSVerbosityCmd->SetParameterName("verbosity", true);
331  fWLSVerbosityCmd->SetRange("verbosity >= 0 && verbosity <= 2");
333 
334  // boundary //////////////////////////////////////
335  fBoundaryInvokeSD1Cmd = new G4UIcmdWithABool("/process/optical/defaults/boundary/setInvokeSD", this);
336  fBoundaryInvokeSD1Cmd->SetGuidance("Set option for calling InvokeSD in G4OpBoundaryProcess");
337  fBoundaryInvokeSD1Cmd->SetGuidance("DEPRECATED: use /process/optical/boundary/setInvokeSD instead.");
338  fBoundaryInvokeSD1Cmd->SetParameterName("InvokeSD", false);
340 
341  fBoundaryInvokeSDCmd = new G4UIcmdWithABool("/process/optical/boundary/setInvokeSD", this);
342  fBoundaryInvokeSDCmd->SetGuidance("Set option for calling InvokeSD in G4OpBoundaryProcess");
343  fBoundaryInvokeSDCmd->SetParameterName("InvokeSD", false);
345 
346  fBoundaryVerbosityCmd = new G4UIcmdWithAnInteger("/process/optical/boundary/verbose", this);
347  fBoundaryVerbosityCmd->SetGuidance("Verbosity for boundary process.");
348  fBoundaryVerbosityCmd->SetParameterName("verbosity", true);
349  fBoundaryVerbosityCmd->SetRange("verbosity >= 0 && verbosity <= 2");
351 
352  // the others ////////////////////////////////////
353  fAbsorptionVerbosityCmd = new G4UIcmdWithAnInteger("/process/optical/absorption/verbose", this);
354  fAbsorptionVerbosityCmd->SetGuidance("Verbosity for absorption process.");
355  fAbsorptionVerbosityCmd->SetParameterName("verbosity", true);
356  fAbsorptionVerbosityCmd->SetRange("verbosity >= 0 && verbosity <= 2");
358 
359  fRayleighVerbosityCmd = new G4UIcmdWithAnInteger("/process/optical/rayleigh/verbose", this);
360  fRayleighVerbosityCmd->SetGuidance("Verbosity for Rayleigh process.");
361  fRayleighVerbosityCmd->SetParameterName("verbosity", true);
362  fRayleighVerbosityCmd->SetRange("verbosity >= 0 && verbosity <= 2");
364 
365  fMieVerbosityCmd = new G4UIcmdWithAnInteger("/process/optical/mie/verbose", this);
366  fMieVerbosityCmd->SetGuidance("Verbosity for Mie process.");
367  fMieVerbosityCmd->SetParameterName("verbosity", true);
368  fMieVerbosityCmd->SetRange("verbosity >= 0 && verbosity <= 2");
370 }
371 
373 {
374  delete fDir;
375  delete fDir2;
376  delete fActivateProcessCmd;
377  delete fVerboseCmd;
378  delete fCerenkovMaxPhotonsCmd;
385  delete fCerenkovVerbosityCmd;
386  delete fScintYieldFactorCmd;
387  delete fScintYieldFactor1Cmd;
390  delete fScintTrackInfoCmd;
391  delete fScintTrackInfo1Cmd;
392  delete fScintStackPhotonsCmd;
393  delete fScintStackPhotons1Cmd;
395  delete fScintVerbosityCmd;
399  delete fWLSTimeProfileCmd;
400  delete fWLSTimeProfile1Cmd;
401  delete fWLSVerbosityCmd;
403  delete fRayleighVerbosityCmd;
404  delete fMieVerbosityCmd;
405  delete fBoundaryVerbosityCmd;
407  delete fBoundaryInvokeSDCmd;
408  delete fBoundaryInvokeSD1Cmd;
409 }
410 
412  G4String newValue)
413 {
415  if (command == fActivateProcessCmd) {
416  std::istringstream is(newValue.data());
417  G4String pn;
418  G4String flag;
419  is >> pn >> flag;
420  if ( pn == "Cerenkov" ) {
422  } else if ( pn == "Scintillation" ) {
424  } else if ( pn == "OpAbsorption" ) {
426  } else if ( pn == "OpRayleigh" ) {
428  } else if ( pn == "OpMieHG" ) {
430  } else if ( pn == "OpBoundary" ) {
432  } else if ( pn == "OpWLS" ) {
434  } else {
436  msg << "Not allowed process name: "<<pn<<" (UI: "<<newValue<<")";
437  G4Exception("G4OpticalPhysicsMessenger::SetNewValue(...)","Optical001",FatalException,msg);
438  }
441  }
442  else if (command == fTrackSecondariesFirstCmd )
443  {
444  std::istringstream is(newValue.data());
445  G4String pn;
446  G4String flag;
447  is >> pn >> flag;
448  if ( pn == "Cerenkov" ) {
450  } else if ( pn == "Scintillation" ) {
452  } else if ( pn == "OpAbsorption" ) {
454  } else if ( pn == "OpRayleigh" ) {
456  } else if ( pn == "OpMieHG" ) {
458  } else if ( pn == "OpBoundary" ) {
460  } else if ( pn == "OpWLS" ) {
462  } else {
464  msg << "Not allowed process name: "<<pn<<" (UI: "<<newValue<<")";
465  G4Exception("G4OpticalPhysicsMessenger::SetNewValue(...)","Optical001",FatalException,msg);
466  }
469  }
470  else if (command == fVerboseCmd) {
472  }
473  else if (command == fCerenkovMaxPhotons1Cmd) {
476  Deprecated();
477  }
478  else if (command == fCerenkovMaxPhotonsCmd) {
481  }
482  else if (command == fCerenkovMaxBetaChange1Cmd) {
485  Deprecated();
486  }
487  else if (command == fCerenkovMaxBetaChangeCmd) {
490  }
491  else if (command == fCerenkovStackPhotons1Cmd) {
494  Deprecated();
495  }
496  else if (command == fCerenkovStackPhotonsCmd) {
499  }
500  else if (command == fCerenkovTrackSecondariesFirstCmd) {
503  }
504  else if (command == fCerenkovVerbosityCmd) {
507  }
508  else if (command == fScintYieldFactor1Cmd) {
511  Deprecated();
512  }
513  else if (command == fScintYieldFactorCmd) {
516  }
517  else if (command == fScintByParticleType1Cmd) {
520  Deprecated();
521  }
522  else if (command == fScintByParticleTypeCmd) {
525  }
526  else if (command == fScintTrackInfo1Cmd) {
529  Deprecated();
530  }
531  else if (command == fScintTrackInfoCmd) {
534  }
535  else if (command == fScintFiniteRiseTime1Cmd) {
538  Deprecated();
539  }
540  else if (command == fScintFiniteRiseTimeCmd) {
543  }
544  else if (command == fScintStackPhotons1Cmd) {
547  Deprecated();
548  }
549  else if (command == fScintStackPhotonsCmd) {
552  }
553  else if (command == fScintExcitationRatioCmd) {
556  }
557  else if (command == fScintTrackSecondariesFirstCmd) {
560  }
561  else if (command == fScintVerbosityCmd) {
564  }
565  else if (command == fWLSTimeProfile1Cmd) {
567  Deprecated();
568  }
569  else if (command == fWLSTimeProfileCmd) {
571  }
572  else if (command == fWLSVerbosityCmd) {
574  }
575  else if (command == fAbsorptionVerbosityCmd) {
577  }
578  else if (command == fRayleighVerbosityCmd) {
580  }
581  else if (command == fMieVerbosityCmd) {
583  }
584  else if (command == fBoundaryVerbosityCmd) {
586  }
587  else if (command == fBoundaryInvokeSD1Cmd) {
589  Deprecated();
590  }
591  else if (command == fBoundaryInvokeSDCmd) {
594  }
595 }
596 
598 {
600  ed <<" This command has been deprecated and will be removed in the next" << G4endl
601  << "major release. Use the same command without /defaults/ instead.";
602  G4Exception("G4OpticalPhysicsMessenger", "optical001", JustWarning, ed);
603 }