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,v 1.5 2009/02/15 16:50:15 vnivanch Exp $ |
---|
27 | // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $ |
---|
28 | // |
---|
29 | // |
---|
30 | // ------------------------------------------------------------------- |
---|
31 | // |
---|
32 | // GEANT4 Class header file |
---|
33 | // |
---|
34 | // |
---|
35 | // File name: G4HadronicProcessStore |
---|
36 | // |
---|
37 | // Author: Vladimir Ivanchenko |
---|
38 | // |
---|
39 | // Creation date: 09.05.2008 |
---|
40 | // |
---|
41 | // Modifications: |
---|
42 | // |
---|
43 | // |
---|
44 | // Class Description: |
---|
45 | // |
---|
46 | |
---|
47 | // ------------------------------------------------------------------- |
---|
48 | // |
---|
49 | |
---|
50 | #ifndef G4HadronicProcessStore_h |
---|
51 | #define G4HadronicProcessStore_h 1 |
---|
52 | |
---|
53 | |
---|
54 | #include "globals.hh" |
---|
55 | #include "G4DynamicParticle.hh" |
---|
56 | #include "G4HadronicProcess.hh" |
---|
57 | #include "G4HadronicInteraction.hh" |
---|
58 | #include "G4ParticleDefinition.hh" |
---|
59 | #include "G4HadronicProcessType.hh" |
---|
60 | #include <map> |
---|
61 | #include <vector> |
---|
62 | |
---|
63 | class G4Element; |
---|
64 | |
---|
65 | class G4HadronicProcessStore |
---|
66 | { |
---|
67 | |
---|
68 | public: |
---|
69 | |
---|
70 | static G4HadronicProcessStore* Instance(); |
---|
71 | |
---|
72 | ~G4HadronicProcessStore(); |
---|
73 | |
---|
74 | void Clean(); |
---|
75 | |
---|
76 | G4double GetInelasticCrossSectionPerVolume( |
---|
77 | const G4ParticleDefinition *aParticle, |
---|
78 | G4double kineticEnergy, |
---|
79 | const G4Material *material); |
---|
80 | |
---|
81 | G4double GetInelasticCrossSectionPerAtom( |
---|
82 | const G4ParticleDefinition *aParticle, |
---|
83 | G4double kineticEnergy, |
---|
84 | const G4Element *anElement); |
---|
85 | |
---|
86 | G4double GetInelasticCrossSectionPerIsotope( |
---|
87 | const G4ParticleDefinition *aParticle, |
---|
88 | G4double kineticEnergy, |
---|
89 | G4int Z, G4int A); |
---|
90 | |
---|
91 | G4double GetElasticCrossSectionPerVolume( |
---|
92 | const G4ParticleDefinition *aParticle, |
---|
93 | G4double kineticEnergy, |
---|
94 | const G4Material *material); |
---|
95 | |
---|
96 | G4double GetElasticCrossSectionPerAtom( |
---|
97 | const G4ParticleDefinition *aParticle, |
---|
98 | G4double kineticEnergy, |
---|
99 | const G4Element *anElement); |
---|
100 | |
---|
101 | G4double GetElasticCrossSectionPerIsotope( |
---|
102 | const G4ParticleDefinition *aParticle, |
---|
103 | G4double kineticEnergy, |
---|
104 | G4int Z, G4int A); |
---|
105 | |
---|
106 | G4double GetCaptureCrossSectionPerVolume( |
---|
107 | const G4ParticleDefinition *aParticle, |
---|
108 | G4double kineticEnergy, |
---|
109 | const G4Material *material); |
---|
110 | |
---|
111 | G4double GetCaptureCrossSectionPerAtom( |
---|
112 | const G4ParticleDefinition *aParticle, |
---|
113 | G4double kineticEnergy, |
---|
114 | const G4Element *anElement); |
---|
115 | |
---|
116 | G4double GetCaptureCrossSectionPerIsotope( |
---|
117 | const G4ParticleDefinition *aParticle, |
---|
118 | G4double kineticEnergy, |
---|
119 | G4int Z, G4int A); |
---|
120 | |
---|
121 | G4double GetFissionCrossSectionPerVolume( |
---|
122 | const G4ParticleDefinition *aParticle, |
---|
123 | G4double kineticEnergy, |
---|
124 | const G4Material *material); |
---|
125 | |
---|
126 | G4double GetFissionCrossSectionPerAtom( |
---|
127 | const G4ParticleDefinition *aParticle, |
---|
128 | G4double kineticEnergy, |
---|
129 | const G4Element *anElement); |
---|
130 | |
---|
131 | G4double GetFissionCrossSectionPerIsotope( |
---|
132 | const G4ParticleDefinition *aParticle, |
---|
133 | G4double kineticEnergy, |
---|
134 | G4int Z, G4int A); |
---|
135 | |
---|
136 | G4double GetChargeExchangeCrossSectionPerVolume( |
---|
137 | const G4ParticleDefinition *aParticle, |
---|
138 | G4double kineticEnergy, |
---|
139 | const G4Material *material); |
---|
140 | |
---|
141 | G4double GetChargeExchangeCrossSectionPerAtom( |
---|
142 | const G4ParticleDefinition *aParticle, |
---|
143 | G4double kineticEnergy, |
---|
144 | const G4Element *anElement); |
---|
145 | |
---|
146 | G4double GetChargeExchangeCrossSectionPerIsotope( |
---|
147 | const G4ParticleDefinition *aParticle, |
---|
148 | G4double kineticEnergy, |
---|
149 | G4int Z, G4int A); |
---|
150 | |
---|
151 | // register/deregister processes following G4HadronicProcess interface |
---|
152 | void Register(G4HadronicProcess*); |
---|
153 | |
---|
154 | void RegisterParticle(G4HadronicProcess*, |
---|
155 | const G4ParticleDefinition*); |
---|
156 | |
---|
157 | void RegisterInteraction(G4HadronicProcess*, |
---|
158 | G4HadronicInteraction*); |
---|
159 | |
---|
160 | void DeRegister(G4HadronicProcess*); |
---|
161 | |
---|
162 | // register/deregister processes following only G4VProcess interface |
---|
163 | void RegisterExtraProcess(G4VProcess*); |
---|
164 | |
---|
165 | void RegisterParticleForExtraProcess(G4VProcess*, |
---|
166 | const G4ParticleDefinition*); |
---|
167 | |
---|
168 | void DeRegisterExtraProcess(G4VProcess*); |
---|
169 | |
---|
170 | void PrintInfo(const G4ParticleDefinition*); |
---|
171 | |
---|
172 | void Dump(G4int level); |
---|
173 | |
---|
174 | void SetVerbose(G4int val); |
---|
175 | |
---|
176 | G4int GetVerbose(); |
---|
177 | |
---|
178 | G4HadronicProcess* FindProcess(const G4ParticleDefinition*, |
---|
179 | G4HadronicProcessType subType); |
---|
180 | |
---|
181 | private: |
---|
182 | |
---|
183 | // constructor |
---|
184 | G4HadronicProcessStore(); |
---|
185 | |
---|
186 | // print process info |
---|
187 | void Print(G4int idxProcess, G4int idxParticle); |
---|
188 | |
---|
189 | static G4HadronicProcessStore* theInstance; |
---|
190 | |
---|
191 | typedef const G4ParticleDefinition* PD; |
---|
192 | typedef G4HadronicProcess* HP; |
---|
193 | typedef G4HadronicInteraction* HI; |
---|
194 | |
---|
195 | // hadronic processes following G4HadronicProcess interface |
---|
196 | std::vector<G4HadronicProcess*> process; |
---|
197 | std::vector<G4HadronicInteraction*> model; |
---|
198 | std::vector<G4String> modelName; |
---|
199 | std::vector<PD> particle; |
---|
200 | std::vector<G4int> wasPrinted; |
---|
201 | |
---|
202 | std::multimap<PD,HP> p_map; |
---|
203 | std::multimap<HP,HI> m_map; |
---|
204 | |
---|
205 | // hadronic processes following only G4VProcess interface |
---|
206 | std::vector<G4VProcess*> extraProcess; |
---|
207 | std::multimap<PD,G4VProcess*> ep_map; |
---|
208 | |
---|
209 | // counters and options |
---|
210 | G4int n_proc; |
---|
211 | G4int n_model; |
---|
212 | G4int n_part; |
---|
213 | G4int n_extra; |
---|
214 | |
---|
215 | G4int verbose; |
---|
216 | G4bool buildTableStart; |
---|
217 | |
---|
218 | // cash |
---|
219 | HP currentProcess; |
---|
220 | PD currentParticle; |
---|
221 | |
---|
222 | G4DynamicParticle localDP; |
---|
223 | |
---|
224 | }; |
---|
225 | |
---|
226 | |
---|
227 | #endif |
---|
228 | |
---|