00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 #ifndef G4VeLowEnergyLoss_h
00065 #define G4VeLowEnergyLoss_h 1
00066
00067 #include "globals.hh"
00068 #include "G4ios.hh"
00069 #include "Randomize.hh"
00070 #include "G4Poisson.hh"
00071 #include "G4Electron.hh"
00072 #include "G4VContinuousDiscreteProcess.hh"
00073 #include "G4PhysicsLogVector.hh"
00074 #include "G4PhysicsLinearVector.hh"
00075 #include "G4MaterialCutsCouple.hh"
00076
00077 class G4VeLowEnergyLoss : public G4VContinuousDiscreteProcess
00078 {
00079 public:
00080
00081 G4VeLowEnergyLoss(const G4String& ,
00082 G4ProcessType aType = fNotDefined );
00083 G4VeLowEnergyLoss(G4VeLowEnergyLoss &);
00084
00085 virtual ~G4VeLowEnergyLoss();
00086
00087 virtual G4double GetContinuousStepLimit(const G4Track& track,
00088 G4double previousStepSize,
00089 G4double currentMinimumStep,
00090 G4double& currentSafety) = 0 ;
00091
00092 virtual G4VParticleChange* AlongStepDoIt(const G4Track& track,
00093 const G4Step& Step) = 0 ;
00094
00095 virtual G4double GetMeanFreePath(const G4Track& track,
00096 G4double previousStepSize,
00097 G4ForceCondition* condition) = 0;
00098
00099 virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
00100 const G4Step& Step) = 0;
00101
00102
00103
00104 protected:
00105
00106
00107
00108 G4double GetLossWithFluct(const G4DynamicParticle* aParticle,
00109 const G4MaterialCutsCouple* couple,
00110 G4double MeanLoss,
00111 G4double step);
00112
00113
00114 private:
00115
00116
00117 G4VeLowEnergyLoss();
00118 G4VeLowEnergyLoss & operator=(const G4VeLowEnergyLoss &right);
00119
00120 protected:
00121
00122
00123 const G4Material* lastMaterial;
00124 G4int imat;
00125 G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
00126 G4double e1LogFluct,e2LogFluct,ipotLogFluct;
00127
00128 const G4int nmaxCont1,nmaxCont2 ;
00129
00130
00131
00132 public:
00133
00134 static void SetRndmStep (G4bool value);
00135
00136
00137
00138 static void SetEnlossFluc (G4bool value);
00139
00140
00141
00142 static void SetStepFunction (G4double c1, G4double c2);
00143
00144
00145
00146
00147
00148 protected:
00149
00150
00151 static G4PhysicsTable*
00152 BuildRangeTable(G4PhysicsTable* theDEDXTable,
00153 G4PhysicsTable* theRangeTable,
00154 G4double Tmin,G4double Tmax,G4int nbin);
00155
00156
00157 static G4PhysicsTable*
00158 BuildLabTimeTable(G4PhysicsTable* theDEDXTable,
00159 G4PhysicsTable* theLabTimeTable,
00160 G4double Tmin,G4double Tmax,G4int nbin);
00161
00162 static G4PhysicsTable*
00163 BuildProperTimeTable(G4PhysicsTable* theDEDXTable,
00164 G4PhysicsTable* ProperTimeTable,
00165 G4double Tmin,G4double Tmax,G4int nbin);
00166
00167
00168 static G4PhysicsTable*
00169 BuildRangeCoeffATable(G4PhysicsTable* theRangeTable,
00170 G4PhysicsTable* theCoeffATable,
00171 G4double Tmin,G4double Tmax,G4int nbin);
00172 static G4PhysicsTable*
00173 BuildRangeCoeffBTable(G4PhysicsTable* theRangeTable,
00174 G4PhysicsTable* theCoeffBTable,
00175 G4double Tmin,G4double Tmax,G4int nbin);
00176 static G4PhysicsTable*
00177 BuildRangeCoeffCTable(G4PhysicsTable* theRangeTable,
00178 G4PhysicsTable* theCoeffCTable,
00179 G4double Tmin,G4double Tmax,G4int nbin);
00180
00181
00182 static G4PhysicsTable*
00183 BuildInverseRangeTable(G4PhysicsTable* theRangeTable,
00184 G4PhysicsTable* theRangeCoeffATable,
00185 G4PhysicsTable* theRangeCoeffBTable,
00186 G4PhysicsTable* theRangeCoeffCTable,
00187 G4PhysicsTable* theInverseRangeTable,
00188 G4double Tmin,G4double Tmax,G4int nbin);
00189
00190 private:
00191
00192 static void BuildRangeVector(G4PhysicsTable* theDEDXTable,
00193 G4double Tmin,G4double Tmax,G4int nbin,
00194 G4int materialIndex,G4PhysicsLogVector* rangeVector);
00195
00196 static void BuildRangeVectorNew(const G4PhysicsTable*,G4int,
00197 G4int,G4PhysicsLogVector*);
00198
00199 static G4double RangeIntLin(G4PhysicsVector* physicsVector
00200 ,G4int nbin);
00201
00202 static G4double RangeIntLog(G4PhysicsVector* physicsVector
00203 ,G4int nbin);
00204
00205 static void BuildLabTimeVector(G4PhysicsTable* theDEDXTable,
00206 G4double Tmin,G4double Tmax,G4int nbin,
00207 G4int materialIndex,G4PhysicsLogVector* rangeVector);
00208
00209 static void BuildProperTimeVector(G4PhysicsTable* theDEDXTable,
00210 G4double Tmin,G4double Tmax,G4int nbin,
00211 G4int materialIndex,G4PhysicsLogVector* rangeVector);
00212
00213 static G4double LabTimeIntLog(G4PhysicsVector* physicsVector
00214 ,G4int nbin);
00215
00216 static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,
00217 G4int nbin);
00218
00219 static void InvertRangeVector(G4PhysicsTable* theRangeTable,
00220 G4PhysicsTable* theRangeCoeffATable,
00221 G4PhysicsTable* theRangeCoeffBTable,
00222 G4PhysicsTable* theRangeCoeffCTable,
00223 G4double Tmin,G4double Tmax,G4int nbin,
00224 G4int materialIndex,G4PhysicsLogVector* rangeVector);
00225
00226
00227
00228 protected:
00229
00230
00231 static G4double ParticleMass,taulow,tauhigh,ltaulow,ltauhigh;
00232
00233
00234 static G4double dRoverRange;
00235
00236 static G4double finalRange;
00237 static G4double c1lim,c2lim,c3lim ;
00238
00239 static G4bool rndmStepFlag;
00240 static G4bool EnlossFlucFlag;
00241
00242
00243 };
00244
00245 #endif
00246
00247
00248