Geant4  10.03
G4LevelReader.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: G4LevelReader.hh 88382 2015-02-17 10:49:24Z vnivanch $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 header file
31 //
32 // File name: G4LevelReader
33 //
34 // Author: V.Ivanchenko
35 //
36 // Creation date: 4 January 2012
37 //
38 // Modifications:
39 //
40 // -------------------------------------------------------------------
41 //
42 // Helper class to read Geant4 nuclear level data
43 //
44 
45 #ifndef G4LEVELREADER_HH
46 #define G4LEVELREADER_HH 1
47 
48 #include "globals.hh"
49 #include "G4LevelManager.hh"
50 #include <iosfwd>
51 
52 class G4NuclearLevelData;
54 
56 {
57 
58 public:
59 
61 
62  // create run manager using G4LEVELGAMMADATA data for Z and A
64 
65  // create run manager using G4LEVELGAMMADATA data for Z and A
67 
68  // create run manager using whatever data
70  const G4String& filename);
71 
73  const G4String& filename);
74 
75  inline void SetVerbose(G4int val);
76 
77 private:
78 
79  G4bool ReadData(std::istringstream& dataFile, G4double& x);
80 
81  G4bool ReadDataItem(std::istream& dataFile, G4double& x);
82 
83  G4bool ReadDataItem(std::istream& dataFile, G4int& x);
84 
85  G4bool ReadDataItem(std::istream& dataFile, G4String& x);
86 
87  const std::vector<G4float>* NormalizedICCProbability(G4int Z);
88 
89  const G4LevelManager* LevelManager(G4int Z, G4int A, G4int nlev,
90  std::ifstream& infile);
91 
92  G4LevelReader(const G4LevelReader & right) = delete;
93  const G4LevelReader& operator=(const G4LevelReader &right) = delete;
94  G4bool operator==(const G4LevelReader &right) const = delete;
95  G4bool operator!=(const G4LevelReader &right) const = delete;
96 
99 
102 
112 
113  static const G4int nfloting = 13;
115 
119 
120  static const G4int nbufmax = 20;
121  static const G4int nbuf2 = 8;
122 
124  char buff2[nbuf2];
125  char bufp[2];
126 
130 
133 
134  std::vector<G4float> vEnergy;
135  std::vector<G4float> vTime;
136  std::vector<G4float> vTimeg;
137  std::vector<G4int> vSpin;
138  std::vector<G4int> vMeta;
139  std::vector<G4int> vIndexDB;
140  std::vector<const G4NucLevel*> vLevel;
141 
142  std::vector<size_t> vIndex;
143  std::vector<G4int> vTrans;
144  std::vector<G4float> vRatio;
145  std::vector<G4float> vGammaCumProbability;
146  std::vector<G4float> vGammaECumProbability;
147  std::vector<G4float> vGammaProbability;
148  std::vector<G4float> vMpRatio;
149  std::vector<const std::vector<G4float>*> vShellProbability;
150 };
151 
153 {
154  fVerbose = val;
155 }
156 
157 #endif
char buffer[nbufmax]
std::vector< G4int > vSpin
G4double fCurrEnergy
std::vector< G4float > vRatio
G4double fICC[10]
std::vector< const G4NucLevel * > vLevel
float G4float
Definition: G4Types.hh:77
G4LevelReader(G4NuclearLevelData *)
const std::vector< G4float > * NormalizedICCProbability(G4int Z)
void SetVerbose(G4int val)
const G4LevelManager * MakeLevelManager(G4int Z, G4int A, const G4String &filename)
G4double fEnergy
G4DeexPrecoParameters * fParam
const G4LevelManager * LevelManager(G4int Z, G4int A, G4int nlev, std::ifstream &infile)
static const G4int nfloting
const G4LevelManager * CreateLevelManagerNEW(G4int Z, G4int A)
int G4int
Definition: G4Types.hh:78
G4bool ReadData(std::istringstream &dataFile, G4double &x)
std::vector< G4float > vTime
double A(double temperature)
char buff2[nbuf2]
bool G4bool
Definition: G4Types.hh:79
G4bool ReadDataItem(std::istream &dataFile, G4double &x)
std::vector< G4float > vTimeg
std::vector< size_t > vIndex
G4bool operator!=(const G4LevelReader &right) const =delete
G4bool operator==(const G4LevelReader &right) const =delete
std::vector< const std::vector< G4float > * > vShellProbability
const G4LevelReader & operator=(const G4LevelReader &right)=delete
std::vector< G4int > vTrans
static G4String fFloatingLevels[nfloting]
std::vector< G4int > vMeta
std::vector< G4float > vGammaCumProbability
G4double fTrEnergy
const G4LevelManager * MakeLevelManagerNEW(G4int Z, G4int A, const G4String &filename)
G4String fDirectory
static const G4int nbuf2
const G4LevelManager * CreateLevelManager(G4int Z, G4int A)
std::vector< G4float > vGammaECumProbability
double G4double
Definition: G4Types.hh:76
G4NuclearLevelData * fData
G4double fTimeFactor
std::vector< G4int > vIndexDB
std::vector< G4float > vEnergy
std::vector< G4float > vGammaProbability
G4double fMinProbability
std::vector< G4float > vMpRatio
static const G4int nbufmax