Geant4 Cross Reference |
1 // 2 // ******************************************************************** 3 // * License and Disclaimer * 4 // * * 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. * 10 // * * 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitation of liability. * 17 // * * 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************************************** 25 // 26 // 27 // G4ParticleHPThermalScatteringData 28 // 29 // Class Description: 30 // 31 // Cross Sections for a high precision (based on evaluated data 32 // libraries) description of themal neutron scattering below 4 eV; 33 // Based on Thermal neutron scattering files 34 // from the evaluated nuclear data files ENDF/B-VI, Release2 35 // To be used in your physics list in case you need this physics. 36 // In this case you want to register an object of this class with 37 // the corresponding process. 38 // 39 // Author: T. Koi (SLAC/SCCS), November-2006 - First implementation. 40 // P. Arce (CIEMAT), June-2014 - Conversion neutron_hp to particle_hp 41 // --------------------------------------------------------------------- 42 #ifndef G4ParticleHPThermalScatteringData_h 43 #define G4ParticleHPThermalScatteringData_h 1 44 45 #include "G4DynamicParticle.hh" 46 #include "G4Element.hh" 47 #include "G4Material.hh" 48 #include "G4ParticleDefinition.hh" 49 #include "G4ParticleHPThermalScatteringNames.hh" 50 #include "G4ParticleHPVector.hh" 51 #include "G4VCrossSectionDataSet.hh" 52 53 #include <map> 54 #include <vector> 55 56 class G4ParticleHPThermalScatteringData : public G4VCrossSectionDataSet 57 { 58 public: 59 60 G4ParticleHPThermalScatteringData(); 61 62 ~G4ParticleHPThermalScatteringData() override; 63 64 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int /*Z*/, G4int /*A*/, 65 const G4Element* /*elm*/, const G4Material* /*mat*/) override; 66 67 G4double GetIsoCrossSection(const G4DynamicParticle*, G4int /*Z*/, G4int /*A*/, 68 const G4Isotope* /*iso*/, const G4Element* /*elm*/, 69 const G4Material* /*mat*/) override; 70 71 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*); 72 73 // G4bool IsZAApplicable( const G4DynamicParticle* , G4double /*ZZ*/, G4double /*AA*/) 74 //{ return false;} 75 76 G4double GetCrossSection(const G4DynamicParticle*, const G4Element*, const G4Material*); 77 G4double GetInelasticCrossSection(const G4DynamicParticle*, const G4Element*, 78 const G4Material*); 79 G4double GetCoherentCrossSection(const G4DynamicParticle*, const G4Element*, const G4Material*); 80 G4double GetIncoherentCrossSection(const G4DynamicParticle*, const G4Element*, 81 const G4Material*); 82 83 void BuildPhysicsTable(const G4ParticleDefinition&) override; 84 85 void DumpPhysicsTable(const G4ParticleDefinition&) override; 86 87 // For user prepared thermal files 88 // Name of G4Element , Name of NDL file 89 void AddUserThermalScatteringFile(const G4String&, const G4String&); 90 91 void CrossSectionDescription(std::ostream&) const override; 92 93 private: 94 95 G4double GetX(const G4DynamicParticle*, G4double aT, std::map<G4double, G4ParticleHPVector*>*); 96 97 void clearCurrentXSData(); 98 99 std::map<G4double, G4ParticleHPVector*>* readData(const G4String&); 100 101 G4int getTS_ID(const G4Material*, const G4Element*); 102 103 private: 104 105 G4double emax; 106 107 // element temp x section from E 108 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* coherent{nullptr}; 109 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* incoherent{nullptr}; 110 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* inelastic{nullptr}; 111 112 std::vector<G4int> indexOfThermalElement; 113 G4ParticleHPThermalScatteringNames* names; 114 115 G4double ke_cache; 116 G4double xs_cache; 117 const G4Element* element_cache; 118 const G4Material* material_cache; 119 120 std::map<std::pair<const G4Material*, const G4Element*>, G4int> dic; 121 }; 122 123 #endif 124