Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ParticleHPThermalScattering.hh
Go to the documentation of this file.
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 // P. Arce, June-2014 Conversion neutron_hp to particle_hp
28 //
29 #ifndef G4ParticleHPThermalScattering_h
30 #define G4ParticleHPThermalScattering_h 1
31 
32 // Thermal Neutron Scattering
33 // Koi, Tatsumi (SLAC/SCCS)
34 //
35 // Class Description
36 // Final State Generators for a high precision (based on evaluated data
37 // libraries) description of themal neutron scattering below 4 eV;
38 // Based on Thermal neutron scattering files
39 // from the evaluated nuclear data files ENDF/B-VI, Release2
40 // To be used in your physics list in case you need this physics.
41 // In this case you want to register an object of this class with
42 // the corresponding process.
43 // Class Description - End
44 
45 #include "globals.hh"
47 #include "G4HadronicInteraction.hh"
48 
51 
52 struct E_isoAng
53 {
56  std::vector < G4double > isoAngle;
58  energy=0.0;
59  n=0;
60  };
61 };
62 
63 struct E_P_E_isoAng
64 {
67  std::vector < G4double > prob;
68  std::vector < E_isoAng* > vE_isoAngle;
69  G4double sum_of_probXdEs; // should be close to 1
71  energy=0.0;
72  n=0;
73  sum_of_probXdEs=0.0;
74  };
75 };
76 
78 {
79  public:
80 
82 
84 
85  G4HadFinalState * ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& aTargetNucleus);
86 
87  virtual const std::pair<G4double, G4double> GetFatalEnergyCheckLevels() const;
88 
89  //For user prepared thermal files
90  //Name of G4Element , Name of NDL file
92 
94 
95  virtual void ModelDescription(std::ostream& outFile) const;
96 
97  private:
98 
99  void clearCurrentFSData();
100 
102 
103  // Coherent Elastic
104  // ElementID temp BraggE cumulativeP
105  std::map < G4int , std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* >* coherentFSs;
106  std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* readACoherentFSDATA( G4String );
107 
108  // Incoherent Elastic
109  // ElementID temp aFS for this temp (and this element)
110  std::map < G4int , std::map < G4double , std::vector < E_isoAng* >* >* >* incoherentFSs;
111  std::map < G4double , std::vector < E_isoAng* >* >* readAnIncoherentFSDATA( G4String );
112  E_isoAng* readAnE_isoAng ( std::istream* );
113 
114  // Inelastic
115  // ElementID temp aFS for this temp (and this element)
116  std::map < G4int , std::map < G4double , std::vector < E_P_E_isoAng* >* >* >* inelasticFSs;
117  std::map < G4double , std::vector < E_P_E_isoAng* >* >* readAnInelasticFSDATA( G4String );
118  E_P_E_isoAng* readAnE_P_E_isoAng ( std::istream* );
119 
121 
122  G4ParticleHPElastic* theHPElastic;
123 
124  G4double getMu ( E_isoAng* );
125 
126  std::pair< G4double , G4double > find_LH ( G4double , std::vector<G4double>* );
127  G4double get_linear_interpolated ( G4double , std::pair < G4double , G4double > , std::pair < G4double , G4double > );
128 
129  E_isoAng create_E_isoAng_from_energy( G4double , std::vector< E_isoAng* >* );
130 
131  G4double get_secondary_energy_from_E_P_E_isoAng ( G4double , E_P_E_isoAng* );
132 
133  std::pair< G4double , E_isoAng > create_sE_and_EPM_from_pE_and_vE_P_E_isoAng ( G4double , G4double , std::vector < E_P_E_isoAng* >* );
134 
135  std::map < std::pair < const G4Material* , const G4Element* > , G4int > dic;
136  void buildPhysicsTable();
137  G4int getTS_ID( const G4Material* , const G4Element* );
138 
139  //size_t sizeOfMaterialTable;
140 
141  G4bool check_E_isoAng( E_isoAng* );
142 
143  //In order to judge whether the rebuilding of physics table is a necessity or not
144  size_t nMaterial;
145  size_t nElement;
146 
147 };
148 
149 #endif
std::vector< G4double > isoAngle
int G4int
Definition: G4Types.hh:78
std::vector< E_isoAng * > vE_isoAngle
virtual void ModelDescription(std::ostream &outFile) const
bool G4bool
Definition: G4Types.hh:79
void BuildPhysicsTable(const G4ParticleDefinition &)
void AddUserThermalScatteringFile(G4String, G4String)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
double G4double
Definition: G4Types.hh:76
virtual const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const
std::vector< G4double > prob