00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef G4NeutronHPThermalScattering_h
00027 #define G4NeutronHPThermalScattering_h 1
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include "globals.hh"
00043 #include "G4NeutronHPThermalScatteringNames.hh"
00044 #include "G4NeutronHPThermalScatteringData.hh"
00045 #include "G4NeutronHPElastic.hh"
00046 #include "G4HadronicInteraction.hh"
00047
00048 struct E_isoAng
00049 {
00050 G4double energy;
00051 G4int n;
00052 std::vector < G4double > isoAngle;
00053 };
00054
00055 struct E_P_E_isoAng
00056 {
00057 G4double energy;
00058 G4int n;
00059 std::vector < G4double > prob;
00060 std::vector < E_isoAng* > vE_isoAngle;
00061 G4double sum_of_probXdEs;
00062 };
00063
00064 class G4NeutronHPThermalScattering : public G4HadronicInteraction
00065 {
00066 public:
00067
00068 G4NeutronHPThermalScattering();
00069
00070 ~G4NeutronHPThermalScattering();
00071
00072 G4HadFinalState * ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& aTargetNucleus);
00073
00074 virtual const std::pair<G4double, G4double> GetFatalEnergyCheckLevels() const;
00075
00076
00077 private:
00078
00079 G4NeutronHPThermalScatteringNames names;
00080
00081
00082
00083 std::map < G4int , std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* > coherentFSs;
00084 std::map < G4double , std::vector < std::pair< G4double , G4double >* >* >* readACoherentFSDATA( G4String );
00085
00086
00087
00088 std::map < G4int , std::map < G4double , std::vector < E_isoAng* >* >* > incoherentFSs;
00089 std::map < G4double , std::vector < E_isoAng* >* >* readAnIncoherentFSDATA( G4String );
00090 E_isoAng* readAnE_isoAng ( std::ifstream* );
00091
00092
00093
00094 std::map < G4int , std::map < G4double , std::vector < E_P_E_isoAng* >* >* > inelasticFSs;
00095 std::map < G4double , std::vector < E_P_E_isoAng* >* >* readAnInelasticFSDATA( G4String );
00096 E_P_E_isoAng* readAnE_P_E_isoAng ( std::ifstream* );
00097
00098
00099 G4NeutronHPThermalScatteringData* theXSection;
00100
00101
00102
00103
00104
00105
00106 G4NeutronHPElastic* theHPElastic;
00107
00108 G4double getMu ( E_isoAng* );
00109
00110 std::pair< G4double , G4double > find_LH ( G4double , std::vector<G4double>* );
00111 G4double get_linear_interpolated ( G4double , std::pair < G4double , G4double > , std::pair < G4double , G4double > );
00112
00113 E_isoAng create_E_isoAng_from_energy( G4double , std::vector< E_isoAng* >* );
00114
00115 G4double get_secondary_energy_from_E_P_E_isoAng ( G4double , E_P_E_isoAng* );
00116
00117 std::pair< G4double , E_isoAng > create_sE_and_EPM_from_pE_and_vE_P_E_isoAng ( G4double , G4double , std::vector < E_P_E_isoAng* >* );
00118
00119 std::map < std::pair < const G4Material* , const G4Element* > , G4int > dic;
00120 void buildPhysicsTable();
00121 G4int getTS_ID( const G4Material* , const G4Element* );
00122
00123 };
00124
00125 #endif