Geant4  10.01.p02
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"
48 #include "G4ParticleHPElastic.hh"
49 #include "G4HadronicInteraction.hh"
50 
51 struct E_isoAng
52 {
54  G4int n;
55  std::vector < G4double > isoAngle;
57  energy=0.0;
58  n=0;
59  };
60 };
61 
62 struct E_P_E_isoAng
63 {
65  G4int n;
66  std::vector < G4double > prob;
67  std::vector < E_isoAng* > vE_isoAngle;
68  G4double sum_of_probXdEs; // should be close to 1
70  energy=0.0;
71  n=0;
72  sum_of_probXdEs=0.0;
73  };
74 };
75 
77 {
78  public:
79 
81 
83 
84  G4HadFinalState * ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& aTargetNucleus);
85 
86  virtual const std::pair<G4double, G4double> GetFatalEnergyCheckLevels() const;
87 
88  //For user prepared thermal files
89  //Name of G4Element , Name of NDL file
91 
92  private:
93 
95 
96  // Coherent Elastic
97  // ElementID temp BraggE cumulativeP
98  std::map < G4int , std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* > coherentFSs;
99  std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* readACoherentFSDATA( G4String );
100 
101  // Incoherent Elastic
102  // ElementID temp aFS for this temp (and this element)
103  std::map < G4int , std::map < G4double , std::vector < E_isoAng* >* >* > incoherentFSs;
104  std::map < G4double , std::vector < E_isoAng* >* >* readAnIncoherentFSDATA( G4String );
105  E_isoAng* readAnE_isoAng ( std::istream* );
106 
107  // Inelastic
108  // ElementID temp aFS for this temp (and this element)
109  std::map < G4int , std::map < G4double , std::vector < E_P_E_isoAng* >* >* > inelasticFSs;
110  std::map < G4double , std::vector < E_P_E_isoAng* >* >* readAnInelasticFSDATA( G4String );
111  E_P_E_isoAng* readAnE_P_E_isoAng ( std::istream* );
112 
114 
116 
117  G4double getMu ( E_isoAng* );
118 
119  std::pair< G4double , G4double > find_LH ( G4double , std::vector<G4double>* );
120  G4double get_linear_interpolated ( G4double , std::pair < G4double , G4double > , std::pair < G4double , G4double > );
121 
122  E_isoAng create_E_isoAng_from_energy( G4double , std::vector< E_isoAng* >* );
123 
125 
126  std::pair< G4double , E_isoAng > create_sE_and_EPM_from_pE_and_vE_P_E_isoAng ( G4double , G4double , std::vector < E_P_E_isoAng* >* );
127 
128  std::map < std::pair < const G4Material* , const G4Element* > , G4int > dic;
129  void buildPhysicsTable();
130  G4int getTS_ID( const G4Material* , const G4Element* );
131 
133 
134 };
135 
136 #endif
G4ParticleHPThermalScatteringNames names
std::vector< G4double > isoAngle
std::map< G4double, std::vector< std::pair< G4double, G4double > * > * > * readACoherentFSDATA(G4String)
G4double get_secondary_energy_from_E_P_E_isoAng(G4double, E_P_E_isoAng *)
std::map< G4int, std::map< G4double, std::vector< E_isoAng * > * > * > incoherentFSs
E_isoAng create_E_isoAng_from_energy(G4double, std::vector< E_isoAng * > *)
std::pair< G4double, E_isoAng > create_sE_and_EPM_from_pE_and_vE_P_E_isoAng(G4double, G4double, std::vector< E_P_E_isoAng * > *)
int G4int
Definition: G4Types.hh:78
std::map< G4double, std::vector< E_P_E_isoAng * > * > * readAnInelasticFSDATA(G4String)
std::map< G4double, std::vector< E_isoAng * > * > * readAnIncoherentFSDATA(G4String)
std::map< G4int, std::map< G4double, std::vector< std::pair< G4double, G4double > * > * > * > coherentFSs
E_P_E_isoAng * readAnE_P_E_isoAng(std::istream *)
G4ParticleHPThermalScatteringData * theXSection
G4int getTS_ID(const G4Material *, const G4Element *)
G4double get_linear_interpolated(G4double, std::pair< G4double, G4double >, std::pair< G4double, G4double >)
void AddUserThermalScatteringFile(G4String, G4String)
std::map< G4int, std::map< G4double, std::vector< E_P_E_isoAng * > * > * > inelasticFSs
std::pair< G4double, G4double > find_LH(G4double, std::vector< G4double > *)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
double G4double
Definition: G4Types.hh:76
std::map< std::pair< const G4Material *, const G4Element * >, G4int > dic
virtual const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const
std::vector< E_isoAng * > vE_isoAngle
std::vector< G4double > prob