1 | // |
---|
2 | // ******************************************************************** |
---|
3 | // * License and Disclaimer * |
---|
4 | // * * |
---|
5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
7 | // * conditions of the Geant4 Software License, included in the file * |
---|
8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
9 | // * include a list of copyright holders. * |
---|
10 | // * * |
---|
11 | // * Neither the authors of this software system, nor their employing * |
---|
12 | // * institutes,nor the agencies providing financial support for this * |
---|
13 | // * work make any representation or warranty, express or implied, * |
---|
14 | // * regarding this software system or assume any liability for its * |
---|
15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
16 | // * for the full disclaimer and the limitation of liability. * |
---|
17 | // * * |
---|
18 | // * This code implementation is the result of the scientific and * |
---|
19 | // * technical work of the GEANT4 collaboration. * |
---|
20 | // * By using, copying, modifying or distributing the software (or * |
---|
21 | // * any work based on the software) you agree to acknowledge its * |
---|
22 | // * use in resulting scientific publications, and indicate your * |
---|
23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
24 | // ******************************************************************** |
---|
25 | // |
---|
26 | // $Id: G4DNAEmfietzoglouExcitationModel.cc,v 1.8 2009/08/13 11:32:47 sincerti Exp $ |
---|
27 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
28 | // |
---|
29 | |
---|
30 | #include "G4DNAEmfietzoglouExcitationModel.hh" |
---|
31 | |
---|
32 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
33 | |
---|
34 | using namespace std; |
---|
35 | |
---|
36 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
37 | |
---|
38 | G4DNAEmfietzoglouExcitationModel::G4DNAEmfietzoglouExcitationModel(const G4ParticleDefinition*, |
---|
39 | const G4String& nam) |
---|
40 | :G4VEmModel(nam),isInitialised(false) |
---|
41 | { |
---|
42 | |
---|
43 | lowEnergyLimit = 8.23 * eV; |
---|
44 | highEnergyLimit = 10 * MeV; |
---|
45 | SetLowEnergyLimit(lowEnergyLimit); |
---|
46 | SetHighEnergyLimit(highEnergyLimit); |
---|
47 | |
---|
48 | verboseLevel= 0; |
---|
49 | // Verbosity scale: |
---|
50 | // 0 = nothing |
---|
51 | // 1 = warning for energy non-conservation |
---|
52 | // 2 = details of energy budget |
---|
53 | // 3 = calculation of cross sections, file openings, sampling of atoms |
---|
54 | // 4 = entering in methods |
---|
55 | |
---|
56 | if (verboseLevel > 3) |
---|
57 | |
---|
58 | if( verboseLevel>0 ) |
---|
59 | { |
---|
60 | G4cout << "Emfietzoglou Excitation model is constructed " << G4endl |
---|
61 | << "Energy range: " |
---|
62 | << lowEnergyLimit / eV << " eV - " |
---|
63 | << highEnergyLimit / MeV << " MeV" |
---|
64 | << G4endl; |
---|
65 | } |
---|
66 | } |
---|
67 | |
---|
68 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
69 | |
---|
70 | G4DNAEmfietzoglouExcitationModel::~G4DNAEmfietzoglouExcitationModel() |
---|
71 | {} |
---|
72 | |
---|
73 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
74 | |
---|
75 | void G4DNAEmfietzoglouExcitationModel::Initialise(const G4ParticleDefinition* /*particle*/, |
---|
76 | const G4DataVector& /*cuts*/) |
---|
77 | { |
---|
78 | |
---|
79 | if (verboseLevel > 3) |
---|
80 | G4cout << "Calling G4DNAEmfietzoglouExcitationModel::Initialise()" << G4endl; |
---|
81 | |
---|
82 | // Energy limits |
---|
83 | |
---|
84 | if (LowEnergyLimit() < lowEnergyLimit) |
---|
85 | { |
---|
86 | G4cout << "G4DNAEmfietzoglouExcitationModel: low energy limit increased from " << |
---|
87 | LowEnergyLimit()/eV << " eV to " << lowEnergyLimit/eV << " eV" << G4endl; |
---|
88 | SetLowEnergyLimit(lowEnergyLimit); |
---|
89 | } |
---|
90 | |
---|
91 | if (HighEnergyLimit() > highEnergyLimit) |
---|
92 | { |
---|
93 | G4cout << "G4DNAEmfietzoglouExcitationModel: high energy limit decreased from " << |
---|
94 | HighEnergyLimit()/MeV << " MeV to " << highEnergyLimit/MeV << " MeV" << G4endl; |
---|
95 | SetHighEnergyLimit(highEnergyLimit); |
---|
96 | } |
---|
97 | |
---|
98 | // |
---|
99 | |
---|
100 | nLevels = waterExcitation.NumberOfLevels(); |
---|
101 | |
---|
102 | // |
---|
103 | if( verboseLevel>0 ) |
---|
104 | { |
---|
105 | G4cout << "Emfietzoglou Excitation model is initialized " << G4endl |
---|
106 | << "Energy range: " |
---|
107 | << LowEnergyLimit() / eV << " eV - " |
---|
108 | << HighEnergyLimit() / MeV << " MeV" |
---|
109 | << G4endl; |
---|
110 | } |
---|
111 | |
---|
112 | if(!isInitialised) |
---|
113 | { |
---|
114 | isInitialised = true; |
---|
115 | |
---|
116 | if(pParticleChange) |
---|
117 | fParticleChangeForGamma = reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange); |
---|
118 | else |
---|
119 | fParticleChangeForGamma = new G4ParticleChangeForGamma(); |
---|
120 | } |
---|
121 | |
---|
122 | // InitialiseElementSelectors(particle,cuts); |
---|
123 | |
---|
124 | // Test if water material |
---|
125 | |
---|
126 | flagMaterialIsWater= false; |
---|
127 | densityWater = 0; |
---|
128 | |
---|
129 | const G4ProductionCutsTable* theCoupleTable = G4ProductionCutsTable::GetProductionCutsTable(); |
---|
130 | |
---|
131 | if(theCoupleTable) |
---|
132 | { |
---|
133 | G4int numOfCouples = theCoupleTable->GetTableSize(); |
---|
134 | |
---|
135 | if(numOfCouples>0) |
---|
136 | { |
---|
137 | for (G4int i=0; i<numOfCouples; i++) |
---|
138 | { |
---|
139 | const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i); |
---|
140 | const G4Material* material = couple->GetMaterial(); |
---|
141 | |
---|
142 | if (material->GetName() == "G4_WATER") |
---|
143 | { |
---|
144 | G4double density = material->GetAtomicNumDensityVector()[1]; |
---|
145 | flagMaterialIsWater = true; |
---|
146 | densityWater = density; |
---|
147 | |
---|
148 | if (verboseLevel > 3) |
---|
149 | G4cout << "****** Water material is found with density(cm^-3)=" << density/(cm*cm*cm) << G4endl; |
---|
150 | } |
---|
151 | |
---|
152 | } |
---|
153 | |
---|
154 | } // if(numOfCouples>0) |
---|
155 | |
---|
156 | } // if (theCoupleTable) |
---|
157 | |
---|
158 | } |
---|
159 | |
---|
160 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
161 | |
---|
162 | G4double G4DNAEmfietzoglouExcitationModel::CrossSectionPerVolume(const G4Material*, |
---|
163 | const G4ParticleDefinition* particleDefinition, |
---|
164 | G4double ekin, |
---|
165 | G4double, |
---|
166 | G4double) |
---|
167 | { |
---|
168 | if (verboseLevel > 3) |
---|
169 | G4cout << "Calling CrossSectionPerVolume() of G4DNAEmfietzoglouExcitationModel" << G4endl; |
---|
170 | |
---|
171 | // Calculate total cross section for model |
---|
172 | |
---|
173 | G4double sigma=0; |
---|
174 | |
---|
175 | if (flagMaterialIsWater) |
---|
176 | { |
---|
177 | |
---|
178 | if (particleDefinition == G4Electron::ElectronDefinition()) |
---|
179 | { |
---|
180 | if (ekin >= lowEnergyLimit && ekin < highEnergyLimit) |
---|
181 | { |
---|
182 | sigma = Sum(ekin); |
---|
183 | } |
---|
184 | } |
---|
185 | |
---|
186 | if (verboseLevel > 3) |
---|
187 | { |
---|
188 | G4cout << "---> Kinetic energy(eV)=" << ekin/eV << G4endl; |
---|
189 | G4cout << " - Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl; |
---|
190 | G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*densityWater/(1./cm) << G4endl; |
---|
191 | } |
---|
192 | |
---|
193 | } // if (flagMaterialIsWater) |
---|
194 | |
---|
195 | return sigma*densityWater; |
---|
196 | } |
---|
197 | |
---|
198 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
199 | |
---|
200 | void G4DNAEmfietzoglouExcitationModel::SampleSecondaries(std::vector<G4DynamicParticle*>* /*fvect*/, |
---|
201 | const G4MaterialCutsCouple* /*couple*/, |
---|
202 | const G4DynamicParticle* aDynamicElectron, |
---|
203 | G4double, |
---|
204 | G4double) |
---|
205 | { |
---|
206 | |
---|
207 | if (verboseLevel > 3) |
---|
208 | G4cout << "Calling SampleSecondaries() of G4DNAEmfietzoglouExcitationModel" << G4endl; |
---|
209 | |
---|
210 | G4double electronEnergy0 = aDynamicElectron->GetKineticEnergy(); |
---|
211 | |
---|
212 | G4int level = RandomSelect(electronEnergy0); |
---|
213 | |
---|
214 | G4double excitationEnergy = waterExcitation.ExcitationEnergy(level); |
---|
215 | G4double newEnergy = electronEnergy0 - excitationEnergy; |
---|
216 | |
---|
217 | if (electronEnergy0 < highEnergyLimit) |
---|
218 | { |
---|
219 | if (newEnergy >= lowEnergyLimit) |
---|
220 | { |
---|
221 | fParticleChangeForGamma->ProposeMomentumDirection(aDynamicElectron->GetMomentumDirection()); |
---|
222 | fParticleChangeForGamma->SetProposedKineticEnergy(newEnergy); |
---|
223 | fParticleChangeForGamma->ProposeLocalEnergyDeposit(excitationEnergy); |
---|
224 | } |
---|
225 | |
---|
226 | else |
---|
227 | { |
---|
228 | fParticleChangeForGamma->ProposeTrackStatus(fStopAndKill); |
---|
229 | fParticleChangeForGamma->ProposeLocalEnergyDeposit(electronEnergy0); |
---|
230 | } |
---|
231 | } |
---|
232 | } |
---|
233 | |
---|
234 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
235 | |
---|
236 | G4double G4DNAEmfietzoglouExcitationModel::PartialCrossSection(G4double t, G4int level) |
---|
237 | { |
---|
238 | // Aj T |
---|
239 | // Sigma(T) = ------------- (Bj / T) ln(Cj ---) [1 - Bj / T]^Pj |
---|
240 | // 2 pi alpha0 R |
---|
241 | // |
---|
242 | // Sigma is the macroscopic cross section = N sigma, where N = number of target particles per unit volume |
---|
243 | // and sigma is the microscopic cross section |
---|
244 | // T is the incoming electron kinetic energy |
---|
245 | // alpha0 is the Bohr Radius (Bohr_radius) |
---|
246 | // Aj, Bj, Cj & Pj are parameters that can be found in Emfietzoglou's papers |
---|
247 | // |
---|
248 | // From Phys. Med. Biol. 48 (2003) 2355-2371, D.Emfietzoglou, |
---|
249 | // Monte Carlo Simulation of the energy loss of low energy electrons in liquid Water |
---|
250 | // |
---|
251 | // Scaling for macroscopic cross section: number of water moleculs per unit volume |
---|
252 | // const G4double sigma0 = (10. / 3.343e22) * cm2; |
---|
253 | |
---|
254 | const G4double density = 3.34192e+19 * mm3; |
---|
255 | |
---|
256 | const G4double aj[]={0.0205, 0.0209, 0.0130, 0.0026, 0.0025}; |
---|
257 | const G4double cj[]={4.9801, 3.3850, 2.8095, 1.9242, 3.4624}; |
---|
258 | const G4double pj[]={0.4757, 0.3483, 0.4443, 0.3429, 0.4379}; |
---|
259 | const G4double r = 13.6 * eV; |
---|
260 | |
---|
261 | G4double sigma = 0.; |
---|
262 | |
---|
263 | G4double exc = waterExcitation.ExcitationEnergy(level); |
---|
264 | |
---|
265 | if (t >= exc) |
---|
266 | { |
---|
267 | G4double excitationSigma = ( aj[level] / (2.*pi*Bohr_radius)) |
---|
268 | * (exc / t) |
---|
269 | * std::log(cj[level]*(t/r)) |
---|
270 | * std::pow((1.- (exc/t)), pj[level]); |
---|
271 | sigma = excitationSigma / density; |
---|
272 | } |
---|
273 | return sigma; |
---|
274 | } |
---|
275 | |
---|
276 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
277 | |
---|
278 | G4int G4DNAEmfietzoglouExcitationModel::RandomSelect(G4double k) |
---|
279 | { |
---|
280 | G4int i = nLevels; |
---|
281 | G4double value = 0.; |
---|
282 | std::deque<double> values; |
---|
283 | |
---|
284 | while (i > 0) |
---|
285 | { |
---|
286 | i--; |
---|
287 | G4double partial = PartialCrossSection(k,i); |
---|
288 | values.push_front(partial); |
---|
289 | value += partial; |
---|
290 | } |
---|
291 | |
---|
292 | value *= G4UniformRand(); |
---|
293 | |
---|
294 | i = nLevels; |
---|
295 | |
---|
296 | while (i > 0) |
---|
297 | { |
---|
298 | i--; |
---|
299 | if (values[i] > value) return i; |
---|
300 | value -= values[i]; |
---|
301 | } |
---|
302 | |
---|
303 | return 0; |
---|
304 | } |
---|
305 | |
---|
306 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
307 | |
---|
308 | G4double G4DNAEmfietzoglouExcitationModel::Sum(G4double k) |
---|
309 | { |
---|
310 | G4double totalCrossSection = 0.; |
---|
311 | |
---|
312 | for (G4int i=0; i<nLevels; i++) |
---|
313 | { |
---|
314 | totalCrossSection += PartialCrossSection(k,i); |
---|
315 | } |
---|
316 | return totalCrossSection; |
---|
317 | } |
---|
318 | |
---|