Geant4 11.1.1
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 52 of file G4ESTARStopping.cc.

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

◆ ~G4ESTARStopping()

G4ESTARStopping::~G4ESTARStopping ( )

Definition at line 65 of file G4ESTARStopping.cc.

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

◆ 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 94 of file G4ESTARStopping.hh.

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

◆ GetElectronicDEDX() [2/2]

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

Definition at line 89 of file G4ESTARStopping.cc.

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

Referenced by GetElectronicDEDX().

◆ GetIndex()

G4int G4ESTARStopping::GetIndex ( const G4Material mat)

Definition at line 72 of file G4ESTARStopping.cc.

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

Referenced by GetElectronicDEDX().

◆ operator=()

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

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