#include <G4LowEXsection.hh>
Public Member Functions | |
G4LowEXsection () | |
virtual | ~G4LowEXsection () |
G4double | CrossSection (G4double s) const |
Definition at line 33 of file G4LowEXsection.hh.
G4LowEXsection::G4LowEXsection | ( | ) | [inline] |
virtual G4LowEXsection::~G4LowEXsection | ( | ) | [inline, virtual] |
Definition at line 33 of file G4LowEXsection.cc.
00034 { 00035 G4double result = 0; 00036 if(aX<front().first) return 0; 00037 G4LowEXsection::const_iterator i; 00038 G4LowEXsection::const_iterator it=end(); 00039 for(i=begin(); i!=end(); i++) 00040 { 00041 if((*i).first/MeV>aX) break; 00042 it = i; 00043 } 00044 G4double x1 = std::log((*it).first); 00045 G4double x2 = std::log((*(it+1)).first); 00046 G4double y1 = std::log((*it).second); 00047 G4double y2 = std::log((*(it+1)).second); 00048 G4double x = std::log(aX); 00049 G4double y = y1+(x-x1)*(y2-y1)/(x2-x1); 00050 result = std::exp(y); 00051 return result*millibarn; 00052 }