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 (  ) 

Definition at line 53 of file G4DensityEffectData.cc.

00053                                         :index(0) 
00054 {
00055   Initialize();
00056 }

G4DensityEffectData::~G4DensityEffectData (  ) 

Definition at line 60 of file G4DensityEffectData.cc.

00061 {
00062 }


Member Function Documentation

void G4DensityEffectData::DumpData (  ) 

Definition at line 1360 of file G4DensityEffectData.cc.

References G4cout, G4endl, and NDENSDATA.

Referenced by PrintData().

01361 {
01362   G4cout << "======================================================================"
01363          << G4endl; 
01364   G4cout << "     Material        Eplasma(eV)  rho  -C   x0   x1   a   m  d0  err"
01365          << G4endl;        
01366   G4cout << "======================================================================"
01367          << G4endl; 
01368   for(G4int i=0; i<NDENSDATA; ++i) {
01369     G4cout << std::setw(3) << i << ". " << std::setw(25) << names[i]
01370            << std::setw(8) << data[i][0]/eV;
01371     for(G4int j=1; j<NDENSARRAY; ++j) { G4cout << std::setw(8) << data[i][j]; }
01372     G4cout << G4endl;
01373   }
01374   G4cout << "======================================================================"
01375          << G4endl; 
01376 }

G4double G4DensityEffectData::GetAdensity ( G4int  idx  )  [inline]

Definition at line 148 of file G4DensityEffectData.hh.

References DBL_MAX, and NDENSDATA.

00149 {
00150   G4double x = DBL_MAX;
00151   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][5]; }
00152   return x;
00153 }

G4double G4DensityEffectData::GetAdjustmentFactor ( G4int  idx  )  [inline]

Definition at line 120 of file G4DensityEffectData.hh.

References DBL_MAX, and NDENSDATA.

00121 {
00122   G4double x = DBL_MAX;
00123   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][1]; }
00124   return x;
00125 } 

G4double G4DensityEffectData::GetCdensity ( G4int  idx  )  [inline]

Definition at line 127 of file G4DensityEffectData.hh.

References DBL_MAX, and NDENSDATA.

00128 {
00129   G4double x = DBL_MAX;
00130   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][2]; }
00131   return x;
00132 } 

G4double G4DensityEffectData::GetDelta0density ( G4int  idx  )  [inline]

Definition at line 162 of file G4DensityEffectData.hh.

References DBL_MAX, and NDENSDATA.

00163 {
00164   G4double x = DBL_MAX;
00165   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][7]; }
00166   return x;
00167 } 

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

Definition at line 1301 of file G4DensityEffectData.cc.

References kStateUndefined, and NDENSELEM.

01302 {
01303   G4int idx = -1;
01304   if(Z > 0 && Z < NDENSELEM) { 
01305     if(st == state[Z])             { idx = indexZ[Z]; } 
01306     else if(st == kStateUndefined) { idx = indexZ[Z]; }
01307   } 
01308   return idx;
01309 }

G4double G4DensityEffectData::GetErrorDensity ( G4int  idx  )  [inline]

Definition at line 169 of file G4DensityEffectData.hh.

References DBL_MAX, and NDENSDATA.

00170 {
00171   G4double x = DBL_MAX;
00172   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][8]; }
00173   return x;
00174 } 

G4int G4DensityEffectData::GetIndex ( const G4String matName  ) 

Definition at line 1311 of file G4DensityEffectData.cc.

References NDENSDATA.

Referenced by PrintData().

01312 {
01313   G4int idx = -1;
01314 
01315   for (G4int i=0; i<NDENSDATA; ++i) {
01316     if ( names[i] == matName ) {
01317       idx = i;
01318       break;
01319     }
01320   }
01321 
01322   return idx;
01323 }

G4double G4DensityEffectData::GetMdensity ( G4int  idx  )  [inline]

Definition at line 155 of file G4DensityEffectData.hh.

References DBL_MAX, and NDENSDATA.

00156 {
00157   G4double x = DBL_MAX;
00158   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][6]; }
00159   return x;
00160 } 

G4double G4DensityEffectData::GetPlasmaEnergy ( G4int  idx  )  [inline]

Definition at line 113 of file G4DensityEffectData.hh.

References DBL_MAX, and NDENSDATA.

00114 {
00115   G4double x = DBL_MAX;
00116   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][0]; }
00117   return x;
00118 } 

G4double G4DensityEffectData::GetX0density ( G4int  idx  )  [inline]

Definition at line 134 of file G4DensityEffectData.hh.

References DBL_MAX, and NDENSDATA.

00135 {
00136   G4double x = DBL_MAX;
00137   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][3]; }
00138   return x;
00139 } 

G4double G4DensityEffectData::GetX1density ( G4int  idx  )  [inline]

Definition at line 141 of file G4DensityEffectData.hh.

References DBL_MAX, and NDENSDATA.

00142 {
00143   G4double x = DBL_MAX;
00144   if(idx >= 0 && idx < NDENSDATA) { x = data[idx][4]; }
00145   return x;
00146 } 

void G4DensityEffectData::PrintData ( const G4String matName  ) 

Definition at line 1335 of file G4DensityEffectData.cc.

References DumpData(), G4cout, G4endl, and GetIndex().

Referenced by G4NistMessenger::SetNewValue().

01336 {
01337   if("" == matName || "all" == matName) {
01338     DumpData();
01339     return;
01340   }
01341   G4int idx = GetIndex(matName);
01342   if(idx >= 0) {
01343     G4cout << "G4DensityEffectData for <" << matName 
01344            << "> index= " << idx << G4endl;
01345     G4cout << "Eplasma(eV)= " << data[idx][0]/eV
01346            << " rho= " << data[idx][1]
01347            << " -C= " << data[idx][2] 
01348            << " x0= " << data[idx][3]
01349            << " x1= " << data[idx][4]
01350            << " a= " << data[idx][5]
01351            << " m= " << data[idx][6] 
01352            << " d0= " << data[idx][7] 
01353            << " err= " << data[idx][8] 
01354            << G4endl;
01355   } else {
01356     G4cout << "G4DensityEffectData does not have <" << matName << ">" << G4endl; 
01357   }
01358 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:45 2013 for Geant4 by  doxygen 1.4.7