Geant4 9.6.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)
 
G4int GetIndex (const G4String &matName)
 
void PrintData (const G4String &matName)
 
void DumpData ()
 
G4double GetPlasmaEnergy (G4int idx)
 
G4double GetAdjustmentFactor (G4int idx)
 
G4double GetCdensity (G4int idx)
 
G4double GetX0density (G4int idx)
 
G4double GetX1density (G4int idx)
 
G4double GetAdensity (G4int idx)
 
G4double GetMdensity (G4int idx)
 
G4double GetDelta0density (G4int idx)
 
G4double GetErrorDensity (G4int idx)
 

Detailed Description

Definition at line 61 of file G4DensityEffectData.hh.

Constructor & Destructor Documentation

◆ G4DensityEffectData()

G4DensityEffectData::G4DensityEffectData ( )

Definition at line 53 of file G4DensityEffectData.cc.

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

◆ ~G4DensityEffectData()

G4DensityEffectData::~G4DensityEffectData ( )

Definition at line 60 of file G4DensityEffectData.cc.

61{
62}

Member Function Documentation

◆ DumpData()

void G4DensityEffectData::DumpData ( )

Definition at line 1360 of file G4DensityEffectData.cc.

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

Referenced by PrintData().

◆ GetAdensity()

G4double G4DensityEffectData::GetAdensity ( G4int  idx)
inline

Definition at line 148 of file G4DensityEffectData.hh.

149{
150 G4double x = DBL_MAX;
151 if(idx >= 0 && idx < NDENSDATA) { x = data[idx][5]; }
152 return x;
153}
double G4double
Definition: G4Types.hh:64
#define DBL_MAX
Definition: templates.hh:83

◆ GetAdjustmentFactor()

G4double G4DensityEffectData::GetAdjustmentFactor ( G4int  idx)
inline

Definition at line 120 of file G4DensityEffectData.hh.

121{
122 G4double x = DBL_MAX;
123 if(idx >= 0 && idx < NDENSDATA) { x = data[idx][1]; }
124 return x;
125}

◆ GetCdensity()

G4double G4DensityEffectData::GetCdensity ( G4int  idx)
inline

Definition at line 127 of file G4DensityEffectData.hh.

128{
129 G4double x = DBL_MAX;
130 if(idx >= 0 && idx < NDENSDATA) { x = data[idx][2]; }
131 return x;
132}

◆ GetDelta0density()

G4double G4DensityEffectData::GetDelta0density ( G4int  idx)
inline

Definition at line 162 of file G4DensityEffectData.hh.

163{
164 G4double x = DBL_MAX;
165 if(idx >= 0 && idx < NDENSDATA) { x = data[idx][7]; }
166 return x;
167}

◆ GetElementIndex()

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

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:114

◆ GetErrorDensity()

G4double G4DensityEffectData::GetErrorDensity ( G4int  idx)
inline

Definition at line 169 of file G4DensityEffectData.hh.

170{
171 G4double x = DBL_MAX;
172 if(idx >= 0 && idx < NDENSDATA) { x = data[idx][8]; }
173 return x;
174}

◆ GetIndex()

G4int G4DensityEffectData::GetIndex ( const G4String matName)

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
1322 return idx;
1323}

Referenced by PrintData().

◆ GetMdensity()

G4double G4DensityEffectData::GetMdensity ( G4int  idx)
inline

Definition at line 155 of file G4DensityEffectData.hh.

156{
157 G4double x = DBL_MAX;
158 if(idx >= 0 && idx < NDENSDATA) { x = data[idx][6]; }
159 return x;
160}

◆ GetPlasmaEnergy()

G4double G4DensityEffectData::GetPlasmaEnergy ( G4int  idx)
inline

Definition at line 113 of file G4DensityEffectData.hh.

114{
115 G4double x = DBL_MAX;
116 if(idx >= 0 && idx < NDENSDATA) { x = data[idx][0]; }
117 return x;
118}

◆ GetX0density()

G4double G4DensityEffectData::GetX0density ( G4int  idx)
inline

Definition at line 134 of file G4DensityEffectData.hh.

135{
136 G4double x = DBL_MAX;
137 if(idx >= 0 && idx < NDENSDATA) { x = data[idx][3]; }
138 return x;
139}

◆ GetX1density()

G4double G4DensityEffectData::GetX1density ( G4int  idx)
inline

Definition at line 141 of file G4DensityEffectData.hh.

142{
143 G4double x = DBL_MAX;
144 if(idx >= 0 && idx < NDENSDATA) { x = data[idx][4]; }
145 return x;
146}

◆ PrintData()

void G4DensityEffectData::PrintData ( const G4String matName)

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 << "Eplasma(eV)= " << data[idx][0]/eV
1346 << " rho= " << data[idx][1]
1347 << " -C= " << data[idx][2]
1348 << " x0= " << data[idx][3]
1349 << " x1= " << data[idx][4]
1350 << " a= " << data[idx][5]
1351 << " m= " << data[idx][6]
1352 << " d0= " << data[idx][7]
1353 << " err= " << data[idx][8]
1354 << G4endl;
1355 } else {
1356 G4cout << "G4DensityEffectData does not have <" << matName << ">" << G4endl;
1357 }
1358}
G4int GetIndex(const G4String &matName)

Referenced by G4NistMessenger::SetNewValue().


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