Geant4  10.01
G4ContinuumGammaDeexcitation.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4ContinuumGammaDeexcitation.cc 87017 2014-11-21 16:26:26Z gcosmo $
27 //
28 // -------------------------------------------------------------------
29 // GEANT 4 class file
30 //
31 // CERN, Geneva, Switzerland
32 //
33 // File name: G4ContinuumGammaDeexcitation
34 //
35 // Authors: Carlo Dallapiccola (dallapiccola@umdhep.umd.edu)
36 // Maria Grazia Pia (pia@genova.infn.it)
37 //
38 // Creation date: 23 October 1998
39 //
40 // Modifications:
41 //
42 // 02 May 2003, Vladimir Ivanchenko change interface to G4NuclearlevelManager
43 //
44 // 19 April 2010 J. M. Quesada: smaller value of tolerance parameter
45 //
46 // -------------------------------------------------------------------
47 //
48 // Class G4ContinuumGammaDeexcitation.cc
49 //
50 // Concrete class derived from G4VGammaDeexcitation
51 //
52 //
54 
55 #include "G4Gamma.hh"
57 #include "G4NuclearLevelManager.hh"
58 #include "G4NuclearLevelStore.hh"
59 #include "G4Fragment.hh"
61 
63  : nucleusZ(0), nucleusA(0), levelManager(0), ctransition(0)
64 {
66 }
67 
69 {}
70 
72 {
73  G4int Z = nucleus->GetZ_asInt();
74  G4int A = nucleus->GetA_asInt();
75  G4double excitation = nucleus->GetExcitationEnergy();
76 
77  if (excitation <= _tolerance) {
78  if (_verbose > 1) {
79  G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition fails; Z= " << Z
80  << " A= " << A << " Eex(meV)= " << excitation << G4endl;
81  }
82  return false;
83  }
84 
85  if (nucleusA != A || nucleusZ != Z) {
87  nucleusA = A;
88  nucleusZ = Z;
89  }
90 
91  if (_verbose > 1) {
92  G4cout << "G4ContinuumGammaDeexcitation: "
93  << " Z= " << Z << " A= " << A << " Eex= " << excitation
94  << G4endl;
95  }
96  if (levelManager && excitation <= levelManager->MaxLevelEnergy() + _tolerance) {
97  if (_verbose > 0) {
98  G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Excitation "
99  << excitation << " below max discrete level "
101  }
102  return false;
103  }
104 
105  if(!ctransition) {
106  ctransition =
109  } else {
110  ctransition->Update(levelManager,Z,A,excitation);
111  }
112 
113  if (_verbose > 1) {
114  G4cout <<"G4ContinuumGammaDeexcitation::CanDoTransition: "
115  << " Eex(MeV)= " << excitation
116  << " Emax(MeV)= " << levelManager->MaxLevelEnergy()
117  << " Z= " << Z << " A= " << A << G4endl;
118  }
119  return true;
120 }
121 
122 
123 
virtual G4bool CanDoTransition(G4Fragment *aNucleus)
static G4NuclearLevelStore * GetInstance()
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4int GetA_asInt() const
Definition: G4Fragment.hh:243
G4ContinuumGammaTransition * ctransition
bool G4bool
Definition: G4Types.hh:79
static const G4double A[nN]
G4NuclearLevelManager * GetManager(G4int Z, G4int A)
G4VGammaTransition * _transition
void Update(const G4NuclearLevelManager *manager, G4int Z, G4int A, G4double exc)
G4int GetZ_asInt() const
Definition: G4Fragment.hh:248
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double MaxLevelEnergy() const
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:260