source: trunk/source/processes/electromagnetic/muons/include/G4MuPairProductionModel.hh@ 899

Last change on this file since 899 was 819, checked in by garnier, 17 years ago

import all except CVS

File size: 7.7 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: G4MuPairProductionModel.hh,v 1.24 2007/10/11 13:52:03 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-01-patch-02 $
28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class header file
32//
33//
34// File name: G4MuPairProductionModel
35//
36// Author: Vladimir Ivanchenko on base of Laszlo Urban code
37//
38// Creation date: 18.05.2002
39//
40// Modifications:
41//
42// 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko)
43// 27-01-03 Make models region aware (V.Ivanchenko)
44// 13-02-03 Add name (V.Ivanchenko)
45// 10-02-04 Update parameterisation using R.Kokoulin model (V.Ivanchenko)
46// 10-02-04 Add lowestKinEnergy (V.Ivanchenko)
47// 13-02-06 Add ComputeCrossSectionPerAtom (mma)
48// 12-05-06 Add parameter to SelectRandomAtom (A.Bogdanov)
49// 11-10-07 Add ignoreCut flag (V.Ivanchenko)
50
51//
52// Class Description:
53//
54// Implementation of e+e- pair production by muons
55//
56
57// -------------------------------------------------------------------
58//
59
60#ifndef G4MuPairProductionModel_h
61#define G4MuPairProductionModel_h 1
62
63#include "G4VEmModel.hh"
64#include <vector>
65
66class G4Element;
67class G4ParticleChangeForLoss;
68class G4ParticleChangeForGamma;
69
70class G4MuPairProductionModel : public G4VEmModel
71{
72
73public:
74
75 G4MuPairProductionModel(const G4ParticleDefinition* p = 0,
76 const G4String& nam = "muPairProd");
77
78 virtual ~G4MuPairProductionModel();
79
80 void SetParticle(const G4ParticleDefinition*);
81
82 void Initialise(const G4ParticleDefinition*, const G4DataVector&);
83
84 void SetLowestKineticEnergy(G4double e) {lowestKinEnergy = e;};
85
86 G4double MinEnergyCut(const G4ParticleDefinition*,
87 const G4MaterialCutsCouple*);
88
89 virtual G4double ComputeCrossSectionPerAtom(
90 const G4ParticleDefinition*,
91 G4double kineticEnergy,
92 G4double Z, G4double A,
93 G4double cutEnergy,
94 G4double maxEnergy);
95
96 virtual G4double CrossSectionPerVolume(const G4Material*,
97 const G4ParticleDefinition*,
98 G4double kineticEnergy,
99 G4double cutEnergy,
100 G4double maxEnergy);
101
102 virtual G4double ComputeDEDXPerVolume(const G4Material*,
103 const G4ParticleDefinition*,
104 G4double kineticEnergy,
105 G4double cutEnergy);
106
107 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
108 const G4MaterialCutsCouple*,
109 const G4DynamicParticle*,
110 G4double tmin,
111 G4double maxEnergy);
112
113protected:
114
115 inline G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
116 G4double kineticEnergy);
117
118
119public:
120
121 G4double ComputMuPairLoss(G4double Z, G4double tkin, G4double cut,
122 G4double tmax);
123
124 G4double ComputeMicroscopicCrossSection(G4double tkin,
125 G4double Z,
126 G4double cut);
127
128 G4double ComputeDMicroscopicCrossSection(G4double tkin,
129 G4double Z,
130 G4double pairEnergy);
131
132 inline void SetIgnoreCutFlag(G4bool);
133
134 inline G4bool IgnoreCutFlag() const;
135
136private:
137
138 const G4Element* SelectRandomAtom(G4double kinEnergy,
139 G4double dt,
140 G4int it,
141 const G4MaterialCutsCouple* couple,
142 G4double tmin);
143
144 void MakeSamplingTables();
145
146 void SetCurrentElement(G4double Z);
147
148 inline G4double InterpolatedIntegralCrossSection(
149 G4double dt, G4double dz, G4int iz,
150 G4int it, G4int iy, G4double z);
151
152 // hide assignment operator
153 G4MuPairProductionModel & operator=(const G4MuPairProductionModel &right);
154 G4MuPairProductionModel(const G4MuPairProductionModel&);
155
156 G4ParticleDefinition* theElectron;
157 G4ParticleDefinition* thePositron;
158 G4ParticleChangeForLoss* fParticleChange;
159 G4ParticleChangeForGamma* gParticleChange;
160
161 G4double minPairEnergy;
162 G4double lowestKinEnergy;
163
164 G4double factorForCross;
165 G4double sqrte;
166 G4double particleMass;
167 G4double currentZ;
168 G4double z13;
169 G4double z23;
170 G4double lnZ;
171
172 const G4ParticleDefinition* particle;
173
174 // tables for sampling
175 G4int nzdat;
176 G4int ntdat;
177 G4int nbiny;
178 size_t nmaxElements;
179 static G4double zdat[5],adat[5],tdat[8],xgi[8],wgi[8];
180 G4double ya[1001],proba[5][8][1001];
181
182 G4double ymin;
183 G4double ymax;
184 G4double dy;
185
186 G4bool ignoreCut;
187
188 G4bool samplingTablesAreFilled;
189 std::vector<G4double> partialSum;
190};
191
192//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
193
194inline G4double G4MuPairProductionModel::MaxSecondaryEnergy(
195 const G4ParticleDefinition*,
196 G4double kineticEnergy)
197{
198 G4double maxPairEnergy = kineticEnergy + particleMass*(1.0 - 0.75*sqrte*z13);
199 return maxPairEnergy;
200}
201
202//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
203
204inline void G4MuPairProductionModel::SetCurrentElement(G4double Z)
205{
206 if(Z != currentZ) {
207 currentZ = Z;
208 z13 = std::pow(Z,0.333333333);
209 z23 = z13*z13;
210 lnZ = std::log(Z);
211 }
212}
213
214//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
215
216inline G4double G4MuPairProductionModel::InterpolatedIntegralCrossSection(
217 G4double dt, G4double dz,
218 G4int iz, G4int it, G4int iy, G4double z)
219{
220 G4double fac = 1./(zdat[iz] *(zdat[iz] +1.));
221 G4double fac1 = 1./(zdat[iz-1]*(zdat[iz-1]+1.));
222 G4double f0 = fac1*proba[iz-1][it-1][iy] +
223 (fac*proba[iz][it-1][iy]-fac1*proba[iz-1][it-1][iy])*dz;
224 G4double f1 = fac1*proba[iz-1][it ][iy] +
225 (fac*proba[iz][it ][iy]-fac1*proba[iz-1][it ][iy])*dz;
226 return (f0 + (f1-f0)*dt)*z*(z+1.);
227}
228
229//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
230
231inline void G4MuPairProductionModel::SetIgnoreCutFlag(G4bool val)
232{
233 ignoreCut = val;
234}
235
236//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
237
238inline G4bool G4MuPairProductionModel::IgnoreCutFlag() const
239{
240 return ignoreCut;
241}
242
243//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
244
245#endif
Note: See TracBrowser for help on using the repository browser.