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 #ifndef G4VEnergyLoss_h
00054 #define G4VEnergyLoss_h 1
00055
00056 #include "globals.hh"
00057 #include "G4ios.hh"
00058 #include "Randomize.hh"
00059 #include "G4Poisson.hh"
00060 #include "G4Electron.hh"
00061 #include "G4VContinuousDiscreteProcess.hh"
00062 #include "G4PhysicsLogVector.hh"
00063 #include "G4PhysicsLinearVector.hh"
00064 #include "G4MaterialCutsCouple.hh"
00065
00066 class G4EnergyLossMessenger;
00067
00068 class G4VEnergyLoss : public G4VContinuousDiscreteProcess
00069 {
00070 public:
00071
00072 G4VEnergyLoss(const G4String&,G4ProcessType aType = fNotDefined );
00073
00074 virtual ~G4VEnergyLoss();
00075
00076 virtual G4double GetContinuousStepLimit(const G4Track& track,
00077 G4double previousStepSize,
00078 G4double currentMinimumStep,
00079 G4double& currentSafety) = 0 ;
00080
00081 virtual G4VParticleChange* AlongStepDoIt(const G4Track& track,
00082 const G4Step& Step) = 0 ;
00083
00084 virtual G4double GetMeanFreePath(const G4Track& track,
00085 G4double previousStepSize,
00086 G4ForceCondition* condition) = 0;
00087
00088 virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
00089 const G4Step& Step) = 0;
00090
00091
00092
00093 protected:
00094
00095
00096
00097 G4double GetLossWithFluct(const G4DynamicParticle* aParticle,
00098 const G4MaterialCutsCouple* couple,
00099 G4double ChargeSquare,
00100 G4double MeanLoss,
00101 G4double step);
00102
00103
00104 G4PhysicsTable*
00105 BuildRangeTable(G4PhysicsTable* theDEDXTable,
00106 G4PhysicsTable* theRangeTable,
00107 G4double Tmin,G4double Tmax,G4int nbin);
00108
00109
00110 G4PhysicsTable*
00111 BuildLabTimeTable(G4PhysicsTable* theDEDXTable,
00112 G4PhysicsTable* theLabTimeTable,
00113 G4double Tmin,G4double Tmax,G4int nbin);
00114
00115 G4PhysicsTable*
00116 BuildProperTimeTable(G4PhysicsTable* theDEDXTable,
00117 G4PhysicsTable* ProperTimeTable,
00118 G4double Tmin,G4double Tmax,G4int nbin);
00119
00120
00121 G4PhysicsTable*
00122 BuildRangeCoeffATable(G4PhysicsTable* theRangeTable,
00123 G4PhysicsTable* theCoeffATable,
00124 G4double Tmin,G4double Tmax,G4int nbin);
00125 G4PhysicsTable*
00126 BuildRangeCoeffBTable(G4PhysicsTable* theRangeTable,
00127 G4PhysicsTable* theCoeffBTable,
00128 G4double Tmin,G4double Tmax,G4int nbin);
00129 G4PhysicsTable*
00130 BuildRangeCoeffCTable(G4PhysicsTable* theRangeTable,
00131 G4PhysicsTable* theCoeffCTable,
00132 G4double Tmin,G4double Tmax,G4int nbin);
00133
00134
00135 G4PhysicsTable*
00136 BuildInverseRangeTable(G4PhysicsTable* theRangeTable,
00137 G4PhysicsTable* theRangeCoeffATable,
00138 G4PhysicsTable* theRangeCoeffBTable,
00139 G4PhysicsTable* theRangeCoeffCTable,
00140 G4PhysicsTable* theInverseRangeTable,
00141 G4double Tmin,G4double Tmax,G4int nbin);
00142
00143 private:
00144
00145 void BuildRangeVector(G4PhysicsTable* theDEDXTable,
00146 G4double Tmin,G4double Tmax,G4int nbin,
00147 G4int materialIndex,G4PhysicsLogVector* rangeVector);
00148
00149 G4double RangeIntLin(G4PhysicsVector* physicsVector,G4int nbin);
00150
00151 G4double RangeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
00152
00153 void BuildLabTimeVector(G4PhysicsTable* theDEDXTable,
00154 G4double Tmin,G4double Tmax,G4int nbin,
00155 G4int materialIndex,G4PhysicsLogVector* rangeVector);
00156
00157 void BuildProperTimeVector(G4PhysicsTable* theDEDXTable,
00158 G4double Tmin,G4double Tmax,G4int nbin,
00159 G4int materialIndex,G4PhysicsLogVector* rangeVector);
00160
00161 G4double LabTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
00162
00163 G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,G4int nbin);
00164
00165 void InvertRangeVector(G4PhysicsTable* theRangeTable,
00166 G4PhysicsTable* theRangeCoeffATable,
00167 G4PhysicsTable* theRangeCoeffBTable,
00168 G4PhysicsTable* theRangeCoeffCTable,
00169 G4double Tmin,G4double Tmax,G4int nbin,
00170 G4int materialIndex,G4PhysicsLogVector* rangeVector);
00171
00172
00173 protected:
00174
00175 G4double ParticleMass;
00176
00177 private:
00178
00179
00180 const G4Material* lastMaterial;
00181 G4int imat;
00182 G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
00183 G4double e1LogFluct,e2LogFluct,ipotLogFluct;
00184
00185 const G4int nmaxCont1,nmaxCont2 ;
00186
00187
00188 G4double taulow,tauhigh,ltaulow,ltauhigh;
00189
00190
00191
00192 public:
00193
00194 static void SetRndmStep(G4bool value);
00195
00196
00197
00198 static void SetEnlossFluc(G4bool value);
00199
00200
00201
00202 static void SetSubSec(G4bool value);
00203
00204
00205
00206 static void SetMinDeltaCutInRange(G4double value);
00207
00208
00209
00210
00211
00212 static void SetStepFunction (G4double c1, G4double c2);
00213
00214
00215
00216
00217
00218 protected:
00219
00220 static G4bool EqualCutVectors( G4double* vec1, G4double* vec2 );
00221 static G4double* CopyCutVectors( G4double* dest, G4double* source );
00222 G4bool CutsWhereModified();
00223
00224
00225 protected:
00226
00227 static G4double dRoverRange;
00228
00229 static G4double finalRange;
00230 static G4double finalRangeRequested;
00231 static G4double c1lim,c2lim,c3lim ;
00232
00233 static G4bool rndmStepFlag;
00234 static G4bool EnlossFlucFlag;
00235 static G4bool subSecFlag;
00236
00237 static G4double MinDeltaCutInRange;
00238 static G4double* MinDeltaEnergy ;
00239 static G4bool* LowerLimitForced ;
00240
00241 static G4bool setMinDeltaCutInRange ;
00242
00243 static G4EnergyLossMessenger* ELossMessenger;
00244 };
00245
00246 #endif
00247
00248
00249