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

#include <G4DensityEffectData.hh>

Public Member Functions

 G4DensityEffectData ()
 
 ~G4DensityEffectData ()
 
G4int GetElementIndex (G4int Z, G4State mState) const
 
G4int GetIndex (const G4String &matName) const
 
void PrintData (const G4String &matName) const
 
void DumpData () const
 
G4double GetPlasmaEnergy (G4int idx) const
 
G4double GetAdjustmentFactor (G4int idx) const
 
G4double GetCdensity (G4int idx) const
 
G4double GetX0density (G4int idx) const
 
G4double GetX1density (G4int idx) const
 
G4double GetAdensity (G4int idx) const
 
G4double GetMdensity (G4int idx) const
 
G4double GetDelta0density (G4int idx) const
 
G4double GetErrorDensity (G4int idx) const
 
G4double GetMeanIonisationPotential (G4int idx) const
 

Detailed Description

Definition at line 60 of file G4DensityEffectData.hh.

Constructor & Destructor Documentation

◆ G4DensityEffectData()

G4DensityEffectData::G4DensityEffectData ( )
explicit

Definition at line 52 of file G4DensityEffectData.cc.

52 :index(0)
53{
54 Initialize();
55}

◆ ~G4DensityEffectData()

G4DensityEffectData::~G4DensityEffectData ( )

Definition at line 59 of file G4DensityEffectData.cc.

60{
61}

Member Function Documentation

◆ DumpData()

void G4DensityEffectData::DumpData ( ) const

Definition at line 1361 of file G4DensityEffectData.cc.

1362{
1363 G4cout << "======================================================================"
1364 << G4endl;
1365 G4cout << " Material Eplasma(eV) rho -C x0 x1 a m d0 err"
1366 << G4endl;
1367 G4cout << "======================================================================"
1368 << G4endl;
1369 for(G4int i=0; i<NDENSDATA; ++i) {
1370 G4cout << std::setw(3) << i << ". " << std::setw(25) << names[i]
1371 << std::setw(8) << data[i][0]/eV;
1372 for(G4int j=1; j<NDENSARRAY; ++j) { G4cout << std::setw(8) << data[i][j]; }
1373 G4cout << G4endl;
1374 }
1375 G4cout << "======================================================================"
1376 << G4endl;
1377}
const G4int NDENSARRAY
const G4int NDENSDATA
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

Referenced by PrintData().

◆ GetAdensity()

G4double G4DensityEffectData::GetAdensity ( G4int  idx) const
inline

Definition at line 138 of file G4DensityEffectData.hh.

139{
140 return (idx >= 0 && idx < NDENSDATA) ? data[idx][5] : DBL_MAX;
141}
#define DBL_MAX
Definition: templates.hh:62

◆ GetAdjustmentFactor()

G4double G4DensityEffectData::GetAdjustmentFactor ( G4int  idx) const
inline

Definition at line 118 of file G4DensityEffectData.hh.

119{
120 return (idx >= 0 && idx < NDENSDATA) ? data[idx][1] : DBL_MAX;
121}

◆ GetCdensity()

G4double G4DensityEffectData::GetCdensity ( G4int  idx) const
inline

Definition at line 123 of file G4DensityEffectData.hh.

124{
125 return (idx >= 0 && idx < NDENSDATA) ? data[idx][2] : DBL_MAX;
126}

◆ GetDelta0density()

G4double G4DensityEffectData::GetDelta0density ( G4int  idx) const
inline

Definition at line 148 of file G4DensityEffectData.hh.

149{
150 return (idx >= 0 && idx < NDENSDATA) ? data[idx][7] : DBL_MAX;
151}

◆ GetElementIndex()

G4int G4DensityEffectData::GetElementIndex ( G4int  Z,
G4State  mState 
) const

Definition at line 1301 of file G4DensityEffectData.cc.

