Back to home page

EIC code displayed by LXR

 
 

    


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

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:     G4NuclearLevelData
0032 //
0033 //      Author:        V.Ivanchenko
0034 // 
0035 //      Creation date: 9 February 2014
0036 //
0037 //      Modifications:
0038 //      
0039 // -------------------------------------------------------------------
0040 //
0041 // Nuclear level data uploaded at initialisation of Geant4 from 
0042 // data files of the G4LEVELGAMMADATA
0043 // 
0044 
0045 #ifndef G4NUCLEARLEVELDATA_HH
0046 #define G4NUCLEARLEVELDATA_HH 1
0047 
0048 #include "globals.hh"
0049 #include "G4DeexPrecoParameters.hh"
0050 #include <vector>
0051 #include <iostream>
0052 
0053 class G4LevelReader;
0054 class G4LevelManager;
0055 class G4PairingCorrection;
0056 class G4ShellCorrection;
0057 class G4Pow;
0058 
0059 class G4NuclearLevelData 
0060 {
0061 private:
0062 
0063   G4NuclearLevelData();
0064 
0065   static G4NuclearLevelData* theInstance;
0066 
0067 public:
0068 
0069   static G4NuclearLevelData* GetInstance();
0070 
0071   ~G4NuclearLevelData();
0072 
0073   // run time call to access or to create level manager
0074   // if data are not yet uploaded then lazy initialisation is used
0075   const G4LevelManager* GetLevelManager(G4int Z, G4int A);
0076 
0077   // add private data to isotope from master thread
0078   G4bool AddPrivateData(G4int Z, G4int A, const G4String& filename);
0079 
0080   // access to min/max A in the level DB 
0081   G4int GetMinA(G4int Z) const;
0082   G4int GetMaxA(G4int Z) const;
0083 
0084   // check max energy of a level without upload of the data
0085   G4double GetMaxLevelEnergy(G4int Z, G4int A) const;
0086   G4float MaxLevelEnergy(G4int Z, G4int A) const;
0087 
0088   // check closest level if the energy is below the max level energy
0089   G4double GetLevelEnergy(G4int Z, G4int A, G4double energy);
0090 
0091   // check closest level below given energy 
0092   G4double GetLowEdgeLevelEnergy(G4int Z, G4int A, G4double energy);
0093 
0094   // check if residual excitation energy corresponding to
0095   // discrete level and if it is the case select closest level
0096   G4double FindLevel(G4int Z, G4int A, G4double resMass, G4double Mass,
0097                      G4double partMass, G4double T);
0098 
0099   // access to all model parameters
0100   G4DeexPrecoParameters* GetParameters();
0101   G4PairingCorrection* GetPairingCorrection();
0102   G4ShellCorrection* GetShellCorrection();  
0103 
0104   // access to correction values
0105   G4double GetLevelDensity(G4int Z, G4int A, G4double U);
0106   G4double GetPairingCorrection(G4int Z, G4int A);
0107 
0108   // enable uploading of data for all Z <= Zlim
0109   void UploadNuclearLevelData(G4int Zlim);
0110 
0111   // stream only existing levels
0112   void StreamLevels(std::ostream& os, G4int Z, G4int A);
0113 
0114   G4NuclearLevelData(G4NuclearLevelData &) = delete;
0115   G4NuclearLevelData & operator=(const G4NuclearLevelData &right) = delete;
0116 
0117 private:
0118 
0119   G4DeexPrecoParameters* fDeexPrecoParameters;
0120   G4LevelReader* fLevelReader;
0121   G4PairingCorrection* fPairingCorrection;
0122   G4ShellCorrection* fShellCorrection;
0123   G4Pow* fG4calc;
0124   G4bool fInitialized = false;
0125 
0126   static const G4int ZMAX = 118;
0127   static const G4int AMIN[ZMAX];
0128   static const G4int AMAX[ZMAX];
0129   static const G4int LEVELIDX[ZMAX];
0130 
0131   std::vector<const G4LevelManager*> fLevelManagers[ZMAX];
0132   std::vector<G4bool> fLevelManagerFlags[ZMAX];
0133 };
0134 
0135 #endif