Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions
G4RIsotopeTable Class Reference

#include <G4RIsotopeTable.hh>

Inheritance diagram for G4RIsotopeTable:
G4VIsotopeTable

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 G4IsotopePropertyGetIsotopeByIsoLvl (G4int Z, G4int A, G4int level=0)
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int level)
 
void DumpTable (G4int Zmin=1, G4int Zmax=118)
 
const G4StringGetName () const
 

Protected Member Functions

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

Detailed Description

Definition at line 64 of file G4RIsotopeTable.hh.

Member Typedef Documentation

Definition at line 72 of file G4RIsotopeTable.hh.

Definition at line 73 of file G4RIsotopeTable.hh.

Constructor & Destructor Documentation

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::G4RIsotopeTable ( const G4RIsotopeTable right)
protected
G4RIsotopeTable::~G4RIsotopeTable ( )
virtual

Definition at line 93 of file G4RIsotopeTable.cc.

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

Member Function Documentation

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

Definition at line 273 of file G4RIsotopeTable.cc.

References G4cout, and G4endl.

Referenced by G4RadioactiveDecay::AddUserDecayDataFile().

274 { if (Z<1 || A<2) {
275  G4cout<<"Z and A not valid!"<<G4endl;
276  }
277 
278  std::ifstream DecaySchemeFile(filename);
279  if (DecaySchemeFile){
280  G4int ID_ion=A*1000+Z;
281  theUserRadioactiveDataFiles[ID_ion]=filename;
282  }
283  else {
284  G4cout<<"The file "<<filename<<" does not exist!"<<G4endl;
285  }
286 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4bool G4RIsotopeTable::FindIsotope ( G4IsotopeProperty property)
virtual

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 }
G4IsotopeProperty * G4RIsotopeTable::GetIsotope ( G4int  Z,
G4int  A,
G4double  E 
)
virtual

Implements G4VIsotopeTable.

Definition at line 114 of file G4RIsotopeTable.cc.

References test::fname, G4cout, G4endl, G4IsotopeProperty::SetAtomicMass(), G4IsotopeProperty::SetAtomicNumber(), G4IsotopeProperty::SetDecayTable(), G4IsotopeProperty::SetEnergy(), G4IsotopeProperty::SetiSpin(), and G4IsotopeProperty::SetLifeTime().

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 }
void SetAtomicMass(G4int A)
virtual G4IsotopeProperty * GetIsotope(G4int Z, G4int A, G4double E)
int G4int
Definition: G4Types.hh:78
void SetiSpin(G4int J)
void SetLifeTime(G4double T)
G4GLOB_DLL std::ostream G4cout
void SetEnergy(G4double E)
void SetDecayTable(G4DecayTable *table)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void SetAtomicNumber(G4int Z)
G4RIsotopeTable& G4RIsotopeTable::operator= ( const G4RIsotopeTable right)
protected

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