Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4DiscreteGammaDeexcitation.cc

    r962 r1315  
    2424// ********************************************************************
    2525//
     26// $Id: G4DiscreteGammaDeexcitation.cc,v 1.15 2010/05/10 07:20:40 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2628//
    2729// -------------------------------------------------------------------
     
    6567  _rdm(false), _levelManager(0)
    6668{
    67   _tolerance = 0.1 * MeV;
     69  _tolerance = CLHEP::keV;
    6870}
    6971
    70 
    71 G4DiscreteGammaDeexcitation::~G4DiscreteGammaDeexcitation() {}
    72 
     72G4DiscreteGammaDeexcitation::~G4DiscreteGammaDeexcitation()
     73{}
    7374
    7475G4VGammaTransition* G4DiscreteGammaDeexcitation::CreateTransition()
    7576{
    76   G4Fragment nucleus = GetNucleus();
    77   G4int A = static_cast<G4int>(nucleus.GetA());
    78   G4int Z = static_cast<G4int>(nucleus.GetZ());
    79 
     77  G4Fragment* nucleus = GetNucleus();
     78  G4int A = static_cast<G4int>(nucleus->GetA());
     79  G4int Z = static_cast<G4int>(nucleus->GetZ());
     80  //  _verbose =2;
     81  //  G4cout << "G4DiscreteGammaDeexcitation::CreateTransition: " << nucleus << G4endl;
    8082  if (_nucleusA != A || _nucleusZ != Z)
    8183    {
     
    8486      _levelManager = G4NuclearLevelStore::GetInstance()->GetManager(Z,A);
    8587    }
    86 
    87 
    8888
    8989  if (_levelManager->IsValid())
     
    9696        }
    9797       
    98       G4double excitation = nucleus.GetExcitationEnergy();
    99       //      const G4NuclearLevel* level =_levelManager.NearestLevel(excitation, _tolerance);
     98      G4double excitation = nucleus->GetExcitationEnergy();
    10099      const G4NuclearLevel* level =_levelManager->NearestLevel(excitation);
    101100       
    102101      if (level != 0) 
    103102        {
    104           if (_verbose > 0)
     103          if (_verbose > 0) {
    105104            G4cout
    106105              << "G4DiscreteGammaDeexcitation::CreateTransition - Created from level energy "
    107106              << level->Energy() << ", excitation is "
    108107              << excitation << G4endl;
    109           G4DiscreteGammaTransition* dtransit = new G4DiscreteGammaTransition(*level,Z);
     108          }
     109          G4DiscreteGammaTransition* dtransit = new G4DiscreteGammaTransition(*level,Z,A);
    110110          dtransit->SetICM(_icm); 
    111111          return dtransit;
     
    113113      else
    114114        {
    115           if (_verbose > 0)
     115          if (_verbose > 0) {
    116116            G4cout
    117117              << "G4DiscreteGammaDeexcitation::CreateTransition - No transition created from "
    118118              << excitation << " within tolerance " << _tolerance << G4endl;
    119            
     119          }
    120120          return 0;
    121121        }
    122122    }
    123   else return 0;
     123  return 0;
    124124}
    125125
    126126
    127 G4bool G4DiscreteGammaDeexcitation::CanDoTransition() const
     127G4bool G4DiscreteGammaDeexcitation::CanDoTransition()
    128128{
    129129
     
    138138        << G4endl;
    139139  }
    140   G4Fragment nucleus = GetNucleus();
    141140  if (canDo)  {
    142     G4double A = nucleus.GetA();
    143     G4double Z = nucleus.GetZ();
    144     if (Z<2 || A<3 || Z>98)
     141    if (_nucleusZ<2 || _nucleusA<3 || _nucleusZ>98)
    145142      {
    146143        canDo = false;
     
    152149  }
    153150
    154   G4double excitation = nucleus.GetExcitationEnergy();
     151  G4Fragment* nucleus = GetNucleus();
     152  G4double excitation = nucleus->GetExcitationEnergy();
     153  //G4cout << "G4DiscreteGammaDeexcitation::CanDoTransition: " << nucleus << G4endl;
    155154
    156155  if (canDo) {
    157     if (excitation <= 0.) {
     156    if (excitation <= _tolerance) {
    158157      canDo = false;
    159       if (_verbose > 0)
     158      if (_verbose > 0) {
    160159        G4cout
    161160          << "G4DiscreteGammaDeexcitation::CanDoTransition -  Excitation <= 0"
     161          << excitation << "  " << excitation - _tolerance
    162162          << G4endl;
     163      }
    163164    } else {
    164165      if (excitation > _levelManager->MaxLevelEnergy() + _tolerance) canDo = false;
    165       if (excitation < _levelManager->MinLevelEnergy() - _tolerance) canDo = false; 
     166      //if (excitation < _levelManager->MinLevelEnergy() - _tolerance) canDo = false; 
    166167      // The following is a protection to avoid looping in case of elements with very low
    167168      // ensdf levels
    168       if (excitation < _levelManager->MinLevelEnergy() * 0.9) canDo = false; 
     169      //if (excitation < _levelManager->MinLevelEnergy() * 0.9) canDo = false; 
    169170 
    170171      if (_verbose > 0) {
Note: See TracChangeset for help on using the changeset viewer.