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 #ifndef G4IONDEDXSCALINGICRU73_HH
00053 #define G4IONDEDXSCALINGICRU73_HH
00054
00055 #include "globals.hh"
00056 #include "G4VIonDEDXScalingAlgorithm.hh"
00057 #include "G4Material.hh"
00058 #include "G4ParticleDefinition.hh"
00059 #include <vector>
00060
00061
00062 class G4IonDEDXScalingICRU73 : public G4VIonDEDXScalingAlgorithm {
00063
00064 public:
00065 G4IonDEDXScalingICRU73(G4int minAtomicNumberIon = 19,
00066 G4int maxAtomicNumberIon = 102);
00067 ~G4IonDEDXScalingICRU73();
00068
00069
00070
00071 G4double ScalingFactorEnergy(
00072 const G4ParticleDefinition* particle,
00073 const G4Material* material);
00074
00075
00076
00077
00078
00079 G4double ScalingFactorDEDX(
00080 const G4ParticleDefinition* particle,
00081 const G4Material*,
00082 G4double kineticEnergy);
00083
00084
00085
00086
00087
00088 G4int AtomicNumberBaseIon(
00089 G4int atomicNumberIon,
00090 const G4Material*);
00091
00092 private:
00093 void UpdateCacheParticle(
00094 const G4ParticleDefinition* particle);
00095
00096 void UpdateCacheMaterial(
00097 const G4Material* material);
00098
00099 void CreateReferenceParticles();
00100
00101 G4double EquilibriumCharge(
00102 G4double mass,
00103 G4double charge,
00104 G4double atomicNumberPow,
00105 G4double kineticEnergy);
00106
00107
00108
00109 G4int minAtomicNumber;
00110 G4int maxAtomicNumber;
00111
00112
00113 G4ParticleDefinition* referenceFe;
00114 G4int atomicNumberRefFe;
00115 G4int massNumberRefFe;
00116 G4double atomicNumberRefPow23Fe;
00117 G4double chargeRefFe;
00118 G4double massRefFe;
00119
00120
00121 G4ParticleDefinition* referenceAr;
00122 G4int atomicNumberRefAr;
00123 G4int massNumberRefAr;
00124 G4double atomicNumberRefPow23Ar;
00125 G4double chargeRefAr;
00126 G4double massRefAr;
00127
00128
00129 G4bool useFe;
00130
00131
00132 const G4ParticleDefinition* cacheParticle;
00133 G4int cacheMassNumber;
00134 G4int cacheAtomicNumber;
00135 G4double cacheAtomicNumberPow23;
00136 G4double cacheCharge;
00137 G4double cacheMass;
00138
00139
00140 const G4Material* cacheMaterial;
00141 };
00142
00143
00144
00145 inline void G4IonDEDXScalingICRU73::UpdateCacheParticle (
00146 const G4ParticleDefinition* particle) {
00147
00148 if(particle != cacheParticle) {
00149
00150 cacheParticle = particle;
00151 cacheAtomicNumber = particle -> GetAtomicNumber();
00152 cacheMassNumber = particle -> GetAtomicMass();
00153 cacheCharge = particle -> GetPDGCharge();
00154 cacheMass = particle -> GetPDGMass();
00155 cacheAtomicNumberPow23 = std::pow(G4double(cacheAtomicNumber), 2./3.);
00156 }
00157 }
00158
00159
00160
00161 inline void G4IonDEDXScalingICRU73::UpdateCacheMaterial (
00162 const G4Material* material) {
00163
00164 if(cacheMaterial != material) {
00165
00166 cacheMaterial = material;
00167
00168 useFe = true;
00169
00170 size_t nmbElements = material -> GetNumberOfElements();
00171 if( nmbElements > 1 ) useFe = false;
00172
00173 if( material -> GetName() == "G4_WATER" ) useFe = true;
00174 }
00175 }
00176
00177
00178
00179 inline G4double G4IonDEDXScalingICRU73::EquilibriumCharge(
00180 G4double mass,
00181 G4double charge,
00182 G4double atomicNumberPow,
00183 G4double kineticEnergy) {
00184
00185 G4double totalEnergy = kineticEnergy + mass;
00186 G4double betaSquared = kineticEnergy *
00187 (totalEnergy + mass) / (totalEnergy * totalEnergy);
00188
00189 G4double beta = std::sqrt( betaSquared );
00190
00191 G4double velOverBohrVel = beta / CLHEP::fine_structure_const;
00192
00193 G4double q1 = 1.0 - std::exp(-velOverBohrVel / atomicNumberPow);
00194
00195 return q1 * charge;
00196 }
00197
00198
00199
00200 #endif