#include <G4RIsotopeTable.hh>
Inheritance diagram for G4RIsotopeTable:
Public Types | |
typedef std::vector< G4IsotopeProperty * > | G4IsotopeList |
typedef std::vector< G4String > | G4IsotopeNameList |
Public Member Functions | |
G4RIsotopeTable () | |
virtual | ~G4RIsotopeTable () |
virtual G4bool | FindIsotope (G4IsotopeProperty *property) |
virtual G4IsotopeProperty * | GetIsotope (G4int Z, G4int A, G4double E) |
void | AddUserDecayDataFile (G4int Z, G4int A, G4String filename) |
Protected Member Functions | |
G4RIsotopeTable (const G4RIsotopeTable &right) | |
G4RIsotopeTable & | operator= (const G4RIsotopeTable &right) |
Definition at line 64 of file G4RIsotopeTable.hh.
typedef std::vector<G4IsotopeProperty*> G4RIsotopeTable::G4IsotopeList |
Definition at line 72 of file G4RIsotopeTable.hh.
typedef std::vector<G4String> G4RIsotopeTable::G4IsotopeNameList |
Definition at line 73 of file G4RIsotopeTable.hh.
G4RIsotopeTable::G4RIsotopeTable | ( | ) |
Definition at line 84 of file G4RIsotopeTable.cc.
00085 {// 00086 //Reset the list of user define data file 00087 // 00088 theUserRadioactiveDataFiles.clear(); 00089 }
G4RIsotopeTable::G4RIsotopeTable | ( | const G4RIsotopeTable & | right | ) | [protected] |
G4RIsotopeTable::~G4RIsotopeTable | ( | ) | [virtual] |
Definition at line 270 of file G4RIsotopeTable.cc.
References G4cout, and G4endl.
Referenced by G4RadioactiveDecay::AddUserDecayDataFile().
00271 { if (Z<1 || A<2) { 00272 G4cout<<"Z and A not valid!"<<G4endl; 00273 } 00274 00275 std::ifstream DecaySchemeFile(filename); 00276 if (DecaySchemeFile){ 00277 G4int ID_ion=A*1000+Z; 00278 theUserRadioactiveDataFiles[ID_ion]=filename; 00279 } 00280 else { 00281 G4cout<<"The file "<<filename<<" does not exist!"<<G4endl; 00282 } 00283 }
G4bool G4RIsotopeTable::FindIsotope | ( | G4IsotopeProperty * | property | ) | [virtual] |
Implements G4VIsotopeTable.
Definition at line 106 of file G4RIsotopeTable.cc.
00107 { 00108 // do nothing, it is here just for the compiler 00109 // it is required by the base class 00110 return true; 00111 }
G4IsotopeProperty * G4RIsotopeTable::GetIsotope | ( | G4int | Z, | |
G4int | A, | |||
G4double | E | |||
) | [virtual] |
Implements G4VIsotopeTable.
Definition at line 114 of file G4RIsotopeTable.cc.
References G4cout, G4endl, G4IsotopeProperty::SetAtomicMass(), G4IsotopeProperty::SetAtomicNumber(), G4IsotopeProperty::SetDecayTable(), G4IsotopeProperty::SetEnergy(), G4IsotopeProperty::SetiSpin(), and G4IsotopeProperty::SetLifeTime().
00115 { 00116 G4String fname = GetIsotopeName(Z, A, E); 00117 G4int j = -1; 00118 for (G4int i = 0 ; i< Entries(); i++) { 00119 if(fIsotopeNameList[i] == fname) j = i;} 00120 if (j >=0) { 00121 if (GetVerboseLevel()>1) { 00122 G4cout <<"G4RIsotopeTable::GetIsotope No. : "; 00123 G4cout <<j<<G4endl; 00124 } 00125 return GetIsotope(j);} 00126 // isotope property data has been loaded already and just return the pointer 00127 else{ 00128 G4double meanlife = GetMeanLifeTime(Z, A, E); 00129 // E is pass as a refence hence on entry E is supplied by the user and it 00130 // could be slightly different from the returned value which is the one 00131 // defined in the database. 00132 // this call is to ensure the code uses a consistane E value through out. 00133 // 00134 00135 G4IsotopeProperty* fProperty = new G4IsotopeProperty(); 00136 // Set Isotope Property 00137 fProperty->SetLifeTime(meanlife); 00138 fProperty->SetAtomicNumber(Z); 00139 fProperty->SetAtomicMass(A); 00140 // Notic that the value of E may have been changed 00141 fProperty->SetEnergy(E); 00142 // The spin is not being used in the current implementation 00143 fProperty->SetiSpin(0); 00144 // the decaytable will be loaded later in G4RadioactiveDecay when it is needed 00145 fProperty->SetDecayTable(0); 00146 00147 fIsotopeList.push_back(fProperty); 00148 fname = GetIsotopeName(Z, A, E); 00149 fIsotopeNameList.push_back(fname); 00150 if (GetVerboseLevel()>1) { 00151 G4cout <<"G4RIsotopeTable::GetIsotope create: "; 00152 G4cout <<fname <<G4endl; 00153 } 00154 return fProperty; 00155 00156 } 00157 }
G4RIsotopeTable& G4RIsotopeTable::operator= | ( | const G4RIsotopeTable & | right | ) | [protected] |