Geant4  10.02.p02
G4HadronicProcessStore.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: G4HadronicProcessStore.hh 90394 2015-05-27 12:14:48Z gcosmo $
27 //
28 //
29 // -------------------------------------------------------------------
30 //
31 // GEANT4 Class header file
32 //
33 //
34 // File name: G4HadronicProcessStore
35 //
36 // Author: Vladimir Ivanchenko
37 //
38 // Creation date: 09.05.2008
39 //
40 // Modifications:
41 //
42 //
43 // Class Description:
44 //
45 
46 // -------------------------------------------------------------------
47 //
48 
49 #ifndef G4HadronicProcessStore_h
50 #define G4HadronicProcessStore_h 1
51 
52 
53 #include "globals.hh"
54 #include "G4DynamicParticle.hh"
55 #include "G4ThreeVector.hh"
56 #include "G4HadronicProcess.hh"
57 #include "G4HadronicInteraction.hh"
58 #include "G4ParticleDefinition.hh"
59 #include "G4HadronicProcessType.hh"
61 #include <map>
62 #include <vector>
63 #include <iostream>
64 
65 class G4Element;
67 
69 {
70 
72 
73 public:
74 
76 
78 
79  void Clean();
82  G4double kineticEnergy,
83  const G4VProcess* process,
84  const G4Element* element,
85  const G4Material* material=0);
86 
89  G4double kineticEnergy,
90  const G4VProcess* process,
91  const G4Material* material);
92 
94  const G4ParticleDefinition *aParticle,
95  G4double kineticEnergy,
96  const G4Material *material);
97 
99  const G4ParticleDefinition *aParticle,
100  G4double kineticEnergy,
101  const G4Element *anElement, const G4Material* mat=0);
102 
104  const G4ParticleDefinition *aParticle,
105  G4double kineticEnergy,
106  G4int Z, G4int A);
107 
109  const G4ParticleDefinition *aParticle,
110  G4double kineticEnergy,
111  const G4Material *material);
112 
114  const G4ParticleDefinition *aParticle,
115  G4double kineticEnergy,
116  const G4Element *anElement, const G4Material* mat=0);
117 
119  const G4ParticleDefinition *aParticle,
120  G4double kineticEnergy,
121  G4int Z, G4int A);
122 
124  const G4ParticleDefinition *aParticle,
125  G4double kineticEnergy,
126  const G4Material *material);
127 
129  const G4ParticleDefinition *aParticle,
130  G4double kineticEnergy,
131  const G4Element *anElement, const G4Material* mat=0);
132 
134  const G4ParticleDefinition *aParticle,
135  G4double kineticEnergy,
136  G4int Z, G4int A);
137 
139  const G4ParticleDefinition *aParticle,
140  G4double kineticEnergy,
141  const G4Material *material);
142 
144  const G4ParticleDefinition *aParticle,
145  G4double kineticEnergy,
146  const G4Element *anElement, const G4Material* mat=0);
147 
149  const G4ParticleDefinition *aParticle,
150  G4double kineticEnergy,
151  G4int Z, G4int A);
152 
154  const G4ParticleDefinition *aParticle,
155  G4double kineticEnergy,
156  const G4Material *material);
157 
159  const G4ParticleDefinition *aParticle,
160  G4double kineticEnergy,
161  const G4Element *anElement, const G4Material* mat=0);
162 
164  const G4ParticleDefinition *aParticle,
165  G4double kineticEnergy,
166  G4int Z, G4int A);
167 
168  // register/deregister processes following G4HadronicProcess interface
169  void Register(G4HadronicProcess*);
170 
172  const G4ParticleDefinition*);
173 
176 
178 
179  // register/deregister processes following only G4VProcess interface
181 
183  const G4ParticleDefinition*);
184 
186 
187  void PrintInfo(const G4ParticleDefinition*);
188 
189  void Dump(G4int level);
190  void DumpHtml();
191  void PrintHtml(const G4ParticleDefinition*, std::ofstream&);
192  void PrintModelHtml(const G4HadronicInteraction * model) const;
193 
194  void SetVerbose(G4int val);
195 
196  G4int GetVerbose();
197 
199  G4HadronicProcessType subType);
200 
201  // Energy-momentum non-conservation limits and reporting
202  void SetEpReportLevel(G4int level);
203 
204  void SetProcessAbsLevel(G4double absoluteLevel);
205 
206  void SetProcessRelLevel(G4double relativeLevel);
207 
208 private:
209 
210  // constructor
212 
213  // print process info
214  void Print(G4int idxProcess, G4int idxParticle);
215 
216  G4String HtmlFileName(const G4String &) const;
217 
219 
220  typedef const G4ParticleDefinition* PD;
223 
224  // hadronic processes following G4HadronicProcess interface
225  std::vector<G4HadronicProcess*> process;
226  std::vector<G4HadronicInteraction*> model;
227  std::vector<G4String> modelName;
228  std::vector<PD> particle;
229  std::vector<G4int> wasPrinted;
230 
231  std::multimap<PD,HP> p_map;
232  std::multimap<HP,HI> m_map;
233 
234  // hadronic processes following only G4VProcess interface
235  std::vector<G4VProcess*> extraProcess;
236  std::multimap<PD,G4VProcess*> ep_map;
237 
238  // counters and options
243 
246 
247  // cache
251 
253 
255 };
256 
257 
258 #endif
259 
void DeRegisterExtraProcess(G4VProcess *)
void PrintModelHtml(const G4HadronicInteraction *model) const
std::vector< G4String > modelName
const G4ParticleDefinition * PD
void SetProcessAbsLevel(G4double absoluteLevel)
G4double GetCaptureCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
void RegisterInteraction(G4HadronicProcess *, G4HadronicInteraction *)
std::vector< G4HadronicProcess * > process
void PrintHtml(const G4ParticleDefinition *, std::ofstream &)
static G4HadronicProcessStore * Instance()
G4double GetElasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
std::vector< G4int > wasPrinted
std::multimap< PD, G4VProcess * > ep_map
std::vector< G4HadronicInteraction * > model
G4double GetFissionCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
#define G4ThreadLocal
Definition: tls.hh:89
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
int G4int
Definition: G4Types.hh:78
G4HadronicProcessType
std::multimap< HP, HI > m_map
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
double A(double temperature)
std::vector< G4VProcess * > extraProcess
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
void Register(G4HadronicProcess *)
bool G4bool
Definition: G4Types.hh:79
G4double GetChargeExchangeCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetInelasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
G4double GetInelasticCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetChargeExchangeCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
std::multimap< PD, HP > p_map
void RegisterParticle(G4HadronicProcess *, const G4ParticleDefinition *)
void Print(G4int idxProcess, G4int idxParticle)
void DeRegister(G4HadronicProcess *)
G4String HtmlFileName(const G4String &) const
void RegisterExtraProcess(G4VProcess *)
G4HadronicEPTestMessenger * theEPTestMessenger
G4double GetChargeExchangeCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetFissionCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetElasticCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4HadronicInteraction * HI
G4double GetCrossSectionPerVolume(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Material *material)
void SetProcessRelLevel(G4double relativeLevel)
void SetEpReportLevel(G4int level)
G4double GetCaptureCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetElasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
double G4double
Definition: G4Types.hh:76
static G4ThreadLocal G4HadronicProcessStore * instance
G4double GetInelasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4double GetCrossSectionPerAtom(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Element *element, const G4Material *material=0)
G4double GetCaptureCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
void PrintInfo(const G4ParticleDefinition *)