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 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/electromagnetic/utils/include/G4OpticalParameters.hh (Version 11.3.0) and /processes/electromagnetic/utils/include/G4OpticalParameters.hh (Version ReleaseNotes)


** Warning: Cannot open xref database.

  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 // -------------------------------------------    
 27 //                                                
 28 // GEANT4 Class header file                       
 29 //                                                
 30 // File name:     G4OpticalParameters             
 31 //                                                
 32 // Author:        Daren Sawkey based on G4EmPa    
 33 //                                                
 34 // Creation date: 14.07.2020                      
 35 //                                                
 36 // Modifications:                                 
 37 //                                                
 38 //                                                
 39 // Class Description:                             
 40 //                                                
 41 // A utility static class, responsable for kee    
 42 // for all optical physics processes and model    
 43 //                                                
 44 // It is initialized by the master thread but     
 45 // at any moment. Parameters may be used in ru    
 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                                                   
 60 class G4OpticalParametersMessenger;               
 61 class G4StateManager;                             
 62                                                   
 63 enum G4OpticalProcessIndex                        
 64 {                                                 
 65   kCerenkov,       ///< Cerenkov process index    
 66   kScintillation,  ///< Scintillation process     
 67   kAbsorption,     ///< Absorption process ind    
 68   kRayleigh,       ///< Rayleigh scattering pr    
 69   kMieHG,          ///< Mie scattering process    
 70   kBoundary,       ///< Boundary process index    
 71   kWLS,            ///< Wave Length Shifting p    
 72   kWLS2,           ///< Second Wave Length Shi    
 73   kNoProcess       ///< Number of processes, n    
 74 };                                                
 75                                                   
 76 /// Return the name for a given optical proces    
 77 G4String G4OpticalProcessName(G4int);             
 78                                                   
 79 inline G4String G4OpticalProcessName(G4int pro    
 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                                                   
104 class G4OpticalParameters                         
105 {                                                 
106  public:                                          
107   static G4OpticalParameters* Instance();         
108                                                   
109   ~G4OpticalParameters();                         
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    
117                                                   
118   void  SetVerboseLevel(G4int);                   
119   G4int GetVerboseLevel() const;                  
120                                                   
121   void   SetProcessActivation(const G4String&,    
122   G4bool GetProcessActivation(const G4String&)    
123                                                   
124   // Cerenkov                                     
125   void  SetCerenkovMaxPhotonsPerStep(G4int);      
126   G4int GetCerenkovMaxPhotonsPerStep() const;     
127   void  SetCerenkovVerboseLevel(G4int);           
128   G4int GetCerenkovVerboseLevel() const;          
129   void     SetCerenkovMaxBetaChange(G4double);    
130   G4double GetCerenkovMaxBetaChange() const;      
131   void   SetCerenkovTrackSecondariesFirst(G4bo    
132   G4bool GetCerenkovTrackSecondariesFirst() co    
133   void   SetCerenkovStackPhotons(G4bool);         
134   G4bool GetCerenkovStackPhotons() const;         
135                                                   
136   // Scintillation                                
137   void   SetScintByParticleType(G4bool);          
138   G4bool GetScintByParticleType() const;          
139   void   SetScintTrackInfo(G4bool);               
140   G4bool GetScintTrackInfo() const;               
141   void   SetScintTrackSecondariesFirst(G4bool)    
142   G4bool GetScintTrackSecondariesFirst() const    
143   void   SetScintFiniteRiseTime(G4bool);          
144   G4bool GetScintFiniteRiseTime() const;          
145   void   SetScintStackPhotons(G4bool);            
146   G4bool GetScintStackPhotons() const;            
147   void   SetScintVerboseLevel(G4int);             
148   G4int  GetScintVerboseLevel() const;            
149                                                   
150   // WLS                                          
151   void     SetWLSTimeProfile(const G4String&);    
152   G4String GetWLSTimeProfile() const;             
153   void  SetWLSVerboseLevel(G4int);                
154   G4int GetWLSVerboseLevel() const;               
155                                                   
156   // WLS2                                         
157   void     SetWLS2TimeProfile(const G4String&)    
158   G4String GetWLS2TimeProfile() const;            
159   void  SetWLS2VerboseLevel(G4int);               
160   G4int GetWLS2VerboseLevel() const;              
161                                                   
162   // boundary                                     
163   void  SetBoundaryVerboseLevel(G4int);           
164   G4int GetBoundaryVerboseLevel() const;          
165   void   SetBoundaryInvokeSD(G4bool);             
166   G4bool GetBoundaryInvokeSD() const;             
167                                                   
168   // absorption                                   
169   void  SetAbsorptionVerboseLevel(G4int);         
170   G4int GetAbsorptionVerboseLevel() const;        
171                                                   
172   // rayleigh                                     
173   void  SetRayleighVerboseLevel(G4int);           
174   G4int GetRayleighVerboseLevel() const;          
175                                                   
176   // mie                                          
177   void  SetMieVerboseLevel(G4int);                
178   G4int GetMieVerboseLevel() const;               
179                                                   
180  private:                                         
181   G4OpticalParameters();                          
182   void Initialise();                              
183   G4bool IsLocked() const;                        
184   void PrintWarning(G4ExceptionDescription& ed    
185                                                   
186   static G4OpticalParameters* theInstance;        
187                                                   
188   G4OpticalParametersMessenger* theMessenger;     
189   G4StateManager* fStateManager;                  
190                                                   
191   G4int verboseLevel;                             
192                                                   
193   // Whether to activate each process             
194   std::map<G4String, G4bool> processActivation    
195                                                   
196   // cerenkov/////////////////                    
197   G4bool cerenkovStackPhotons;                    
198   G4bool cerenkovTrackSecondariesFirst;           
199   G4int cerenkovVerboseLevel;                     
200   G4int cerenkovMaxPhotons;                       
201   G4double cerenkovMaxBetaChange;                 
202                                                   
203   // scintillation /////////////////              
204                                                   
205   /// option to set a finite rise-time; Note:     
206   /// process expects the user to have set the    
207   /// property SCINTILLATIONRISETIME{1,2,3}       
208   G4bool scintFiniteRiseTime;                     
209                                                   
210   /// option to  allow for the light yield to     
211   /// particle type and deposited energy in ca    
212   /// light emission in scintillators             
213   G4bool scintByParticleType;                     
214                                                   
215   /// option to allow for G4ScintillationTrack    
216   /// to be attached to a scintillation photon    
217   G4bool scintTrackInfo;                          
218                                                   
219   /// option to allow stacking of secondary Sc    
220   G4bool scintStackPhotons;                       
221                                                   
222   G4int scintVerboseLevel;                        
223   G4bool scintTrackSecondariesFirst;              
224                                                   
225   ///////////////// WLS                           
226   G4String wlsTimeProfileName;                    
227   G4int wlsVerboseLevel;                          
228                                                   
229   ///////////////// WLS2                          
230   G4String wls2TimeProfileName;                   
231   G4int wls2VerboseLevel;                         
232                                                   
233   //////////////// absorption                     
234   G4int absorptionVerboseLevel;                   
235                                                   
236   //////////////// rayleigh                       
237   G4int rayleighVerboseLevel;                     
238                                                   
239   //////////////// mie                            
240   G4int mieVerboseLevel;                          
241                                                   
242   //////////////// boundary                       
243   /// G4OpBoundaryProcess to call InvokeSD met    
244   G4bool boundaryInvokeSD;                        
245   G4int boundaryVerboseLevel;                     
246                                                   
247 #ifdef G4MULTITHREADED                            
248   static G4Mutex opticalParametersMutex;          
249 #endif                                            
250 };                                                
251                                                   
252 //....oooOO0OOooo........oooOO0OOooo........oo    
253                                                   
254 #endif                                            
255