File indexing completed on 2025-10-31 09:03:04
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 
0016 
0017 
0018 
0019 
0020 
0021 
0022 
0023 
0024 
0025 
0026 
0027 
0028 
0029 
0030 
0031 
0032 
0033 
0034 
0035 
0036 
0037 
0038 
0039 
0040 
0041 
0042 
0043 
0044 #ifndef G4LEVELREADER_HH
0045 #define G4LEVELREADER_HH 1
0046 
0047 #include "globals.hh"
0048 #include "G4LevelManager.hh"
0049 #include <iosfwd>
0050 #include <vector>
0051 
0052 class G4NuclearLevelData;
0053 
0054 class G4LevelReader 
0055 {
0056 
0057 public:
0058 
0059   explicit G4LevelReader(G4NuclearLevelData*);
0060 
0061   
0062   const G4LevelManager* CreateLevelManager(G4int Z, G4int A);
0063 
0064   
0065   const G4LevelManager* MakeLevelManager(G4int Z, G4int A,
0066                      const G4String& filename);
0067 
0068   inline void SetVerbose(G4int val);
0069 
0070   G4LevelReader(const G4LevelReader & right) = delete;  
0071   const G4LevelReader& operator=(const G4LevelReader &right) = delete;
0072   G4bool operator==(const G4LevelReader &right) const = delete;
0073   G4bool operator!=(const G4LevelReader &right) const = delete;
0074   
0075 private:
0076 
0077   G4bool ReadData(std::istringstream& dataFile, G4double& x);
0078 
0079   G4bool ReadDataItem(std::istream& dataFile, G4double& x);
0080 
0081   G4bool ReadDataItem(std::istream& dataFile, G4float& x);
0082 
0083   G4bool ReadDataItem(std::istream& dataFile, G4int& x);
0084   
0085   const std::vector<G4float>* NormalizedICCProbability(G4int Z);
0086 
0087   const G4LevelManager* LevelManager(G4int Z, G4int A,
0088                      std::ifstream& infile);
0089 
0090   G4NuclearLevelData* fData;
0091 
0092   G4double fEnergy = 0.;
0093   G4double fTransEnergy = 0.;
0094   G4double fTime = 0.;
0095   G4double fTimeFactor;
0096   G4double fSpin = 0.;
0097 
0098   G4float fProb = 0.f;
0099   G4float fAlpha = 0.f;
0100   G4float fAlphaMax;
0101   G4float fRatio = 0.f;
0102   G4float fNorm1 = 0.f;
0103   G4float fICC[10] = {0.f};
0104 
0105   G4int nbufmax = 20;
0106   G4int nbuf1 = 14;
0107   G4int nbuf2 = 8;
0108   G4int count1 = 0;
0109   G4int count2 = 0;
0110 
0111   G4int fVerbose = 1;
0112   G4int fLevelMax = 632;
0113   G4int fTransMax = 145;
0114   G4int ntrans = 0;
0115   G4int i1 = 0;
0116   G4int i2 = 0;
0117   G4int k = 0;
0118   G4int kk = 0;
0119   G4int tnum = 0;
0120 
0121   char buffer[20] = {' '};
0122   char buff1[14] = {' '};
0123   char buff2[8] = {' '};
0124 
0125   std::vector<G4double> vEnergy;
0126   std::vector<G4int> vSpin;
0127   std::vector<const G4NucLevel*> vLevel;
0128 
0129   std::vector<G4int> vTrans;
0130   std::vector<G4float> vRatio;
0131   std::vector<G4float> vGammaCumProbability;
0132   std::vector<G4float> vGammaProbability;
0133   std::vector<const std::vector<G4float>*> vShellProbability;
0134 
0135   G4String fPol = "  ";
0136   G4String fDirectory;
0137 };
0138 
0139 inline void G4LevelReader::SetVerbose(G4int val)
0140 {
0141   fVerbose = val;
0142 }
0143 
0144 #endif