Geant4  10.01.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 86515 2014-11-13 09:11:45Z 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 
68 
70 {
71 
73 
74 public:
75 
77 
79 
80  void Clean();
83  G4double kineticEnergy,
84  const G4VProcess* process,
85  const G4Element* element,
86  const G4Material* material=0);
87 
90  G4double kineticEnergy,
91  const G4VProcess* process,
92  const G4Material* material);
93 
95  const G4ParticleDefinition *aParticle,
96  G4double kineticEnergy,
97  const G4Material *material);
98 
100  const G4ParticleDefinition *aParticle,
101  G4double kineticEnergy,
102  const G4Element *anElement, const G4Material* mat=0);
103 
105  const G4ParticleDefinition *aParticle,
106  G4double kineticEnergy,
107  G4int Z, G4int A);
108 
110  const G4ParticleDefinition *aParticle,
111  G4double kineticEnergy,
112  const G4Material *material);
113 
115  const G4ParticleDefinition *aParticle,
116  G4double kineticEnergy,
117  const G4Element *anElement, const G4Material* mat=0);
118 
120  const G4ParticleDefinition *aParticle,
121  G4double kineticEnergy,
122  G4int Z, G4int A);
123 
125  const G4ParticleDefinition *aParticle,
126  G4double kineticEnergy,
127  const G4Material *material);
128 
130  const G4ParticleDefinition *aParticle,
131  G4double kineticEnergy,
132  const G4Element *anElement, const G4Material* mat=0);
133 
135  const G4ParticleDefinition *aParticle,
136  G4double kineticEnergy,
137  G4int Z, G4int A);
138 
140  const G4ParticleDefinition *aParticle,
141  G4double kineticEnergy,
142  const G4Material *material);
143 
145  const G4ParticleDefinition *aParticle,
146  G4double kineticEnergy,
147  const G4Element *anElement, const G4Material* mat=0);
148 
150  const G4ParticleDefinition *aParticle,
151  G4double kineticEnergy,
152  G4int Z, G4int A);
153 
155  const G4ParticleDefinition *aParticle,
156  G4double kineticEnergy,
157  const G4Material *material);
158 
160  const G4ParticleDefinition *aParticle,
161  G4double kineticEnergy,
162  const G4Element *anElement, const G4Material* mat=0);
163 
165  const G4ParticleDefinition *aParticle,
166  G4double kineticEnergy,
167  G4int Z, G4int A);
168 
169  // register/deregister processes following G4HadronicProcess interface
170  void Register(G4HadronicProcess*);
171 
173  const G4ParticleDefinition*);
174 
177 
179 
180  // register/deregister processes following only G4VProcess interface
182 
184  const G4ParticleDefinition*);
185 
187 
188  void PrintInfo(const G4ParticleDefinition*);
189 
190  void Dump(G4int level);
191  void DumpHtml();
192  void PrintHtml(const G4ParticleDefinition*, std::ofstream&);
193  void PrintModelHtml(const G4HadronicInteraction * model) const;
194 
195  void SetVerbose(G4int val);
196 
197  G4int GetVerbose();
198 
200  G4HadronicProcessType subType);
201 
202  // Energy-momentum non-conservation limits and reporting
203  void SetEpReportLevel(G4int level);
204 
205  void SetProcessAbsLevel(G4double absoluteLevel);
206 
207  void SetProcessRelLevel(G4double relativeLevel);
208 
209 private:
210 
211  // constructor
213 
214  // print process info
215  void Print(G4int idxProcess, G4int idxParticle);
216 
217  typedef const G4ParticleDefinition* PD;
220 
221  // hadronic processes following G4HadronicProcess interface
222  std::vector<G4HadronicProcess*> process;
223  std::vector<G4HadronicInteraction*> model;
224  std::vector<G4String> modelName;
225  std::vector<PD> particle;
226  std::vector<G4int> wasPrinted;
227 
228  std::multimap<PD,HP> p_map;
229  std::multimap<HP,HI> m_map;
230 
231  // hadronic processes following only G4VProcess interface
232  std::vector<G4VProcess*> extraProcess;
233  std::multimap<PD,G4VProcess*> ep_map;
234 
235  // counters and options
240 
243 
244  // cache
248 
250 
252 };
253 
254 
255 #endif
256 
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)
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 *)
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 *)