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

#include <G3EleTable.hh>

Public Member Functions

 G3EleTable ()
 
virtual ~G3EleTable ()
 
G4ElementGetEle (G4double Z)
 

Detailed Description

Definition at line 47 of file G3EleTable.hh.

Constructor & Destructor Documentation

◆ G3EleTable()

G3EleTable::G3EleTable ( )

Definition at line 38 of file G3EleTable.cc.

38 :_MaxEle(109){
39 _EleNames = new char*[_MaxEle];
40 // create an array of pointers to elements
41 _Ele = new G4Element*[_MaxEle];
42 LoadUp();
43}

◆ ~G3EleTable()

G3EleTable::~G3EleTable ( )
virtual

Definition at line 45 of file G3EleTable.cc.

45 {
46 delete [] _EleNames;
47 delete [] _Ele;
48}

Member Function Documentation

◆ GetEle()

G4Element * G3EleTable::GetEle ( G4double  Z)

Definition at line 51 of file G3EleTable.cc.

51 {
52 G4double A;
53 char name[20], sym[3];
54 G4int index = (G4int) Z-1;
55 if (!parse(Z, name, sym, A)) {
56 G4String na(name);
57 G4String sy(sym);
58 if (_Ele[index] == 0) {
59 // add an element to the element table here
60 _Ele[index] = new G4Element(na, sy, Z, A*g/mole);
61 }
62 }
63 return _Ele[index];
64}
double A(double temperature)
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const char * name(G4int ptype)

Referenced by G4gsmate(), and G4gsmixt().


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