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