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/G4ContinuumGammaDeexcitation.cc

    r819 r1315  
    2424// ********************************************************************
    2525//
     26// $Id: G4ContinuumGammaDeexcitation.cc,v 1.7 2010/04/30 16:08:03 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2628//
    2729// -------------------------------------------------------------------
     
    4042//
    4143//      02 May 2003,   Vladimir Ivanchenko change interface to G4NuclearlevelManager
     44//
     45//      19 April 2010 J. M. Quesada: smaller value of tolerance parameter
    4246//     
    4347// -------------------------------------------------------------------
     
    6165//
    6266
    63 G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation(): _nucleusZ(0), _nucleusA(0), _levelManager(0)
     67G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation()
     68  : _nucleusZ(0), _nucleusA(0), _levelManager(0)
    6469{ }
    6570
     
    7176G4VGammaTransition* G4ContinuumGammaDeexcitation::CreateTransition()
    7277{
    73   G4Fragment nucleus = GetNucleus();
    74   G4int Z = static_cast<G4int>(nucleus.GetZ());
    75   G4int A = static_cast<G4int>(nucleus.GetA());
    76   G4double excitation = nucleus.GetExcitationEnergy();
     78  G4Fragment* nucleus = GetNucleus();
     79  G4int Z = static_cast<G4int>(nucleus->GetZ());
     80  G4int A = static_cast<G4int>(nucleus->GetA());
     81  G4double excitation = nucleus->GetExcitationEnergy();
    7782
    7883  if (_nucleusA != A || _nucleusZ != Z)
     
    8388    }
    8489
    85   if (_verbose > 1)
     90  if (_verbose > 1) {
    8691    G4cout << "G4ContinuumGammaDeexcitation::CreateTransition - Created" << G4endl;
    87 
     92  }
    8893  G4VGammaTransition* gt =  new G4ContinuumGammaTransition(_levelManager,Z,A,excitation,_verbose );
    8994
     
    9297   
    9398
    94 G4bool G4ContinuumGammaDeexcitation::CanDoTransition() const
     99G4bool G4ContinuumGammaDeexcitation::CanDoTransition()
    95100{
    96  G4bool canDo = true;
     101  //JMQ: far too small, creating sometimes continuum gammas instead of the right discrete ones
     102  // (when excitation energy is slightly over maximum discrete  energy): changed
     103  //  G4double tolerance = 10*eV;
     104  const G4double tolerance = CLHEP::keV;
    97105
    98106  if (_transition == 0)
    99107    {
    100       canDo = false;
    101 
    102       if (_verbose > 0)
    103         G4cout
    104           << "G4ContinuumGammaDeexcitation::CanDoTransition - Null transition "
    105           << G4endl;
     108      if (_verbose > 0) {
     109        G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Null transition "
     110               << G4endl;
     111      }
     112      return false;
    106113    }
    107114
    108   G4Fragment nucleus = GetNucleus();
    109   G4double excitation = nucleus.GetExcitationEnergy();
     115  G4Fragment* nucleus = GetNucleus();
     116  G4double excitation = nucleus->GetExcitationEnergy();
    110117
    111   G4double A = nucleus.GetA();
    112   G4double Z = nucleus.GetZ();
    113   if (A <2 || Z<3)
     118  //  G4int A = (G4int)nucleus->GetA();
     119  // G4int Z = (G4int)nucleus->GetZ();
     120  if (_nucleusA<2 || _nucleusZ<3)
    114121    {
    115       canDo = false;
    116       if (_verbose > 0)
    117         G4cout
    118           << "G4ContinuumGammaDeexcitation::CanDoTransition - n/p/H"
    119           << G4endl;
     122      if (_verbose > 1) {
     123        G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - n/p/H"
     124               << G4endl;
     125      }
     126      return false;
    120127    }
    121128
    122 
    123 
    124   if (excitation <= 0.)
     129  if (excitation <= tolerance)
    125130    {
    126       canDo = false;
    127       if (_verbose > 0)
    128         G4cout
    129           << "G4ContinuumGammaDeexcitation::CanDoTransition -  Excitation <= 0"
    130           << G4endl;
     131      if (_verbose > 1) {
     132        G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition -  Excitation "
     133               << excitation/CLHEP::keV << " keV is too small"
     134               << G4endl;
     135      }
     136      return false;
    131137    }
    132   G4double tolerance = 10*eV;
    133   if (excitation <= (_levelManager->MaxLevelEnergy()+ tolerance))
    134     {
    135       canDo = false;
    136       if (_verbose > 0)
    137       G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition -  Excitation "
    138              << excitation << " below max discrete level "
    139              << _levelManager->MaxLevelEnergy() << G4endl;
     138  if (excitation <= (_levelManager->MaxLevelEnergy() + tolerance))
     139    {
     140      if (_verbose > 0) {
     141        G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition -  Excitation "
     142               << excitation << " below max discrete level "
     143               << _levelManager->MaxLevelEnergy() << G4endl;
     144      }
     145      return false;
    140146    }
    141147 
    142   if (canDo)
    143     { if (_verbose > 1)
    144       G4cout <<"G4ContinuumGammaDeexcitation::CanDoTransition - CanDo"
    145              << G4endl;
    146     }
    147 
    148   return canDo;
    149 
     148  if (_verbose > 1) {
     149    G4cout <<"G4ContinuumGammaDeexcitation::CanDoTransition - CanDo"
     150           << " Eex(keV)= " << excitation/CLHEP::keV
     151           << " Emax(keV)= " << _levelManager->MaxLevelEnergy()/CLHEP::keV
     152           << " Z= " << _nucleusZ << " A= " << _nucleusA
     153           << G4endl;
     154  }
     155  return true;
    150156}
    151157
Note: See TracChangeset for help on using the changeset viewer.