File indexing completed on 2025-01-18 09:58:24
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
0064
0065
0066
0067
0068
0069
0070
0071 #ifndef G4HRDENERGYLOSS_HH
0072 #define G4HRDENERGYLOSS_HH 1
0073
0074 #include "G4ios.hh"
0075 #include "globals.hh"
0076 #include "Randomize.hh"
0077 #include "G4VContinuousDiscreteProcess.hh"
0078 #include "G4Material.hh"
0079 #include "G4Element.hh"
0080 #include "G4Proton.hh"
0081 #include "G4AntiProton.hh"
0082 #include "G4Electron.hh"
0083 #include "G4VParticleChange.hh"
0084 #include "G4Track.hh"
0085 #include "G4Step.hh"
0086 #include "G4PhysicsLogVector.hh"
0087 #include "G4PhysicsLinearVector.hh"
0088
0089 class G4EnergyLossMessenger;
0090
0091 class G4hRDEnergyLoss : public G4VContinuousDiscreteProcess
0092
0093 {
0094 public:
0095
0096 G4hRDEnergyLoss(const G4String& );
0097
0098 ~G4hRDEnergyLoss();
0099
0100 virtual G4double GetMeanFreePath(
0101 const G4Track& track,
0102 G4double previousStepSize,
0103 enum G4ForceCondition* condition
0104 ) = 0 ;
0105
0106 virtual G4VParticleChange* PostStepDoIt(const G4Track& track,
0107 const G4Step& Step) = 0 ;
0108
0109
0110
0111
0112
0113 static G4int GetNumberOfProcesses();
0114
0115
0116 static void SetNumberOfProcesses(G4int number);
0117
0118
0119 static void PlusNumberOfProcesses();
0120
0121
0122 static void MinusNumberOfProcesses();
0123
0124 static void SetdRoverRange(G4double value);
0125 static void SetRndmStep (G4bool value);
0126 static void SetEnlossFluc (G4bool value);
0127 static void SetStepFunction (G4double c1, G4double c2);
0128
0129 protected:
0130
0131 G4bool CutsWhereModified();
0132
0133
0134 const G4double MaxExcitationNumber ;
0135 const G4double probLimFluct ;
0136 const long nmaxDirectFluct,nmaxCont1,nmaxCont2 ;
0137
0138 static void BuildDEDXTable(const G4ParticleDefinition& aParticleType);
0139
0140 protected:
0141
0142 static G4ThreadLocal G4PhysicsTable* theDEDXpTable ;
0143 static G4ThreadLocal G4PhysicsTable* theDEDXpbarTable ;
0144 static G4ThreadLocal G4PhysicsTable* theRangepTable ;
0145 static G4ThreadLocal G4PhysicsTable* theRangepbarTable ;
0146
0147
0148 static G4ThreadLocal G4PhysicsTable* theInverseRangepTable ;
0149 static G4ThreadLocal G4PhysicsTable* theInverseRangepbarTable ;
0150
0151
0152 static G4ThreadLocal G4PhysicsTable* theLabTimepTable ;
0153 static G4ThreadLocal G4PhysicsTable* theLabTimepbarTable ;
0154
0155 static G4ThreadLocal G4PhysicsTable* theProperTimepTable ;
0156 static G4ThreadLocal G4PhysicsTable* theProperTimepbarTable ;
0157
0158
0159
0160 static G4ThreadLocal G4PhysicsTable** RecorderOfpProcess;
0161 static G4ThreadLocal G4PhysicsTable** RecorderOfpbarProcess;
0162 static G4ThreadLocal G4int CounterOfpProcess ;
0163 static G4ThreadLocal G4int CounterOfpbarProcess ;
0164
0165
0166 static G4ThreadLocal G4double ParticleMass ;
0167
0168
0169 static G4ThreadLocal G4double ptableElectronCutInRange;
0170 static G4ThreadLocal G4double pbartableElectronCutInRange;
0171
0172 static G4ThreadLocal G4double Charge ;
0173
0174 static G4ThreadLocal G4double LowestKineticEnergy;
0175 static G4ThreadLocal G4double HighestKineticEnergy;
0176 static G4ThreadLocal G4int TotBin;
0177
0178
0179 static G4ThreadLocal G4double RTable,LOGRTable;
0180
0181
0182
0183 G4PhysicsTable* theLossTable ;
0184
0185 G4double linLossLimit ;
0186
0187 G4double MinKineticEnergy ;
0188
0189 static G4ThreadLocal G4double dRoverRange ;
0190
0191 static G4ThreadLocal G4double finalRange ;
0192 static G4ThreadLocal G4double c1lim,c2lim,c3lim ;
0193
0194 static G4ThreadLocal G4bool rndmStepFlag ;
0195 static G4ThreadLocal G4bool EnlossFlucFlag ;
0196
0197
0198 private:
0199
0200
0201
0202 G4hRDEnergyLoss(G4hRDEnergyLoss &);
0203 G4hRDEnergyLoss & operator=(const G4hRDEnergyLoss &right);
0204
0205
0206 static G4ThreadLocal G4double Mass,taulow,tauhigh,ltaulow,ltauhigh;
0207
0208
0209
0210
0211 static void BuildRangeTable(const G4ParticleDefinition& aParticleType);
0212
0213 static void BuildInverseRangeTable(const G4ParticleDefinition& aParticleType);
0214
0215 static void BuildTimeTables(const G4ParticleDefinition& aParticleType);
0216
0217 static void BuildLabTimeVector(G4int materialIndex,
0218 G4PhysicsLogVector* rangeVector);
0219
0220 static void BuildProperTimeVector(G4int materialIndex,
0221 G4PhysicsLogVector* rangeVector);
0222
0223 static void InvertRangeVector(G4int materialIndex,
0224 G4PhysicsLogVector* rangeVector);
0225
0226 static void BuildRangeVector(G4int materialIndex,
0227 G4PhysicsLogVector* rangeVector);
0228
0229 static G4double LabTimeIntLog(G4PhysicsVector* physicsVector, G4int nbin);
0230
0231 static G4double ProperTimeIntLog(G4PhysicsVector* physicsVector, G4int nbin);
0232
0233 static G4double RangeIntLin(G4PhysicsVector* physicsVector, G4int nbin);
0234
0235 static G4double RangeIntLog(G4PhysicsVector* physicsVector, G4int nbin);
0236
0237 static void BuildRangeCoeffATable( const G4ParticleDefinition& aParticleType);
0238 static void BuildRangeCoeffBTable( const G4ParticleDefinition& aParticleType);
0239 static void BuildRangeCoeffCTable(const G4ParticleDefinition& aParticleType);
0240
0241
0242
0243 static G4ThreadLocal G4PhysicsTable* theDEDXTable;
0244
0245 static G4ThreadLocal G4PhysicsTable* theRangeTable;
0246 static G4ThreadLocal G4PhysicsTable* theInverseRangeTable;
0247
0248 static G4ThreadLocal G4PhysicsTable* theLabTimeTable;
0249 static G4ThreadLocal G4PhysicsTable* theProperTimeTable;
0250
0251 static G4ThreadLocal G4PhysicsTable** RecorderOfProcess;
0252 static G4ThreadLocal G4int CounterOfProcess;
0253
0254 static G4ThreadLocal G4PhysicsTable* thepRangeCoeffATable;
0255 static G4ThreadLocal G4PhysicsTable* thepRangeCoeffBTable;
0256 static G4ThreadLocal G4PhysicsTable* thepRangeCoeffCTable;
0257 static G4ThreadLocal G4PhysicsTable* thepbarRangeCoeffATable;
0258 static G4ThreadLocal G4PhysicsTable* thepbarRangeCoeffBTable;
0259 static G4ThreadLocal G4PhysicsTable* thepbarRangeCoeffCTable;
0260
0261 static G4ThreadLocal G4PhysicsTable* theRangeCoeffATable;
0262 static G4ThreadLocal G4PhysicsTable* theRangeCoeffBTable;
0263 static G4ThreadLocal G4PhysicsTable* theRangeCoeffCTable;
0264 static G4ThreadLocal G4int NumberOfProcesses ;
0265
0266 };
0267
0268 #endif