Geant4  10.00.p01
paraMaker.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: paraMaker.cc 66241 2012-12-13 18:34:42Z gunter $
27 //
28 // 20100412 M. Kelsey -- Modify paraMaker[Truncated] to take buffer as argument
29 // 20100517 M. Kelsey -- BUG FIX: Must check for array boundary "if (Z>=70)"
30 // 20100517 M. Kelsey -- Use G4CascadeInterpolator, which handles boundaries
31 // 20100601 M. Kelsey -- Bug fix from Gunter Folger; resize(6,0.), not clear()
32 // 20100914 M. Kelsey -- Migrate to integer A and Z
33 // 20130807 M. Kelsey -- Convert to class object for thread isolation
34 
36 #include "G4CascadeInterpolator.hh"
37 
38 
39 namespace {
40  static const G4double Z1[5] = {10.0, 20.0, 30.0, 50.0, 70.0};
41  static const G4double AP[5] = {0.42, 0.58, 0.68, 0.77, 0.80};
42  static const G4double CP[5] = {0.50, 0.28, 0.20, 0.15, 0.10};
43  static const G4double AA[5] = {0.68, 0.82, 0.91, 0.97, 0.98};
44  static const G4double CA[5] = {0.10, 0.10, 0.10, 0.08, 0.06};
45 }
46 
47 // Constructor and destructor
48 
50  : verboseLevel(vb), interp(new G4CascadeInterpolator<5>(Z1, false)) {;}
51 
53  delete interp;
54 }
55 
56 
57 // calculates the coefficients for the phenomenological formulas for
58 // coulumb barier, c.s. etc needed for evaporators
59 
62  std::pair<std::vector<G4double>, std::vector<G4double> >& parms) {
63  if (verboseLevel > 3) {
64  G4cout << " >>> G4InuclSpecialFunctions::paraMaker" << G4endl;
65  }
66 
67  // Set up input buffer for results
68  std::vector<G4double>& AK = parms.first;
69  AK.resize(6,0.);
70 
71  std::vector<G4double>& CPA = parms.second;
72  CPA.resize(6,0.);
73 
74  AK[0] = 0.0;
75  CPA[0] = 0.0;
76 
77  AK[1] = interp->interpolate(Z, AP);
78  AK[5] = interp->interpolate(Z, AA);
79  CPA[1] = interp->interpolate(Z, CP);
80  CPA[5] = interp->interpolate(Z, CA);
81 
82  AK[2] = AK[1] + 0.06;
83  AK[3] = AK[1] + 0.12;
84  AK[4] = AK[5] - 0.06;
85 
86  CPA[2] = CPA[1] * 0.5;
87  CPA[3] = CPA[1] / 3.0;
88  CPA[4] = 4.0 * CPA[5] / 3.0;
89 
90  return; // Buffer filled
91 }
92 
93 void
95 getTruncated(G4double Z, std::pair<G4double,G4double>& parms) {
96  if (verboseLevel > 3) {
97  G4cout << " >>> G4InuclSpecialFunctions::paraMakerTruncated" << G4endl;
98  }
99 
100  // Set up buffers for output
101  G4double& AK2=parms.first;
102  G4double& CP2=parms.second;
103 
104  AK2 = interp->interpolate(Z, AP);
105  CP2 = interp->interpolate(Z, CP);
106 
107  return; // Buffer filled
108 }
int G4int
Definition: G4Types.hh:78
void getTruncated(G4double Z, std::pair< G4double, G4double > &parms)
Definition: paraMaker.cc:95
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void getParams(G4double Z, std::pair< std::vector< G4double >, std::vector< G4double > > &parms)
Definition: paraMaker.cc:61