G4NeutronHPThermalScattering.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 #ifndef G4NeutronHPThermalScattering_h
00027 #define G4NeutronHPThermalScattering_h 1
00028 
00029 // Thermal Neutron Scattering
00030 // Koi, Tatsumi (SLAC/SCCS)
00031 //
00032 // Class Description
00033 // Final State Generators for a high precision (based on evaluated data
00034 // libraries) description of themal neutron scattering below 4 eV;
00035 // Based on Thermal neutron scattering files
00036 // from the evaluated nuclear data files ENDF/B-VI, Release2
00037 // To be used in your physics list in case you need this physics.
00038 // In this case you want to register an object of this class with
00039 // the corresponding process.
00040 // Class Description - End
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;  // should be close to 1
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       //G4int GetNiso() {return theElastic[0].GetNiso();}
00076 
00077    private:
00078 
00079       G4NeutronHPThermalScatteringNames names;
00080 
00081       // Coherent Elastic 
00082       //         ElementID             temp                                BraggE    cumulativeP
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       // Incoherent Elastic 
00087       //         ElementID          temp        aFS for this temp (and this element)
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       // Inelastic 
00093       //         ElementID          temp         aFS for this temp (and this element) 
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 //      G4double * xSec;
00101       //G4String dirName;
00102 //      G4int numEle;
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

Generated on Mon May 27 17:49:04 2013 for Geant4 by  doxygen 1.4.7