Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4BraggIonModel.cc
Go to the documentation of this file.
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// -------------------------------------------------------------------
27//
28// GEANT4 Class file
29//
30//
31// File name: G4BraggIonModel
32//
33// Author: Vladimir Ivanchenko
34//
35// Creation date: 13.10.2004
36//
37// Modifications:
38// 11-05-05 Major optimisation of internal interfaces (V.Ivantchenko)
39// 29-11-05 Do not use G4Alpha class (V.Ivantchenko)
40// 15-02-06 ComputeCrossSectionPerElectron, ComputeCrossSectionPerAtom (mma)
41// 25-04-06 Add stopping data from ASTAR (V.Ivanchenko)
42// 23-10-06 Reduce lowestKinEnergy to 0.25 keV (V.Ivanchenko)
43// 12-08-08 Added methods GetParticleCharge, GetChargeSquareRatio,
44// CorrectionsAlongStep needed for ions(V.Ivanchenko)
45//
46
47// Class Description:
48//
49// Implementation of energy loss and delta-electron production by
50// slow charged heavy particles
51
52// -------------------------------------------------------------------
53//
54
55//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57
58#include "G4BraggIonModel.hh"
60#include "G4SystemOfUnits.hh"
61#include "Randomize.hh"
62#include "G4Electron.hh"
64#include "G4EmCorrections.hh"
65#include "G4DeltaAngle.hh"
67#include "G4ASTARStopping.hh"
68#include "G4PSTARStopping.hh"
69#include "G4NistManager.hh"
70#include "G4Log.hh"
71#include "G4Exp.hh"
72#include "G4AutoLock.hh"
73
74//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
75
76G4ASTARStopping* G4BraggIonModel::fASTAR = nullptr;
77
78namespace
79{
80 G4Mutex alphaMutex = G4MUTEX_INITIALIZER;
81}
82
84 const G4String& nam)
85 : G4BraggModel(p, nam)
86{
87 HeMass = 3.727417*CLHEP::GeV;
88 massFactor = 1000.*CLHEP::amu_c2/HeMass;
89}
90
91//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92
94{
95 if(isFirstAlpha) {
96 delete fASTAR;
97 fASTAR = nullptr;
98 }
99}
100
101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102
104 const G4DataVector& ref)
105{
107 const G4String& pname = particle->GetParticleName();
108 if(pname == "alpha") { isAlpha = true; }
109 if(isAlpha && fASTAR == nullptr) {
110 G4AutoLock l(&alphaMutex);
111 if(fASTAR == nullptr) {
112 isFirstAlpha = true;
113 fASTAR = new G4ASTARStopping();
114 }
115 l.unlock();
116 }
117 if(isFirstAlpha) {
118 fASTAR->Initialise();
119 }
120}
121
122
123//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
124
126 const G4Material* mat,
127 G4double kinEnergy)
128{
129 // this method is called only for ions, so no check if it is an ion
130 if(isAlpha) { return 1.0; }
131 return G4BraggModel::GetChargeSquareRatio(p, mat, kinEnergy);
132}
133
134//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
135
137 const G4ParticleDefinition* p,
138 G4double kinEnergy,
140 G4double cutEnergy,
141 G4double maxEnergy)
142{
143 G4double sigma =
144 Z*ComputeCrossSectionPerElectron(p,kinEnergy,cutEnergy,maxEnergy);
145 if(isAlpha) {
146 sigma *= (HeEffChargeSquare(Z, kinEnergy/CLHEP::MeV)/chargeSquareRatio);
147 }
148 return sigma;
149}
150
151//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152
154 const G4Material* material,
155 const G4ParticleDefinition* p,
156 G4double kinEnergy,
157 G4double cutEnergy,
158 G4double maxEnergy)
159{
160 G4double sigma = material->GetElectronDensity()*
161 ComputeCrossSectionPerElectron(p,kinEnergy,cutEnergy,maxEnergy);
162 if(isAlpha) {
163 const G4double zeff = material->GetTotNbOfElectPerVolume()/
164 material->GetTotNbOfAtomsPerVolume();
165 sigma *= (HeEffChargeSquare(zeff, kinEnergy/CLHEP::MeV)/chargeSquareRatio);
166 }
167 return sigma;
168}
169
170//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
171
173 const G4ParticleDefinition* p,
174 G4double kineticEnergy,
175 G4double cut)
176{
177 const G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
178 const G4double tlim = lowestKinEnergy*massRate;
179 const G4double tmin = std::max(std::min(cut, tmax), tlim);
180 G4double dedx = 0.0;
181
182 if(kineticEnergy < tlim) {
183 dedx = HeDEDX(material, tlim)*std::sqrt(kineticEnergy/tlim);
184 } else {
185 dedx = HeDEDX(material, kineticEnergy);
186
187 if (tmin < tmax) {
188 const G4double tau = kineticEnergy/mass;
189 const G4double x = tmin/tmax;
190
191 G4double del =
192 (G4Log(x)*(tau + 1.)*(tau + 1.)/(tau * (tau + 2.0)) + 1.0 - x) *
193 CLHEP::twopi_mc2_rcl2*material->GetElectronDensity();
194 if(isAlpha) {
195 const G4double zeff = material->GetTotNbOfElectPerVolume()/
196 material->GetTotNbOfAtomsPerVolume();
197 heChargeSquare = HeEffChargeSquare(zeff, kineticEnergy/CLHEP::MeV);
198 del *= heChargeSquare;
199 }
200 dedx += del;
201 }
202 }
203 dedx = std::max(dedx, 0.0);
204 /*
205 G4cout << "BraggIon: " << material->GetName()
206 << " E(MeV)=" << kineticEnergy/MeV
207 << " Tmin(MeV)=" << tmin << " dedx(MeV*cm^2/g)="
208 << dedx*gram/(MeV*cm2*material->GetDensity())
209 << " q2=" << chargeSquare << G4endl;
210 */
211 return dedx;
212}
213
214//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
215
217 const G4ParticleDefinition* p,
218 const G4double preKinEnergy,
219 const G4double,
220 const G4double&,
221 G4double& eloss)
222{
223 // no correction for alpha
224 if (isAlpha) { return; }
225
226 // no correction at a small step at the last step
227 if(eloss >= preKinEnergy || eloss < preKinEnergy*0.05) { return; }
228
229 // corrections only for ions
230 if(p != particle) { SetParticle(p); }
231
232 // effective energy and charge at a step
233 const G4double e = std::max(preKinEnergy - eloss*0.5, preKinEnergy*0.5);
234 const G4double q20 = corr->EffectiveChargeSquareRatio(p, mat, preKinEnergy);
235 const G4double q2 = corr->EffectiveChargeSquareRatio(p, mat, e);
236 const G4double qfactor = q2/q20;
237 /*
238 G4cout << "G4BraggIonModel::CorrectionsAlongStep: Epre(MeV)="
239 << preKinEnergy << " Eeff(MeV)=" << e
240 << " eloss=" << eloss << " elossnew=" << eloss*qfactor
241 << " qfactor=" << qfactor << " Qpre=" << q20
242 << p->GetParticleName() <<G4endl;
243 */
244 eloss *= qfactor;
245}
246
247//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
248
249G4int G4BraggIonModel::HasMaterialForHe(const G4Material* mat) const
250{
251 const G4String& chFormula = mat->GetChemicalFormula();
252 if(chFormula.empty()) { return -1; }
253
254 // ICRU Report N49, 1993. Ziegler model for He.
255
256 static const G4int numberOfMolecula = 11;
257 static const G4String molName[numberOfMolecula] = {
258 "CaF_2", "Cellulose_Nitrate", "LiF", "Policarbonate",
259 "(C_2H_4)_N-Polyethylene", "(C_2H_4)_N-Polymethly_Methacralate",
260 "Polysterene", "SiO_2", "NaI", "H_2O",
261 "Graphite" };
262
263 // Search for the material in the table
264 for (G4int i=0; i<numberOfMolecula; ++i) {
265 if (chFormula == molName[i]) {
266 return i;
267 }
268 }
269 return -1;
270}
271
272//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
273
274G4double G4BraggIonModel::HeStoppingPower(const G4double kineticEnergy) const
275{
276 G4double ionloss = 0.0;
277 if (iMolecula >= 0) {
278
279 // The data and the fit from:
280 // ICRU Report N49, 1993. Ziegler's model for alpha
281 // He energy in internal units of parametrisation formula (MeV)
282 // Input scaled energy of a proton or GenericIon
283 G4double T = kineticEnergy/(massRate*CLHEP::MeV);
284
285 static const G4float a[11][5] = {
286 {9.43672f, 0.54398f, 84.341f, 1.3705f, 57.422f},
287 {67.1503f, 0.41409f, 404.512f, 148.97f, 20.99f},
288 {5.11203f, 0.453f, 36.718f, 50.6f, 28.058f},
289 {61.793f, 0.48445f, 361.537f, 57.889f, 50.674f},
290 {7.83464f, 0.49804f, 160.452f, 3.192f, 0.71922f},
291 {19.729f, 0.52153f, 162.341f, 58.35f, 25.668f},
292 {26.4648f, 0.50112f, 188.913f, 30.079f, 16.509f},
293 {7.8655f, 0.5205f, 63.96f, 51.32f, 67.775f},
294 {8.8965f, 0.5148f, 339.36f, 1.7205f, 0.70423f},
295 {2.959f, 0.53255f, 34.247f, 60.655f, 15.153f},
296 {3.80133f, 0.41590f, 12.9966f, 117.83f, 242.28f} };
297
298 static const G4double atomicWeight[11] = {
299 101.96128f, 44.0098f, 16.0426f, 28.0536f, 42.0804f,
300 104.1512f, 44.665f, 60.0843f, 18.0152f, 18.0152f, 12.0f};
301
302 const G4int i = iMolecula;
303
304 G4double slow = (G4double)(a[i][0]);
305
306 G4double x1 = (G4double)(a[i][1]);
307 G4double x2 = (G4double)(a[i][2]);
308 G4double x3 = (G4double)(a[i][3]);
309 G4double x4 = (G4double)(a[i][4]);
310
311 // Free electron gas model
312 if ( T < 0.001 ) {
313 G4double shigh = G4Log( 1.0 + x3*1000.0 + x4*0.001 ) *x2*1000.0;
314 ionloss = slow*shigh / (slow + shigh) ;
315 ionloss *= std::sqrt(T*1000.0) ;
316
317 // Main parametrisation
318 } else {
319 slow *= G4Exp(G4Log(T*1000.0)*x1) ;
320 G4double shigh = G4Log( 1.0 + x3/T + x4*T ) * x2/T ;
321 ionloss = slow*shigh / (slow + shigh) ;
322 /*
323 G4cout << "## " << i << ". T= " << T << " slow= " << slow
324 << " a0= " << a[i][0] << " a1= " << a[i][1]
325 << " shigh= " << shigh
326 << " dedx= " << ionloss << " q^2= " << HeEffChargeSquare(z, T*MeV)
327 << G4endl;
328 */
329 }
330 ionloss = std::max(ionloss, 0.0) * atomicWeight[iMolecula];
331 }
332 return ionloss;
333}
334
335//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
336
337G4double G4BraggIonModel::HeElectronicStoppingPower(const G4int z,
338 const G4double kineticEnergy) const
339{
340 G4double ionloss ;
341 G4int i = std::min(z-1, 91); // index of atom
342 //G4cout << "ElectronicStoppingPower z=" << z << " i=" << i
343 // << " E=" << kineticEnergy << G4endl;
344 // The data and the fit from:
345 // ICRU Report 49, 1993. Ziegler's type of parametrisations.
346 // Proton kinetic energy for parametrisation (keV/amu)
347 // He energy in internal units of parametrisation formula (MeV)
348 //G4double T = kineticEnergy*rateMassHe2p/CLHEP::MeV;
349 G4double T = kineticEnergy/CLHEP::MeV;
350
351 static const G4float a[92][5] = {
352 { 0.35485f, 0.6456f, 6.01525f, 20.8933f, 4.3515f
353 },{ 0.58f, 0.59f, 6.3f, 130.0f, 44.07f
354 },{ 1.42f, 0.49f, 12.25f, 32.0f, 9.161f
355 },{ 2.206f, 0.51f, 15.32f, 0.25f, 8.995f //Be Ziegler77
356 // },{ 2.1895f, 0.47183,7.2362f, 134.30f, 197.96f //Be from ICRU
357 },{ 3.691f, 0.4128f, 18.48f, 50.72f, 9.0f
358 },{ 3.83523f, 0.42993f,12.6125f, 227.41f, 188.97f
359 // },{ 1.9259f, 0.5550f, 27.15125f, 26.0665f, 6.2768f //too many digits
360 },{ 1.9259f, 0.5550f, 27.1513f, 26.0665f, 6.2768f
361 },{ 2.81015f, 0.4759f, 50.0253f, 10.556f, 1.0382f
362 },{ 1.533f, 0.531f, 40.44f, 18.41f, 2.718f
363 },{ 2.303f, 0.4861f, 37.01f, 37.96f, 5.092f
364 // Z= 11-20
365 },{ 9.894f, 0.3081f, 23.65f, 0.384f, 92.93f
366 },{ 4.3f, 0.47f, 34.3f, 3.3f, 12.74f
367 },{ 2.5f, 0.625f, 45.7f, 0.1f, 4.359f
368 },{ 2.1f, 0.65f, 49.34f, 1.788f, 4.133f
369 },{ 1.729f, 0.6562f, 53.41f, 2.405f, 3.845f
370 },{ 1.402f, 0.6791f, 58.98f, 3.528f, 3.211f
371 },{ 1.117f, 0.7044f, 69.69f, 3.705f, 2.156f
372 },{ 2.291f, 0.6284f, 73.88f, 4.478f, 2.066f
373 },{ 8.554f, 0.3817f, 83.61f, 11.84f, 1.875f
374 },{ 6.297f, 0.4622f, 65.39f, 10.14f, 5.036f
375 // Z= 21-30
376 },{ 5.307f, 0.4918f, 61.74f, 12.4f, 6.665f
377 },{ 4.71f, 0.5087f, 65.28f, 8.806f, 5.948f
378 },{ 6.151f, 0.4524f, 83.0f, 18.31f, 2.71f
379 },{ 6.57f, 0.4322f, 84.76f, 15.53f, 2.779f
380 },{ 5.738f, 0.4492f, 84.6f, 14.18f, 3.101f
381 },{ 5.013f, 0.4707f, 85.8f, 16.55f, 3.211f
382 },{ 4.32f, 0.4947f, 76.14f, 10.85f, 5.441f
383 },{ 4.652f, 0.4571f, 80.73f, 22.0f, 4.952f
384 },{ 3.114f, 0.5236f, 76.67f, 7.62f, 6.385f
385 },{ 3.114f, 0.5236f, 76.67f, 7.62f, 7.502f
386 // Z= 31-40
387 },{ 3.114f, 0.5236f, 76.67f, 7.62f, 8.514f
388 },{ 5.746f, 0.4662f, 79.24f, 1.185f, 7.993f
389 },{ 2.792f, 0.6346f, 106.1f, 0.2986f, 2.331f
390 },{ 4.667f, 0.5095f, 124.3f, 2.102f, 1.667f
391 },{ 2.44f, 0.6346f, 105.0f, 0.83f, 2.851f
392 },{ 1.413f, 0.7377f, 147.9f, 1.466f, 1.016f
393 },{ 11.72f, 0.3826f, 102.8f, 9.231f, 4.371f
394 },{ 7.126f, 0.4804f, 119.3f, 5.784f, 2.454f
395 },{ 11.61f, 0.3955f, 146.7f, 7.031f, 1.423f
396 },{ 10.99f, 0.41f, 163.9f, 7.1f, 1.052f
397 // Z= 41-50
398 },{ 9.241f, 0.4275f, 163.1f, 7.954f, 1.102f
399 },{ 9.276f, 0.418f, 157.1f, 8.038f, 1.29f
400 },{ 3.999f, 0.6152f, 97.6f, 1.297f, 5.792f
401 },{ 4.306f, 0.5658f, 97.99f, 5.514f, 5.754f
402 },{ 3.615f, 0.6197f, 86.26f, 0.333f, 8.689f
403 },{ 5.8f, 0.49f, 147.2f, 6.903f, 1.289f
404 },{ 5.6f, 0.49f, 130.0f, 10.0f, 2.844f
405 },{ 3.55f, 0.6068f, 124.7f, 1.112f, 3.119f
406 },{ 3.6f, 0.62f, 105.8f, 0.1692f, 6.026f
407 },{ 5.4f, 0.53f, 103.1f, 3.931f, 7.767f
408 // Z= 51-60
409 },{ 3.97f, 0.6459f, 131.8f, 0.2233f, 2.723f
410 },{ 3.65f, 0.64f, 126.8f, 0.6834f, 3.411f
411 },{ 3.118f, 0.6519f, 164.9f, 1.208f, 1.51f
412 },{ 3.949f, 0.6209f, 200.5f, 1.878f, 0.9126f
413 },{ 14.4f, 0.3923f, 152.5f, 8.354f, 2.597f
414 },{ 10.99f, 0.4599f, 138.4f, 4.811f, 3.726f
415 },{ 16.6f, 0.3773f, 224.1f, 6.28f, 0.9121f
416 },{ 10.54f, 0.4533f, 159.3f, 4.832f, 2.529f
417 },{ 10.33f, 0.4502f, 162.0f, 5.132f, 2.444f
418 },{ 10.15f, 0.4471f, 165.6f, 5.378f, 2.328f
419 // Z= 61-70
420 },{ 9.976f, 0.4439f, 168.0f, 5.721f, 2.258f
421 },{ 9.804f, 0.4408f, 176.2f, 5.675f, 1.997f
422 },{ 14.22f, 0.363f, 228.4f, 7.024f, 1.016f
423 },{ 9.952f, 0.4318f, 233.5f, 5.065f, 0.9244f
424 },{ 9.272f, 0.4345f, 210.0f, 4.911f, 1.258f
425 },{ 10.13f, 0.4146f, 225.7f, 5.525f, 1.055f
426 },{ 8.949f, 0.4304f, 213.3f, 5.071f, 1.221f
427 },{ 11.94f, 0.3783f, 247.2f, 6.655f, 0.849f
428 },{ 8.472f, 0.4405f, 195.5f, 4.051f, 1.604f
429 },{ 8.301f, 0.4399f, 203.7f, 3.667f, 1.459f
430 // Z= 71-80
431 },{ 6.567f, 0.4858f, 193.0f, 2.65f, 1.66f
432 },{ 5.951f, 0.5016f, 196.1f, 2.662f, 1.589f
433 },{ 7.495f, 0.4523f, 251.4f, 3.433f, 0.8619f
434 },{ 6.335f, 0.4825f, 255.1f, 2.834f, 0.8228f
435 },{ 4.314f, 0.5558f, 214.8f, 2.354f, 1.263f
436 },{ 4.02f, 0.5681f, 219.9f, 2.402f, 1.191f
437 },{ 3.836f, 0.5765f, 210.2f, 2.742f, 1.305f
438 },{ 4.68f, 0.5247f, 244.7f, 2.749f, 0.8962f
439 },{ 2.892f, 0.6204f, 208.6f, 2.415f, 1.416f //Au Z77
440 // },{ 3.223f, 0.5883f, 232.7f, 2.954f, 1.05 //Au ICRU
441 },{ 2.892f, 0.6204f, 208.6f, 2.415f, 1.416f
442 // Z= 81-90
443 },{ 4.728f, 0.5522f, 217.0f, 3.091f, 1.386f
444 },{ 6.18f, 0.52f, 170.0f, 4.0f, 3.224f
445 },{ 9.0f, 0.47f, 198.0f, 3.8f, 2.032f
446 },{ 2.324f, 0.6997f, 216.0f, 1.599f, 1.399f
447 },{ 1.961f, 0.7286f, 223.0f, 1.621f, 1.296f
448 },{ 1.75f, 0.7427f, 350.1f, 0.9789f, 0.5507f
449 },{ 10.31f, 0.4613f, 261.2f, 4.738f, 0.9899f
450 },{ 7.962f, 0.519f, 235.7f, 4.347f, 1.313f
451 },{ 6.227f, 0.5645f, 231.9f, 3.961f, 1.379f
452 },{ 5.246f, 0.5947f, 228.6f, 4.027f, 1.432f
453 // Z= 91-92
454 },{ 5.408f, 0.5811f, 235.7f, 3.961f, 1.358f
455 },{ 5.218f, 0.5828f, 245.0f, 3.838f, 1.25f}
456 };
457
458 G4double slow = (G4double)(a[i][0]);
459
460 G4double x1 = (G4double)(a[i][1]);
461 G4double x2 = (G4double)(a[i][2]);
462 G4double x3 = (G4double)(a[i][3]);
463 G4double x4 = (G4double)(a[i][4]);
464
465 // Free electron gas model
466 if ( T < 0.001 ) {
467 G4double shigh = G4Log( 1.0 + x3*1000.0 + x4*0.001 )* x2*1000.0;
468 ionloss = slow*shigh*std::sqrt(T*1000.0) / (slow + shigh) ;
469
470 // Main parametrisation
471 } else {
472 slow *= G4Exp(G4Log(T*1000.0)*x1);
473 G4double shigh = G4Log( 1.0 + x3/T + x4*T ) * x2/T;
474 ionloss = slow*shigh / (slow + shigh) ;
475 /*
476 G4cout << "## " << i << ". T= " << T << " slow= " << slow
477 << " a0= " << a[i][0] << " a1= " << a[i][1]
478 << " shigh= " << shigh
479 << " dedx= " << ionloss << " q^2= " << HeEffChargeSquare(z, T)
480 << G4endl;
481 */
482 }
483 ionloss = std::max(ionloss, 0.0);
484 return ionloss;
485}
486
487//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
488
489G4double G4BraggIonModel::HeDEDX(const G4Material* material,
490 const G4double aEnergy)
491{
492 // aEnergy is energy of alpha
493 G4double eloss = 0.0;
494 // check DB
495 if(material != currentMaterial) {
496 currentMaterial = material;
497 baseMaterial = material->GetBaseMaterial()
498 ? material->GetBaseMaterial() : material;
499 iPSTAR = -1;
500 iASTAR = -1;
501 iMolecula = -1;
502 iICRU90 = (nullptr != fICRU90) ? fICRU90->GetIndex(baseMaterial) : -1;
503
504 if(iICRU90 < 0) {
505 if(isAlpha) {
506 iASTAR = fASTAR->GetIndex(baseMaterial);
507 if(iASTAR < 0) { iMolecula = HasMaterialForHe(baseMaterial); }
508 } else {
509 iPSTAR = fPSTAR->GetIndex(baseMaterial);
510 }
511 }
512 /*
513 G4cout << "%%% " <<material->GetName() << " iMolecula= "
514 << iMolecula << " iASTAR= " << iASTAR
515 << " iICRU90= " << iICRU90<< G4endl;
516 */
517 }
518 // ICRU90
519 if(iICRU90 >= 0) {
520 eloss = (isAlpha)
521 ? fICRU90->GetElectronicDEDXforAlpha(iICRU90, aEnergy)
522 : fICRU90->GetElectronicDEDXforProton(iICRU90, aEnergy);
523 if(eloss > 0.0) { return eloss*material->GetDensity(); }
524 }
525 // PSTAR parameterisation
526 if( iPSTAR >= 0 ) {
527 return fPSTAR->GetElectronicDEDX(iPSTAR, aEnergy)
528 *material->GetDensity();
529 }
530 // ASTAR
531 if( iASTAR >= 0 ) {
532 eloss = fASTAR->GetElectronicDEDX(iASTAR, aEnergy);
533 /*
534 G4cout << "ASTAR: E=" << aEnergy
535 << " dedx=" << eloss*material->GetDensity()
536 << " " << particle->GetParticleName() << G4endl;
537 */
538 if(eloss > 0.0) { return eloss*material->GetDensity(); }
539 }
540
541 const std::size_t numberOfElements = material->GetNumberOfElements();
542 const G4ElementVector* theElmVector = material->GetElementVector();
543 const G4double* theAtomicNumDensityVector =
544 material->GetAtomicNumDensityVector();
545
546 // molecular data use proton stopping power table
547 // element data from ICRU49 include data for alpha
548 if(iMolecula >= 0) {
549 const G4double zeff = material->GetTotNbOfElectPerVolume()/
550 material->GetTotNbOfAtomsPerVolume();
551 heChargeSquare = HeEffChargeSquare(zeff, aEnergy/CLHEP::MeV);
552 eloss = HeStoppingPower(aEnergy)*heChargeSquare*material->GetDensity()/amu;
553
554 // pure material
555 } else if(1 == numberOfElements) {
556
557 const G4Element* element = (*theElmVector)[0];
558 eloss = HeElectronicStoppingPower(element->GetZasInt(), aEnergy)
559 * (material->GetTotNbOfAtomsPerVolume());
560
561 // Brugg's rule calculation
562 } else {
563 // loop for the elements in the material
564 for (std::size_t i=0; i<numberOfElements; ++i) {
565 const G4Element* element = (*theElmVector)[i];
566 eloss += HeElectronicStoppingPower(element->GetZasInt(), aEnergy)
567 * theAtomicNumDensityVector[i];
568 }
569 }
570 return eloss*theZieglerFactor;
571}
572
573//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
574
576G4BraggIonModel::HeEffChargeSquare(const G4double z,
577 const G4double kinEnergyHeInMeV) const
578{
579 // The aproximation of He effective charge from:
580 // J.F.Ziegler, J.P. Biersack, U. Littmark
581 // The Stopping and Range of Ions in Matter,
582 // Vol.1, Pergamon Press, 1985
583
584 static const G4double c[6] = {0.2865, 0.1266, -0.001429,
585 0.02402,-0.01135, 0.001475};
586
587 G4double e = std::max(0.0, G4Log(kinEnergyHeInMeV*massFactor));
588 G4double x = c[0] ;
589 G4double y = 1.0 ;
590 for (G4int i=1; i<6; ++i) {
591 y *= e;
592 x += y * c[i];
593 }
594
595 G4double w = 7.6 - e ;
596 w = 1.0 + (0.007 + 0.00005*z) * G4Exp( -w*w ) ;
597 w = 4.0 * (1.0 - G4Exp(-x)) * w * w ;
598
599 return w;
600}
601
602//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
603
G4TemplateAutoLock< G4Mutex > G4AutoLock
std::vector< const G4Element * > G4ElementVector
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition G4Exp.hh:132
G4double G4Log(G4double x)
Definition G4Log.hh:169
#define G4MUTEX_INITIALIZER
std::mutex G4Mutex
float G4float
Definition G4Types.hh:84
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
void CorrectionsAlongStep(const G4Material *, const G4ParticleDefinition *, const G4double kinEnergy, const G4double cutEnergy, const G4double &length, G4double &eloss) override
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
G4double GetChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy) override
~G4BraggIonModel() override
G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) override
G4BraggIonModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="BraggIon")
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
const G4Material * baseMaterial
G4double massRate
G4double lowestKinEnergy
G4BraggModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="Bragg")
G4double theZieglerFactor
void SetParticle(const G4ParticleDefinition *p)
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) final
G4EmCorrections * corr
G4double GetChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy) override
const G4ParticleDefinition * particle
const G4Material * currentMaterial
G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
static G4PSTARStopping * fPSTAR
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
static G4ICRU90StoppingData * fICRU90
G4double chargeSquareRatio
G4int GetZasInt() const
Definition G4Element.hh:120
G4double GetDensity() const
const G4String & GetChemicalFormula() const
const G4ElementVector * GetElementVector() const
const G4Material * GetBaseMaterial() const
G4double GetTotNbOfAtomsPerVolume() const
G4double GetTotNbOfElectPerVolume() const
const G4double * GetAtomicNumDensityVector() const
G4double GetElectronDensity() const
std::size_t GetNumberOfElements() const