1302{
1303 G4int idx = -1;
1304 if(Z > 0 && Z < NDENSELEM) {
1305 if(st == state[Z]) { idx = indexZ[Z]; }
1306 else if(st == kStateUndefined) { idx = indexZ[Z]; }
1307 }
1308 return idx;
1309}
const G4int NDENSELEM
@ kStateUndefined
Definition: G4Material.hh:111

◆ GetErrorDensity()

G4double G4DensityEffectData::GetErrorDensity ( G4int  idx) const
inline

Definition at line 153 of file G4DensityEffectData.hh.

154{
155 return (idx >= 0 && idx < NDENSDATA) ? data[idx][8] : DBL_MAX;
156}

◆ GetIndex()

G4int G4DensityEffectData::GetIndex ( const G4String matName) const

Definition at line 1311 of file G4DensityEffectData.cc.

1312{
1313 G4int idx = -1;
1314
1315 for (G4int i=0; i<NDENSDATA; ++i) {
1316 if ( names[i] == matName ) {
1317 idx = i;
1318 break;
1319 }
1320 }
1321 return idx;
1322}

Referenced by G4IonisParamMat::FindMeanExcitationEnergy(), and PrintData().

◆ GetMdensity()

G4double G4DensityEffectData::GetMdensity ( G4int  idx) const
inline

Definition at line 143 of file G4DensityEffectData.hh.

144{
145 return (idx >= 0 && idx < NDENSDATA) ? data[idx][6] : DBL_MAX;
146}

◆ GetMeanIonisationPotential()

G4double G4DensityEffectData::GetMeanIonisationPotential ( G4int  idx) const
inline

Definition at line 158 of file G4DensityEffectData.hh.

159{
160 return (idx >= 0 && idx < NDENSDATA) ? data[idx][9] : DBL_MAX;
161}

Referenced by G4IonisParamMat::FindMeanExcitationEnergy().

◆ GetPlasmaEnergy()

G4double G4DensityEffectData::GetPlasmaEnergy ( G4int  idx) const
inline

Definition at line 113 of file G4DensityEffectData.hh.

114{
115 return (idx >= 0 && idx < NDENSDATA) ? data[idx][0] : DBL_MAX;
116}

◆ GetX0density()

G4double G4DensityEffectData::GetX0density ( G4int  idx) const
inline

Definition at line 128 of file G4DensityEffectData.hh.

129{
130 return (idx >= 0 && idx < NDENSDATA) ? data[idx][3] : DBL_MAX;
131}

◆ GetX1density()

G4double G4DensityEffectData::GetX1density ( G4int  idx) const
inline

Definition at line 133 of file G4DensityEffectData.hh.

134{
135 return (idx >= 0 && idx < NDENSDATA) ? data[idx][4] : DBL_MAX;
136}

◆ PrintData()

void G4DensityEffectData::PrintData ( const G4String matName) const

Definition at line 1335 of file G4DensityEffectData.cc.

1336{
1337 if("" == matName || "all" == matName) {
1338 DumpData();
1339 return;
1340 }
1341 G4int idx = GetIndex(matName);
1342 if(idx >= 0) {
1343 G4cout << "G4DensityEffectData for <" << matName
1344 << "> index= " << idx << G4endl;
1345 G4cout << "I(eV)= " << data[idx][9]/CLHEP::eV
1346 << "Eplasma(eV)= " << data[idx][0]/CLHEP::eV
1347 << " rho= " << data[idx][1]
1348 << " -C= " << data[idx][2]
1349 << " x0= " << data[idx][3]
1350 << " x1= " << data[idx][4]
1351 << " a= " << data[idx][5]
1352 << " m= " << data[idx][6]
1353 << " d0= " << data[idx][7]
1354 << " err= " << data[idx][8]
1355 << G4endl;
1356 } else {
1357 G4cout << "G4DensityEffectData does not have <" << matName << ">" << G4endl;
1358 }
1359}
G4int GetIndex(const G4String &matName) const

Referenced by G4NistMessenger::SetNewValue().


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