Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4LowEXsection Class Reference

#include <G4LowEXsection.hh>

+ Inheritance diagram for G4LowEXsection:

Public Member Functions

 G4LowEXsection ()
 
virtual ~G4LowEXsection ()
 
G4double CrossSection (G4double s) const
 

Detailed Description

Definition at line 33 of file G4LowEXsection.hh.

Constructor & Destructor Documentation

◆ G4LowEXsection()

G4LowEXsection::G4LowEXsection ( )
inline

Definition at line 36 of file G4LowEXsection.hh.

36{}

◆ ~G4LowEXsection()

virtual G4LowEXsection::~G4LowEXsection ( )
inlinevirtual

Definition at line 37 of file G4LowEXsection.hh.

37{}

Member Function Documentation

◆ CrossSection()

G4double G4LowEXsection::CrossSection ( G4double  s) const

Definition at line 32 of file G4LowEXsection.cc.

34 {
35 G4double result = 0;
36 if(aX<front().first) return 0;
37 G4LowEXsection::const_iterator i;
38 G4LowEXsection::const_iterator it=end();
39 for(i=begin(); i!=end(); i++)
40 {
41 if((*i).first/MeV>aX) break;
42 it = i;
43 }
44 G4double x1 = std::log((*it).first);
45 G4double x2 = std::log((*(it+1)).first);
46 G4double y1 = std::log((*it).second);
47 G4double y2 = std::log((*(it+1)).second);
48 G4double x = std::log(aX);
49 G4double y = y1+(x-x1)*(y2-y1)/(x2-x1);
50 result = std::exp(y);
51 return result*millibarn;
52 }
double G4double
Definition: G4Types.hh:64

The documentation for this class was generated from the following files: