Problem 57 - G4NuclearLevel::_halfLife == 0 causes a problems in src/G4DiscreteGammaTransition.cc
Summary: G4NuclearLevel::_halfLife == 0 causes a problems in src/G4DiscreteGammaTransi...
Status: CLOSED REMIND
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic (show other problems)
Version: 1.0
Hardware: PC Other
: P2 normal
Assignee: Hans-Peter.Wellisch
URL:
Depends on:
Blocks:
 
Reported: 2000-02-09 00:20 CET by isupov
Modified: 2012-02-15 04:27 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description isupov 2000-02-09 00:20:27 CET
Calculations in src/G4DiscreteGammaTransition.cc,
G4DiscreteGammaTransition.cc::SelectGamma()
with tau == 0 cause a problem (divide by zero at least). tau initialized as
follows:

  G4double tau = _level.HalfLife() / log(2.0);

so if G4NuclearLevel._halfLife initialized by 0, tau also will be 0.
But $G4DATA/PhotonEvaporation/* contains a lot of nuclear levels with lifetime
zero ! So we need:
  either change all this datafiles (for more reasonable representation STABLE
nuclear levels - ?),
  or change src/G4NuclearLevelManager.cc, function
G4NuclearLevelManager::Read(ifstream& dataFile) (for more reasonable _halfLife
initialization - at least FLT_MAX, this more than Universe lifetime, but not
yet produce problems with double fp arithmetic :^)
 Patch as follows:

*** G4NuclearLevelManager.cc.org        Tue Feb  8 16:01:55 2000
--- G4NuclearLevelManager.cc    Tue Feb  8 16:03:25 2000
***************
*** 192,197 ****
--- 192,198 ----
        // data files, where some transitions show up with relative probability
        // zero
        if (_probability < minProbability) _probability = minProbability;
+       if (_halfLife == 0.0) _halfLife = FLT_MAX;

        // G4cout << "Read " << _levelEnergy << " " << _gammaEnergy << " " <<
_probability << endl;
      }
Comment 1 Hans-Peter.Wellisch 2000-02-14 06:55:59 CET
This is for Alessandro, who has no account on the system, it seems.
I am in contact by E-mail now.
Comment 2 Hans-Peter.Wellisch 2000-07-20 02:51:59 CEST
verified code in repository by inspection.