Geant4.10
 All Data Structures 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 
37 /** \file G4INCLDeuteronDensity.cc
38  * \brief Deuteron density in r and p according to the Paris potential.
39  *
40  * \date 6 March 2012
41  * \author Davide Mancusi
42  */
43 
44 #include "G4INCLDeuteronDensity.hh"
45 #include "G4INCLGlobals.hh"
46 // #include <cassert>
47 #include <algorithm>
48 
49 namespace G4INCL {
50 
51  namespace DeuteronDensity {
52 
53  namespace {
54 
55  const G4int coeffTableSize = 13;
56 
57  /// \brief Coefficients for the deuteron wave function
58  const G4double coeff1[coeffTableSize] = {
59  0.88688076e+0,
60  -0.34717093e+0,
61  -0.30502380e+1,
62  0.56207766e+2,
63  -0.74957334e+3,
64  0.53365279e+4,
65  -0.22706863e+5,
66  0.60434469e+5,
67  -0.10292058e+6,
68  0.11223357e+6,
69  -0.75925226e+5,
70  0.29059715e+5,
71  -0.48157368e+4
72  };
73 
74  /// \brief Coefficients for the deuteron wave function
75  const G4double coeff2[coeffTableSize] = {
76  0.23135193e-1,
77  -0.85604572e+0,
78  0.56068193e+1,
79  -0.69462922e+2,
80  0.41631118e+3,
81  -0.12546621e+4,
82  0.12387830e+4,
83  0.33739172e+4,
84  -0.13041151e+5,
85  0.19512524e+5,
86  -0.15634324e+5,
87  0.66231089e+4,
88  -0.11698185e+4
89  };
90 
91  /// \brief Normalisation coefficient for the r-space deuteron wave function
92  const G4double normalisationR = std::sqrt(32. * Math::pi) * 0.28212;
93 
94  /// \brief Normalisation coefficient for the p-space deuteron wave function
95  const G4double normalisationP = normalisationR / (std::sqrt(4. * Math::pi) * std::pow(PhysicalConstants::hc,1.5));
96 
97  /// \brief Mysterious coefficient that appears in the wavefunctions
98  const G4double al = 0.23162461;
99 
100  }
101 
103  const G4double sWave = wavefunctionR(0, r);
104  const G4double dWave = wavefunctionR(2, r);
105  return r*r*(sWave*sWave + dWave*dWave);
106  }
107 
109  const G4double sWave = wavefunctionR(0, r);
110  const G4double dWave = wavefunctionR(2, r);
111  const G4double sWaveDeriv = derivWavefunctionR(0, r);
112  const G4double dWaveDeriv = derivWavefunctionR(2, r);
113  return (sWave*sWaveDeriv + dWave*dWaveDeriv) / Math::twoPi;
114  }
115 
117  const G4double sWave = wavefunctionP(0, p);
118  const G4double dWave = wavefunctionP(2, p);
119  return p*p*(sWave*sWave + dWave*dWave);
120  }
121 
122  G4double wavefunctionR(const G4int l, const G4double theR) {
123 // assert(l==0 || l==2); // only s- and d-waves in a deuteron
124  const G4double r = 2. * std::max(theR, 1.e-4);
125 
126  G4double result = 0.;
127  G4double fmr;
128 
129  for(G4int i=0; i<coeffTableSize; ++i) {
130  fmr = r * (al+i);
131  if(l==0) { // s-wave
132  result += coeff1[i] * std::exp(-fmr);
133  } else { // d-wave
134  result += coeff2[i] * std::exp(-fmr) * (1.+3./fmr+3./(fmr*fmr));
135  }
136  }
137 
138  result *= normalisationR/r;
139  return result;
140  }
141 
142  G4double derivWavefunctionR(const G4int l, const G4double theR) {
143 // assert(l==0 || l==2); // only s- and d-waves in a deuteron
144  const G4double r = 2. * std::max(theR, 1.e-4);
145 
146  G4double result = 0.;
147  G4double fmr;
148 
149  for(G4int i=0; i<coeffTableSize; ++i) {
150  fmr = r * (al+i);
151  if(l==0) { // s-wave
152  result += coeff1[i] * std::exp(-fmr) * (fmr + 1.);
153  } else { // d-wave
154  result += coeff2[i] * std::exp(-fmr) * (fmr + 4. + 9./fmr + 9./(fmr*fmr));
155  }
156  }
157 
158  result *= -normalisationR/(r*r);
159  return result;
160  }
161 
162  G4double wavefunctionP(const G4int l, const G4double theQ) {
163 // assert(l==0 || l==2); // only s- and d-waves in a deuteron
164  const G4double q = theQ / PhysicalConstants::hc;
165  const G4double q2 = q*q;
166  G4double result=0.;
167  G4double fmq, alPlusI;
168  for(G4int i=0; i<coeffTableSize; ++i) {
169  alPlusI = al+i;
170  fmq = q2 + alPlusI*alPlusI;
171  if(l==0) { // s-wave
172  result += coeff1[i] / fmq;
173  } else { // d-wave
174  result += coeff2[i] / fmq;
175  }
176  }
177 
178  result *= normalisationP;
179  return result;
180  }
181 
182  }
183 
184 }
G4double derivWavefunctionR(const G4int l, const G4double r)
const char * p
Definition: xmltok.h:285
const G4double pi
const G4double hc
[MeV*fm]
int G4int
Definition: G4Types.hh:78
G4double derivDensityR(const G4double r)
First derivative of the r-space density function.
G4double densityR(const G4double r)
PDF for a nucleon in r space.
Deuteron density in r and p according to the Paris potential.
G4double densityP(const G4double p)
PDF for a nucleon in p space.
G4double wavefunctionP(const G4int l, const G4double p)
G4double wavefunctionR(const G4int l, const G4double r)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const G4double twoPi
double G4double
Definition: G4Types.hh:76