Geant4-11
Public Member Functions
G4LowEXsection Class Reference

#include <G4LowEXsection.hh>

Inheritance diagram for G4LowEXsection:

Public Member Functions

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

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 33 of file G4LowEXsection.cc.

35 {
36 G4double result = 0;
37 if(aX<front().first) return 0;
38 G4LowEXsection::const_iterator i;
39 G4LowEXsection::const_iterator it=end();
40 for(i=begin(); i!=end(); i++)
41 {
42 if((*i).first/MeV>aX) break;
43 it = i;
44 }
45 G4double x1 = G4Log((*it).first);
46 G4double x2 = G4Log((*(it+1)).first);
47 G4double y1 = G4Log((*it).second);
48 G4double y2 = G4Log((*(it+1)).second);
49 G4double x = G4Log(aX);
50 G4double y = y1+(x-x1)*(y2-y1)/(x2-x1);
51 result = G4Exp(y);
52 return result*millibarn;
53 }
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:179
G4double G4Log(G4double x)
Definition: G4Log.hh:226
static constexpr double millibarn
Definition: G4SIunits.hh:86
static constexpr double second
Definition: G4SIunits.hh:137
static constexpr double MeV
Definition: G4SIunits.hh:200
double G4double
Definition: G4Types.hh:83

References G4Exp(), G4Log(), MeV, millibarn, and second.


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