61 if(
nullptr == theInstance)
65 if(
nullptr == theInstance)
68 static G4OpticalParameters manager;
69 theInstance = &manager;
84G4OpticalParameters::G4OpticalParameters()
100void G4OpticalParameters::Initialise()
104 cerenkovStackPhotons =
true;
105 cerenkovOffloadPhotons =
false;
106 cerenkovTrackSecondariesFirst =
true;
107 cerenkovGeneral =
false;
108 cerenkovVerboseLevel = 1;
109 cerenkovMaxPhotons = 100;
110 cerenkovMaxBetaChange = 10.;
112 scintByParticleType =
false;
113 scintTrackInfo =
false;
114 scintStackPhotons =
true;
115 scintOffloadPhotons =
false;
116 scintFiniteRiseTime =
false;
117 scintTrackSecondariesFirst =
true;
118 scintVerboseLevel = 1;
120 wlsTimeProfileName =
"delta";
123 wls2TimeProfileName =
"delta";
124 wls2VerboseLevel = 1;
126 absorptionVerboseLevel = 1;
128 rayleighVerboseLevel = 1;
132 boundaryInvokeSD =
false;
133 boundaryVerboseLevel = 1;
135 processActivation[
"OpRayleigh"] =
true;
136 processActivation[
"OpBoundary"] =
true;
137 processActivation[
"OpMieHG"] =
true;
138 processActivation[
"OpAbsorption"] =
true;
139 processActivation[
"OpWLS"] =
true;
140 processActivation[
"OpWLS2"] =
true;
141 processActivation[
"Cerenkov"] =
true;
142 processActivation[
"Scintillation"] =
true;
143 processActivation[
"QuasiCerenkov"] =
true;
144 processActivation[
"QuasiScintillation"] =
true;
179 if(processActivation[process] == val)
183 if(processActivation.find(process) != processActivation.end())
185 processActivation[process] = val;
190 ed <<
"Process name " << process <<
" out of bounds.";
191 G4Exception(
"G4OpticalParameters::SetProcessActivation()",
"Optical013",
198 return processActivation.find(process)->second;
207 cerenkovStackPhotons = val;
212 return cerenkovStackPhotons;
221 cerenkovOffloadPhotons = val;
226 return cerenkovOffloadPhotons;
235 cerenkovVerboseLevel = val;
240 return cerenkovVerboseLevel;
249 cerenkovMaxPhotons = val;
254 return cerenkovMaxPhotons;
263 cerenkovMaxBetaChange = val;
268 return cerenkovMaxBetaChange;
277 cerenkovTrackSecondariesFirst = val;
282 return cerenkovTrackSecondariesFirst;
291 cerenkovGeneral = val;
296 return cerenkovGeneral;
305 scintByParticleType = val;
310 return scintByParticleType;
319 scintTrackInfo = val;
330 scintTrackSecondariesFirst = val;
335 return scintTrackSecondariesFirst;
344 scintFiniteRiseTime = val;
349 return scintFiniteRiseTime;
358 scintStackPhotons = val;
363 return scintStackPhotons;
372 scintOffloadPhotons = val;
377 return scintOffloadPhotons;
386 scintVerboseLevel = val;
391 return scintVerboseLevel;
400 wlsTimeProfileName = val;
405 return wlsTimeProfileName;
414 wlsVerboseLevel = val;
419 return wlsVerboseLevel;
428 wls2TimeProfileName = val;
433 return wls2TimeProfileName;
442 wls2VerboseLevel = val;
447 return wls2VerboseLevel;
456 boundaryVerboseLevel = val;
461 return boundaryVerboseLevel;
470 boundaryInvokeSD = val;
475 return boundaryInvokeSD;
484 absorptionVerboseLevel = val;
489 return absorptionVerboseLevel;
498 rayleighVerboseLevel = val;
503 return rayleighVerboseLevel;
512 mieVerboseLevel = val;
517 return mieVerboseLevel;
520const std::vector<std::pair<G4XRayModelType, const G4String> >&
532 xrayVolumes.push_back(std::make_pair(type, lvname));
543 G4long prec = os.precision(5);
545 <<
"======================================================================="
548 <<
"====== Optical Physics Parameters ========"
551 <<
"======================================================================="
554 os <<
" Cerenkov process active: "
556 os <<
" Cerenkov maximum photons per step: " << cerenkovMaxPhotons
558 os <<
" Cerenkov maximum beta change per step: " << cerenkovMaxBetaChange
560 os <<
" Cerenkov stack photons: " << cerenkovStackPhotons
562 os <<
" Cerenkov track secondaries first: "
563 << cerenkovTrackSecondariesFirst <<
"\n";
564 os <<
" Scintillation process active: "
566 os <<
" Scintillation finite rise time: " << scintFiniteRiseTime
568 os <<
" Scintillation by particle type: " << scintByParticleType
570 os <<
" Scintillation record track info: " << scintTrackInfo <<
"\n";
571 os <<
" Scintillation stack photons: " << scintStackPhotons <<
"\n";
572 os <<
" Scintillation track secondaries first: " << scintTrackSecondariesFirst
574 os <<
" WLS process active: "
576 os <<
" WLS time profile name: " << wlsTimeProfileName
578 os <<
" WLS2 process active: "
580 os <<
" WLS2 time profile name: " << wls2TimeProfileName
582 os <<
" Boundary process active: "
584 os <<
" Boundary invoke sensitive detector: " << boundaryInvokeSD <<
"\n";
585 os <<
" Rayleigh process active: "
587 os <<
" MieHG process active: "
589 os <<
" Absorption process active: "
592 <<
"======================================================================="
599#ifdef G4MULTITHREADED
603#ifdef G4MULTITHREADED
608std::ostream&
operator<<(std::ostream& os,
const G4OpticalParameters& par)
614G4bool 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
void SetActiveVolume(const G4String &name, G4XRayModelType type)
G4bool GetBoundaryInvokeSD() const
void SetScintByParticleType(G4bool)
void SetCerenkovMaxBetaChange(G4double)
void SetRayleighVerboseLevel(G4int)
void SetScintOffloadPhotons(G4bool)
G4bool GetScintOffloadPhotons() const
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
void EnableCerenkovGeneral(G4bool)
G4int GetBoundaryVerboseLevel() const
G4int GetRayleighVerboseLevel() const
G4int GetWLS2VerboseLevel() const
G4String GetWLS2TimeProfile() const
const std::vector< std::pair< G4XRayModelType, const G4String > > & ActiveVolumes() const
G4int GetMieVerboseLevel() const
void SetVerboseLevel(G4int)
void SetWLS2TimeProfile(const G4String &)
G4int GetCerenkovMaxPhotonsPerStep() const
G4bool CerenkovGeneral() const
static G4OpticalParameters * Instance()
G4double GetCerenkovMaxBetaChange() const
G4int GetVerboseLevel() const
void SetAbsorptionVerboseLevel(G4int)
G4bool GetProcessActivation(const G4String &) const
void SetCerenkovStackPhotons(G4bool)
void SetCerenkovTrackSecondariesFirst(G4bool)
G4bool GetCerenkovOffloadPhotons() const
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
void SetCerenkovOffloadPhotons(G4bool)
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()