80 const G4double G4RIsotopeTable::levelTolerance = 2.0*
keV;
88 theUserRadioactiveDataFiles.clear();
96 fIsotopeNameList.clear();
100 G4int G4RIsotopeTable::GetVerboseLevel()
const
118 for (
G4int i = 0 ; i< Entries(); i++) {
119 if(fIsotopeNameList[i] == fname) j = i;}
121 if (GetVerboseLevel()>1) {
122 G4cout <<
"G4RIsotopeTable::GetIsotope No. : ";
128 G4double meanlife = GetMeanLifeTime(Z, A, E);
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: ";
162 std::ostringstream os;
163 os.setf(std::ios::fixed);
164 os <<
"A"<< A <<
"Z" << Z <<
'[' << std::setprecision(1) << E/
keV <<
']';
166 if (GetVerboseLevel()>1) {
167 G4cout <<
"G4RIsotopeTable::GetIsotope Name: ";
180 std::map<int,G4String>::iterator it = theUserRadioactiveDataFiles.find(1000*A+Z);
182 if ( it != theUserRadioactiveDataFiles.end() ){
186 if (!getenv(
"G4RADIOACTIVEDATA")) {
187 G4cout <<
"Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files." <<
G4endl;
189 "Please setenv G4RADIOACTIVEDATA to point to the radioactive decay data files.");
191 G4String dirName = getenv(
"G4RADIOACTIVEDATA");
193 std::ostringstream os;
194 os <<dirName <<
"/z" <<Z <<
".a" <<A ;
197 std::ifstream DecaySchemeFile(file);
199 G4bool found_in_raddecay_data(
false);
200 if (!DecaySchemeFile) {
201 if (GetVerboseLevel()>1) {
202 G4cout <<
"G4RIsotopeTable::GetMeanLife() : "
203 <<
"cannot find ion radioactive decay file: "
207 char inputChars[100]={
' '};
213 while (!found_in_raddecay_data && !DecaySchemeFile.getline(inputChars, 100).eof()) {
214 inputLine = inputChars;
215 inputLine = inputLine.
strip(1);
217 if (inputChars[0] !=
'#' && inputLine.length() != 0) {
218 std::istringstream tmpstream(inputLine);
219 tmpstream >> recordType >>
a >>
b;
220 if (recordType ==
"P") {
221 if (std::abs(
a*
keV-aE) < levelTolerance) {
222 found_in_raddecay_data =
true;
223 lifetime = b/0.693147*
s ;
228 DecaySchemeFile.close();
231 if (!found_in_raddecay_data && aE) {
233 lifetime = 1.0E-20*
s;
243 lifetime = half_life/0.693147;
246 if (GetVerboseLevel()>1 && half_life<0) {
247 G4cout <<
"G4RIsotopeTable::GetMeanLife() : ";
248 G4cout <<
"cannot find ion of required excitation E = " << aE <<
G4endl;
249 G4cout <<
"state in radioactive or photoevaporation data file " <<
G4endl;
250 G4cout <<
"The nucleus is assumed to be IT decayed with life = 1E-20 s" <<
G4endl;
251 G4cout <<
" -----------* THIS MAY CAUSE PROBLEM IN ITS DECAY-----------" <<
G4endl;
255 if (!found_in_raddecay_data && !aE) {
256 if (GetVerboseLevel()>1) {
257 G4cout <<
"G4RIsotopeTable::GetMeanLife() : ";
258 G4cout <<
"cannot find ion of required excitation E = " << aE <<
G4endl;
259 G4cout <<
"state in radioactive or photoevaporation data file" <<
G4endl;
260 G4cout <<
"The nucleus is assumed to be stable" <<
G4endl;
265 if (GetVerboseLevel()>1) {
266 G4cout <<
"G4RIsotopeTable::GetMeanLifeTime: ";
267 G4cout <<lifetime <<
" for " << GetIsotopeName(Z, A, aE) <<
G4endl;
278 std::ifstream DecaySchemeFile(filename);
279 if (DecaySchemeFile){
281 theUserRadioactiveDataFiles[ID_ion]=filename;
284 G4cout<<
"The file "<<filename<<
" does not exist!"<<
G4endl;
void SetAtomicMass(G4int A)
virtual G4IsotopeProperty * GetIsotope(G4int Z, G4int A, G4double E)
virtual ~G4RIsotopeTable()
G4double HalfLife() const
G4String strip(G4int strip_Type=trailing, char c=' ')
void AddUserDecayDataFile(G4int Z, G4int A, G4String filename)
virtual G4bool FindIsotope(G4IsotopeProperty *property)
static G4NuclearLevelStore * GetInstance()
void SetLifeTime(G4double T)
G4GLOB_DLL std::ostream G4cout
G4NuclearLevelManager * GetManager(G4int Z, G4int A)
void SetEnergy(G4double E)
void SetDecayTable(G4DecayTable *table)
static G4ParticleTable * GetParticleTable()
const G4NuclearLevel * NearestLevel(G4double energy, G4double eDiffMax=9999.*CLHEP::GeV) const
G4int GetVerboseLevel() const
void SetAtomicNumber(G4int Z)