#include <G4DNADingfelderChargeIncreaseModel.hh>
Inheritance diagram for G4DNADingfelderChargeIncreaseModel:
Public Member Functions | |
G4DNADingfelderChargeIncreaseModel (const G4ParticleDefinition *p=0, const G4String &nam="DNADingfelderChargeIncreaseModel") | |
virtual | ~G4DNADingfelderChargeIncreaseModel () |
virtual void | Initialise (const G4ParticleDefinition *, const G4DataVector &) |
virtual G4double | CrossSectionPerVolume (const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax) |
virtual void | SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) |
Protected Attributes | |
G4ParticleChangeForGamma * | fParticleChangeForGamma |
Definition at line 41 of file G4DNADingfelderChargeIncreaseModel.hh.
G4DNADingfelderChargeIncreaseModel::G4DNADingfelderChargeIncreaseModel | ( | const G4ParticleDefinition * | p = 0 , |
|
const G4String & | nam = "DNADingfelderChargeIncreaseModel" | |||
) |
Definition at line 40 of file G4DNADingfelderChargeIncreaseModel.cc.
References fParticleChangeForGamma, G4cout, and G4endl.
00042 :G4VEmModel(nam),isInitialised(false) 00043 { 00044 // nistwater = G4NistManager::Instance()->FindOrBuildMaterial("G4_WATER"); 00045 fpMolWaterDensity = 0; 00046 00047 numberOfPartialCrossSections[0]=0; 00048 numberOfPartialCrossSections[1]=0; 00049 00050 verboseLevel= 0; 00051 // Verbosity scale: 00052 // 0 = nothing 00053 // 1 = warning for energy non-conservation 00054 // 2 = details of energy budget 00055 // 3 = calculation of cross sections, file openings, sampling of atoms 00056 // 4 = entering in methods 00057 00058 if( verboseLevel>0 ) 00059 { 00060 G4cout << "Dingfelder charge increase model is constructed " << G4endl; 00061 } 00062 fParticleChangeForGamma = 0; 00063 }
G4DNADingfelderChargeIncreaseModel::~G4DNADingfelderChargeIncreaseModel | ( | ) | [virtual] |
G4double G4DNADingfelderChargeIncreaseModel::CrossSectionPerVolume | ( | const G4Material * | material, | |
const G4ParticleDefinition * | p, | |||
G4double | ekin, | |||
G4double | emin, | |||
G4double | emax | |||
) | [virtual] |
Reimplemented from G4VEmModel.
Definition at line 190 of file G4DNADingfelderChargeIncreaseModel.cc.
References G4cout, G4endl, G4Material::GetIndex(), G4DNAGenericIonsManager::GetIon(), G4ParticleDefinition::GetParticleName(), G4DNAGenericIonsManager::Instance(), and G4INCL::Math::pi.
00195 { 00196 if (verboseLevel > 3) 00197 G4cout << "Calling CrossSectionPerVolume() of G4DNADingfelderChargeIncreaseModel" << G4endl; 00198 00199 // Calculate total cross section for model 00200 00201 G4DNAGenericIonsManager *instance; 00202 instance = G4DNAGenericIonsManager::Instance(); 00203 00204 if ( 00205 particleDefinition != instance->GetIon("hydrogen") 00206 && 00207 particleDefinition != instance->GetIon("alpha+") 00208 && 00209 particleDefinition != instance->GetIon("helium") 00210 ) 00211 00212 return 0; 00213 00214 G4double lowLim = 0; 00215 G4double highLim = 0; 00216 G4double totalCrossSection = 0.; 00217 00218 G4double waterDensity = (*fpMolWaterDensity)[material->GetIndex()]; 00219 00220 if(waterDensity!= 0.0) 00221 // if (material == nistwater || material->GetBaseMaterial() == nistwater) 00222 { 00223 const G4String& particleName = particleDefinition->GetParticleName(); 00224 00225 std::map< G4String,G4double,std::less<G4String> >::iterator pos1; 00226 pos1 = lowEnergyLimit.find(particleName); 00227 00228 if (pos1 != lowEnergyLimit.end()) 00229 { 00230 lowLim = pos1->second; 00231 } 00232 00233 std::map< G4String,G4double,std::less<G4String> >::iterator pos2; 00234 pos2 = highEnergyLimit.find(particleName); 00235 00236 if (pos2 != highEnergyLimit.end()) 00237 { 00238 highLim = pos2->second; 00239 } 00240 00241 if (k >= lowLim && k < highLim) 00242 { 00243 //HYDROGEN 00244 if (particleDefinition == instance->GetIon("hydrogen")) 00245 { 00246 const G4double aa = 2.835; 00247 const G4double bb = 0.310; 00248 const G4double cc = 2.100; 00249 const G4double dd = 0.760; 00250 const G4double fac = 1.0e-18; 00251 const G4double rr = 13.606 * eV; 00252 00253 G4double t = k / (proton_mass_c2/electron_mass_c2); 00254 G4double x = t / rr; 00255 G4double temp = 4.0 * pi * Bohr_radius/nm * Bohr_radius/nm * fac; 00256 G4double sigmal = temp * cc * (std::pow(x,dd)); 00257 G4double sigmah = temp * (aa * std::log(1.0 + x) + bb) / x; 00258 totalCrossSection = 1.0/(1.0/sigmal + 1.0/sigmah) *m*m; 00259 } 00260 else 00261 { 00262 totalCrossSection = Sum(k,particleDefinition); 00263 } 00264 } 00265 00266 if (verboseLevel > 2) 00267 { 00268 G4cout << "__________________________________" << G4endl; 00269 G4cout << "°°° G4DNADingfelderChargeIncreaseModel - XS INFO START" << G4endl; 00270 G4cout << "°°° Kinetic energy(eV)=" << k/eV << " particle : " << particleName << G4endl; 00271 G4cout << "°°° Cross section per water molecule (cm^2)=" << totalCrossSection/cm/cm << G4endl; 00272 G4cout << "°°° Cross section per water molecule (cm^-1)=" << totalCrossSection*waterDensity/(1./cm) << G4endl; 00273 // G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl; 00274 G4cout << "°°° G4DNADingfelderChargeIncreaseModel - XS INFO END" << G4endl; 00275 } 00276 00277 } 00278 00279 return totalCrossSection*waterDensity; 00280 // return totalCrossSection*material->GetAtomicNumDensityVector()[1]; 00281 00282 }
void G4DNADingfelderChargeIncreaseModel::Initialise | ( | const G4ParticleDefinition * | , | |
const G4DataVector & | ||||
) | [virtual] |
Implements G4VEmModel.
Definition at line 72 of file G4DNADingfelderChargeIncreaseModel.cc.
References fParticleChangeForGamma, G4cout, G4endl, G4DNAGenericIonsManager::GetIon(), G4Material::GetMaterial(), G4DNAMolecularMaterial::GetNumMolPerVolTableFor(), G4VEmModel::GetParticleChangeForGamma(), G4ParticleDefinition::GetParticleName(), G4VEmModel::HighEnergyLimit(), G4DNAMolecularMaterial::Instance(), G4DNAGenericIonsManager::Instance(), G4VEmModel::LowEnergyLimit(), G4VEmModel::SetHighEnergyLimit(), and G4VEmModel::SetLowEnergyLimit().
00074 { 00075 00076 if (verboseLevel > 3) 00077 G4cout << "Calling G4DNADingfelderChargeIncreaseModel::Initialise()" << G4endl; 00078 00079 // Energy limits 00080 00081 G4DNAGenericIonsManager *instance; 00082 instance = G4DNAGenericIonsManager::Instance(); 00083 G4ParticleDefinition* hydrogenDef = instance->GetIon("hydrogen"); 00084 G4ParticleDefinition* alphaPlusDef = instance->GetIon("alpha+"); 00085 G4ParticleDefinition* heliumDef = instance->GetIon("helium"); 00086 00087 G4String hydrogen; 00088 G4String alphaPlus; 00089 G4String helium; 00090 00091 // LIMITS 00092 00093 hydrogen = hydrogenDef->GetParticleName(); 00094 lowEnergyLimit[hydrogen] = 100. * eV; 00095 highEnergyLimit[hydrogen] = 100. * MeV; 00096 00097 alphaPlus = alphaPlusDef->GetParticleName(); 00098 lowEnergyLimit[alphaPlus] = 1. * keV; 00099 highEnergyLimit[alphaPlus] = 400. * MeV; 00100 00101 helium = heliumDef->GetParticleName(); 00102 lowEnergyLimit[helium] = 1. * keV; 00103 highEnergyLimit[helium] = 400. * MeV; 00104 00105 // 00106 00107 if (particle==hydrogenDef) 00108 { 00109 SetLowEnergyLimit(lowEnergyLimit[hydrogen]); 00110 SetHighEnergyLimit(highEnergyLimit[hydrogen]); 00111 } 00112 00113 if (particle==alphaPlusDef) 00114 { 00115 SetLowEnergyLimit(lowEnergyLimit[alphaPlus]); 00116 SetHighEnergyLimit(highEnergyLimit[alphaPlus]); 00117 } 00118 00119 if (particle==heliumDef) 00120 { 00121 SetLowEnergyLimit(lowEnergyLimit[helium]); 00122 SetHighEnergyLimit(highEnergyLimit[helium]); 00123 } 00124 00125 // Final state 00126 00127 //ALPHA+ 00128 00129 f0[0][0]=1.; 00130 a0[0][0]=2.25; 00131 a1[0][0]=-0.75; 00132 b0[0][0]=-32.10; 00133 c0[0][0]=0.600; 00134 d0[0][0]=2.40; 00135 x0[0][0]=4.60; 00136 00137 x1[0][0]=-1.; 00138 b1[0][0]=-1.; 00139 00140 numberOfPartialCrossSections[0]=1; 00141 00142 //HELIUM 00143 00144 f0[0][1]=1.; 00145 a0[0][1]=2.25; 00146 a1[0][1]=-0.75; 00147 b0[0][1]=-30.93; 00148 c0[0][1]=0.590; 00149 d0[0][1]=2.35; 00150 x0[0][1]=4.29; 00151 00152 f0[1][1]=1.; 00153 a0[1][1]=2.25; 00154 a1[1][1]=-0.75; 00155 b0[1][1]=-32.61; 00156 c0[1][1]=0.435; 00157 d0[1][1]=2.70; 00158 x0[1][1]=4.45; 00159 00160 x1[0][1]=-1.; 00161 b1[0][1]=-1.; 00162 00163 x1[1][1]=-1.; 00164 b1[1][1]=-1.; 00165 00166 numberOfPartialCrossSections[1]=2; 00167 00168 // 00169 00170 if( verboseLevel>0 ) 00171 { 00172 G4cout << "Dingfelder charge increase model is initialized " << G4endl 00173 << "Energy range: " 00174 << LowEnergyLimit() / keV << " keV - " 00175 << HighEnergyLimit() / MeV << " MeV for " 00176 << particle->GetParticleName() 00177 << G4endl; 00178 } 00179 00180 // Initialize water density pointer 00181 fpMolWaterDensity = G4DNAMolecularMaterial::Instance()->GetNumMolPerVolTableFor(G4Material::GetMaterial("G4_WATER")); 00182 00183 if (isInitialised) { return; } 00184 fParticleChangeForGamma = GetParticleChangeForGamma(); 00185 isInitialised = true; 00186 }
void G4DNADingfelderChargeIncreaseModel::SampleSecondaries | ( | std::vector< G4DynamicParticle * > * | , | |
const G4MaterialCutsCouple * | , | |||
const G4DynamicParticle * | , | |||
G4double | tmin, | |||
G4double | maxEnergy | |||
) | [virtual] |
Implements G4VEmModel.
Definition at line 286 of file G4DNADingfelderChargeIncreaseModel.cc.
References G4Electron::Electron(), FatalException, fParticleChangeForGamma, fStopAndKill, G4cout, G4endl, G4Exception(), G4DynamicParticle::GetDefinition(), G4DNAGenericIonsManager::GetIon(), G4DynamicParticle::GetKineticEnergy(), G4DynamicParticle::GetMomentumDirection(), G4ParticleDefinition::GetPDGMass(), G4DNAGenericIonsManager::Instance(), CLHEP::detail::n, G4VParticleChange::ProposeLocalEnergyDeposit(), and G4VParticleChange::ProposeTrackStatus().
00291 { 00292 if (verboseLevel > 3) 00293 G4cout << "Calling SampleSecondaries() of G4DNADingfelderChargeIncreaseModel" << G4endl; 00294 00295 fParticleChangeForGamma->ProposeTrackStatus(fStopAndKill); 00296 fParticleChangeForGamma->ProposeLocalEnergyDeposit(0.); 00297 00298 G4ParticleDefinition* definition = aDynamicParticle->GetDefinition(); 00299 00300 G4double particleMass = definition->GetPDGMass(); 00301 00302 G4double inK = aDynamicParticle->GetKineticEnergy(); 00303 00304 G4int finalStateIndex = RandomSelect(inK,definition); 00305 00306 G4int n = NumberOfFinalStates(definition,finalStateIndex); 00307 00308 G4double outK = inK - IncomingParticleBindingEnergyConstant(definition,finalStateIndex); 00309 00310 G4DNAGenericIonsManager* instance; 00311 instance = G4DNAGenericIonsManager::Instance(); 00312 00313 G4double electronK; 00314 if (definition == instance->GetIon("hydrogen")) electronK = inK*electron_mass_c2/proton_mass_c2; 00315 else electronK = inK*electron_mass_c2/(particleMass); 00316 00317 if (outK<0) 00318 { 00319 G4Exception("G4DNADingfelderChargeIncreaseModel::SampleSecondaries","em0004", 00320 FatalException,"Final kinetic energy is negative."); 00321 } 00322 00323 G4DynamicParticle* dp = new G4DynamicParticle 00324 00325 (OutgoingParticleDefinition(definition,finalStateIndex), 00326 aDynamicParticle->GetMomentumDirection(), 00327 outK) ; 00328 00329 fvect->push_back(dp); 00330 00331 n = n - 1; 00332 00333 while (n>0) 00334 { 00335 n--; 00336 fvect->push_back(new G4DynamicParticle 00337 (G4Electron::Electron(), aDynamicParticle->GetMomentumDirection(), electronK) ); 00338 } 00339 00340 }
Definition at line 67 of file G4DNADingfelderChargeIncreaseModel.hh.
Referenced by G4DNADingfelderChargeIncreaseModel(), Initialise(), and SampleSecondaries().