Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4INCLDeuteronDensity.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 // INCL++ intra-nuclear cascade model
27 // Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28 // Davide Mancusi, CEA
29 // Alain Boudard, CEA
30 // Sylvie Leray, CEA
31 // Joseph Cugnon, University of Liege
32 //
33 #define INCLXX_IN_GEANT4_MODE 1
34 
35 #include "globals.hh"
36 
44 #include "G4INCLDeuteronDensity.hh"
45 #include "G4INCLGlobals.hh"
46 // #include <cassert>
47 #include <algorithm>
48 
49 namespace G4INCL {
50 
52  const G4double DeuteronDensity::coeff1[coeffTableSize] = {
53  0.88688076e+0,
54  -0.34717093e+0,
55  -0.30502380e+1,
56  0.56207766e+2,
57  -0.74957334e+3,
58  0.53365279e+4,
59  -0.22706863e+5,
60  0.60434469e+5,
61  -0.10292058e+6,
62  0.11223357e+6,
63  -0.75925226e+5,
64  0.29059715e+5,
65  -0.48157368e+4
66  };
67 
69  const G4double DeuteronDensity::coeff2[coeffTableSize] = {
70  0.23135193e-1,
71  -0.85604572e+0,
72  0.56068193e+1,
73  -0.69462922e+2,
74  0.41631118e+3,
75  -0.12546621e+4,
76  0.12387830e+4,
77  0.33739172e+4,
78  -0.13041151e+5,
79  0.19512524e+5,
80  -0.15634324e+5,
81  0.66231089e+4,
82  -0.11698185e+4
83  };
84 
86  const G4double DeuteronDensity::normalisationR = std::sqrt(32. * Math::pi) * 0.28212;
87 
89  const G4double DeuteronDensity::normalisationP = normalisationR / (std::sqrt(4. * Math::pi) * std::pow(PhysicalConstants::hc,1.5));
90 
92  const G4double DeuteronDensity::al = 0.23162461;
93 
95  const G4double sWave = wavefunctionR(0, r);
96  const G4double dWave = wavefunctionR(2, r);
97  return r*r*(sWave*sWave + dWave*dWave);
98  }
99 
101  const G4double sWave = wavefunctionR(0, r);
102  const G4double dWave = wavefunctionR(2, r);
103  const G4double sWaveDeriv = derivWavefunctionR(0, r);
104  const G4double dWaveDeriv = derivWavefunctionR(2, r);
105  return (sWave*sWaveDeriv + dWave*dWaveDeriv) / Math::twoPi;
106  }
107 
109  const G4double sWave = wavefunctionP(0, p);
110  const G4double dWave = wavefunctionP(2, p);
111  return p*p*(sWave*sWave + dWave*dWave);
112  }
113 
115 // assert(l==0 || l==2); // only s- and d-waves in a deuteron
116  const G4double r = 2. * std::max(theR, 1.e-4);
117 
118  G4double result = 0.;
119  G4double fmr;
120 
121  for(G4int i=0; i<coeffTableSize; ++i) {
122  fmr = r * (al+i);
123  if(l==0) { // s-wave
124  result += coeff1[i] * std::exp(-fmr);
125  } else { // d-wave
126  result += coeff2[i] * std::exp(-fmr) * (1.+3./fmr+3./(fmr*fmr));
127  }
128  }
129 
130  result *= normalisationR/r;
131  return result;
132  }
133 
135 // assert(l==0 || l==2); // only s- and d-waves in a deuteron
136  const G4double r = 2. * std::max(theR, 1.e-4);
137 
138  G4double result = 0.;
139  G4double fmr;
140 
141  for(G4int i=0; i<coeffTableSize; ++i) {
142  fmr = r * (al+i);
143  if(l==0) { // s-wave
144  result += coeff1[i] * std::exp(-fmr) * (fmr + 1.);
145  } else { // d-wave
146  result += coeff2[i] * std::exp(-fmr) * (fmr + 4. + 9./fmr + 9./(fmr*fmr));
147  }
148  }
149 
150  result *= -normalisationR/(r*r);
151  return result;
152  }
153 
155 // assert(l==0 || l==2); // only s- and d-waves in a deuteron
156  const G4double q = theQ / PhysicalConstants::hc;
157  const G4double q2 = q*q;
158  G4double result=0.;
159  G4double fmq, alPlusI;
160  for(G4int i=0; i<coeffTableSize; ++i) {
161  alPlusI = al+i;
162  fmq = q2 + alPlusI*alPlusI;
163  if(l==0) { // s-wave
164  result += coeff1[i] / fmq;
165  } else { // d-wave
166  result += coeff2[i] / fmq;
167  }
168  }
169 
170  result *= normalisationP;
171  return result;
172  }
173 
174 }
175