Back to home page

EIC code displayed by LXR

 
 

    


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

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 
0059 class G4GammaNuclearXS final : public G4VCrossSectionDataSet
0060 {
0061 public: 
0062 
0063   G4GammaNuclearXS();
0064 
0065   ~G4GammaNuclearXS() override = default;
0066     
0067   static const char* Default_Name() { return "GammaNuclearXS"; }
0068 
0069   G4bool IsElementApplicable(const G4DynamicParticle*, 
0070                  G4int Z, const G4Material*) final;
0071 
0072   G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A,
0073              const G4Element*, const G4Material* mat) final;
0074 
0075   G4double GetElementCrossSection(const G4DynamicParticle*, 
0076                       G4int Z, 
0077                                   const G4Material* mat = nullptr) final; 
0078 
0079   G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
0080                               const G4Isotope* iso = nullptr,
0081                               const G4Element* elm = nullptr,
0082                               const G4Material* mat = nullptr) final;
0083 
0084   const G4Isotope* SelectIsotope(const G4Element*, 
0085                                  G4double kinEnergy, G4double logE) final;
0086 
0087   void BuildPhysicsTable(const G4ParticleDefinition&) final;
0088 
0089   G4double IsoCrossSection(G4double ekin, G4int Z, G4int A);
0090 
0091   G4double ElementCrossSection(G4double ekin, G4int Z);
0092 
0093   G4double LowEnergyCrossSection(G4double ekin, G4int Z);
0094 
0095   void CrossSectionDescription(std::ostream&) const final;
0096       
0097   G4GammaNuclearXS & operator=(const G4GammaNuclearXS &right) = delete;
0098   G4GammaNuclearXS(const G4GammaNuclearXS&) = delete;
0099   
0100 private: 
0101 
0102   void Initialise(G4int Z);
0103 
0104   const G4String& FindDirectoryPath();
0105 
0106   G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn, G4int Z);
0107   
0108   G4VCrossSectionDataSet* ggXsection = nullptr;
0109   const G4ParticleDefinition* gamma;
0110 
0111   // Cache
0112   G4double fXS = 0.0;  
0113   G4double fEkin = 0.0;  
0114   G4int fZ = 0;  
0115 
0116   static const G4int MAXZGAMMAXS = 95;
0117   static const G4int MAXNFREE = 11;
0118   static G4ElementData* data;
0119   // Upper limit of the linear transition between IAEA database and CHIPS model
0120   static const G4double eTransitionBound; 
0121   // The list of elements with non-linear parametrisation for better precision 
0122   static const G4int freeVectorException[MAXNFREE];
0123   // CHIPS photonuclear model had a problem with high energy parametrisation 
0124   // for isotopes of H and He, coefficient is needed to connect isotope cross 
0125   // section with element cross-section on high energies.
0126   static G4double coeff[3][3]; 
0127   static G4double xs150[MAXZGAMMAXS];
0128   static G4String gDataDirectory;
0129 
0130   std::vector<G4double> temp;
0131 };
0132 
0133 #endif