File indexing completed on 2025-01-31 09:22:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063 #ifndef G4RDVeLowEnergyLoss_h
0064 #define G4RDVeLowEnergyLoss_h 1
0065
0066 #include "globals.hh"
0067 #include "G4ios.hh"
0068 #include "Randomize.hh"
0069 #include "G4Poisson.hh"
0070 #include "G4Electron.hh"
0071 #include "G4VContinuousDiscreteProcess.hh"
0072 #include "G4PhysicsLogVector.hh"
0073 #include "G4PhysicsLinearVector.hh"
0074 #include "G4MaterialCutsCouple.hh"
0075
0076 class G4RDVeLowEnergyLoss : public G4VContinuousDiscreteProcess
0077 {
0078 public:
0079
0080 G4RDVeLowEnergyLoss(const G4String& ,
0081 G4ProcessType aType = fNotDefined );
0082 G4RDVeLowEnergyLoss(G4RDVeLowEnergyLoss &);
0083
0084 virtual ~G4RDVeLowEnergyLoss();
0085
0086 virtual G4double GetContinuousStepLimit(const G4Track& track,
0087 G4double previousStepSize,
0088 G4double currentMinimumStep,
0089 G4double& currentSafety) = 0 ;
0090
0091 virtual G4VParticleChange* AlongStepDoIt(const G4Track& track,
0092 const G4Step& Step) = 0 ;
0093
0094 virtual G4double GetMeanFreePath(const G4Track& track,
0095 G4double previousStepSize,
0096 G4ForceCondition* condition) = 0;
0097
0098 virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
0099 const G4Step& Step) = 0;
0100
0101
0102
0103 protected:
0104
0105
0106
0107 G4double GetLossWithFluct(const G4DynamicParticle* aParticle,
0108 const G4MaterialCutsCouple* couple,
0109 G4double MeanLoss,
0110 G4double step);
0111
0112
0113 private:
0114
0115
0116 G4RDVeLowEnergyLoss();
0117 G4RDVeLowEnergyLoss & operator=(const G4RDVeLowEnergyLoss &right);
0118
0119 protected:
0120
0121
0122 const G4Material* lastMaterial;
0123 G4int imat;
0124 G4double f1Fluct,f2Fluct,e1Fluct,e2Fluct,rateFluct,ipotFluct;
0125 G4double e1LogFluct,e2LogFluct,ipotLogFluct;
0126
0127 const G4int nmaxCont1,nmaxCont2 ;
0128
0129
0130
0131 public:
0132
0133 static void SetRndmStep (G4bool value);
0134
0135
0136
0137 static void SetEnlossFluc (G4bool value);
0138
0139
0140
0141 static void SetStepFunction (G4double c1, G4double c2);
0142
0143
0144
0145
0146
0147 protected:
0148
0149
0150 static G4PhysicsTable*
0151 BuildRangeTable(G4PhysicsTable* theDEDXTable,
0152 G4PhysicsTable* theRangeTable,
0153 G4double Tmin,G4double Tmax,G4int nbin);
0154
0155
0156 static G4PhysicsTable*
0157 BuildLabTimeTable(G4PhysicsTable* theDEDXTable,
0158 G4PhysicsTable* theLabTimeTable,
0159 G4double Tmin,G4double Tmax,G4int nbin);
0160
0161 static G4PhysicsTable*
0162 BuildProperTimeTable(G4PhysicsTable* theDEDXTable,
0163 G4PhysicsTable* ProperTimeTable,
0164 G4double Tmin,G4double Tmax,G4int nbin);
0165
0166
0167 static G4PhysicsTable*
0168 BuildRangeCoeffATable(G4PhysicsTable* theRangeTable,
0169 G4PhysicsTable* theCoeffATable,
0170 G4double Tmin,G4double Tmax,G4int nbin);
0171 static G4PhysicsTable*
0172 BuildRangeCoeffBTable(G4PhysicsTable* theRangeTable,
0173 G4PhysicsTable* theCoeffBTable,
0174 G4double Tmin,G4double Tmax,G4int nbin);
0175 static G4PhysicsTable*
0176 BuildRangeCoeffCTable(G4PhysicsTable* theRangeTable,
0177 G4PhysicsTable* theCoeffCTable,
0178 G4double Tmin,G4double Tmax,G4int nbin);
0179
0180
0181 static G4PhysicsTable*
0182 BuildInverseRangeTable(G4PhysicsTable* theRangeTable,
0183 G4PhysicsTable* theRangeCoeffATable,
0184 G4PhysicsTable* theRangeCoeffBTable,
0185 G4PhysicsTable* theRangeCoeffCTable,
0186 G4PhysicsTable* theInverseRangeTable,
0187 G4double Tmin,G4double Tmax,G4int nbin);
0188
0189 private:
0190
0191 static void BuildRangeVector(G4PhysicsTable* theDEDXTable,
0192 G4double Tmin,G4double Tmax,G4int nbin,
0193 G4int materialIndex,G4PhysicsLogVector* rangeVector);
0194
0195 static void BuildRangeVectorNew(const G4PhysicsTable*,G4int,
0196 G4int,G4PhysicsLogVector*);
0197
0198 static G4double RangeIntLin(G4PhysicsVector* physicsVector
0199 ,G4int nbin);
0200
0201 static G4double RangeIntLog(G4PhysicsVector* physicsVector
0202 ,G4int nbin);
0203
0204 static void BuildLabTimeVector(G4PhysicsTable* theDEDXTable,
0205 G4double Tmin,G4double Tmax,G4int nbin,
0206 G4int materialIndex,G4PhysicsLogVector* rangeVector);
0207
0208 static void BuildProperTimeVector(G4PhysicsTable* theDEDXTable,
0209 G4double Tmin,G4double Tmax,G4int nbin,
0210 G4int materialIndex,G4PhysicsLogVector* rangeVector);
0211
0212 static G4double LabTimeIntLog(G4PhysicsVector* physicsVector
0213 ,G4int nbin);
0214
0215 static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector,
0216 G4int nbin);
0217
0218 static void InvertRangeVector(G4PhysicsTable* theRangeTable,
0219 G4PhysicsTable* theRangeCoeffATable,
0220 G4PhysicsTable* theRangeCoeffBTable,
0221 G4PhysicsTable* theRangeCoeffCTable,
0222 G4double Tmin,G4double Tmax,G4int nbin,
0223 G4int materialIndex,G4PhysicsLogVector* rangeVector);
0224
0225
0226
0227 protected:
0228
0229
0230 static G4double ParticleMass,taulow,tauhigh,ltaulow,ltauhigh;
0231
0232
0233 static G4double dRoverRange;
0234
0235 static G4double finalRange;
0236 static G4double c1lim,c2lim,c3lim ;
0237
0238 static G4bool rndmStepFlag;
0239 static G4bool EnlossFlucFlag;
0240
0241
0242 };
0243
0244 #endif
0245
0246
0247