File indexing completed on 2025-01-18 09:58:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 #ifndef G4OpticalParameters_h
0052 #define G4OpticalParameters_h 1
0053
0054 #include "globals.hh"
0055 #include "G4ios.hh"
0056 #include "G4ThreeVector.hh"
0057 #include "G4Threading.hh"
0058 #include <vector>
0059
0060 class G4OpticalParametersMessenger;
0061 class G4StateManager;
0062
0063 enum G4OpticalProcessIndex
0064 {
0065 kCerenkov,
0066 kScintillation,
0067 kAbsorption,
0068 kRayleigh,
0069 kMieHG,
0070 kBoundary,
0071 kWLS,
0072 kWLS2,
0073 kNoProcess
0074 };
0075
0076
0077 G4String G4OpticalProcessName(G4int);
0078
0079 inline G4String G4OpticalProcessName(G4int processNumber)
0080 {
0081 switch(processNumber)
0082 {
0083 case kCerenkov:
0084 return "Cerenkov";
0085 case kScintillation:
0086 return "Scintillation";
0087 case kAbsorption:
0088 return "OpAbsorption";
0089 case kRayleigh:
0090 return "OpRayleigh";
0091 case kMieHG:
0092 return "OpMieHG";
0093 case kBoundary:
0094 return "OpBoundary";
0095 case kWLS:
0096 return "OpWLS";
0097 case kWLS2:
0098 return "OpWLS2";
0099 default:
0100 return "NoProcess";
0101 }
0102 }
0103
0104 class G4OpticalParameters
0105 {
0106 public:
0107 static G4OpticalParameters* Instance();
0108
0109 ~G4OpticalParameters();
0110
0111 void SetDefaults();
0112
0113
0114 void StreamInfo(std::ostream& os) const;
0115 void Dump() const;
0116 friend std::ostream& operator<<(std::ostream& os, const G4OpticalParameters&);
0117
0118 void SetVerboseLevel(G4int);
0119 G4int GetVerboseLevel() const;
0120
0121 void SetProcessActivation(const G4String&, G4bool);
0122 G4bool GetProcessActivation(const G4String&) const;
0123
0124
0125 void SetCerenkovMaxPhotonsPerStep(G4int);
0126 G4int GetCerenkovMaxPhotonsPerStep() const;
0127 void SetCerenkovVerboseLevel(G4int);
0128 G4int GetCerenkovVerboseLevel() const;
0129 void SetCerenkovMaxBetaChange(G4double);
0130 G4double GetCerenkovMaxBetaChange() const;
0131 void SetCerenkovTrackSecondariesFirst(G4bool);
0132 G4bool GetCerenkovTrackSecondariesFirst() const;
0133 void SetCerenkovStackPhotons(G4bool);
0134 G4bool GetCerenkovStackPhotons() const;
0135
0136
0137 void SetScintByParticleType(G4bool);
0138 G4bool GetScintByParticleType() const;
0139 void SetScintTrackInfo(G4bool);
0140 G4bool GetScintTrackInfo() const;
0141 void SetScintTrackSecondariesFirst(G4bool);
0142 G4bool GetScintTrackSecondariesFirst() const;
0143 void SetScintFiniteRiseTime(G4bool);
0144 G4bool GetScintFiniteRiseTime() const;
0145 void SetScintStackPhotons(G4bool);
0146 G4bool GetScintStackPhotons() const;
0147 void SetScintVerboseLevel(G4int);
0148 G4int GetScintVerboseLevel() const;
0149
0150
0151 void SetWLSTimeProfile(const G4String&);
0152 G4String GetWLSTimeProfile() const;
0153 void SetWLSVerboseLevel(G4int);
0154 G4int GetWLSVerboseLevel() const;
0155
0156
0157 void SetWLS2TimeProfile(const G4String&);
0158 G4String GetWLS2TimeProfile() const;
0159 void SetWLS2VerboseLevel(G4int);
0160 G4int GetWLS2VerboseLevel() const;
0161
0162
0163 void SetBoundaryVerboseLevel(G4int);
0164 G4int GetBoundaryVerboseLevel() const;
0165 void SetBoundaryInvokeSD(G4bool);
0166 G4bool GetBoundaryInvokeSD() const;
0167
0168
0169 void SetAbsorptionVerboseLevel(G4int);
0170 G4int GetAbsorptionVerboseLevel() const;
0171
0172
0173 void SetRayleighVerboseLevel(G4int);
0174 G4int GetRayleighVerboseLevel() const;
0175
0176
0177 void SetMieVerboseLevel(G4int);
0178 G4int GetMieVerboseLevel() const;
0179
0180 private:
0181 G4OpticalParameters();
0182 void Initialise();
0183 G4bool IsLocked() const;
0184 void PrintWarning(G4ExceptionDescription& ed) const;
0185
0186 static G4OpticalParameters* theInstance;
0187
0188 G4OpticalParametersMessenger* theMessenger;
0189 G4StateManager* fStateManager;
0190
0191 G4int verboseLevel;
0192
0193
0194 std::map<G4String, G4bool> processActivation;
0195
0196
0197 G4bool cerenkovStackPhotons;
0198 G4bool cerenkovTrackSecondariesFirst;
0199 G4int cerenkovVerboseLevel;
0200 G4int cerenkovMaxPhotons;
0201 G4double cerenkovMaxBetaChange;
0202
0203
0204
0205
0206
0207
0208 G4bool scintFiniteRiseTime;
0209
0210
0211
0212
0213 G4bool scintByParticleType;
0214
0215
0216
0217 G4bool scintTrackInfo;
0218
0219
0220 G4bool scintStackPhotons;
0221
0222 G4int scintVerboseLevel;
0223 G4bool scintTrackSecondariesFirst;
0224
0225
0226 G4String wlsTimeProfileName;
0227 G4int wlsVerboseLevel;
0228
0229
0230 G4String wls2TimeProfileName;
0231 G4int wls2VerboseLevel;
0232
0233
0234 G4int absorptionVerboseLevel;
0235
0236
0237 G4int rayleighVerboseLevel;
0238
0239
0240 G4int mieVerboseLevel;
0241
0242
0243
0244 G4bool boundaryInvokeSD;
0245 G4int boundaryVerboseLevel;
0246
0247 #ifdef G4MULTITHREADED
0248 static G4Mutex opticalParametersMutex;
0249 #endif
0250 };
0251
0252
0253
0254 #endif