G4DiscreteGammaTransition Class Reference

#include <G4DiscreteGammaTransition.hh>

Inheritance diagram for G4DiscreteGammaTransition:

G4VGammaTransition

Public Member Functions

 G4DiscreteGammaTransition (const G4NuclearLevel &level, G4int Z, G4int A)
virtual ~G4DiscreteGammaTransition ()
virtual void SetEnergyFrom (G4double energy)
virtual G4double GetGammaEnergy ()
virtual G4double GetGammaCreationTime ()
virtual void SelectGamma ()
void SetICM (G4bool ic)
G4bool GetICM () const
G4double GetBondEnergy ()
G4int GetOrbitNumber ()
G4bool IsAGamma ()

Detailed Description

Definition at line 79 of file G4DiscreteGammaTransition.hh.


Constructor & Destructor Documentation

G4DiscreteGammaTransition::G4DiscreteGammaTransition ( const G4NuclearLevel level,
G4int  Z,
G4int  A 
)

Definition at line 75 of file G4DiscreteGammaTransition.cc.

References G4VGammaTransition::_verbose.

00075                                                                                                  : 
00076   _nucleusZ(Z), _orbitE(-1), _bondE(0.), _aGamma(true), _icm(false), _gammaEnergy(0.), 
00077   _level(level), _excitation(0.),  _gammaCreationTime(0.),_A(A),_Z(Z)
00078 {
00079   _levelManager = 0;
00080   _verbose = 0;
00081   //JMQ: added tolerence in the mismatch
00082   //VI:  increased tolerence 
00083   _tolerance = 10*CLHEP::keV;
00084 }

G4DiscreteGammaTransition::~G4DiscreteGammaTransition (  )  [virtual]

Definition at line 86 of file G4DiscreteGammaTransition.cc.

00087 {}


Member Function Documentation

G4double G4DiscreteGammaTransition::GetBondEnergy (  )  [inline]

Definition at line 100 of file G4DiscreteGammaTransition.hh.

Referenced by G4VGammaDeexcitation::GenerateGamma().

00100 {return _bondE;};

G4double G4DiscreteGammaTransition::GetGammaCreationTime (  )  [virtual]

Implements G4VGammaTransition.

Definition at line 232 of file G4DiscreteGammaTransition.cc.

00233 {
00234   return _gammaCreationTime;
00235 }

G4double G4DiscreteGammaTransition::GetGammaEnergy (  )  [virtual]

Implements G4VGammaTransition.

Definition at line 227 of file G4DiscreteGammaTransition.cc.

00228 {
00229   return _gammaEnergy;
00230 }

G4bool G4DiscreteGammaTransition::GetICM (  )  const [inline]

Definition at line 99 of file G4DiscreteGammaTransition.hh.

Referenced by G4VGammaDeexcitation::GenerateGamma().

00099 { return _icm;};

G4int G4DiscreteGammaTransition::GetOrbitNumber (  )  [inline]

Definition at line 101 of file G4DiscreteGammaTransition.hh.

Referenced by G4VGammaDeexcitation::GenerateGamma().

00101 {return _orbitE;};

G4bool G4DiscreteGammaTransition::IsAGamma (  )  [inline]

Definition at line 102 of file G4DiscreteGammaTransition.hh.

Referenced by G4VGammaDeexcitation::GenerateGamma().

00102 {return _aGamma;};

void G4DiscreteGammaTransition::SelectGamma (  )  [virtual]

Implements G4VGammaTransition.

Definition at line 89 of file G4DiscreteGammaTransition.cc.

