G4ContinuumGammaDeexcitation.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id$
00027 //
00028 // -------------------------------------------------------------------
00029 //      GEANT 4 class file 
00030 //
00031 //      CERN, Geneva, Switzerland
00032 //
00033 //      File name:     G4ContinuumGammaDeexcitation
00034 //
00035 //      Authors:       Carlo Dallapiccola (dallapiccola@umdhep.umd.edu)
00036 //                     Maria Grazia Pia (pia@genova.infn.it)
00037 // 
00038 //      Creation date: 23 October 1998
00039 //
00040 //      Modifications: 
00041 //
00042 //      02 May 2003,   Vladimir Ivanchenko change interface to G4NuclearlevelManager
00043 //
00044 //      19 April 2010 J. M. Quesada: smaller value of tolerance parameter
00045 //      
00046 // -------------------------------------------------------------------
00047 //
00048 // Class G4ContinuumGammaDeexcitation.cc
00049 //
00050 //       Concrete class derived from G4VGammaDeexcitation
00051 //
00052 //
00053 #include "G4ContinuumGammaDeexcitation.hh"
00054 
00055 #include "G4Gamma.hh"
00056 #include "G4ContinuumGammaTransition.hh"
00057 #include "G4NuclearLevelManager.hh"
00058 #include "G4NuclearLevelStore.hh"
00059 #include "G4Fragment.hh"      
00060 #include "G4ConstantLevelDensityParameter.hh"
00061 
00062 //
00063 // Constructor
00064 //
00065 
00066 G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation()
00067   : _nucleusZ(0), _nucleusA(0), _levelManager(0)
00068 {}
00069 
00070 G4ContinuumGammaDeexcitation::~G4ContinuumGammaDeexcitation() 
00071 {}
00072 
00073 G4VGammaTransition* G4ContinuumGammaDeexcitation::CreateTransition()
00074 {
00075   G4Fragment* nucleus = GetNucleus();
00076   G4int Z = nucleus->GetZ_asInt();
00077   G4int A = nucleus->GetA_asInt();
00078   G4double excitation = nucleus->GetExcitationEnergy();
00079 
00080   if (_nucleusA != A || _nucleusZ != Z)
00081   {
00082     _levelManager = G4NuclearLevelStore::GetInstance()->GetManager(Z,A);
00083     _nucleusA = A;
00084     _nucleusZ = Z;
00085   }
00086 
00087   if (_verbose > 1) {
00088     G4cout << "G4ContinuumGammaDeexcitation::CreateTransition "
00089            << " Z= " << Z << "  A= " << A << " Eex= " << excitation
00090            << "  "  << _levelManager
00091            << G4endl;
00092   }
00093   G4VGammaTransition* gt =  
00094     new G4ContinuumGammaTransition(_levelManager,Z,A,excitation,_verbose );
00095 
00096   return gt;
00097 }
00098     
00099 
00100 G4bool G4ContinuumGammaDeexcitation::CanDoTransition() 
00101 {
00102   //JMQ: far too small, creating sometimes continuum gammas instead 
00103   //     of the right discrete ones (when excitation energy is slightly 
00104   //     over maximum discrete  energy): changed
00105   //  G4double tolerance = 10*eV;
00106   const G4double tolerance = CLHEP::keV;
00107 
00108   if (_transition == 0) 
00109     {
00110       if (_verbose > 0) {
00111         G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Null transition "
00112                << G4endl;
00113       }
00114       return false;
00115     }
00116 
00117   G4Fragment* nucleus = GetNucleus();
00118   G4double excitation = nucleus->GetExcitationEnergy();
00119 
00120   if (_nucleusZ < 2 || _nucleusA < 3)
00121     {
00122       if (_verbose > 1) { 
00123         G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - n/p/H"
00124                << G4endl;
00125       }
00126       return false;
00127     }
00128 
00129   if (excitation <= tolerance) 
00130     {
00131       if (_verbose > 1) { 
00132         G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition -  Excitation "
00133                << excitation/CLHEP::keV << " keV is too small"
00134                << G4endl;
00135       }
00136       return false;
00137     }
00138   if (excitation <= (_levelManager->MaxLevelEnergy() + tolerance)) 
00139     {  
00140       if (_verbose > 0) {
00141         G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition -  Excitation " 
00142                << excitation << " below max discrete level " 
00143                << _levelManager->MaxLevelEnergy() << G4endl;
00144       }
00145       return false;
00146     }
00147   
00148   if (_verbose > 1) {
00149     G4cout <<"G4ContinuumGammaDeexcitation::CanDoTransition - CanDo" 
00150            << " Eex(keV)= " << excitation/CLHEP::keV 
00151            << " Emax(keV)= " << _levelManager->MaxLevelEnergy()/CLHEP::keV 
00152            << " Z= " << _nucleusZ << " A= " << _nucleusA
00153            << G4endl;
00154   }
00155   return true;
00156 }
00157 
00158 
00159 

Generated on Mon May 27 17:47:57 2013 for Geant4 by  doxygen 1.4.7