Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-04 10:02:32

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 Class header file
0030 //
0031 //
0032 // File name:    G4GammaNuclearXS
0033 //
0034 // Authors  V.Ivantchenko, Geant4, 20 October 2020
0035 //          B.Kutsenko, BINP/NSU, 10 August 2021
0036 //
0037 //
0038 // Class Description:
0039 // This is a base class for gamma-nuclear cross section based on
0040 // data files from IAEA Evaluated Photonuclear Data Library (IAEA/PD-2019) 
0041 // https://www-nds.iaea.org/photonuclear/
0042 // Database review:
0043 // https://www.sciencedirect.com/science/article/pii/S0090375219300699?via%3Dihub
0044 //
0045 
0046 #ifndef G4GammaNuclearXS_h
0047 #define G4GammaNuclearXS_h 1
0048 
0049 #include "G4VCrossSectionDataSet.hh"
0050 #include "globals.hh"
0051 #include <vector>
0052 
0053 class G4DynamicParticle;
0054 class G4ParticleDefinition;
0055 class G4Element;
0056 class G4ElementData;
0057 class G4PhysicsVector;
0058 class G4PhotoNuclearCrossSection;
0059 
0060 class G4GammaNuclearXS final : public G4VCrossSectionDataSet
0061 {
0062 public: 
0063 
0064   G4GammaNuclearXS();
0065 
0066   ~G4GammaNuclearXS() override = default;
0067     
0068   static const char* Default_Name() { return "GammaNuclearXS"; }
0069 
0070   G4bool IsElementApplicable(const G4DynamicParticle*, 
0071                  G4int Z, const G4Material*) final;
0072 
0073   G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A,
0074              const G4Element*, const G4Material* mat) final;
0075 
0076   G4double GetElementCrossSection(const G4DynamicParticle*, 
0077                       G4int Z, 
0078                                   const G4Material* mat = nullptr) final; 
0079 
0080   G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
0081                               const G4Isotope* iso = nullptr,
0082                               const G4Element* elm = nullptr,
0083                               const G4Material* mat = nullptr) final;
0084 
0085   const G4Isotope* SelectIsotope(const G4Element*, 
0086                                  G4double kinEnergy, G4double logE) final;
0087 
0088   void BuildPhysicsTable(const G4ParticleDefinition&) final;
0089 
0090   G4double IsoCrossSection(const G4double ekin, const G4int Z, const G4int A);
0091 
0092   G4double ElementCrossSection(const G4double ekin, const G4int Z);
0093 
0094   G4double LowEnergyCrossSection(G4double ekin, G4int Z);
0095 
0096   void CrossSectionDescription(std::ostream&) const final;
0097       
0098   G4GammaNuclearXS & operator=(const G4GammaNuclearXS &right) = delete;
0099   G4GammaNuclearXS(const G4GammaNuclearXS&) = delete;
0100   
0101 private: 
0102 
0103   void Initialise(G4int Z);
0104 
0105   const G4String& FindDirectoryPath();
0106 
0107   G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn, G4int Z);
0108   
0109   G4PhotoNuclearCrossSection* ggXsection = nullptr;
0110   const G4ParticleDefinition* gamma;
0111 
0112   // Cache
0113   G4double fXS = 0.0;  
0114   G4double fEkin = 0.0;  
0115   G4int fZ = 0;  
0116 
0117   static const G4int MAXZGAMMAXS = 95;
0118   static const G4int MAXNFREE = 11;
0119   static G4ElementData* data;
0120   // The list of elements with non-linear parametrisation for better precision 
0121   static const G4int freeVectorException[MAXNFREE];
0122   // CHIPS photonuclear model had a problem with high energy parametrisation 
0123   // for isotopes of H and He, coefficient is needed to connect isotope cross 
0124   // section with element cross-section on high energies.
0125   static G4double coeff[3][3]; 
0126   static G4double xs150[MAXZGAMMAXS];
0127   static G4String gDataDirectory;
0128 
0129   std::vector<G4double> temp;
0130 };
0131 
0132 #endif