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

#include <G4WaterStopping.hh>

Public Member Functions

 G4WaterStopping (G4EmCorrections *corr=nullptr, G4bool splineFlag=true)
 
 ~G4WaterStopping ()
 
G4double GetElectronicDEDX (G4int Z, G4double energy)
 

Detailed Description

Definition at line 56 of file G4WaterStopping.hh.

Constructor & Destructor Documentation

◆ G4WaterStopping()

G4WaterStopping::G4WaterStopping ( G4EmCorrections corr = nullptr,
G4bool  splineFlag = true 
)
explicit

Definition at line 56 of file G4WaterStopping.cc.

57{
58 spline = splineFlag;
59 dedx.reserve(17);
60 Initialise(corr);
61}

◆ ~G4WaterStopping()

G4WaterStopping::~G4WaterStopping ( )
default

Member Function Documentation

◆ GetElectronicDEDX()

G4double G4WaterStopping::GetElectronicDEDX ( G4int  Z,
G4double  energy 
)

Definition at line 69 of file G4WaterStopping.cc.

70{
71 G4double res = 0.0;
72 G4int idx = iz - 3;
73
74 if(iz == 26) { idx = 16; }
75 else if (iz < 3 || iz > 18) { return res; }
76
77 G4double scaledEnergy = energy/A[idx];
78 if(scaledEnergy < emin) {
79 res = (*(dedx[idx]))[0]*std::sqrt(scaledEnergy/emin);
80 } else {
81 res = (dedx[idx])->Value(scaledEnergy);
82 }
83 return res;
84}
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const G4double A[17]
G4double energy(const ThreeVector &p, const G4double m)

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