Geant4-11
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//
27//
28// -------------------------------------------------------------------
29//
30// GEANT4 Class header file
31//
32//
33// File name: G4HadronicProcessStore
34//
35// Author: Vladimir Ivanchenko
36//
37// Creation date: 09.05.2008
38//
39// Modifications:
40//
41//
42// Class Description:
43//
44
45// -------------------------------------------------------------------
46//
47
48#ifndef G4HadronicProcessStore_h
49#define G4HadronicProcessStore_h 1
50
51
52#include "globals.hh"
53#include "G4DynamicParticle.hh"
54#include "G4ThreeVector.hh"
55#include "G4HadronicProcess.hh"
60#include <map>
61#include <vector>
62#include <iostream>
63
64class G4Element;
67
69{
70
72
73public:
74
76
78
79 void Clean();
82 G4double kineticEnergy,
83 const G4VProcess* process,
84 const G4Element* element,
85 const G4Material* material=nullptr);
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,
102 const G4Material* mat=nullptr);
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,
133 const G4Material* mat=nullptr);
134
136 const G4ParticleDefinition *aParticle,
137 G4double kineticEnergy,
138 G4int Z, G4int A);
139
141 const G4ParticleDefinition *aParticle,
142 G4double kineticEnergy,
143 const G4Material *material);
144
146 const G4ParticleDefinition *aParticle,
147 G4double kineticEnergy,
148 const G4Element *anElement,
149 const G4Material* mat=nullptr);
150
152 const G4ParticleDefinition *aParticle,
153 G4double kineticEnergy,
154 G4int Z, G4int A);
155
157 const G4ParticleDefinition *aParticle,
158 G4double kineticEnergy,
159 const G4Material *material);
160
162 const G4ParticleDefinition *aParticle,
163 G4double kineticEnergy,
164 const G4Element *anElement,
165 const G4Material* mat=nullptr);
166
168 const G4ParticleDefinition *aParticle,
169 G4double kineticEnergy,
170 G4int Z, G4int A);
171
172 // register/deregister processes following G4HadronicProcess interface
174
176 const G4ParticleDefinition*);
177
180
182
183 // register/deregister processes following only G4VProcess interface
185
187 const G4ParticleDefinition*);
188
190
191 void SetBuildXSTable(G4bool val);
192
193 G4bool GetBuildXSTable() const;
194
195 void PrintInfo(const G4ParticleDefinition*);
196
197 void Dump(G4int level);
198 void DumpHtml();
199 void PrintHtml(const G4ParticleDefinition*, std::ofstream&);
200 void PrintModelHtml(const G4HadronicInteraction * model) const;
201
202 void SetVerbose(G4int val);
204 // these methods are obsolete and will be removed
205
207 G4HadronicProcessType subType);
208
209 // Energy-momentum non-conservation limits and reporting
210 void SetEpReportLevel(G4int level);
211
212 void SetProcessAbsLevel(G4double absoluteLevel);
213
214 void SetProcessRelLevel(G4double relativeLevel);
215
216private:
217
218 // constructor
220
221 // print process info
222 void Print(G4int idxProcess, G4int idxParticle);
223
224 G4String HtmlFileName(const G4String &) const;
225
227
228 typedef const G4ParticleDefinition* PD;
231
232 // hadronic processes following G4HadronicProcess interface
233 std::vector<G4HadronicProcess*> process;
234 std::vector<G4HadronicInteraction*> model;
235 std::vector<G4String> modelName;
236 std::vector<PD> particle;
237 std::vector<G4int> wasPrinted;
238
239 std::multimap<PD,HP> p_map;
240 std::multimap<HP,HI> m_map;
241
242 // hadronic processes following only G4VProcess interface
243 std::vector<G4VProcess*> extraProcess;
244 std::multimap<PD,G4VProcess*> ep_map;
245
247
248 // counters and options
253
256
257 // cache
261
263
265};
266
267#endif
268
G4HadronicProcessType
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
const G4double A[17]
void DeRegister(G4HadronicProcess *)
G4double GetCaptureCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
G4double GetCaptureCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
std::vector< G4HadronicInteraction * > model
G4double GetCrossSectionPerVolume(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Material *material)
G4double GetCaptureCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4HadronicProcess * FindProcess(const G4ParticleDefinition *, G4HadronicProcessType subType)
std::multimap< PD, HP > p_map
void RegisterParticle(G4HadronicProcess *, const G4ParticleDefinition *)
G4double GetChargeExchangeCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
void PrintHtml(const G4ParticleDefinition *, std::ofstream &)
void SetProcessAbsLevel(G4double absoluteLevel)
std::multimap< HP, HI > m_map
G4String HtmlFileName(const G4String &) const
G4double GetChargeExchangeCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetFissionCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetInelasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
std::vector< G4HadronicProcess * > process
G4double GetInelasticCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
G4double GetInelasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
const G4ParticleDefinition * PD
void SetProcessRelLevel(G4double relativeLevel)
void DeRegisterExtraProcess(G4VProcess *)
std::vector< G4int > wasPrinted
void Print(G4int idxProcess, G4int idxParticle)
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
G4HadronicParameters * param
G4double GetChargeExchangeCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=nullptr)
void RegisterExtraProcess(G4VProcess *)
G4double GetElasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
void SetEpReportLevel(G4int level)
static G4HadronicProcessStore * Instance()
G4double GetElasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
void RegisterInteraction(G4HadronicProcess *, G4HadronicInteraction *)
G4HadronicEPTestMessenger * theEPTestMessenger
G4double GetCrossSectionPerAtom(const G4ParticleDefinition *particle, G4double kineticEnergy, const G4VProcess *process, const G4Element *element, const G4Material *material=nullptr)
std::vector< G4String > modelName
G4HadronicInteraction * HI
std::vector< G4VProcess * > extraProcess
static G4ThreadLocal G4HadronicProcessStore * instance
std::multimap< PD, G4VProcess * > ep_map
void Register(G4HadronicProcess *)
void PrintModelHtml(const G4HadronicInteraction *model) const
G4double GetElasticCrossSectionPerIsotope(const G4ParticleDefinition *aParticle, G4double kineticEnergy, G4int Z, G4int A)
void PrintInfo(const G4ParticleDefinition *)
G4double GetFissionCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
string material
Definition: eplot.py:19
#define G4ThreadLocal
Definition: tls.hh:77