Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4EmParameters.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 // $Id: G4EmParameters.hh 66885 2013-01-16 17:37:13Z gunter $
27 //
28 //
29 // -------------------------------------------------------------------
30 //
31 // GEANT4 Class header file
32 //
33 //
34 // File name: G4EmParameters
35 //
36 // Author: Vladimir Ivanchenko for migration to MT
37 //
38 //
39 // Creation date: 17.05.2013
40 //
41 // Modifications:
42 //
43 //
44 // Class Description:
45 //
46 // A utility static class, responsable for keeping parameters
47 // for all EM physics processes and models.
48 //
49 // It is initialized by the master thread but can be updated
50 // at any moment. Parameters may be used in run time or at
51 // initialisation
52 //
53 // -------------------------------------------------------------------
54 //
55 
56 #ifndef G4EmParameters_h
57 #define G4EmParameters_h 1
58 
59 #include "globals.hh"
60 #include "G4ios.hh"
61 #include "G4MscStepLimitType.hh"
63 #include "G4EmSaturation.hh"
64 #include <vector>
65 
68 class G4VEmProcess;
70 class G4StateManager;
71 
73 {
74 public:
75 
76  static G4EmParameters* Instance();
77 
79 
80  void SetDefaults();
81 
82  // printing
83  std::ostream& StreamInfo(std::ostream& os) const;
84  void Dump() const;
85  friend std::ostream& operator<< (std::ostream& os, const G4EmParameters&);
86 
87  // boolean flags
88  void SetLossFluctuations(G4bool val);
89  G4bool LossFluctuation() const;
90 
91  void SetBuildCSDARange(G4bool val);
92  G4bool BuildCSDARange() const;
93 
94  void SetLPM(G4bool val);
95  G4bool LPM() const;
96 
97  void SetSpline(G4bool val);
98  G4bool Spline() const;
99 
100  void SetUseCutAsFinalRange(G4bool val);
101  G4bool UseCutAsFinalRange() const;
102 
103  void SetApplyCuts(G4bool val);
104  G4bool ApplyCuts() const;
105 
106  void SetFluo(G4bool val);
107  G4bool Fluo() const;
108 
109  void SetBeardenFluoDir(G4bool val);
110  G4bool BeardenFluoDir() const;
111 
112  void SetAuger(G4bool val);
113  G4bool Auger() const;
114 
115  void SetAugerCascade(G4bool val);
116  G4bool AugerCascade() const;
117 
118  void SetPixe(G4bool val);
119  G4bool Pixe() const;
120 
123 
124  void SetLateralDisplacement(G4bool val);
125  G4bool LateralDisplacement() const;
126 
129 
132 
135 
136  void SetUseMottCorrection(G4bool val);
137  G4bool UseMottCorrection() const;
138 
139  void SetIntegral(G4bool val);
140  G4bool Integral() const;
141 
142  void SetBirksActive(G4bool val);
143  G4bool BirksActive() const;
144 
147 
148  // double parameters with values
149  void SetMinSubRange(G4double val);
150  G4double MinSubRange() const;
151 
152  void SetMinEnergy(G4double val);
153  G4double MinKinEnergy() const;
154 
155  void SetMaxEnergy(G4double val);
156  G4double MaxKinEnergy() const;
157 
160 
163 
164  void SetLowestMuHadEnergy(G4double val);
165  G4double LowestMuHadEnergy() const;
166 
167  void SetLinearLossLimit(G4double val);
168  G4double LinearLossLimit() const;
169 
170  void SetBremsstrahlungTh(G4double val);
171  G4double BremsstrahlungTh() const;
172 
173  void SetLambdaFactor(G4double val);
174  G4double LambdaFactor() const;
175 
178 
179  void SetMscThetaLimit(G4double val);
180  G4double MscThetaLimit() const;
181 
182  void SetMscRangeFactor(G4double val);
183  G4double MscRangeFactor() const;
184 
187 
188  void SetMscGeomFactor(G4double val);
189  G4double MscGeomFactor() const;
190 
191  void SetMscSkin(G4double val);
192  G4double MscSkin() const;
193 
194  void SetStepFunction(G4double v1, G4double v2);
195 
197 
198  // integer parameters
199  void SetNumberOfBins(G4int val);
200  G4int NumberOfBins() const;
201 
204 
205  void SetVerbose(G4int val);
206  G4int Verbose() const;
207 
208  void SetWorkerVerbose(G4int val);
209  G4int WorkerVerbose() const;
210 
213 
216 
219 
220  // string parameters
221  void SetPIXECrossSectionModel(const G4String&);
223 
226 
227  // parameters per region or per process
228  void AddPAIModel(const G4String& particle,
229  const G4String& region,
230  const G4String& type);
231  const std::vector<G4String>& ParticlesPAI() const;
232  const std::vector<G4String>& RegionsPAI() const;
233  const std::vector<G4String>& TypesPAI() const;
234 
235  void AddMicroElec(const G4String& region);
236  const std::vector<G4String>& RegionsMicroElec() const;
237 
238  void AddDNA(const G4String& region, const G4String& type);
239  const std::vector<G4String>& RegionsDNA() const;
240  const std::vector<G4String>& TypesDNA() const;
241 
242  void AddMsc(const G4String& region, const G4String& type);
243  const std::vector<G4String>& RegionsMsc() const;
244  const std::vector<G4String>& TypesMsc() const;
245 
246  void SetSubCutoff(G4bool val, const G4String& region = "");
247 
248  void SetDeexActiveRegion(const G4String& region, G4bool fdeex,
249  G4bool fauger, G4bool fpixe);
250 
251  void SetProcessBiasingFactor(const G4String& procname,
252  G4double val, G4bool wflag);
253 
254  void ActivateForcedInteraction(const G4String& procname,
255  const G4String& region,
256  G4double length,
257  G4bool wflag);
258 
260  const G4String& region,
261  G4double factor,
262  G4double energyLimit);
263 
264  // initialisation methods
266  G4bool isElectron) const;
267  void DefineRegParamForEM(G4VEmProcess*) const;
269 
270 private:
271 
272  G4EmParameters(G4EmParameters &) = delete;
273  G4EmParameters & operator=(const G4EmParameters &right) = delete;
274 
275  G4EmParameters();
276 
277  void Initialise();
278 
279  G4bool IsLocked() const;
280 
281  G4String CheckRegion(const G4String&) const;
282 
283  void PrintWarning(G4ExceptionDescription& ed) const;
284 
285  static G4EmParameters* theInstance;
286 
287  G4EmParametersMessenger* theMessenger;
288 
289  G4StateManager* fStateManager;
290 
291  G4EmSaturation* emSaturation;
292 
293  G4bool lossFluctuation;
294  G4bool buildCSDARange;
295  G4bool flagLPM;
296  G4bool spline;
297  G4bool cutAsFinalRange;
298  G4bool applyCuts;
299  G4bool fluo;
300  G4bool beardenFluoDir;
301  G4bool auger;
302  G4bool augerCascade;
303  G4bool pixe;
304  G4bool deexIgnoreCut;
305  G4bool lateralDisplacement;
306  G4bool muhadLateralDisplacement;
307  G4bool latDisplacementBeyondSafety;
308  G4bool useAngGeneratorForIonisation;
309  G4bool useMottCorrection;
310  G4bool integral;
311  G4bool birks;
312 
313  G4double minSubRange;
314  G4double minKinEnergy;
315  G4double maxKinEnergy;
316  G4double maxKinEnergyCSDA;
317  G4double lowestElectronEnergy;
318  G4double lowestMuHadEnergy;
319  G4double linLossLimit;
320  G4double bremsTh;
321  G4double lambdaFactor;
322  G4double factorForAngleLimit;
323  G4double thetaLimit;
324  G4double rangeFactor;
325  G4double rangeFactorMuHad;
326  G4double geomFactor;
327  G4double skin;
328  G4double dRoverRange;
329  G4double finalRange;
330  G4double dRoverRangeMuHad;
331  G4double finalRangeMuHad;
332 
333  G4int nbins;
334  G4int nbinsPerDecade;
335  G4int verbose;
336  G4int workerVerbose;
337 
338  G4MscStepLimitType mscStepLimit;
339  G4MscStepLimitType mscStepLimitMuHad;
340  G4NuclearFormfactorType nucFormfactor;
341 
342  G4String namePIXE;
343  G4String nameElectronPIXE;
344 
345  std::vector<G4String> m_particlesPAI;
346  std::vector<G4String> m_regnamesPAI;
347  std::vector<G4String> m_typesPAI;
348 
349  std::vector<G4String> m_regnamesME;
350 
351  std::vector<G4String> m_regnamesDNA;
352  std::vector<G4String> m_typesDNA;
353 
354  std::vector<G4String> m_regnamesMsc;
355  std::vector<G4String> m_typesMsc;
356 
357  std::vector<G4String> m_regnamesSubCut;
358  std::vector<G4bool> m_subCuts;
359 
360  std::vector<G4String> m_regnamesDeex;
361  std::vector<G4bool> m_fluo;
362  std::vector<G4bool> m_auger;
363  std::vector<G4bool> m_pixe;
364 
365  std::vector<G4String> m_procBiasedXS;
366  std::vector<G4double> m_factBiasedXS;
367  std::vector<G4bool> m_weightBiasedXS;
368 
369  std::vector<G4String> m_procForced;
370  std::vector<G4String> m_regnamesForced;
371  std::vector<G4double> m_lengthForced;
372  std::vector<G4bool> m_weightForced;
373 
374  std::vector<G4String> m_procBiasedSec;
375  std::vector<G4String> m_regnamesBiasedSec;
376  std::vector<G4double> m_factBiasedSec;
377  std::vector<G4double> m_elimBiasedSec;
378 
379 };
380 
381 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
382 
383 #endif
384 
G4bool UseCutAsFinalRange() const
void SetLossFluctuations(G4bool val)
G4int NumberOfBinsPerDecade() const
const XML_Char * name
Definition: expat.h:151
void SetApplyCuts(G4bool val)
void SetProcessBiasingFactor(const G4String &procname, G4double val, G4bool wflag)
G4int NumberOfBins() const
void SetVerbose(G4int val)
G4bool Spline() const
G4int WorkerVerbose() const
G4double MaxKinEnergy() const
void SetEmSaturation(G4EmSaturation *)
G4bool isElectron(G4int ityp)
void ActivateSecondaryBiasing(const G4String &name, const G4String &region, G4double factor, G4double energyLimit)
void SetDeexcitationIgnoreCut(G4bool val)
void SetUseMottCorrection(G4bool val)
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void SetLowestElectronEnergy(G4double val)
void SetLatDisplacementBeyondSafety(G4bool val)
G4MscStepLimitType MscMuHadStepLimitType() const
void SetMscStepLimitType(G4MscStepLimitType val)
G4bool AugerCascade() const
G4double LowestElectronEnergy() const
G4bool BirksActive() const
void SetBeardenFluoDir(G4bool val)
void SetLinearLossLimit(G4double val)
G4double MscGeomFactor() const
G4double MscMuHadRangeFactor() const
G4double MscThetaLimit() const
void SetAuger(G4bool val)
const std::vector< G4String > & ParticlesPAI() const
const std::vector< G4String > & RegionsMicroElec() const
G4bool Integral() const
std::ostream & StreamInfo(std::ostream &os) const
void SetNumberOfBins(G4int val)
void SetMinSubRange(G4double val)
G4bool LPM() const
void SetMaxEnergyForCSDARange(G4double val)
const std::vector< G4String > & RegionsPAI() const
G4bool ApplyCuts() const
void DefineRegParamForLoss(G4VEnergyLossProcess *, G4bool isElectron) const
void SetStepFunctionMuHad(G4double v1, G4double v2)
const std::vector< G4String > & TypesDNA() const
G4bool Fluo() const
void SetPIXEElectronCrossSectionModel(const G4String &)
int G4int
Definition: G4Types.hh:78
void SetDeexActiveRegion(const G4String &region, G4bool fdeex, G4bool fauger, G4bool fpixe)
const std::vector< G4String > & RegionsMsc() const
void SetMaxEnergy(G4double val)
void SetBremsstrahlungTh(G4double val)
G4double MinSubRange() const
G4bool DeexcitationIgnoreCut() const
G4bool LatDisplacementBeyondSafety() const
void SetBirksActive(G4bool val)
void AddPAIModel(const G4String &particle, const G4String &region, const G4String &type)
void SetLateralDisplacement(G4bool val)
G4bool BuildCSDARange() const
G4EmSaturation * GetEmSaturation()
void SetWorkerVerbose(G4int val)
G4double LinearLossLimit() const
void SetPIXECrossSectionModel(const G4String &)
G4double LambdaFactor() const
G4int Verbose() const
G4bool MuHadLateralDisplacement() const
const G4String & PIXECrossSectionModel()
G4double LowestMuHadEnergy() const
bool G4bool
Definition: G4Types.hh:79
void SetMscRangeFactor(G4double val)
friend std::ostream & operator<<(std::ostream &os, const G4EmParameters &)
void SetAugerCascade(G4bool val)
void Dump() const
void SetNumberOfBinsPerDecade(G4int val)
G4bool LateralDisplacement() const
void SetNuclearFormfactorType(G4NuclearFormfactorType val)
void SetLowestMuHadEnergy(G4double val)
void SetMscGeomFactor(G4double val)
G4double MinKinEnergy() const
void SetMscMuHadStepLimitType(G4MscStepLimitType val)
void AddDNA(const G4String &region, const G4String &type)
void SetSubCutoff(G4bool val, const G4String &region="")
G4NuclearFormfactorType NuclearFormfactorType() const
void SetBuildCSDARange(G4bool val)
void AddMicroElec(const G4String &region)
G4bool Auger() const
G4bool LossFluctuation() const
const std::vector< G4String > & TypesMsc() const
void SetMscMuHadRangeFactor(G4double val)
void SetPixe(G4bool val)
void SetSpline(G4bool val)
void SetMuHadLateralDisplacement(G4bool val)
void SetMinEnergy(G4double val)
void SetLPM(G4bool val)
G4bool UseAngularGeneratorForIonisation() const
G4NuclearFormfactorType
G4MscStepLimitType
G4double BremsstrahlungTh() const
static G4EmParameters * Instance()
void DefineRegParamForDeex(G4VAtomDeexcitation *) const
G4double MscRangeFactor() const
void SetIntegral(G4bool val)
void AddMsc(const G4String &region, const G4String &type)
void ActivateAngularGeneratorForIonisation(G4bool val)
void ActivateForcedInteraction(const G4String &procname, const G4String &region, G4double length, G4bool wflag)
void SetUseCutAsFinalRange(G4bool val)
G4bool UseMottCorrection() const
const std::vector< G4String > & RegionsDNA() const
G4bool Pixe() const
G4MscStepLimitType MscStepLimitType() const
void SetMscThetaLimit(G4double val)
void SetLambdaFactor(G4double val)
void SetFactorForAngleLimit(G4double val)
double G4double
Definition: G4Types.hh:76
void DefineRegParamForEM(G4VEmProcess *) const
G4double MaxEnergyForCSDARange() const
G4double MscSkin() const
const G4String & PIXEElectronCrossSectionModel()
const std::vector< G4String > & TypesPAI() const
void SetStepFunction(G4double v1, G4double v2)
void SetFluo(G4bool val)
G4double FactorForAngleLimit() const
G4bool BeardenFluoDir() const
void SetMscSkin(G4double val)