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

#include <G4ESTARStopping.hh>

Public Member Functions

 G4ESTARStopping (const G4String &datatype="")
 
 ~G4ESTARStopping ()
 
G4int GetIndex (const G4Material *)
 
G4double GetElectronicDEDX (G4int idx, G4double energy)
 
G4double GetElectronicDEDX (const G4Material *, G4double energy)
 
G4ESTARStoppingoperator= (const G4ESTARStopping &right)=delete
 
 G4ESTARStopping (const G4ESTARStopping &)=delete
 

Detailed Description

Definition at line 61 of file G4ESTARStopping.hh.

Constructor & Destructor Documentation

◆ G4ESTARStopping() [1/2]

G4ESTARStopping::G4ESTARStopping ( const G4String & datatype = "")
explicit

Definition at line 53 of file G4ESTARStopping.cc.

54{
55 sdata.resize(280,nullptr);
56 name.resize(280,"");
57
58 if("basic" == datatype) { type = 1; }
59 else if("long" == datatype) { type = 2; }
60
61 Initialise();
62}

◆ ~G4ESTARStopping()

G4ESTARStopping::~G4ESTARStopping ( )

Definition at line 66 of file G4ESTARStopping.cc.

67{
68 for(size_t i=1; i<280; ++i) { delete sdata[i]; }
69}

◆ G4ESTARStopping() [2/2]

G4ESTARStopping::G4ESTARStopping ( const G4ESTARStopping & )
delete

Member Function Documentation

◆ GetElectronicDEDX() [1/2]

G4double G4ESTARStopping::GetElectronicDEDX ( const G4Material * mat,
G4double energy )
inline

Definition at line 93 of file G4ESTARStopping.hh.

95{
96 return GetElectronicDEDX(GetIndex(mat), energy);
97}
G4double GetElectronicDEDX(G4int idx, G4double energy)
G4int GetIndex(const G4Material *)

◆ GetElectronicDEDX() [2/2]

G4double G4ESTARStopping::GetElectronicDEDX ( G4int idx,
G4double energy )

Definition at line 90 of file G4ESTARStopping.cc.

91{
92 G4double res = 0.0;
93 if (i<1 || i>279){
94 G4cout << "### G4ESTARStopping WARNING: index "
95 << i << " is out of range!" << G4endl;
96 return res;
97 }
98 G4double emin = sdata[i]->Energy(0);
99 if(energy < emin) { res = (*(sdata[i]))[0]*std::sqrt(energy/emin); }
100 else { res = sdata[i]->Value(energy); }
101 return res;
102}
double G4double
Definition G4Types.hh:83
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

Referenced by GetElectronicDEDX().

◆ GetIndex()

G4int G4ESTARStopping::GetIndex ( const G4Material * mat)

Definition at line 73 of file G4ESTARStopping.cc.

74{
75 if (mat != currentMaterial) {
76 G4String matName = mat->GetName();
77 for (G4int i=1; i<280; ++i){
78 if (matName == name[i]){
79 matIndex = i;
80 currentMaterial = mat;
81 break;
82 }
83 }
84 }
85 return matIndex;
86}
int G4int
Definition G4Types.hh:85
const G4String & GetName() const

Referenced by GetElectronicDEDX().

◆ operator=()

G4ESTARStopping & G4ESTARStopping::operator= ( const G4ESTARStopping & right)
delete

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