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 | // $Id: G4hLowEnergyLoss.hh,v 1.17 2006/06/29 19:37:58 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: $ |
---|
29 | // |
---|
30 | // $Id: |
---|
31 | // ------------------------------------------------------------ |
---|
32 | // GEANT 4 class header file |
---|
33 | // |
---|
34 | // History: first implementation, based on object model of |
---|
35 | // 2nd December 1995, G.Cosmo |
---|
36 | // ---------- G4hEnergyLoss physics process ----------- |
---|
37 | // by Laszlo Urban, 30 May 1997 |
---|
38 | // |
---|
39 | // ************************************************************ |
---|
40 | // It is the first implementation of the NEW UNIFIED ENERGY LOSS PROCESS. |
---|
41 | // It calculates the continuous energy loss for charged hadrons. |
---|
42 | // Processes giving contribution to the continuous loss : |
---|
43 | // ionisation (= cont.ion.loss + delta ray production) |
---|
44 | // can be added more easily .......... |
---|
45 | // This class creates static proton/antiproton dE/dx and range tables , |
---|
46 | // which tables can be used by other processes. |
---|
47 | // The energy loss for other charged hadrons is calculated from the p/pbar |
---|
48 | // tables with scaled kinetic energy. |
---|
49 | // |
---|
50 | // 7/10/98 L.Urban some bugs fixed + some cleanup |
---|
51 | // 22/10/98 L.Urban cleanup |
---|
52 | // 02/02/99 L.Urban several bugs fixed |
---|
53 | // 31/03/00 V.Ivanchenko rename to lowenergy as G4hLowEnergyLoss.hh |
---|
54 | // 09/08/00 V.Ivanchenko remove GetContinuousStepLimit and IsApplicable |
---|
55 | // 23/11/01 V.Ivanchenko Move static member-functions from header to source |
---|
56 | // 22/01/03 V.Ivanchenko Cuts per region |
---|
57 | // 18/04/03 V.Ivanchenko Make dRoverRange protected |
---|
58 | // |
---|
59 | // Class description: |
---|
60 | // Class for Low Energy electromagnetic energy loss of hadrons |
---|
61 | // Further documentation available from http://www.ge.infn.it/geant4/lowE |
---|
62 | |
---|
63 | // **************************************************************************** |
---|
64 | |
---|
65 | #ifndef G4hLowEnergyLoss_h |
---|
66 | #define G4hLowEnergyLoss_h 1 |
---|
67 | |
---|
68 | #include "G4ios.hh" |
---|
69 | #include "globals.hh" |
---|
70 | #include "Randomize.hh" |
---|
71 | #include "G4VContinuousDiscreteProcess.hh" |
---|
72 | #include "G4Material.hh" |
---|
73 | #include "G4Element.hh" |
---|
74 | #include "G4Proton.hh" |
---|
75 | #include "G4AntiProton.hh" |
---|
76 | #include "G4Electron.hh" |
---|
77 | #include "G4VParticleChange.hh" |
---|
78 | #include "G4Track.hh" |
---|
79 | #include "G4Step.hh" |
---|
80 | #include "G4PhysicsLogVector.hh" |
---|
81 | #include "G4PhysicsLinearVector.hh" |
---|
82 | |
---|
83 | class G4EnergyLossMessenger; |
---|
84 | |
---|
85 | class G4hLowEnergyLoss : public G4VContinuousDiscreteProcess |
---|
86 | |
---|
87 | { |
---|
88 | public: |
---|
89 | |
---|
90 | G4hLowEnergyLoss(const G4String& ); |
---|
91 | |
---|
92 | ~G4hLowEnergyLoss(); |
---|
93 | |
---|
94 | virtual G4double GetMeanFreePath( |
---|
95 | const G4Track& track, |
---|
96 | G4double previousStepSize, |
---|
97 | enum G4ForceCondition* condition |
---|
98 | ) = 0 ; |
---|
99 | |
---|
100 | virtual G4VParticleChange* PostStepDoIt(const G4Track& track, |
---|
101 | const G4Step& Step) = 0 ; |
---|
102 | |
---|
103 | |
---|
104 | protected: |
---|
105 | |
---|
106 | G4bool CutsWhereModified(); |
---|
107 | |
---|
108 | private: |
---|
109 | |
---|
110 | // hide assignment operator |
---|
111 | |
---|
112 | G4hLowEnergyLoss(G4hLowEnergyLoss &); |
---|
113 | G4hLowEnergyLoss & operator=(const G4hLowEnergyLoss &right); |
---|
114 | |
---|
115 | |
---|
116 | // ===================================================================== |
---|
117 | |
---|
118 | public: |
---|
119 | |
---|
120 | private: |
---|
121 | |
---|
122 | // variables for the integration routines |
---|
123 | static G4double Mass,taulow,tauhigh,ltaulow,ltauhigh; |
---|
124 | |
---|
125 | protected: |
---|
126 | // G4Material *lastMaterial ; |
---|
127 | const G4double MaxExcitationNumber ; |
---|
128 | const G4double probLimFluct ; |
---|
129 | const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ; |
---|
130 | |
---|
131 | // ==================================================================== |
---|
132 | // static part of the class |
---|
133 | |
---|
134 | public: |
---|
135 | |
---|
136 | // get the number of processes contributing to the cont.energy loss |
---|
137 | static G4int GetNumberOfProcesses(); |
---|
138 | |
---|
139 | // set the number of processes contributing to the cont.energy loss |
---|
140 | static void SetNumberOfProcesses(G4int number); |
---|
141 | |
---|
142 | // Increment the number of processes contributing to the cont.energy loss |
---|
143 | static void PlusNumberOfProcesses(); |
---|
144 | |
---|
145 | // decrement the number of processes contributing to the cont.energy loss |
---|
146 | static void MinusNumberOfProcesses(); |
---|
147 | |
---|
148 | static void SetdRoverRange(G4double value); |
---|
149 | static void SetRndmStep (G4bool value); |
---|
150 | static void SetEnlossFluc (G4bool value); |
---|
151 | static void SetStepFunction (G4double c1, G4double c2); |
---|
152 | |
---|
153 | protected: |
---|
154 | |
---|
155 | static void BuildDEDXTable(const G4ParticleDefinition& aParticleType); |
---|
156 | |
---|
157 | private: |
---|
158 | |
---|
159 | static void BuildRangeTable(const G4ParticleDefinition& aParticleType); |
---|
160 | |
---|
161 | static void BuildInverseRangeTable( |
---|
162 | const G4ParticleDefinition& aParticleType); |
---|
163 | |
---|
164 | static void BuildTimeTables(const G4ParticleDefinition& aParticleType); |
---|
165 | |
---|
166 | static void BuildLabTimeVector(G4int materialIndex, |
---|
167 | G4PhysicsLogVector* rangeVector); |
---|
168 | |
---|
169 | static void BuildProperTimeVector(G4int materialIndex, |
---|
170 | G4PhysicsLogVector* rangeVector); |
---|
171 | |
---|
172 | static void InvertRangeVector(G4int materialIndex, |
---|
173 | G4PhysicsLogVector* rangeVector); |
---|
174 | |
---|
175 | static void BuildRangeVector(G4int materialIndex, |
---|
176 | G4PhysicsLogVector* rangeVector); |
---|
177 | |
---|
178 | static G4double LabTimeIntLog(G4PhysicsVector* physicsVector |
---|
179 | ,G4int nbin); |
---|
180 | |
---|
181 | static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector, |
---|
182 | G4int nbin); |
---|
183 | |
---|
184 | static G4double RangeIntLin(G4PhysicsVector* physicsVector |
---|
185 | ,G4int nbin); |
---|
186 | |
---|
187 | static G4double RangeIntLog(G4PhysicsVector* physicsVector |
---|
188 | ,G4int nbin); |
---|
189 | |
---|
190 | static void BuildRangeCoeffATable( |
---|
191 | const G4ParticleDefinition& aParticleType); |
---|
192 | static void BuildRangeCoeffBTable( |
---|
193 | const G4ParticleDefinition& aParticleType); |
---|
194 | static void BuildRangeCoeffCTable( |
---|
195 | const G4ParticleDefinition& aParticleType); |
---|
196 | |
---|
197 | // ==================================================================== |
---|
198 | |
---|
199 | public: |
---|
200 | |
---|
201 | protected: |
---|
202 | |
---|
203 | static G4PhysicsTable* theDEDXpTable ; |
---|
204 | static G4PhysicsTable* theDEDXpbarTable ; |
---|
205 | static G4PhysicsTable* theRangepTable ; |
---|
206 | static G4PhysicsTable* theRangepbarTable ; |
---|
207 | |
---|
208 | //inverse of the range tables |
---|
209 | static G4PhysicsTable* theInverseRangepTable ; |
---|
210 | static G4PhysicsTable* theInverseRangepbarTable ; |
---|
211 | |
---|
212 | //lab and proper time tables |
---|
213 | static G4PhysicsTable* theLabTimepTable ; |
---|
214 | static G4PhysicsTable* theLabTimepbarTable ; |
---|
215 | |
---|
216 | static G4PhysicsTable* theProperTimepTable ; |
---|
217 | static G4PhysicsTable* theProperTimepbarTable ; |
---|
218 | |
---|
219 | // processes inherited from G4hLowEnergyLoss |
---|
220 | // register themselves in the static array Recorder |
---|
221 | static G4PhysicsTable** RecorderOfpProcess; |
---|
222 | static G4PhysicsTable** RecorderOfpbarProcess; |
---|
223 | static G4int CounterOfpProcess ; |
---|
224 | static G4int CounterOfpbarProcess ; |
---|
225 | |
---|
226 | // particle mass |
---|
227 | static G4double ParticleMass ; |
---|
228 | |
---|
229 | // cut in range |
---|
230 | static G4double ptableElectronCutInRange; |
---|
231 | static G4double pbartableElectronCutInRange; |
---|
232 | |
---|
233 | static G4double Charge ; |
---|
234 | |
---|
235 | |
---|
236 | static G4double LowestKineticEnergy; |
---|
237 | static G4double HighestKineticEnergy; |
---|
238 | static G4int TotBin; // number of bins in table, |
---|
239 | // calculated in BuildPhysicsTable |
---|
240 | |
---|
241 | static G4double RTable,LOGRTable; // LOGRTable=std::log(HighestKineticEnergy |
---|
242 | // /LowestKineticEnergy)/TotBin |
---|
243 | // RTable = std::exp(LOGRTable) |
---|
244 | private: |
---|
245 | |
---|
246 | static G4PhysicsTable* theDEDXTable; |
---|
247 | |
---|
248 | static G4PhysicsTable* theRangeTable; |
---|
249 | static G4PhysicsTable* theInverseRangeTable; |
---|
250 | |
---|
251 | static G4PhysicsTable* theLabTimeTable; |
---|
252 | static G4PhysicsTable* theProperTimeTable; |
---|
253 | |
---|
254 | static G4PhysicsTable** RecorderOfProcess; |
---|
255 | static G4int CounterOfProcess; |
---|
256 | |
---|
257 | static G4PhysicsTable* thepRangeCoeffATable; |
---|
258 | static G4PhysicsTable* thepRangeCoeffBTable; |
---|
259 | static G4PhysicsTable* thepRangeCoeffCTable; |
---|
260 | static G4PhysicsTable* thepbarRangeCoeffATable; |
---|
261 | static G4PhysicsTable* thepbarRangeCoeffBTable; |
---|
262 | static G4PhysicsTable* thepbarRangeCoeffCTable; |
---|
263 | |
---|
264 | static G4PhysicsTable* theRangeCoeffATable; |
---|
265 | static G4PhysicsTable* theRangeCoeffBTable; |
---|
266 | static G4PhysicsTable* theRangeCoeffCTable; |
---|
267 | static G4int NumberOfProcesses ; |
---|
268 | |
---|
269 | protected: |
---|
270 | |
---|
271 | G4PhysicsTable* theLossTable ; |
---|
272 | |
---|
273 | G4double linLossLimit ; |
---|
274 | |
---|
275 | G4double MinKineticEnergy ; |
---|
276 | |
---|
277 | static G4double dRoverRange ; // maximum allowed deltarange/range |
---|
278 | // in one step |
---|
279 | static G4double finalRange ; // last step before stop |
---|
280 | static G4double c1lim,c2lim,c3lim ; // coeffs for computing steplimit |
---|
281 | |
---|
282 | static G4bool rndmStepFlag ; |
---|
283 | static G4bool EnlossFlucFlag ; |
---|
284 | |
---|
285 | }; |
---|
286 | |
---|
287 | #endif |
---|
288 | |
---|
289 | |
---|
290 | |
---|