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 | // GEANT4 tag $Name: geant4-09-03-cand-01 $ |
---|
28 | // |
---|
29 | // |
---|
30 | // GEANT4 Hadron physics class -- header file |
---|
31 | // F.W. Jones, TRIUMF, 03-DEC-96 |
---|
32 | // |
---|
33 | // This class encapsulates cross section data and interpolations |
---|
34 | // from the Geant3/Gheisha routine GHESIG. |
---|
35 | // For further comments see G4HadronCrossSections.cc. |
---|
36 | // |
---|
37 | // Note: this is implemented as a SINGLETON class |
---|
38 | // |
---|
39 | // 27-MAR-97 FWJ: first version for Alpha release |
---|
40 | // 14-APR-97 FWJ: class name changed from G4LCrossSectionData |
---|
41 | // to G4HadronicCrossSections |
---|
42 | // 14-APR-98 FWJ: rewritten as class G4HadronCrossSections |
---|
43 | // and adapted to G4CrossSectionDataSet/DataStore class design. |
---|
44 | // 26-JUN-98 FWJ: added elastic/inelastic caching to improve performance. |
---|
45 | // 06-NOV-98 FWJ: added first-order correction for low-energy |
---|
46 | // inelastic cross sections |
---|
47 | // |
---|
48 | |
---|
49 | |
---|
50 | #ifndef G4HadronCrossSections_h |
---|
51 | #define G4HadronCrossSections_h 1 |
---|
52 | |
---|
53 | #include "globals.hh" |
---|
54 | #include "G4Element.hh" |
---|
55 | #include "G4VProcess.hh" |
---|
56 | #include "G4DynamicParticle.hh" |
---|
57 | //#include "G4ParticleTypes.hh" |
---|
58 | #include "G4PionPlus.hh" |
---|
59 | #include "G4PionZero.hh" |
---|
60 | #include "G4PionMinus.hh" |
---|
61 | #include "G4KaonPlus.hh" |
---|
62 | #include "G4KaonZeroShort.hh" |
---|
63 | #include "G4KaonZeroLong.hh" |
---|
64 | #include "G4KaonMinus.hh" |
---|
65 | #include "G4Proton.hh" |
---|
66 | #include "G4AntiProton.hh" |
---|
67 | #include "G4Neutron.hh" |
---|
68 | #include "G4Deuteron.hh" |
---|
69 | #include "G4Triton.hh" |
---|
70 | #include "G4Alpha.hh" |
---|
71 | #include "G4AntiNeutron.hh" |
---|
72 | #include "G4Lambda.hh" |
---|
73 | #include "G4AntiLambda.hh" |
---|
74 | #include "G4SigmaPlus.hh" |
---|
75 | #include "G4SigmaZero.hh" |
---|
76 | #include "G4SigmaMinus.hh" |
---|
77 | #include "G4AntiSigmaPlus.hh" |
---|
78 | #include "G4AntiSigmaZero.hh" |
---|
79 | #include "G4AntiSigmaMinus.hh" |
---|
80 | #include "G4XiZero.hh" |
---|
81 | #include "G4XiMinus.hh" |
---|
82 | #include "G4AntiXiZero.hh" |
---|
83 | #include "G4AntiXiMinus.hh" |
---|
84 | #include "G4OmegaMinus.hh" |
---|
85 | #include "G4AntiOmegaMinus.hh" |
---|
86 | //#include "G4LPhysicsFreeVector.hh" |
---|
87 | |
---|
88 | |
---|
89 | enum { TSIZE=41, NPARTS=35, NELAB=17, NCNLW=15, NFISS=21 }; |
---|
90 | |
---|
91 | class G4HadronCrossSections |
---|
92 | { |
---|
93 | public: |
---|
94 | |
---|
95 | G4HadronCrossSections() : prevParticleDefinition(0), verboseLevel(0) |
---|
96 | { |
---|
97 | } |
---|
98 | |
---|
99 | ~G4HadronCrossSections() |
---|
100 | { |
---|
101 | } |
---|
102 | |
---|
103 | static G4HadronCrossSections* Instance() |
---|
104 | { |
---|
105 | if (!theInstance) theInstance = new G4HadronCrossSections(); |
---|
106 | return theInstance; |
---|
107 | } |
---|
108 | |
---|
109 | G4bool IsApplicable(const G4DynamicParticle* aParticle, |
---|
110 | const G4Element* ) |
---|
111 | { |
---|
112 | return (GetParticleCode(aParticle) > 0); |
---|
113 | } |
---|
114 | |
---|
115 | G4bool IsApplicable(const G4DynamicParticle* aParticle, |
---|
116 | G4double /*ZZ*/, G4double /*AA*/) |
---|
117 | { |
---|
118 | return (GetParticleCode(aParticle) > 0); |
---|
119 | } |
---|
120 | |
---|
121 | G4double GetElasticCrossSection(const G4DynamicParticle*, const G4Element*); |
---|
122 | |
---|
123 | G4double GetElasticCrossSection(const G4DynamicParticle*, |
---|
124 | G4double /*ZZ*/, G4double /*AA*/); |
---|
125 | |
---|
126 | G4double GetInelasticCrossSection(const G4DynamicParticle*, |
---|
127 | const G4Element*); |
---|
128 | |
---|
129 | G4double GetInelasticCrossSection(const G4DynamicParticle*, |
---|
130 | G4double /*ZZ*/, G4double /*AA*/); |
---|
131 | |
---|
132 | G4double GetCaptureCrossSection(const G4DynamicParticle* aParticle, |
---|
133 | const G4Element* anElement) |
---|
134 | { |
---|
135 | return GetCaptureCrossSection(aParticle, anElement->GetZ(), |
---|
136 | anElement->GetN()); |
---|
137 | } |
---|
138 | |
---|
139 | G4double GetCaptureCrossSection(const G4DynamicParticle*, |
---|
140 | G4double /*ZZ*/, G4double /*AA*/); |
---|
141 | |
---|
142 | G4double GetFissionCrossSection(const G4DynamicParticle* aParticle, |
---|
143 | const G4Element* anElement) |
---|
144 | { |
---|
145 | return GetFissionCrossSection(aParticle, anElement->GetZ(), |
---|
146 | anElement->GetN()); |
---|
147 | } |
---|
148 | |
---|
149 | G4double GetFissionCrossSection(const G4DynamicParticle*, |
---|
150 | G4double /*ZZ*/, G4double /*AA*/); |
---|
151 | |
---|
152 | |
---|
153 | static void SetCorrectInelasticNearZero(G4bool value) |
---|
154 | { |
---|
155 | correctInelasticNearZero = value; |
---|
156 | } |
---|
157 | |
---|
158 | static G4bool GetCorrectInelasticNearZero() |
---|
159 | { |
---|
160 | return correctInelasticNearZero; |
---|
161 | } |
---|
162 | |
---|
163 | void SetVerboseLevel(G4int value) |
---|
164 | { |
---|
165 | verboseLevel = value; |
---|
166 | } |
---|
167 | |
---|
168 | G4int GetVerboseLevel() |
---|
169 | { |
---|
170 | return verboseLevel; |
---|
171 | } |
---|
172 | |
---|
173 | private: |
---|
174 | |
---|
175 | G4int GetParticleCode(const G4DynamicParticle*); |
---|
176 | |
---|
177 | void CalcScatteringCrossSections(const G4DynamicParticle*, |
---|
178 | G4double /*ZZ*/, G4double /*AA*/); |
---|
179 | |
---|
180 | static G4HadronCrossSections* theInstance; |
---|
181 | |
---|
182 | G4double sigelastic, siginelastic; |
---|
183 | G4ParticleDefinition* prevParticleDefinition; |
---|
184 | G4Element* prevElement; |
---|
185 | G4double prevKineticEnergy; |
---|
186 | |
---|
187 | static G4bool correctInelasticNearZero; |
---|
188 | |
---|
189 | G4int verboseLevel; |
---|
190 | |
---|
191 | // The following arrays are declared static to allow the use of initializers. |
---|
192 | // They are initialized in G4HadronCrossSections.cc, thus providing some |
---|
193 | // data hiding. |
---|
194 | |
---|
195 | static G4float plab[TSIZE]; |
---|
196 | static G4float csel[NPARTS][TSIZE]; |
---|
197 | static G4float csin[NPARTS][TSIZE]; |
---|
198 | |
---|
199 | |
---|
200 | static G4float cspiel[3][TSIZE]; |
---|
201 | static G4float cspiin[3][TSIZE]; |
---|
202 | |
---|
203 | static G4float cspnel[3][TSIZE]; |
---|
204 | static G4float cspnin[3][TSIZE]; |
---|
205 | |
---|
206 | static G4float elab[NELAB]; |
---|
207 | static G4float cnlwat[NCNLW], cnlwel[NCNLW][NELAB], cnlwin[NCNLW][NELAB]; |
---|
208 | |
---|
209 | static G4float cscap[100]; |
---|
210 | |
---|
211 | static G4float ekfiss[NFISS], csfiss[4][NFISS]; |
---|
212 | |
---|
213 | static G4float alpha[NPARTS], alphac[TSIZE]; |
---|
214 | |
---|
215 | static G4float partel[35], partin[35]; |
---|
216 | static G4int icorr[35], intrc[35]; |
---|
217 | |
---|
218 | static G4float csa[4]; |
---|
219 | static G4int ipart2[7]; |
---|
220 | }; |
---|
221 | #endif |
---|