Geant4  10.01.p03
G4NeutronHPNeutronYield.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 //
27 //
28 #ifndef G4NeutronHPNeutronYield_h
29 #define G4NeutronHPNeutronYield_h 1
30 
31 #include <CLHEP/Units/SystemOfUnits.h>
32 
33 #include "globals.hh"
34 #include "G4NeutronHPVector.hh"
36 #include "G4NeutronHPList.hh"
37 
39 {
40  public:
42  {
43  simpleMean = true;
44  spontPrompt = true;
45  hasPromptData = false;
46  hasDelayedData = false;
47  }
49 
51 
52  void InitMean(std::istream & aDataFile)
53  {
54  G4int iflag;
55  aDataFile >> targetMass >>iflag;
56  if(iflag == 1) simpleMean=false;
57  if(simpleMean)
58  {
59  theSimpleMean.Init(aDataFile, CLHEP::eV);
60  }
61  else
62  {
63  theMean.Init(aDataFile);
64  }
65  }
66 
67  void InitPrompt(std::istream & aDataFile)
68  {
69  hasPromptData = true;
70  G4int iflag;
71  aDataFile >> targetMass >>iflag;
72  if(iflag == 2) spontPrompt = false;
73  if(spontPrompt)
74  {
75  aDataFile >> theSpontPrompt;
76  }
77  else
78  {
79  thePrompt.Init(aDataFile, CLHEP::eV);
80  }
81  }
82 
83  void InitDelayed(std::istream & aDataFile)
84  {
85  hasDelayedData = true;
86  G4int iflag;
87  aDataFile >> targetMass >>iflag;
88  thePrecursorDecayConstants.Init(aDataFile, 1./CLHEP::s); // s is the CLHEP unit second
89  if(iflag == 2) spontDelayed = false;
90  if(spontDelayed)
91  {
92  aDataFile >> theSpontDelayed;
93  }
94  else
95  {
96  theDelayed.Init(aDataFile, CLHEP::eV);
97  }
98  }
99 
101  {
102  if(simpleMean)
103  {
104  return theSimpleMean.GetY(anEnergy);
105  }
106  return theMean.GetValue(anEnergy);
107  }
108 
110  {
111  if(!hasPromptData) return 0;
112  if(spontPrompt)
113  {
114  return theSpontPrompt;
115  }
116  return thePrompt.GetY(anEnergy);
117  }
118 
120  {
121  if(!hasDelayedData) return 0;
122  if(spontDelayed)
123  {
124  return theSpontDelayed;
125  }
126  return theDelayed.GetY(anEnergy);
127  }
128 
130  {
132  }
133 
134  private:
135 
137  // total mean
141 
142  // Prompt neutrons
147 
148  // delayed neutrons
154 
155 };
156 #endif
G4double GetY(G4double x)
void Init(std::istream &theData)
G4double GetValue(G4double anEnergy)
void InitDelayed(std::istream &aDataFile)
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
int G4int
Definition: G4Types.hh:78
G4double GetMean(G4double anEnergy)
static const double s
Definition: G4SIunits.hh:150
bool G4bool
Definition: G4Types.hh:79
void Init(std::istream &aDataFile, G4int nPar, G4double unit=1.)
G4double GetDelayed(G4double anEnergy)
static const double eV
Definition: G4SIunits.hh:194
G4double GetValue(G4int i)
void InitPrompt(std::istream &aDataFile)
G4NeutronHPPolynomExpansion theMean
G4NeutronHPList thePrecursorDecayConstants
double G4double
Definition: G4Types.hh:76
G4double GetPrompt(G4double anEnergy)
void InitMean(std::istream &aDataFile)