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
00065
00066
00067
00068
00069
00070
00071
00072
00073 #ifndef G4HRDENERGYLOSS_HH
00074 #define G4HRDENERGYLOSS_HH 1
00075
00076 #include "G4ios.hh"
00077 #include "globals.hh"
00078 #include "Randomize.hh"
00079 #include "G4VContinuousDiscreteProcess.hh"
00080 #include "G4Material.hh"
00081 #include "G4Element.hh"
00082 #include "G4Proton.hh"
00083 #include "G4AntiProton.hh"
00084 #include "G4Electron.hh"
00085 #include "G4VParticleChange.hh"
00086 #include "G4Track.hh"
00087 #include "G4Step.hh"
00088 #include "G4PhysicsLogVector.hh"
00089 #include "G4PhysicsLinearVector.hh"
00090
00091 class G4EnergyLossMessenger;
00092
00093 class G4hRDEnergyLoss : public G4VContinuousDiscreteProcess
00094
00095 {
00096 public:
00097
00098 G4hRDEnergyLoss(const G4String& );
00099
00100 ~G4hRDEnergyLoss();
00101
00102 virtual G4double GetMeanFreePath(
00103 const G4Track& track,
00104 G4double previousStepSize,
00105 enum G4ForceCondition* condition
00106 ) = 0 ;
00107
00108 virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
00109 const G4Step& Step) = 0 ;
00110
00111
00112
00113
00114
00115 static G4int GetNumberOfProcesses();
00116
00117
00118 static void SetNumberOfProcesses(G4int number);
00119
00120
00121 static void PlusNumberOfProcesses();
00122
00123
00124 static void MinusNumberOfProcesses();
00125
00126 static void SetdRoverRange(G4double value);
00127 static void SetRndmStep (G4bool value);
00128 static void SetEnlossFluc (G4bool value);
00129 static void SetStepFunction (G4double c1, G4double c2);
00130
00131 protected:
00132
00133 G4bool CutsWhereModified();
00134
00135
00136 const G4double MaxExcitationNumber ;
00137 const G4double probLimFluct ;
00138 const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
00139
00140 static void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
00141
00142 protected:
00143
00144 static G4PhysicsTable* theDEDXpTable ;
00145 static G4PhysicsTable* theDEDXpbarTable ;
00146 static G4PhysicsTable* theRangepTable ;
00147 static G4PhysicsTable* theRangepbarTable ;
00148
00149
00150 static G4PhysicsTable* theInverseRangepTable ;
00151 static G4PhysicsTable* theInverseRangepbarTable ;
00152
00153
00154 static G4PhysicsTable* theLabTimepTable ;
00155 static G4PhysicsTable* theLabTimepbarTable ;
00156
00157 static G4PhysicsTable* theProperTimepTable ;
00158 static G4PhysicsTable* theProperTimepbarTable ;
00159
00160
00161
00162 static G4PhysicsTable** RecorderOfpProcess;
00163 static G4PhysicsTable** RecorderOfpbarProcess;
00164 static G4int CounterOfpProcess ;
00165 static G4int CounterOfpbarProcess ;
00166
00167
00168 static G4double ParticleMass ;
00169
00170
00171 static G4double ptableElectronCutInRange;
00172 static G4double pbartableElectronCutInRange;
00173
00174 static G4double Charge ;
00175
00176 static G4double LowestKineticEnergy;
00177 static G4double HighestKineticEnergy;
00178 static G4int TotBin;
00179
00180
00181 static G4double RTable,LOGRTable;
00182
00183
00184
00185 G4PhysicsTable* theLossTable ;
00186
00187 G4double linLossLimit ;
00188
00189 G4double MinKineticEnergy ;
00190
00191 static G4double dRoverRange ;
00192
00193 static G4double finalRange ;
00194 static G4double c1lim,c2lim,c3lim ;
00195
00196 static G4bool rndmStepFlag ;
00197 static G4bool EnlossFlucFlag ;
00198
00199
00200 private:
00201
00202
00203
00204 G4hRDEnergyLoss(G4hRDEnergyLoss &);
00205 G4hRDEnergyLoss & operator=(const G4hRDEnergyLoss &right);
00206
00207
00208 static G4double Mass,taulow,tauhigh,ltaulow,ltauhigh;
00209
00210
00211
00212
00213 static void BuildRangeTable(const G4ParticleDefinition& aParticleType);
00214
00215 static void BuildInverseRangeTable(const G4ParticleDefinition& aParticleType);
00216
00217 static void BuildTimeTables(const G4ParticleDefinition& aParticleType);
00218
00219 static void BuildLabTimeVector(G4int materialIndex,
00220 G4PhysicsLogVector* rangeVector);
00221
00222 static void BuildProperTimeVector(G4int materialIndex,
00223 G4PhysicsLogVector* rangeVector);
00224
00225 static void InvertRangeVector(G4int materialIndex,
00226 G4PhysicsLogVector* rangeVector);
00227
00228 static void BuildRangeVector(G4int materialIndex,
00229 G4PhysicsLogVector* rangeVector);
00230
00231 static G4double LabTimeIntLog(G4PhysicsVector* physicsVector, G4int nbin);
00232
00233 static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector, G4int nbin);
00234
00235 static G4double RangeIntLin(G4PhysicsVector* physicsVector, G4int nbin);
00236
00237 static G4double RangeIntLog(G4PhysicsVector* physicsVector, G4int nbin);
00238
00239 static void BuildRangeCoeffATable( const G4ParticleDefinition& aParticleType);
00240 static void BuildRangeCoeffBTable( const G4ParticleDefinition& aParticleType);
00241 static void BuildRangeCoeffCTable(const G4ParticleDefinition& aParticleType);
00242
00243
00244
00245 static G4PhysicsTable* theDEDXTable;
00246
00247 static G4PhysicsTable* theRangeTable;
00248 static G4PhysicsTable* theInverseRangeTable;
00249
00250 static G4PhysicsTable* theLabTimeTable;
00251 static G4PhysicsTable* theProperTimeTable;
00252
00253 static G4PhysicsTable** RecorderOfProcess;
00254 static G4int CounterOfProcess;
00255
00256 static G4PhysicsTable* thepRangeCoeffATable;
00257 static G4PhysicsTable* thepRangeCoeffBTable;
00258 static G4PhysicsTable* thepRangeCoeffCTable;
00259 static G4PhysicsTable* thepbarRangeCoeffATable;
00260 static G4PhysicsTable* thepbarRangeCoeffBTable;
00261 static G4PhysicsTable* thepbarRangeCoeffCTable;
00262
00263 static G4PhysicsTable* theRangeCoeffATable;
00264 static G4PhysicsTable* theRangeCoeffBTable;
00265 static G4PhysicsTable* theRangeCoeffCTable;
00266 static G4int NumberOfProcesses ;
00267
00268 };
00269
00270 #endif
00271
00272
00273