Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4InuclSpecialFunctions.hh
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: G4InuclSpecialFunctions.hh 67863 2013-03-11 19:00:21Z mkelsey $
27 //
28 // 20100114 M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly
29 // 20100319 M. Kelsey -- Add optional mass argument to generateWithFixedTheta;
30 // define new generateWithRandomAngles, encapsulating code; define
31 // cbrt() cube-root function (in math.h, but not in <math>!)
32 // 20100412 M. Kelsey -- Modify paraMaker[Truncated] to take buffer as argument
33 // 20100914 M. Kelsey -- Migrate to integer A and Z. Discard unused binding
34 // energy functions
35 // 20120608 M. Kelsey -- Fix variable-name "shadowing" compiler warnings.
36 // 20130308 M. Kelsey -- New function to encapsulate INUCL power expansion
37 // 20130808 M. Kelsey -- Convert paraMaker[Truncated] to class object, to
38 // allow thread isolation
39 // 20130829 M. Kelsey -- Address Coverity #52158, 52161 for copy actions.
40 // 20150619 M. Kelsey -- Overload G4cbrt for case of integer arguments
41 
42 #ifndef G4INUCL_SPECIAL_FUNC_HH
43 #define G4INUCL_SPECIAL_FUNC_HH
44 
45 #include "globals.hh"
46 #include "G4LorentzVector.hh"
47 #include <algorithm>
48 #include <vector>
49 
50 template <int N> class G4CascadeInterpolator;
51 
52 
53 namespace G4InuclSpecialFunctions {
55 
56  // NOTE: Used only by G4Fissioner
58 
59  G4double FermiEnergy(G4int A, G4int Z, G4int ntype);
60 
61  G4double getAL(G4int A);
62 
64 
66 
67  G4double G4cbrt(G4double x); // Can't use "cbrt" name, clashes with <math.h>
68  G4double G4cbrt(G4int n); // Use G4Pow::powN() here for speedup
69 
70  G4double inuclRndm(); // Wrapper for G4UniformRand()
71 
72  G4double randomInuclPowers(G4double ekin, // Power series in Ekin, S
73  const G4double (&coeff)[4][4]);
74 
75  G4double randomGauss(G4double sigma); // Gaussian distribution
76 
78 
79  std::pair<G4double, G4double> randomCOS_SIN();
80 
82 
83  // Optional mass argument will be used to fill G4LorentzVector correctly
85  G4double mass=0.);
86 
88 
89  // This is an object to be instantiated by client code
90  class paraMaker {
91  public:
92  paraMaker(G4int verbose=0);
93  ~paraMaker();
94 
95  // NOTE: Passing Z as double here, to be used as interpolation argument
96  void getParams(G4double Z, std::pair<std::vector<G4double>,
97  std::vector<G4double> >& parms);
98 
99  void getTruncated(G4double Z, std::pair<G4double, G4double>& parms);
100 
101  private:
102  G4int verboseLevel;
103  G4CascadeInterpolator<5>* interp;
104 
105  // No copy actions
106  paraMaker(const paraMaker& right);
107  paraMaker& operator=(const paraMaker& right);
108  };
109 }
110 
111 
112 #endif
G4double randomGauss(G4double sigma)
G4double bindingEnergyAsymptotic(G4int A, G4int Z)
const char * p
Definition: xmltok.h:285
int G4int
Definition: G4Types.hh:78
void getTruncated(G4double Z, std::pair< G4double, G4double > &parms)
Definition: paraMaker.cc:97
double A(double temperature)
G4double randomInuclPowers(G4double ekin, const G4double(&coeff)[4][4])
G4LorentzVector generateWithRandomAngles(G4double p, G4double mass=0.)
G4LorentzVector generateWithFixedTheta(G4double ct, G4double p, G4double mass=0.)
std::pair< G4double, G4double > randomCOS_SIN()
double G4double
Definition: G4Types.hh:76
void getParams(G4double Z, std::pair< std::vector< G4double >, std::vector< G4double > > &parms)
Definition: paraMaker.cc:63
G4double bindingEnergy(G4int A, G4int Z)
G4double FermiEnergy(G4int A, G4int Z, G4int ntype)
G4double nucleiLevelDensity(G4int A)