References G4VGammaTransition::_verbose, G4cout, G4endl, G4UniformRand, G4NuclearLevel::GammaCumulativeProbabilities(), G4NuclearLevel::GammaEnergies(), G4NuclearLevel::GammaWeights(), G4AtomicShells::GetBindingEnergy(), G4Pow::GetInstance(), G4NuclearLevel::HalfLife(), G4NuclearLevel::KConvertionProbabilities(), G4NuclearLevel::L1ConvertionProbabilities(), G4NuclearLevel::L2ConvertionProbabilities(), G4NuclearLevel::L3ConvertionProbabilities(), G4Pow::logZ(), G4NuclearLevel::M1ConvertionProbabilities(), G4NuclearLevel::M2ConvertionProbabilities(), G4NuclearLevel::M3ConvertionProbabilities(), G4NuclearLevel::M4ConvertionProbabilities(), G4NuclearLevel::M5ConvertionProbabilities(), G4NuclearLevel::NumberOfGammas(), and G4NuclearLevel::TotalConvertionProbabilities().

00090 {
00091   // default gamma 
00092   _aGamma = true;    
00093   _gammaEnergy = 0.;
00094   
00095   G4int nGammas = _level.NumberOfGammas();
00096   if (nGammas > 0)
00097     {
00098       G4int iGamma = 0;
00099       if(1 < nGammas) {
00100         G4double random = G4UniformRand();
00101       
00102         //G4cout << "G4DiscreteGammaTransition::SelectGamma  N= " 
00103         //       << nGammas << " rand= " << random << G4endl;
00104         for(iGamma=0; iGamma<nGammas; ++iGamma)
00105           {
00106             //G4cout << iGamma << "  prob= " 
00107             //     << (_level.GammaCumulativeProbabilities())[iGamma] << G4endl;
00108             if(random <= (_level.GammaCumulativeProbabilities())[iGamma])
00109               { break; }
00110           }
00111       }
00112       /*     
00113       G4cout << "Elevel(MeV)= " << _level.Energy()/MeV
00114              << " Etran(MeV)= " << (_level.GammaEnergies())[iGamma]/MeV
00115              << " Eexc(MeV)= " << _excitation/MeV << G4endl;
00116       */
00117 
00118       // VI: do not apply correction here in order do not make 
00119       //     double correction
00120       //G4double eCorrection = _level.Energy() - _excitation;      
00121       //_gammaEnergy = (_level.GammaEnergies())[iGamma] - eCorrection;
00122       _gammaEnergy = (_level.GammaEnergies())[iGamma];
00123             
00124       //JMQ: 
00125       //1)If chosen gamma energy is close enough to excitation energy, 
00126       //  the later is used instead for gamma dacey to gs (it guarantees 
00127       //  energy conservation)
00128       //2)For energy conservation, level energy differences instead of  
00129       //  tabulated gamma energies must be used (origin of final fake photons)
00130       
00131       // VI: remove fake photons - applied only for the last transition
00132       //     do not applied on each transition
00133       if(std::fabs(_excitation - _gammaEnergy) < _tolerance) { 
00134         _gammaEnergy =_excitation;
00135       }
00136 
00137       //  JMQ: Warning: the following check is needed to avoid loops:
00138       //  Due essentially to missing nuclear levels in data files, it is
00139       //  possible that _gammaEnergy is so low as the nucleus doesn't change
00140       //  its level after the transition.
00141       //  When such case is found, force the full deexcitation of the nucleus.
00142       //
00143       //    NOTE: you should force the transition to the next lower level,
00144       //          but this change needs a more complex revision of actual 
00145       //          design.
00146       //          I leave this for a later revision.
00147 
00148       // VI: the check has no sence and we make this very simple
00149       if (_gammaEnergy < _tolerance) { 
00150         _gammaEnergy = _excitation; 
00151       }
00152 
00153       //G4cout << "G4DiscreteGammaTransition::SelectGamma: " << _gammaEnergy 
00154       //             << " _icm: " << _icm << G4endl;
00155 
00156       // now decide whether Internal Coversion electron should be emitted instead
00157       if (_icm) {
00158         G4double random = G4UniformRand();
00159         if ( random <= (_level.TotalConvertionProbabilities())[iGamma]
00160              *(_level.GammaWeights())[iGamma]
00161              /((_level.TotalConvertionProbabilities())[iGamma]*(_level.GammaWeights())[iGamma]
00162                +(_level.GammaWeights())[iGamma])) 
00163           {
00164             G4int iShell = 9;
00165             random = G4UniformRand() ;
00166             if ( random <= (_level.KConvertionProbabilities())[iGamma]) 
00167               { iShell = 0;}
00168             else if ( random <= (_level.L1ConvertionProbabilities())[iGamma]) 
00169               { iShell = 1;}
00170             else if ( random <= (_level.L2ConvertionProbabilities())[iGamma]) 
00171               { iShell = 2;}
00172             else if ( random <= (_level.L3ConvertionProbabilities())[iGamma]) 
00173               { iShell = 3;}    
00174             else if ( random <= (_level.M1ConvertionProbabilities())[iGamma]) 
00175               { iShell = 4;}
00176             else if ( random <= (_level.M2ConvertionProbabilities())[iGamma]) 
00177               { iShell = 5;}
00178             else if ( random <= (_level.M3ConvertionProbabilities())[iGamma]) 
00179               { iShell = 6;}
00180             else if ( random <= (_level.M4ConvertionProbabilities())[iGamma]) 
00181               { iShell = 7;}
00182             else if ( random <= (_level.M5ConvertionProbabilities())[iGamma]) 
00183               { iShell = 8;}
00184             // the following is needed to match the ishell to that used in  G4AtomicShells
00185             if ( iShell == 9) {
00186               if ( (_nucleusZ < 28) && (_nucleusZ > 20)) {
00187                 iShell--;
00188               } else if ( _nucleusZ == 20 || _nucleusZ == 19 ) {
00189                 iShell = iShell -2;
00190               }
00191             }
00192             //L.Desorgher 02/11/2011
00193             //Atomic shell information is available in Geant4 only up top Z=100
00194             //To extend the photo evaporation code to Z>100  the call 
00195             // to G4AtomicShells::GetBindingEnergy should be forbidden for Z>100
00196             _bondE = 0.;
00197             if (_nucleusZ <=100)
00198             _bondE = G4AtomicShells::GetBindingEnergy(_nucleusZ, iShell);
00199             if (_verbose > 0) {
00200               G4cout << "G4DiscreteGammaTransition: _nucleusZ = " <<_nucleusZ 
00201                      << " , iShell = " << iShell  
00202                      << " , Shell binding energy = " << _bondE/keV
00203                      << " keV " << G4endl;
00204             }
00205 
00206             // 09.05.2010 VI : it is an error - cannot subtract bond energy from 
00207             //                 transition energy here
00208             //_gammaEnergy = _gammaEnergy - _bondE; 
00209             //G4cout << "_gammaEnergy = " << _gammaEnergy << G4endl;
00210 
00211             _orbitE = iShell;     
00212             _aGamma = false ;   // emitted is not a gamma now 
00213           }
00214       }
00215       
00216       G4double tau = _level.HalfLife() / G4Pow::GetInstance()->logZ(2);
00217 
00218       //09.05.2010 VI rewrite samling of decay time 
00219       //              assuming ordinary exponential low
00220       _gammaCreationTime = 0.;      
00221       if(tau > 0.0) {  _gammaCreationTime = -tau*std::log(G4UniformRand()); }
00222 
00223     }
00224   return;
00225 }

void G4DiscreteGammaTransition::SetEnergyFrom ( G4double  energy  )  [virtual]

Implements G4VGammaTransition.

Definition at line 237 of file G4DiscreteGammaTransition.cc.

00238 {
00239   _excitation = energy;
00240 }

void G4DiscreteGammaTransition::SetICM ( G4bool  ic  )  [inline]

Definition at line 98 of file G4DiscreteGammaTransition.hh.

Referenced by G4DiscreteGammaDeexcitation::CreateTransition().

00098 { _icm = ic; };


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:46 2013 for Geant4 by  doxygen 1.4.7