Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
paraMaker.cc
이 파일의 문서화 페이지로 가기
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 // Interpolation constants for calculating k factors for Coulomb energy
40 // calculation. AP: proton, AA: alpha
41 namespace {
42  static const G4double Z1[5] = {10.0, 20.0, 30.0, 50.0, 70.0};
43  static const G4double AP[5] = {0.42, 0.58, 0.68, 0.77, 0.80};
44  static const G4double CP[5] = {0.50, 0.28, 0.20, 0.15, 0.10};
45  static const G4double AA[5] = {0.68, 0.82, 0.91, 0.97, 0.98};
46  static const G4double CA[5] = {0.10, 0.10, 0.10, 0.08, 0.06};
47 }
48 
49 // Constructor and destructor
50 
52  : verboseLevel(vb), interp(new G4CascadeInterpolator<5>(Z1, false)) {;}
53 
55  delete interp;
56 }
57 
58 
59 // calculates the coefficients for the phenomenological formulas for
60 // coulumb barier, c.s. etc needed for evaporators
61 
64  std::pair<std::vector<G4double>, std::vector<G4double> >& parms) {
65  if (verboseLevel > 3) {
66  G4cout << " >>> G4InuclSpecialFunctions::paraMaker" << G4endl;
67  }
68 
69  // Set up input buffer for results
70  std::vector<G4double>& AK = parms.first;
71  AK.resize(6,0.);
72 
73  std::vector<G4double>& CPA = parms.second;
74  CPA.resize(6,0.);
75 
76  AK[0] = 0.0;
77  CPA[0] = 0.0;
78 
79  AK[1] = interp->interpolate(Z, AP);
80  AK[5] = interp->interpolate(Z, AA);
81  CPA[1] = interp->interpolate(Z, CP);
82  CPA[5] = interp->interpolate(Z, CA);
83 
84  AK[2] = AK[1] + 0.06;
85  AK[3] = AK[1] + 0.12;
86  AK[4] = AK[5] - 0.06;
87 
88  CPA[2] = CPA[1] * 0.5;
89  CPA[3] = CPA[1] / 3.0;
90  CPA[4] = 4.0 * CPA[5] / 3.0;
91 
92  return; // Buffer filled
93 }
94 
95 void
97 getTruncated(G4double Z, std::pair<G4double,G4double>& parms) {
98  if (verboseLevel > 3) {
99  G4cout << " >>> G4InuclSpecialFunctions::paraMakerTruncated" << G4endl;
100  }
101 
102  // Set up buffers for output
103  G4double& AK2=parms.first;
104  G4double& CP2=parms.second;
105 
106  AK2 = interp->interpolate(Z, AP);
107  CP2 = interp->interpolate(Z, CP);
108 
109  return; // Buffer filled
110 }
#define G4endl
Definition: G4ios.hh:61
void getTruncated(G4double Z, std::pair< G4double, G4double > &parms)
Definition: paraMaker.cc:97
Float_t Z
double G4double
Definition: G4Types.hh:76
void getParams(G4double Z, std::pair< std::vector< G4double >, std::vector< G4double > > &parms)
Definition: paraMaker.cc:63
Double_t Z1
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout