Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VeLowEnergyLoss.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 // $Id$
28 //
29 // 3.4.2000 Veronique Lefebure:
30 // Move utils/include/G4VEnergyLoss.hh to
31 // lowenergy/include/G4VeLowEnergyLoss.hh
32 //
33 // ------------------------------------------------------------
34 // GEANT 4 class header file
35 //
36 //
37 // Class Description
38 //
39 // General service class for the energy loss classes
40 //
41 // It contains code needed to compute the range tables,
42 // time tables, the inverse range tables and some auxiliary
43 // tables.
44 // The energy loss fluctuation code is here,too.
45 //
46 // All the EnergyLoss classes are inherited from G4VeLowEnergyLoss
47 // class.
48 //
49 // -----------------------------------------------------------
50 // created on 28 January 2000 by L. Urban
51 // -----------------------------------------------------------
52 //
53 // Modifications:
54 // 20/09/00 V.Ivanchenko update fluctuations
55 // 23/11/01 V.Ivanchenko Move static member-functions from header to source
56 // 22/01/03 V.Ivanchenko Cut per range
57 //
58 // Class description:
59 // Abstract class for Low Energy Electromagnetic electron energy loss
60 // Further documentation available from http://www.ge.infn.it/geant4/lowE
61 
62 // -----------------------------------------------------------
63 
64 #ifndef G4VeLowEnergyLoss_h
65 #define G4VeLowEnergyLoss_h 1
66 
67 #include "globals.hh"
68 #include "G4ios.hh"
69 #include "Randomize.hh"
70 #include "G4Poisson.hh"
71 #include "G4Electron.hh"
73 #include "G4PhysicsLogVector.hh"
74 #include "G4PhysicsLinearVector.hh"
75 #include "G4MaterialCutsCouple.hh"
76 
78 {
79  public:
80 
82  G4ProcessType aType = fNotDefined );
84 
85  virtual ~G4VeLowEnergyLoss();
86 
87  virtual G4double GetContinuousStepLimit(const G4Track& track,
88  G4double previousStepSize,
89  G4double currentMinimumStep,
90  G4double& currentSafety) = 0 ;
91 
92  virtual G4VParticleChange* AlongStepDoIt(const G4Track& track,
93  const G4Step& Step) = 0 ;
94 
95  virtual G4double GetMeanFreePath(const G4Track& track,
96  G4double previousStepSize,
98 
99  virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
100  const G4Step& Step) = 0;
101 
102 
103 
104  protected:// with description
105 
106  // code for the energy loss fluctuation
107 
109  const G4MaterialCutsCouple* couple,
110  G4double MeanLoss,
111  G4double step);
112 
113 
114  private:
115 
116  // hide default constructor and assignment operator as private
118  G4VeLowEnergyLoss & operator=(const G4VeLowEnergyLoss &right);
119 
120  protected:
121 
122  // data members to speed up the fluctuation calculation
127 
129 
130  // static part of the class
131 
132  public: // With description
133 
134  static void SetRndmStep (G4bool value);
135  // use / do not use randomisation in energy loss steplimit
136  // ( default = no randomisation)
137 
138  static void SetEnlossFluc (G4bool value);
139  // compute energy loss with/without fluctuation
140  // ( default : with fluctuation)
141 
142  static void SetStepFunction (G4double c1, G4double c2);
143  // sets values for data members used to compute the step limit:
144  // dRoverRange : max. relative range change in one step,
145  // finalRange : if range <= finalRange --> last step for the particle.
146 
147 
148  protected: // With description
149 
150  // Build range table starting from the DEDXtable
151  static G4PhysicsTable*
152  BuildRangeTable(G4PhysicsTable* theDEDXTable,
153  G4PhysicsTable* theRangeTable,
154  G4double Tmin,G4double Tmax,G4int nbin);
155 
156  // Build time tables starting from the DEDXtable
157  static G4PhysicsTable*
158  BuildLabTimeTable(G4PhysicsTable* theDEDXTable,
159  G4PhysicsTable* theLabTimeTable,
160  G4double Tmin,G4double Tmax,G4int nbin);
161 
162  static G4PhysicsTable*
163  BuildProperTimeTable(G4PhysicsTable* theDEDXTable,
164  G4PhysicsTable* ProperTimeTable,
165  G4double Tmin,G4double Tmax,G4int nbin);
166 
167  // Build tables of coefficients needed for inverting the range table
168  static G4PhysicsTable*
169  BuildRangeCoeffATable(G4PhysicsTable* theRangeTable,
170  G4PhysicsTable* theCoeffATable,
171  G4double Tmin,G4double Tmax,G4int nbin);
172  static G4PhysicsTable*
173  BuildRangeCoeffBTable(G4PhysicsTable* theRangeTable,
174  G4PhysicsTable* theCoeffBTable,
175  G4double Tmin,G4double Tmax,G4int nbin);
176  static G4PhysicsTable*
177  BuildRangeCoeffCTable(G4PhysicsTable* theRangeTable,
178  G4PhysicsTable* theCoeffCTable,
179  G4double Tmin,G4double Tmax,G4int nbin);
180 
181  // Invert range table
182  static G4PhysicsTable*
183  BuildInverseRangeTable(G4PhysicsTable* theRangeTable,
184  G4PhysicsTable* theRangeCoeffATable,
185  G4PhysicsTable* theRangeCoeffBTable,
186  G4PhysicsTable* theRangeCoeffCTable,
187  G4PhysicsTable* theInverseRangeTable,
188  G4double Tmin,G4double Tmax,G4int nbin);
189 
190  private:
191 
192  static void BuildRangeVector(G4PhysicsTable* theDEDXTable,
193  G4double Tmin,G4double Tmax,G4int nbin,
194  G4int materialIndex,G4PhysicsLogVector* rangeVector);
195 
196  static void BuildRangeVectorNew(const G4PhysicsTable*,G4int,
198 
199  static G4double RangeIntLin(G4PhysicsVector* physicsVector
200  ,G4int nbin);
201 
202  static G4double RangeIntLog(G4PhysicsVector* physicsVector
203  ,G4int nbin);
204 
205  static void BuildLabTimeVector(G4PhysicsTable* theDEDXTable,
206  G4double Tmin,G4double Tmax,G4int nbin,
207  G4int materialIndex,G4PhysicsLogVector* rangeVector);
208 
209  static void BuildProperTimeVector(G4PhysicsTable* theDEDXTable,
210  G4double Tmin,G4double Tmax,G4int nbin,
211  G4int materialIndex,G4PhysicsLogVector* rangeVector);
212 
213  static G4double LabTimeIntLog(G4PhysicsVector* physicsVector
214  ,G4int nbin);
215 
216  static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,
217  G4int nbin);
218 
219  static void InvertRangeVector(G4PhysicsTable* theRangeTable,
220  G4PhysicsTable* theRangeCoeffATable,
221  G4PhysicsTable* theRangeCoeffBTable,
222  G4PhysicsTable* theRangeCoeffCTable,
223  G4double Tmin,G4double Tmax,G4int nbin,
224  G4int materialIndex,G4PhysicsLogVector* rangeVector);
225 
226 
227  // data members
228  protected:
229 
230  // variables for the integration routines
232 
233 
234  static G4double dRoverRange; // dRoverRange is the maximum allowed
235  // deltarange/range in one Step
236  static G4double finalRange; // final step before stopping
237  static G4double c1lim,c2lim,c3lim ; // coeffs for computing steplimit
238 
239  static G4bool rndmStepFlag; // control the randomization of the step
240  static G4bool EnlossFlucFlag; // control the energy loss fluctuation
241 
242 
243 };
244 
245 #endif
246 
247 
248