Geant4  10.00.p03
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 67989 2013-03-13 10:54:03Z 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"
60 #include <map>
61 #include <vector>
62 #include <iostream>
63 
64 class G4Element;
66 
67 
69 {
70 
71 public:
72 
74 
76 
77  void Clean();
80  G4double kineticEnergy,
81  const G4VProcess* process,
82  const G4Element* element,
83  const G4Material* material=0);
84 
86  const G4ParticleDefinition* particle,
87  G4double kineticEnergy,
88  const G4VProcess* process,
89  const G4Material* material);
90 
92  const G4ParticleDefinition *aParticle,
93  G4double kineticEnergy,
94  const G4Material *material);
95 
97  const G4ParticleDefinition *aParticle,
98  G4double kineticEnergy,
99  const G4Element *anElement, const G4Material* mat=0);
100 
102  const G4ParticleDefinition *aParticle,
103  G4double kineticEnergy,
104  G4int Z, G4int A);
105 
107  const G4ParticleDefinition *aParticle,
108  G4double kineticEnergy,
109  const G4Material *material);
110 
112  const G4ParticleDefinition *aParticle,
113  G4double kineticEnergy,
114  const G4Element *anElement, const G4Material* mat=0);
115 
117  const G4ParticleDefinition *aParticle,
118  G4double kineticEnergy,
119  G4int Z, G4int A);
120 
122  const G4ParticleDefinition *aParticle,
123  G4double kineticEnergy,
124  const G4Material *material);
125 
127  const G4ParticleDefinition *aParticle,
128  G4double kineticEnergy,
129  const G4Element *anElement, const G4Material* mat=0);
130 
132  const G4ParticleDefinition *aParticle,
133  G4double kineticEnergy,
134  G4int Z, G4int A);
135 
137  const G4ParticleDefinition *aParticle,
138  G4double kineticEnergy,
139  const G4Material *material);
140 
142  const G4ParticleDefinition *aParticle,
143  G4double kineticEnergy,
144  const G4Element *anElement, const G4Material* mat=0);
145 
147  const G4ParticleDefinition *aParticle,
148  G4double kineticEnergy,
149  G4int Z, G4int A);
150 
152  const G4ParticleDefinition *aParticle,
153  G4double kineticEnergy,
154  const G4Material *material);
155 
157  const G4ParticleDefinition *aParticle,
158  G4double kineticEnergy,
159  const G4Element *anElement, const G4Material* mat=0);
160 
162  const G4ParticleDefinition *aParticle,
163  G4double kineticEnergy,
164  G4int Z, G4int A);
165 
166  // register/deregister processes following G4HadronicProcess interface
167  void Register(G4HadronicProcess*);
168 
170  const G4ParticleDefinition*);
171 
174 
176 
177  // register/deregister processes following only G4VProcess interface
179 
181  const G4ParticleDefinition*);
182 
184 
185  void PrintInfo(const G4ParticleDefinition*);
186 
187  void Dump(G4int level);
188  void DumpHtml();
189  void PrintHtml(const G4ParticleDefinition*, std::ofstream&);
190  void PrintModelHtml(const G4HadronicInteraction * model) const;
191 
192  void SetVerbose(G4int val);
193 
194  G4int GetVerbose();
195 
197  G4HadronicProcessType subType);
198 
199  // Energy-momentum non-conservation limits and reporting
200  void SetEpReportLevel(G4int level);
201 
202  void SetProcessAbsLevel(G4double absoluteLevel);
203 
204  void SetProcessRelLevel(G4double relativeLevel);
205 
206 private:
207 
208  // constructor
210 
211  // print process info
212  void Print(G4int idxProcess, G4int idxParticle);
213 
215 
216  typedef const G4ParticleDefinition* PD;
219 
220  // hadronic processes following G4HadronicProcess interface
221  std::vector<G4HadronicProcess*> process;
222  std::vector<G4HadronicInteraction*> model;
223  std::vector<G4String> modelName;
224  std::vector<PD> particle;
225  std::vector<G4int> wasPrinted;
226 
227  std::multimap<PD,HP> p_map;
228  std::multimap<HP,HI> m_map;
229 
230  // hadronic processes following only G4VProcess interface
231  std::vector<G4VProcess*> extraProcess;
232  std::multimap<PD,G4VProcess*> ep_map;
233 
234  // counters and options
239 
242 
243  // cash
246 
248 
250 };
251 
252 
253 #endif
254 
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:52
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
int G4int
Definition: G4Types.hh:78
G4HadronicProcessType
static G4ThreadLocal G4HadronicProcessStore * theInstance
std::multimap< HP, HI > m_map
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
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)
static const G4double A[nN]
void DeRegister(G4HadronicProcess *)
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
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 *)