Geant4  10.01.p02
G4KokoulinMuonNuclearXS.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 // $Id: $
27 //
28 // Author: D.H. Wright
29 // Date: 1 February 2011
30 //
31 // Modified:
32 //
33 // 19 Aug 2011, V.Ivanchenko move to new design and make x-section per element
34 
35 // Description: use Kokoulin's parameterized calculation of virtual
36 // photon production cross section and conversion to
37 // real photons.
38 
40 
41 #include "G4PhysicalConstants.hh"
42 #include "G4SystemOfUnits.hh"
43 #include "G4PhysicsLogVector.hh"
44 #include "G4PhysicsVector.hh"
45 #include "G4MuonMinus.hh"
46 #include "G4MuonPlus.hh"
47 #include "G4NucleiProperties.hh"
48 #include "G4NistManager.hh"
49 #include "G4Log.hh"
50 #include "G4Exp.hh"
51 
53 
55  :G4VCrossSectionDataSet("KokoulinMuonNuclearXS"),
56  LowestKineticEnergy(1*GeV), HighestKineticEnergy(1*PeV),
57  TotBin(60), CutFixed(0.2*GeV), isInitialized(false), isMaster(false)
58 {}
59 
61 {
62  if (isMaster) {
63  for(G4int i=0; i<MAXZMUN; ++i) {
64  delete theCrossSection[i];
65  theCrossSection[i] = 0;
66  }
67  }
68 }
69 
70 G4bool
72  G4int, const G4Material*)
73 {
74  return true;
75 }
76 
77 void
79 {
80  if(!isInitialized) {
81  isMaster = true;
82  isInitialized = true;
83  }
85 }
86 
88 {
89  G4double energy, A, Value;
90  G4int Z;
91 
93  const G4ElementTable* theElementTable = G4Element::GetElementTable();
94  G4NistManager* nistManager = G4NistManager::Instance();
95 
96  for (G4int j = 0; j < nEl; j++) {
97  Z = G4lrint((*theElementTable)[j]->GetZ());
98  A = nistManager->GetAtomicMassAmu(Z);
99  if(Z < MAXZMUN && !theCrossSection[Z]) {
102  TotBin);
103  for (G4int i = 0; i <= TotBin; ++i) {
104  energy = theCrossSection[Z]->Energy(i);
105  Value = ComputeMicroscopicCrossSection(energy, A);
106  theCrossSection[Z]->PutValue(i,Value);
107  }
108  }
109  }
110 }
111 
114 {
115  // Calculate cross section (differential in muon incident kinetic energy) by
116  // integrating the double differential cross section over the energy loss
117 
118  static const G4double xgi[] =
119  {0.0199,0.1017,0.2372,0.4083,0.5917,0.7628,0.8983,0.9801};
120  static const G4double wgi[] =
121  {0.0506,0.1112,0.1569,0.1813,0.1813,0.1569,0.1112,0.0506};
122  static const G4double ak1 = 6.9;
123  static const G4double ak2 = 1.0;
124 
126 
127  G4double CrossSection = 0.0;
128  if (KineticEnergy <= CutFixed) return CrossSection;
129 
130  G4double epmin = CutFixed;
131  G4double epmax = KineticEnergy + Mass - 0.5*proton_mass_c2;
132  if (epmax <= epmin) return CrossSection; // NaN bug correction
133 
134  G4double aaa = G4Log(epmin);
135  G4double bbb = G4Log(epmax);
136  G4int kkk = std::max(1,G4int((bbb-aaa)/ak1 +ak2));
137  G4double hhh = (bbb-aaa)/kkk ;
138  G4double epln;
139  G4double ep;
140  G4double x;
141 
142  for (G4int l = 0; l < kkk; ++l) {
143  x = aaa + hhh*l;
144  for (G4int ll = 0; ll < 8; ++ll) {
145  epln=x+xgi[ll]*hhh;
146  ep = G4Exp(epln);
147  CrossSection +=
148  ep*wgi[ll]*ComputeDDMicroscopicCrossSection(KineticEnergy, 0, A, ep);
149  }
150  }
151 
152  CrossSection *= hhh ;
153  if (CrossSection < 0.) { CrossSection = 0.; }
154  return CrossSection;
155 }
156 
159  G4double A, G4double epsilon)
160 {
161  // Calculate the double-differential microscopic cross section (in muon
162  // incident kinetic energy and energy loss) using the cross section formula
163  // of R.P. Kokoulin (18/01/98)
164 
165  static const G4double alam2 = 0.400*GeV*GeV;
166  static const G4double alam = 0.632456*GeV;
167  static const G4double coeffn = fine_structure_const/pi;
168 
169  G4double ParticleMass = G4MuonMinus::MuonMinus()->GetPDGMass();
170  G4double TotalEnergy = KineticEnergy + ParticleMass;
171 
172  G4double DCrossSection = 0.;
173 
174  if ((epsilon >= TotalEnergy - 0.5*proton_mass_c2) ||
175  (epsilon <= CutFixed) ) { return DCrossSection; }
176 
177  G4double ep = epsilon/GeV;
178  G4double aeff = 0.22*A+0.78*G4Exp(0.89*G4Log(A)); //shadowing
179  G4double sigph = (49.2+11.1*G4Log(ep)+151.8/std::sqrt(ep))*microbarn;
180 
181  G4double v = epsilon/TotalEnergy;
182  G4double v1 = 1.-v;
183  G4double v2 = v*v;
184  G4double mass2 = ParticleMass*ParticleMass;
185 
186  G4double up = TotalEnergy*TotalEnergy*v1/mass2*(1.+mass2*v2/(alam2*v1));
187  G4double down = 1.+epsilon/alam*(1.+alam/(2.*proton_mass_c2)+epsilon/alam);
188 
189  DCrossSection = coeffn*aeff*sigph/epsilon*
190  (-v1+(v1+0.5*v2*(1.+2.*mass2/alam2))*G4Log(up/down));
191 
192  if (DCrossSection < 0.) { DCrossSection = 0.; }
193  return DCrossSection;
194 }
195 
198  G4int Z, const G4Material*)
199 {
200  return theCrossSection[Z]->Value(aPart->GetKineticEnergy());
201 }
202 
G4double GetKineticEnergy() const
const G4double pi
static const double microbarn
Definition: G4SIunits.hh:97
G4double ComputeDDMicroscopicCrossSection(G4double incidentKE, G4double Z, G4double A, G4double epsilon)
G4double ComputeMicroscopicCrossSection(G4double incidentKE, G4double A)
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
static size_t GetNumberOfElements()
Definition: G4Element.cc:410
G4double GetElementCrossSection(const G4DynamicParticle *particle, G4int Z, const G4Material *)
bool G4bool
Definition: G4Types.hh:79
void PutValue(size_t index, G4double theValue)
static const double GeV
Definition: G4SIunits.hh:196
const G4int MAXZMUN
G4double Energy(size_t index) const
G4bool IsElementApplicable(const G4DynamicParticle *particle, G4int Z, const G4Material *)
G4double Value(G4double theEnergy, size_t &lastidx) const
static const G4double A[nN]
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
static const double PeV
Definition: G4SIunits.hh:198
G4double GetPDGMass() const
int G4lrint(double ad)
Definition: templates.hh:163
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double energy(const ThreeVector &p, const G4double m)
G4double GetAtomicMassAmu(const G4String &symb) const
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:100
void BuildPhysicsTable(const G4ParticleDefinition &)
static G4PhysicsVector * theCrossSection[MAXZMUN]
std::vector< G4Element * > G4ElementTable
double G4double
Definition: G4Types.hh:76
static G4ElementTable * GetElementTable()
Definition: G4Element.cc:403
G4bool isInitialized()
Check if the generator is initialized.