Geant4_10
G4EmConfigurator.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: G4EmConfigurator.hh 66241 2012-12-13 18:34:42Z gunter $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 Class header file
31 //
32 // File name: G4EmConfigurator
33 //
34 // Author: Vladimir Ivanchenko
35 //
36 // Creation date: 14.07.2008
37 //
38 // Modifications:
39 //
40 // Class Description:
41 //
42 // This class provides configuration EM models for
43 // particles/processes/regions
44 //
45 
46 // -------------------------------------------------------------------
47 //
48 
49 #ifndef G4EmConfigurator_h
50 #define G4EmConfigurator_h 1
51 
52 #include "globals.hh"
53 #include "G4VEmModel.hh"
54 #include "G4VEmFluctuationModel.hh"
55 #include <vector>
56 
57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58 
60 class G4VEmProcess;
62 
64 {
65 public:
66 
67  G4EmConfigurator(G4int verboseLevel = 1);
68 
70 
71  // Set EM model for particle type and process to
72  // be active for the G4Region and energy interval
73  // The model will be added to the list
74  //
75  void SetExtraEmModel(const G4String& particleName,
76  const G4String& processName,
77  G4VEmModel*,
78  const G4String& regionName = "",
79  G4double emin = 0.0,
80  G4double emax = DBL_MAX,
82 
83  // Add all previously declared models to corresponding processes
84  // Can be called in ConstructPhysics
85  //
86  void AddModels();
87 
88  // These methods called by G4LossTableManager
89  //
90  void PrepareModels(const G4ParticleDefinition* aParticle,
92 
93  void PrepareModels(const G4ParticleDefinition* aParticle,
94  G4VEmProcess* p);
95 
96  void PrepareModels(const G4ParticleDefinition* aParticle,
98 
99  void Clear();
100 
101  inline void SetVerbose(G4int value);
102 
103 private:
104 
105  G4Region* FindRegion(const G4String&);
106 
107  void SetModelForRegion(G4VEmModel* model,
109  G4Region* reg,
110  const G4String& particleName,
111  const G4String& processName,
112  G4double emin,
113  G4double emax);
114 
115  G4bool UpdateModelEnergyRange(G4VEmModel* mod,
116  G4double emin, G4double emax);
117 
118  // hide assignment operator
119  G4EmConfigurator & operator=(const G4EmConfigurator &right);
121 
122  std::vector<G4VEmModel*> models;
123  std::vector<G4VEmFluctuationModel*> flucModels;
124  std::vector<G4String> particles;
125  std::vector<G4String> processes;
126  std::vector<G4String> regions;
127  std::vector<G4double> lowEnergy;
128  std::vector<G4double> highEnergy;
129 
130  G4int index;
131  G4int verbose;
132 };
133 
134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
135 
137 {
138  verbose = value;
139 }
140 
141 #endif
142 
143 
144 
145 
146 
147 
148 
149 
const char * p
Definition: xmltok.h:285
int G4int
Definition: G4Types.hh:78
bool G4bool
Definition: G4Types.hh:79
G4EmConfigurator(G4int verboseLevel=1)
const XML_Char XML_Content * model
Definition: expat.h:151
void SetVerbose(G4int value)
#define fm
void PrepareModels(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
const XML_Char int const XML_Char * value
Definition: expat.h:331
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String &regionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=0)