Problem 57

Summary: G4NuclearLevel::_halfLife == 0 causes a problems in src/G4DiscreteGammaTransition.cc
Product: Geant4 Reporter: isupov
Component: processes/hadronicAssignee: Hans-Peter.Wellisch
Status: CLOSED REMIND    
Severity: normal    
Priority: P2    
Version: 1.0   
Hardware: PC   
OS: Other   

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.