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 #include "G4IonDEDXScalingICRU73.hh"
00054 #include "G4ParticleDefinition.hh"
00055 #include "G4ParticleTable.hh"
00056 #include "G4Material.hh"
00057
00058
00059
00060
00061 G4IonDEDXScalingICRU73::G4IonDEDXScalingICRU73(
00062 G4int minAtomicNumberIon,
00063 G4int maxAtomicNumberIon) :
00064 minAtomicNumber( minAtomicNumberIon ),
00065 maxAtomicNumber( maxAtomicNumberIon ),
00066 referenceFe( 0 ),
00067 atomicNumberRefFe( 26 ),
00068 massNumberRefFe( 56 ),
00069 atomicNumberRefPow23Fe( 0 ),
00070 chargeRefFe( 0 ),
00071 massRefFe( 0 ),
00072 referenceAr( 0 ),
00073 atomicNumberRefAr( 18 ),
00074 massNumberRefAr( 40 ),
00075 atomicNumberRefPow23Ar( 0 ),
00076 chargeRefAr( 0 ),
00077 massRefAr( 0 ),
00078 useFe( true ),
00079 cacheParticle( 0 ),
00080 cacheMassNumber( 0 ),
00081 cacheAtomicNumber( 0 ),
00082 cacheAtomicNumberPow23( 0 ),
00083 cacheCharge( 0 ),
00084 cacheMass( 0 ),
00085 cacheMaterial( 0 ) {
00086
00087 }
00088
00089
00090
00091 G4IonDEDXScalingICRU73::~G4IonDEDXScalingICRU73() {
00092
00093 }
00094
00095
00096
00097 void G4IonDEDXScalingICRU73::CreateReferenceParticles() {
00098
00099 G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
00100
00101 G4double excitationEnergy = 0.0;
00102
00103 referenceFe = particleTable -> GetIon(atomicNumberRefFe, massNumberRefFe,
00104 excitationEnergy);
00105 referenceAr = particleTable -> GetIon(atomicNumberRefAr, massNumberRefAr,
00106 excitationEnergy);
00107
00108 massRefFe = referenceFe -> GetPDGMass();
00109 massRefAr = referenceAr -> GetPDGMass();
00110
00111 chargeRefFe = referenceFe -> GetPDGCharge();
00112 chargeRefAr = referenceAr -> GetPDGCharge();
00113
00114 atomicNumberRefPow23Fe = std::pow(G4double(atomicNumberRefFe), 2./3.);
00115 atomicNumberRefPow23Ar = std::pow(G4double(atomicNumberRefAr), 2./3.);
00116 }
00117
00118
00119
00120
00121
00122 G4double G4IonDEDXScalingICRU73::ScalingFactorEnergy (
00123 const G4ParticleDefinition* particle,
00124 const G4Material* material) {
00125
00126 G4double factor = 1.0;
00127
00128 UpdateCacheParticle(particle);
00129 UpdateCacheMaterial(material);
00130
00131 if(cacheAtomicNumber >= minAtomicNumber &&
00132 cacheAtomicNumber <= maxAtomicNumber &&
00133 cacheAtomicNumber != atomicNumberRefFe &&
00134 cacheAtomicNumber != atomicNumberRefAr) {
00135
00136 if(referenceFe == 0 || referenceAr == 0) CreateReferenceParticles();
00137
00138 if( useFe )
00139 factor = cacheMassNumber * (massRefFe / cacheMass) / massNumberRefFe;
00140 else
00141 factor = cacheMassNumber * (massRefAr / cacheMass) / massNumberRefAr;
00142 }
00143
00144 return factor;
00145 }
00146
00147
00148
00149 G4double G4IonDEDXScalingICRU73::ScalingFactorDEDX(
00150 const G4ParticleDefinition* particle,
00151 const G4Material* material,
00152 G4double kineticEnergy) {
00153
00154 G4double factor = 1.0;
00155
00156 UpdateCacheParticle(particle);
00157 UpdateCacheMaterial(material);
00158
00159 if(cacheAtomicNumber >= minAtomicNumber &&
00160 cacheAtomicNumber <= maxAtomicNumber &&
00161 cacheAtomicNumber != atomicNumberRefFe &&
00162 cacheAtomicNumber != atomicNumberRefAr) {
00163
00164 if(referenceFe == 0 || referenceAr == 0) CreateReferenceParticles();
00165
00166 if( useFe ) {
00167
00168 G4double equilibriumCharge = EquilibriumCharge(cacheMass,
00169 cacheCharge,
00170 cacheAtomicNumberPow23,
00171 kineticEnergy);
00172
00173 G4double scaledKineticEnergy = kineticEnergy * (massRefFe / cacheMass);
00174
00175 G4double equilibriumChargeRefFe = EquilibriumCharge(massRefFe,
00176 chargeRefFe,
00177 atomicNumberRefPow23Fe,
00178 scaledKineticEnergy);
00179
00180 factor = equilibriumCharge * equilibriumCharge/
00181 ( equilibriumChargeRefFe * equilibriumChargeRefFe );
00182
00183 }
00184 else {
00185
00186 G4double equilibriumCharge = EquilibriumCharge(cacheMass,
00187 cacheCharge,
00188 cacheAtomicNumberPow23,
00189 kineticEnergy);
00190
00191 G4double scaledKineticEnergy = kineticEnergy * (massRefAr / cacheMass);
00192
00193 G4double equilibriumChargeRefAr = EquilibriumCharge(massRefAr,
00194 chargeRefAr,
00195 atomicNumberRefPow23Ar,
00196 scaledKineticEnergy);
00197
00198 factor = equilibriumCharge * equilibriumCharge/
00199 ( equilibriumChargeRefAr * equilibriumChargeRefAr );
00200
00201 }
00202 }
00203
00204 return factor;
00205 }
00206
00207
00208
00209 G4int G4IonDEDXScalingICRU73::AtomicNumberBaseIon(
00210 G4int atomicNumberIon,
00211 const G4Material* material) {
00212
00213 UpdateCacheMaterial(material);
00214
00215 G4int atomicNumber = atomicNumberIon;
00216
00217 if(atomicNumberIon >= minAtomicNumber &&
00218 atomicNumberIon <= maxAtomicNumber &&
00219 atomicNumberIon != atomicNumberRefFe &&
00220 atomicNumberIon != atomicNumberRefAr) {
00221
00222 if(referenceFe == 0 || referenceAr == 0) CreateReferenceParticles();
00223
00224 if( useFe ) atomicNumber = atomicNumberRefFe;
00225 else atomicNumber = atomicNumberRefAr;
00226 }
00227
00228 return atomicNumber;
00229 }
00230
00231