Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:37

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // -------------------------------------------------------------------
0028 //
0029 //      GEANT4 header file 
0030 //
0031 //      File name:     G4LevelReader
0032 //
0033 //      Author:        V.Ivanchenko
0034 // 
0035 //      Creation date: 4 January 2012
0036 //
0037 //      Modifications:
0038 //      
0039 // -------------------------------------------------------------------
0040 //
0041 // Helper class to read Geant4 nuclear level data  
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   // create run manager using G4LEVELGAMMADATA data for Z and A
0062   const G4LevelManager* CreateLevelManager(G4int Z, G4int A);
0063 
0064   // create run manager using whatever data
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 
0109   G4int fVerbose = 1;
0110   G4int fLevelMax = 632;
0111   G4int fTransMax = 145;
0112   G4int ntrans = 0;
0113   G4int i1 = 0;
0114   G4int i2 = 0;
0115   G4int k = 0;
0116   G4int kk = 0;
0117   G4int tnum = 0;
0118 
0119   char buffer[20] = {' '};
0120   char buff1[14] = {' '};
0121   char buff2[8] = {' '};
0122 
0123   std::vector<G4double> vEnergy;
0124   std::vector<G4int> vSpin;
0125   std::vector<const G4NucLevel*> vLevel;
0126 
0127   std::vector<G4int> vTrans;
0128   std::vector<G4float> vRatio;
0129   std::vector<G4float> vGammaCumProbability;
0130   std::vector<G4float> vGammaProbability;
0131   std::vector<const std::vector<G4float>*> vShellProbability;
0132 
0133   G4String fPol = "  ";
0134   G4String fDirectory;
0135 };
0136 
0137 inline void G4LevelReader::SetVerbose(G4int val)
0138 {
0139   fVerbose = val;
0140 }
0141 
0142 #endif