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

#include <G4RIsotopeTable.hh>

+ Inheritance diagram for G4RIsotopeTable:

Public Types

typedef std::vector< G4IsotopeProperty * > G4IsotopeList
 
typedef std::vector< G4StringG4IsotopeNameList
 

Public Member Functions

 G4RIsotopeTable ()
 
virtual ~G4RIsotopeTable ()
 
virtual G4bool FindIsotope (G4IsotopeProperty *property)
 
virtual G4IsotopePropertyGetIsotope (G4int Z, G4int A, G4double E)
 
void AddUserDecayDataFile (G4int Z, G4int A, G4String filename)
 
- Public Member Functions inherited from G4VIsotopeTable
 G4VIsotopeTable ()
 
 G4VIsotopeTable (const G4String &)
 
 G4VIsotopeTable (const G4VIsotopeTable &)
 
G4VIsotopeTableoperator= (const G4VIsotopeTable &)
 
virtual ~G4VIsotopeTable ()
 
virtual G4bool FindIsotope (G4IsotopeProperty *property)=0
 
virtual G4IsotopePropertyGetIsotope (G4int Z, G4int A, G4double E)=0
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int level)
 

Protected Member Functions

 G4RIsotopeTable (const G4RIsotopeTable &right)
 
G4RIsotopeTableoperator= (const G4RIsotopeTable &right)
 

Detailed Description

Definition at line 64 of file G4RIsotopeTable.hh.

Member Typedef Documentation

◆ G4IsotopeList

Definition at line 72 of file G4RIsotopeTable.hh.

◆ G4IsotopeNameList

Definition at line 73 of file G4RIsotopeTable.hh.

Constructor & Destructor Documentation

◆ G4RIsotopeTable() [1/2]

G4RIsotopeTable::G4RIsotopeTable ( )

Definition at line 84 of file G4RIsotopeTable.cc.

85{//
86 //Reset the list of user define data file
87 //
88 theUserRadioactiveDataFiles.clear();
89}

◆ G4RIsotopeTable() [2/2]

G4RIsotopeTable::G4RIsotopeTable ( const G4RIsotopeTable right)
protected

◆ ~G4RIsotopeTable()

G4RIsotopeTable::~G4RIsotopeTable ( )
virtual

Definition at line 93 of file G4RIsotopeTable.cc.

94{
95 fIsotopeList.clear();
96 fIsotopeNameList.clear();
97}

Member Function Documentation

◆ AddUserDecayDataFile()

void G4RIsotopeTable::AddUserDecayDataFile ( G4int  Z,
G4int  A,
G4String  filename 
)

Definition at line 270 of file G4RIsotopeTable.cc.

271{ if (Z<1 || A<2) {
272 G4cout<<"Z and A not valid!"<<G4endl;
273 }
274
275 std::ifstream DecaySchemeFile(filename);
276 if (DecaySchemeFile){
277 G4int ID_ion=A*1000+Z;
278 theUserRadioactiveDataFiles[ID_ion]=filename;
279 }
280 else {
281 G4cout<<"The file "<<filename<<" does not exist!"<<G4endl;
282 }
283}
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

Referenced by G4RadioactiveDecay::AddUserDecayDataFile().

◆ FindIsotope()

G4bool G4RIsotopeTable::FindIsotope ( G4IsotopeProperty property)
virtual

Implements G4VIsotopeTable.

Definition at line 106 of file G4RIsotopeTable.cc.

107{
108 // do nothing, it is here just for the compiler
109 // it is required by the base class
110 return true;
111}

◆ GetIsotope()

G4IsotopeProperty * G4RIsotopeTable::GetIsotope ( G4int  Z,
G4int  A,
G4double  E 
)
virtual

Implements G4VIsotopeTable.

Definition at line 114 of file G4RIsotopeTable.cc.

115{
116 G4String fname = GetIsotopeName(Z, A, E);
117 G4int j = -1;
118 for (G4int i = 0 ; i< Entries(); i++) {
119 if(fIsotopeNameList[i] == fname) j = i;}
120 if (j >=0) {
121 if (GetVerboseLevel()>1) {
122 G4cout <<"G4RIsotopeTable::GetIsotope No. : ";
123 G4cout <<j<<G4endl;
124 }
125 return GetIsotope(j);}
126 // isotope property data has been loaded already and just return the pointer
127 else{
128 G4double meanlife = GetMeanLifeTime(Z, A, E);
129 // E is pass as a refence hence on entry E is supplied by the user and it
130 // could be slightly different from the returned value which is the one
131 // defined in the database.
132 // this call is to ensure the code uses a consistane E value through out.
133 //
134
135 G4IsotopeProperty* fProperty = new G4IsotopeProperty();
136 // Set Isotope Property
137 fProperty->SetLifeTime(meanlife);
138 fProperty->SetAtomicNumber(Z);
139 fProperty->SetAtomicMass(A);
140 // Notic that the value of E may have been changed
141 fProperty->SetEnergy(E);
142 // The spin is not being used in the current implementation
143 fProperty->SetiSpin(0);
144 // the decaytable will be loaded later in G4RadioactiveDecay when it is needed
145 fProperty->SetDecayTable(0);
146
147 fIsotopeList.push_back(fProperty);
148 fname = GetIsotopeName(Z, A, E);
149 fIsotopeNameList.push_back(fname);
150 if (GetVerboseLevel()>1) {
151 G4cout <<"G4RIsotopeTable::GetIsotope create: ";
152 G4cout <<fname <<G4endl;
153 }
154 return fProperty;
155
156 }
157}
double G4double
Definition: G4Types.hh:64
void SetAtomicMass(G4int A)
void SetDecayTable(G4DecayTable *table)
void SetEnergy(G4double E)
void SetiSpin(G4int J)
void SetAtomicNumber(G4int Z)
void SetLifeTime(G4double T)
virtual G4IsotopeProperty * GetIsotope(G4int Z, G4int A, G4double E)

Referenced by GetIsotope().

◆ operator=()

G4RIsotopeTable & G4RIsotopeTable::operator= ( const G4RIsotopeTable right)
protected

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