Geant4 9.6.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 48 of file G3EleTable.hh.

Constructor & Destructor Documentation

◆ G3EleTable()

G3EleTable::G3EleTable ( )

Definition at line 39 of file G3EleTable.cc.

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

◆ ~G3EleTable()

G3EleTable::~G3EleTable ( )
virtual

Definition at line 46 of file G3EleTable.cc.

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

Member Function Documentation

◆ GetEle()

G4Element * G3EleTable::GetEle ( G4double  Z)

Definition at line 52 of file G3EleTable.cc.

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

Referenced by G4gsmate(), and G4gsmixt().


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