Geant4-11
G4OpticalParameters.hh
Go to the documentation of this file.
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// GEANT4 Class header file
29//
30// File name: G4OpticalParameters
31//
32// Author: Daren Sawkey based on G4EmParameters
33//
34// Creation date: 14.07.2020
35//
36// Modifications:
37//
38//
39// Class Description:
40//
41// A utility static class, responsable for keeping parameters
42// for all optical physics processes and models.
43//
44// It is initialized by the master thread but can be updated
45// at any moment. Parameters may be used in run time or at
46// initialisation
47//
48// -------------------------------------------------------------------
49//
50
51#ifndef G4OpticalParameters_h
52#define G4OpticalParameters_h 1
53
54#include "globals.hh"
55#include "G4ios.hh"
56#include "G4ThreeVector.hh"
57#include "G4Threading.hh"
58#include <vector>
59
61class G4StateManager;
62
64{
74};
75
78
79inline G4String G4OpticalProcessName(G4int processNumber)
80{
81 switch(processNumber)
82 {
83 case kCerenkov:
84 return "Cerenkov";
85 case kScintillation:
86 return "Scintillation";
87 case kAbsorption:
88 return "OpAbsorption";
89 case kRayleigh:
90 return "OpRayleigh";
91 case kMieHG:
92 return "OpMieHG";
93 case kBoundary:
94 return "OpBoundary";
95 case kWLS:
96 return "OpWLS";
97 case kWLS2:
98 return "OpWLS2";
99 default:
100 return "NoProcess";
101 }
102}
103
105{
106 public:
108
110
111 void SetDefaults();
112
113 // printing
114 void StreamInfo(std::ostream& os) const;
115 void Dump() const;
116 friend std::ostream& operator<<(std::ostream& os, const G4OpticalParameters&);
117
119 G4int GetVerboseLevel() const;
120
123
124 // Cerenkov
135
136 // Scintillation
151
152 // WLS
153 void SetWLSTimeProfile(const G4String&);
157
158 // WLS2
159 void SetWLS2TimeProfile(const G4String&);
163
164 // boundary
169
170 // absorption
173
174 // rayleigh
177
178 // mie
181
182 private:
184 void Initialise();
185 G4bool IsLocked() const;
186 void PrintWarning(G4ExceptionDescription& ed) const;
187
189
192
194
195 // Whether to activate each process
196 std::map<G4String, G4bool> processActivation;
197
198 // cerenkov/////////////////
204
205 // scintillation /////////////////
206
211
216
220
223
226
230
234
237
240
243
248
249#ifdef G4MULTITHREADED
250 static G4Mutex opticalParametersMutex;
251#endif
252};
253
254//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
255
256#endif
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
G4OpticalProcessIndex
@ kWLS
Wave Length Shifting process index.
@ kScintillation
Scintillation process index.
@ kWLS2
Second Wave Length Shifting process index.
@ kRayleigh
Rayleigh scattering process index.
@ kAbsorption
Absorption process index.
@ kBoundary
Boundary process index.
@ kNoProcess
Number of processes, no selected process.
@ kCerenkov
Cerenkov process index.
@ kMieHG
Mie scattering process index.
G4String G4OpticalProcessName(G4int)
Return the name for a given optical process index.
std::mutex G4Mutex
Definition: G4Threading.hh:81
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4bool GetBoundaryInvokeSD() const
void SetScintByParticleType(G4bool)
void SetCerenkovMaxBetaChange(G4double)
static G4OpticalParameters * theInstance
void SetRayleighVerboseLevel(G4int)
void SetCerenkovMaxPhotonsPerStep(G4int)
void SetBoundaryInvokeSD(G4bool)
void SetBoundaryVerboseLevel(G4int)
G4int GetCerenkovVerboseLevel() const
void SetScintTrackSecondariesFirst(G4bool)
void SetScintEnhancedTimeConstants(G4bool)
friend std::ostream & operator<<(std::ostream &os, const G4OpticalParameters &)
G4int GetScintVerboseLevel() const
void StreamInfo(std::ostream &os) const
G4int GetAbsorptionVerboseLevel() const
void SetScintStackPhotons(G4bool)
G4bool GetScintStackPhotons() const
G4int GetBoundaryVerboseLevel() const
G4int GetRayleighVerboseLevel() const
G4int GetWLS2VerboseLevel() const
std::map< G4String, G4bool > processActivation
G4String GetWLS2TimeProfile() const
G4StateManager * fStateManager
G4int GetMieVerboseLevel() const
void SetWLS2TimeProfile(const G4String &)
G4OpticalParametersMessenger * theMessenger
G4int GetCerenkovMaxPhotonsPerStep() const
static G4OpticalParameters * Instance()
G4double GetCerenkovMaxBetaChange() const
void SetAbsorptionVerboseLevel(G4int)
G4bool GetProcessActivation(const G4String &) const
void SetCerenkovStackPhotons(G4bool)
void SetCerenkovTrackSecondariesFirst(G4bool)
void SetScintFiniteRiseTime(G4bool)
G4String GetWLSTimeProfile() const
G4bool GetScintEnhancedTimeConstants() const
G4bool GetScintByParticleType() const
void SetWLSTimeProfile(const G4String &)
G4bool GetScintFiniteRiseTime() const
void SetCerenkovVerboseLevel(G4int)
void PrintWarning(G4ExceptionDescription &ed) const
G4bool scintStackPhotons
option to allow stacking of secondary Scintillation photons
G4bool GetScintTrackInfo() const
G4bool GetCerenkovTrackSecondariesFirst() const
G4int GetWLSVerboseLevel() const
void SetProcessActivation(const G4String &, G4bool)
G4bool GetScintTrackSecondariesFirst() const
G4bool GetCerenkovStackPhotons() const