61 if(
nullptr == theInstance)
65 if(
nullptr == theInstance)
69 theInstance = &manager;
84G4OpticalParameters::G4OpticalParameters()
100void G4OpticalParameters::Initialise()
104 cerenkovStackPhotons =
true;
105 cerenkovTrackSecondariesFirst =
true;
106 cerenkovVerboseLevel = 0;
107 cerenkovMaxPhotons = 100;
108 cerenkovMaxBetaChange = 10.;
110 scintByParticleType =
false;
111 scintTrackInfo =
false;
112 scintStackPhotons =
true;
113 scintFiniteRiseTime =
false;
114 scintTrackSecondariesFirst =
true;
115 scintVerboseLevel = 0;
117 wlsTimeProfileName =
"delta";
120 wls2TimeProfileName =
"delta";
121 wls2VerboseLevel = 0;
123 absorptionVerboseLevel = 0;
125 rayleighVerboseLevel = 0;
129 boundaryInvokeSD =
false;
130 boundaryVerboseLevel = 0;
132 processActivation[
"OpRayleigh"] =
true;
133 processActivation[
"OpBoundary"] =
true;
134 processActivation[
"OpMieHG"] =
true;
135 processActivation[
"OpAbsorption"] =
true;
136 processActivation[
"OpWLS"] =
true;
137 processActivation[
"OpWLS2"] =
true;
138 processActivation[
"Cerenkov"] =
true;
139 processActivation[
"Scintillation"] =
true;
174 if(processActivation[process] == val)
178 if(processActivation.find(process) != processActivation.end())
180 processActivation[process] = val;
185 ed <<
"Process name " << process <<
" out of bounds.";
186 G4Exception(
"G4OpticalParameters::SetProcessActivation()",
"Optical013",
193 return processActivation.find(process)->second;
202 cerenkovStackPhotons = val;
207 return cerenkovStackPhotons;
216 cerenkovVerboseLevel = val;
221 return cerenkovVerboseLevel;
230 cerenkovMaxPhotons = val;
235 return cerenkovMaxPhotons;
244 cerenkovMaxBetaChange = val;
249 return cerenkovMaxBetaChange;
258 cerenkovTrackSecondariesFirst = val;
263 return cerenkovTrackSecondariesFirst;
272 scintByParticleType = val;
277 return scintByParticleType;
286 scintTrackInfo = val;
297 scintTrackSecondariesFirst = val;
302 return scintTrackSecondariesFirst;
311 scintFiniteRiseTime = val;
316 return scintFiniteRiseTime;
325 scintStackPhotons = val;
330 return scintStackPhotons;
339 scintVerboseLevel = val;
344 return scintVerboseLevel;
353 wlsTimeProfileName = val;
358 return wlsTimeProfileName;
367 wlsVerboseLevel = val;
372 return wlsVerboseLevel;
381 wls2TimeProfileName = val;
386 return wls2TimeProfileName;
395 wls2VerboseLevel = val;
400 return wls2VerboseLevel;
409 boundaryVerboseLevel = val;
414 return boundaryVerboseLevel;
423 boundaryInvokeSD = val;
428 return boundaryInvokeSD;
437 absorptionVerboseLevel = val;
442 return absorptionVerboseLevel;
451 rayleighVerboseLevel = val;
456 return rayleighVerboseLevel;
465 mieVerboseLevel = val;
470 return mieVerboseLevel;
480 G4long prec = os.precision(5);
482 <<
"======================================================================="
485 <<
"====== Optical Physics Parameters ========"
488 <<
"======================================================================="
491 os <<
" Cerenkov process active: "
493 os <<
" Cerenkov maximum photons per step: " << cerenkovMaxPhotons
495 os <<
" Cerenkov maximum beta change per step: " << cerenkovMaxBetaChange
497 os <<
" Cerenkov stack photons: " << cerenkovStackPhotons
499 os <<
" Cerenkov track secondaries first: "
500 << cerenkovTrackSecondariesFirst <<
"\n";
501 os <<
" Scintillation process active: "
503 os <<
" Scintillation finite rise time: " << scintFiniteRiseTime
505 os <<
" Scintillation by particle type: " << scintByParticleType
507 os <<
" Scintillation record track info: " << scintTrackInfo <<
"\n";
508 os <<
" Scintillation stack photons: " << scintStackPhotons <<
"\n";
509 os <<
" Scintillation track secondaries first: " << scintTrackSecondariesFirst
511 os <<
" WLS process active: "
513 os <<
" WLS time profile name: " << wlsTimeProfileName
515 os <<
" WLS2 process active: "
517 os <<
" WLS2 time profile name: " << wls2TimeProfileName
519 os <<
" Boundary process active: "
521 os <<
" Boundary invoke sensitive detector: " << boundaryInvokeSD <<
"\n";
522 os <<
" Rayleigh process active: "
524 os <<
" MieHG process active: "
526 os <<
" Absorption process active: "
529 <<
"======================================================================="
536#ifdef G4MULTITHREADED
540#ifdef G4MULTITHREADED
551G4bool G4OpticalParameters::IsLocked()
const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
std::ostream & operator<<(std::ostream &os, const G4OpticalParameters &par)
#define G4MUTEX_INITIALIZER
#define G4MUTEXLOCK(mutex)
#define G4MUTEXUNLOCK(mutex)
G4GLOB_DLL std::ostream G4cout
G4bool GetBoundaryInvokeSD() const
void SetScintByParticleType(G4bool)
void SetCerenkovMaxBetaChange(G4double)
void SetRayleighVerboseLevel(G4int)
void SetCerenkovMaxPhotonsPerStep(G4int)
void SetBoundaryInvokeSD(G4bool)
void SetBoundaryVerboseLevel(G4int)
G4int GetCerenkovVerboseLevel() const
void SetWLS2VerboseLevel(G4int)
void SetScintTrackSecondariesFirst(G4bool)
G4int GetScintVerboseLevel() const
void StreamInfo(std::ostream &os) const
G4int GetAbsorptionVerboseLevel() const
void SetScintVerboseLevel(G4int)
void SetScintStackPhotons(G4bool)
G4bool GetScintStackPhotons() const
G4int GetBoundaryVerboseLevel() const
G4int GetRayleighVerboseLevel() const
G4int GetWLS2VerboseLevel() const
G4String GetWLS2TimeProfile() const
G4int GetMieVerboseLevel() const
void SetVerboseLevel(G4int)
void SetWLS2TimeProfile(const G4String &)
G4int GetCerenkovMaxPhotonsPerStep() const
static G4OpticalParameters * Instance()
G4double GetCerenkovMaxBetaChange() const
G4int GetVerboseLevel() const
void SetAbsorptionVerboseLevel(G4int)
G4bool GetProcessActivation(const G4String &) const
void SetCerenkovStackPhotons(G4bool)
void SetCerenkovTrackSecondariesFirst(G4bool)
void SetScintFiniteRiseTime(G4bool)
G4String GetWLSTimeProfile() const
G4bool GetScintByParticleType() const
void SetMieVerboseLevel(G4int)
void SetScintTrackInfo(G4bool)
void SetWLSTimeProfile(const G4String &)
G4bool GetScintFiniteRiseTime() const
void SetCerenkovVerboseLevel(G4int)
G4bool GetScintTrackInfo() const
G4bool GetCerenkovTrackSecondariesFirst() const
void SetWLSVerboseLevel(G4int)
G4int GetWLSVerboseLevel() const
void SetProcessActivation(const G4String &, G4bool)
G4bool GetScintTrackSecondariesFirst() const
G4bool GetCerenkovStackPhotons() const
const G4ApplicationState & GetCurrentState() const
static G4StateManager * GetStateManager()