source: trunk/source/processes/electromagnetic/highenergy/src/G4mplIonisationModel.cc@ 1006

Last change on this file since 1006 was 1005, checked in by garnier, 17 years ago

fichier oublies

File size: 7.9 KB
Line 
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: G4mplIonisationModel.cc,v 1.6 2009/02/20 16:38:33 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-02-ref-02 $
28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class header file
32//
33//
34// File name: G4mplIonisationModel
35//
36// Author: Vladimir Ivanchenko
37//
38// Creation date: 06.09.2005
39//
40// Modifications:
41// 12.08.2007 Changing low energy approximation and extrapolation.
42// Small bug fixing and refactoring (M. Vladymyrov)
43// 13.11.2007 Use low-energy asymptotic from [3] (V.Ivanchenko)
44//
45//
46// -------------------------------------------------------------------
47// References
48// [1] Steven P. Ahlen: Energy loss of relativistic heavy ionizing particles,
49// S.P. Ahlen, Rev. Mod. Phys 52(1980), p121
50// [2] K.A. Milton arXiv:hep-ex/0602040
51// [3] S.P. Ahlen and K. Kinoshita, Phys. Rev. D26 (1982) 2347
52
53
54//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
55//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
56
57#include "G4mplIonisationModel.hh"
58#include "Randomize.hh"
59#include "G4LossTableManager.hh"
60#include "G4ParticleChangeForLoss.hh"
61
62//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63
64using namespace std;
65
66G4mplIonisationModel::G4mplIonisationModel(G4double mCharge, const G4String& nam)
67 : G4VEmModel(nam),G4VEmFluctuationModel(nam),
68 magCharge(mCharge),
69 twoln10(log(100.0)),
70 betalow(0.01),
71 betalim(0.1),
72 beta2lim(betalim*betalim),
73 bg2lim(beta2lim*(1.0 + beta2lim))
74{
75 nmpl = G4int(abs(magCharge) * 2 * fine_structure_const + 0.5);
76 if(nmpl > 6) nmpl = 6;
77 else if(nmpl < 1) nmpl = 1;
78 pi_hbarc2_over_mc2 = pi * hbarc * hbarc / electron_mass_c2;
79 chargeSquare = magCharge * magCharge;
80 dedxlim = 45.*nmpl*nmpl*GeV*cm2/g;
81}
82
83//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
84
85G4mplIonisationModel::~G4mplIonisationModel()
86{}
87
88//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
89
90void G4mplIonisationModel::Initialise(const G4ParticleDefinition* p,
91 const G4DataVector&)
92{
93 monopole = p;
94 mass = monopole->GetPDGMass();
95
96 if(pParticleChange)
97 fParticleChange = reinterpret_cast<G4ParticleChangeForLoss*>(pParticleChange);
98 else
99 fParticleChange = new G4ParticleChangeForLoss();
100}
101
102//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
103
104G4double G4mplIonisationModel::ComputeDEDXPerVolume(const G4Material* material,
105 const G4ParticleDefinition*,
106 G4double kineticEnergy,
107 G4double)
108{
109 G4double tau = kineticEnergy / mass;
110 G4double gam = tau + 1.0;
111 G4double bg2 = tau * (tau + 2.0);
112 G4double beta2 = bg2 / (gam * gam);
113 G4double beta = sqrt(beta2);
114
115 // low-energy asymptotic formula
116 G4double dedx = dedxlim*beta*material->GetDensity();
117
118 // above asymptotic
119 if(beta > betalow) {
120
121 // high energy
122 if(beta >= betalim) {
123 dedx = ComputeDEDXAhlen(material, bg2);
124
125 } else {
126
127 G4double dedx1 = dedxlim*betalow*material->GetDensity();
128 G4double dedx2 = ComputeDEDXAhlen(material, bg2lim);
129
130 // extrapolation between two formula
131 G4double kapa2 = beta - betalow;
132 G4double kapa1 = betalim - beta;
133 dedx = (kapa1*dedx1 + kapa2*dedx2)/(kapa1 + kapa2);
134 }
135 }
136 return dedx;
137}
138
139//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
140
141G4double G4mplIonisationModel::ComputeDEDXAhlen(const G4Material* material,
142 G4double bg2)
143{
144 G4double eDensity = material->GetElectronDensity();
145 G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy();
146 G4double cden = material->GetIonisation()->GetCdensity();
147 G4double mden = material->GetIonisation()->GetMdensity();
148 G4double aden = material->GetIonisation()->GetAdensity();
149 G4double x0den = material->GetIonisation()->GetX0density();
150 G4double x1den = material->GetIonisation()->GetX1density();
151
152 // Ahlen's formula for nonconductors, [1]p157, f(5.7)
153 G4double dedx = log(2.0 * electron_mass_c2 * bg2 / eexc) - 0.5;
154
155 // Kazama et al. cross-section correction
156 G4double k = 0.406;
157 if(nmpl > 1) k = 0.346;
158
159 // Bloch correction
160 const G4double B[7] = { 0.0, 0.248, 0.672, 1.022, 1.243, 1.464, 1.685};
161
162 dedx += 0.5 * k - B[nmpl];
163
164 // density effect correction
165 G4double deltam;
166 G4double x = log(bg2) / twoln10;
167 if ( x >= x0den ) {
168 deltam = twoln10 * x - cden;
169 if ( x < x1den ) deltam += aden * pow((x1den-x), mden);
170 dedx -= 0.5 * deltam;
171 }
172
173 // now compute the total ionization loss
174 dedx *= pi_hbarc2_over_mc2 * eDensity * nmpl * nmpl;
175
176 if (dedx < 0.0) dedx = 0;
177 return dedx;
178}
179
180//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
181
182void G4mplIonisationModel::SampleSecondaries(std::vector<G4DynamicParticle*>*,
183 const G4MaterialCutsCouple*,
184 const G4DynamicParticle*,
185 G4double,
186 G4double)
187{}
188
189//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
190
191G4double G4mplIonisationModel::SampleFluctuations(
192 const G4Material* material,
193 const G4DynamicParticle* dp,
194 G4double& tmax,
195 G4double& length,
196 G4double& meanLoss)
197{
198 G4double siga = Dispersion(material,dp,tmax,length);
199 G4double loss = meanLoss;
200 siga = sqrt(siga);
201 G4double twomeanLoss = meanLoss + meanLoss;
202
203 if(twomeanLoss < siga) {
204 G4double x;
205 do {
206 loss = twomeanLoss*G4UniformRand();
207 x = (loss - meanLoss)/siga;
208 } while (1.0 - 0.5*x*x < G4UniformRand());
209 } else {
210 do {
211 loss = G4RandGauss::shoot(meanLoss,siga);
212 } while (0.0 > loss || loss > twomeanLoss);
213 }
214 return loss;
215}
216
217//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
218
219G4double G4mplIonisationModel::Dispersion(const G4Material* material,
220 const G4DynamicParticle* dp,
221 G4double& tmax,
222 G4double& length)
223{
224 G4double siga = 0.0;
225 G4double tau = dp->GetKineticEnergy()/mass;
226 if(tau > 0.0) {
227 G4double electronDensity = material->GetElectronDensity();
228 G4double gam = tau + 1.0;
229 G4double invbeta2 = (gam*gam)/(tau * (tau+2.0));
230 siga = (invbeta2 - 0.5) * twopi_mc2_rcl2 * tmax * length
231 * electronDensity * chargeSquare;
232 }
233 return siga;
234}
235
236//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracBrowser for help on using the repository browser.