source: trunk/source/processes/hadronic/models/de_excitation/photon_evaporation/src/G4ContinuumGammaDeexcitation.cc @ 1196

Last change on this file since 1196 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 4.6 KB
Line 
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//
27// -------------------------------------------------------------------
28//      GEANT 4 class file
29//
30//      CERN, Geneva, Switzerland
31//
32//      File name:     G4ContinuumGammaDeexcitation
33//
34//      Authors:       Carlo Dallapiccola (dallapiccola@umdhep.umd.edu)
35//                     Maria Grazia Pia (pia@genova.infn.it)
36//
37//      Creation date: 23 October 1998
38//
39//      Modifications:
40//
41//      02 May 2003,   Vladimir Ivanchenko change interface to G4NuclearlevelManager
42//     
43// -------------------------------------------------------------------
44//
45// Class G4ContinuumGammaDeexcitation.cc
46//
47//       Concrete class derived from G4VGammaDeexcitation
48//
49//
50#include "G4ContinuumGammaDeexcitation.hh"
51
52#include "G4Gamma.hh"
53#include "G4ContinuumGammaTransition.hh"
54#include "G4NuclearLevelManager.hh"
55#include "G4NuclearLevelStore.hh"
56#include "G4Fragment.hh"     
57#include "G4ConstantLevelDensityParameter.hh"
58
59//
60// Constructor
61//
62
63G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation(): _nucleusZ(0), _nucleusA(0), _levelManager(0)
64{ }
65
66
67G4ContinuumGammaDeexcitation::~G4ContinuumGammaDeexcitation() 
68{ }
69
70
71G4VGammaTransition* G4ContinuumGammaDeexcitation::CreateTransition()
72{
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();
77
78  if (_nucleusA != A || _nucleusZ != Z)
79    {
80      _levelManager = G4NuclearLevelStore::GetInstance()->GetManager(Z,A);
81      _nucleusA = A;
82      _nucleusZ = Z;
83    }
84
85  if (_verbose > 1)
86    G4cout << "G4ContinuumGammaDeexcitation::CreateTransition - Created" << G4endl;
87
88  G4VGammaTransition* gt =  new G4ContinuumGammaTransition(_levelManager,Z,A,excitation,_verbose );
89
90  return gt;
91}
92   
93
94G4bool G4ContinuumGammaDeexcitation::CanDoTransition() const
95{
96 G4bool canDo = true;
97
98  if (_transition == 0) 
99    {
100      canDo = false;
101
102      if (_verbose > 0)
103        G4cout
104          << "G4ContinuumGammaDeexcitation::CanDoTransition - Null transition "
105          << G4endl;
106    }
107
108  G4Fragment nucleus = GetNucleus();
109  G4double excitation = nucleus.GetExcitationEnergy();
110
111  G4double A = nucleus.GetA();
112  G4double Z = nucleus.GetZ();
113  if (A <2 || Z<3)
114    {
115      canDo = false;
116      if (_verbose > 0) 
117        G4cout
118          << "G4ContinuumGammaDeexcitation::CanDoTransition - n/p/H"
119          << G4endl;
120    }
121
122
123
124  if (excitation <= 0.) 
125    {
126      canDo = false;
127      if (_verbose > 0) 
128        G4cout
129          << "G4ContinuumGammaDeexcitation::CanDoTransition -  Excitation <= 0"
130          << G4endl;
131    }
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;
140    }
141 
142  if (canDo)
143    { if (_verbose > 1) 
144      G4cout <<"G4ContinuumGammaDeexcitation::CanDoTransition - CanDo" 
145             << G4endl; 
146    }
147
148  return canDo;
149
150}
151
152
153
Note: See TracBrowser for help on using the repository browser.