Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4ParticleHPParticleYield.hh
이 파일의 문서화 페이지로 가기
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 //
27 // P. Arce, June-2014 Conversion neutron_hp to particle_hp
28 //
29 #ifndef G4ParticleHPParticleYield_h
30 #define G4ParticleHPParticleYield_h 1
31 
33 
34 #include "globals.hh"
35 #include "G4ParticleHPVector.hh"
37 #include "G4ParticleHPList.hh"
38 
40 {
41  public:
43  {
44  simpleMean = true;
45  spontPrompt = true;
46  hasPromptData = false;
47  hasDelayedData = false;
48 
49  targetMass = 0.0;
50  theSpontPrompt = 0.0;
51  spontDelayed = true;
52  theSpontDelayed = 0.0;
53  }
55 
57 
58  void InitMean(std::istream & aDataFile)
59  {
60  G4int iflag;
61  aDataFile >> targetMass >>iflag;
62  if(iflag == 1) simpleMean=false;
63  if(simpleMean)
64  {
65  theSimpleMean.Init(aDataFile, CLHEP::eV);
66  }
67  else
68  {
69  theMean.Init(aDataFile);
70  }
71  }
72 
73  void InitPrompt(std::istream & aDataFile)
74  {
75  hasPromptData = true;
76  G4int iflag;
77  aDataFile >> targetMass >>iflag;
78  if(iflag == 2) spontPrompt = false;
79  if(spontPrompt)
80  {
81  aDataFile >> theSpontPrompt;
82  }
83  else
84  {
85  thePrompt.Init(aDataFile, CLHEP::eV);
86  }
87  }
88 
89  void InitDelayed(std::istream & aDataFile)
90  {
91  hasDelayedData = true;
92  G4int iflag;
93  aDataFile >> targetMass >>iflag;
94  thePrecursorDecayConstants.Init(aDataFile, 1./CLHEP::s); // s is the CLHEP unit second
95  if(iflag == 2) spontDelayed = false;
96  if(spontDelayed)
97  {
98  aDataFile >> theSpontDelayed;
99  }
100  else
101  {
102  theDelayed.Init(aDataFile, CLHEP::eV);
103  }
104  }
105 
107  {
108  if(simpleMean)
109  {
110  return theSimpleMean.GetY(anEnergy);
111  }
112  return theMean.GetValue(anEnergy);
113  }
114 
116  {
117  if(!hasPromptData) return 0;
118  if(spontPrompt)
119  {
120  return theSpontPrompt;
121  }
122  return thePrompt.GetY(anEnergy);
123  }
124 
126  {
127  if(!hasDelayedData) return 0;
128  if(spontDelayed)
129  {
130  return theSpontDelayed;
131  }
132  return theDelayed.GetY(anEnergy);
133  }
134 
136  {
138  }
139 
140  private:
141 
143  // total mean
147 
148  // Prompt neutrons
153 
154  // delayed neutrons
160 
161 };
162 #endif
void InitPrompt(std::istream &aDataFile)
G4ParticleHPPolynomExpansion theMean
void InitMean(std::istream &aDataFile)
G4double GetMean(G4double anEnergy)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4double GetY(G4double x)
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
G4double GetDelayed(G4double anEnergy)
static constexpr double s
static constexpr double eV
void Init(std::istream &aDataFile, G4int nPar, G4double unit=1.)
void InitDelayed(std::istream &aDataFile)
G4double GetValue(G4double anEnergy)
G4double GetPrompt(G4double anEnergy)
G4double GetValue(G4int i)
int G4int
Definition: G4Types.hh:78