[819] | 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 | // |
---|
[1347] | 26 | // $Id: G4ContinuumGammaDeexcitation.cc,v 1.8 2010/11/17 19:17:17 vnivanch Exp $ |
---|
| 27 | // GEANT4 tag $Name: geant4-09-04-ref-00 $ |
---|
[819] | 28 | // |
---|
| 29 | // ------------------------------------------------------------------- |
---|
| 30 | // GEANT 4 class file |
---|
| 31 | // |
---|
| 32 | // CERN, Geneva, Switzerland |
---|
| 33 | // |
---|
| 34 | // File name: G4ContinuumGammaDeexcitation |
---|
| 35 | // |
---|
| 36 | // Authors: Carlo Dallapiccola (dallapiccola@umdhep.umd.edu) |
---|
| 37 | // Maria Grazia Pia (pia@genova.infn.it) |
---|
| 38 | // |
---|
| 39 | // Creation date: 23 October 1998 |
---|
| 40 | // |
---|
| 41 | // Modifications: |
---|
| 42 | // |
---|
| 43 | // 02 May 2003, Vladimir Ivanchenko change interface to G4NuclearlevelManager |
---|
[1315] | 44 | // |
---|
| 45 | // 19 April 2010 J. M. Quesada: smaller value of tolerance parameter |
---|
[819] | 46 | // |
---|
| 47 | // ------------------------------------------------------------------- |
---|
| 48 | // |
---|
| 49 | // Class G4ContinuumGammaDeexcitation.cc |
---|
| 50 | // |
---|
| 51 | // Concrete class derived from G4VGammaDeexcitation |
---|
| 52 | // |
---|
| 53 | // |
---|
| 54 | #include "G4ContinuumGammaDeexcitation.hh" |
---|
| 55 | |
---|
| 56 | #include "G4Gamma.hh" |
---|
| 57 | #include "G4ContinuumGammaTransition.hh" |
---|
| 58 | #include "G4NuclearLevelManager.hh" |
---|
| 59 | #include "G4NuclearLevelStore.hh" |
---|
| 60 | #include "G4Fragment.hh" |
---|
| 61 | #include "G4ConstantLevelDensityParameter.hh" |
---|
| 62 | |
---|
| 63 | // |
---|
| 64 | // Constructor |
---|
| 65 | // |
---|
| 66 | |
---|
[1315] | 67 | G4ContinuumGammaDeexcitation::G4ContinuumGammaDeexcitation() |
---|
| 68 | : _nucleusZ(0), _nucleusA(0), _levelManager(0) |
---|
[1347] | 69 | {} |
---|
[819] | 70 | |
---|
| 71 | G4ContinuumGammaDeexcitation::~G4ContinuumGammaDeexcitation() |
---|
[1347] | 72 | {} |
---|
[819] | 73 | |
---|
| 74 | G4VGammaTransition* G4ContinuumGammaDeexcitation::CreateTransition() |
---|
| 75 | { |
---|
[1315] | 76 | G4Fragment* nucleus = GetNucleus(); |
---|
[1347] | 77 | G4int Z = nucleus->GetZ_asInt(); |
---|
| 78 | G4int A = nucleus->GetA_asInt(); |
---|
[1315] | 79 | G4double excitation = nucleus->GetExcitationEnergy(); |
---|
[819] | 80 | |
---|
| 81 | if (_nucleusA != A || _nucleusZ != Z) |
---|
| 82 | { |
---|
| 83 | _levelManager = G4NuclearLevelStore::GetInstance()->GetManager(Z,A); |
---|
| 84 | _nucleusA = A; |
---|
| 85 | _nucleusZ = Z; |
---|
| 86 | } |
---|
| 87 | |
---|
[1315] | 88 | if (_verbose > 1) { |
---|
[819] | 89 | G4cout << "G4ContinuumGammaDeexcitation::CreateTransition - Created" << G4endl; |
---|
[1315] | 90 | } |
---|
[1347] | 91 | G4VGammaTransition* gt = |
---|
| 92 | new G4ContinuumGammaTransition(_levelManager,Z,A,excitation,_verbose ); |
---|
[819] | 93 | |
---|
| 94 | return gt; |
---|
| 95 | } |
---|
| 96 | |
---|
| 97 | |
---|
[1315] | 98 | G4bool G4ContinuumGammaDeexcitation::CanDoTransition() |
---|
[819] | 99 | { |
---|
[1347] | 100 | //JMQ: far too small, creating sometimes continuum gammas instead |
---|
| 101 | // of the right discrete ones (when excitation energy is slightly |
---|
| 102 | // over maximum discrete energy): changed |
---|
[1315] | 103 | // G4double tolerance = 10*eV; |
---|
| 104 | const G4double tolerance = CLHEP::keV; |
---|
[819] | 105 | |
---|
| 106 | if (_transition == 0) |
---|
| 107 | { |
---|
[1315] | 108 | if (_verbose > 0) { |
---|
| 109 | G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Null transition " |
---|
| 110 | << G4endl; |
---|
| 111 | } |
---|
| 112 | return false; |
---|
[819] | 113 | } |
---|
| 114 | |
---|
[1315] | 115 | G4Fragment* nucleus = GetNucleus(); |
---|
| 116 | G4double excitation = nucleus->GetExcitationEnergy(); |
---|
[819] | 117 | |
---|
[1347] | 118 | if (_nucleusZ < 2 || _nucleusA < 3) |
---|
[819] | 119 | { |
---|
[1315] | 120 | if (_verbose > 1) { |
---|
| 121 | G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - n/p/H" |
---|
| 122 | << G4endl; |
---|
| 123 | } |
---|
| 124 | return false; |
---|
[819] | 125 | } |
---|
| 126 | |
---|
[1315] | 127 | if (excitation <= tolerance) |
---|
[819] | 128 | { |
---|
[1315] | 129 | if (_verbose > 1) { |
---|
| 130 | G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Excitation " |
---|
| 131 | << excitation/CLHEP::keV << " keV is too small" |
---|
| 132 | << G4endl; |
---|
| 133 | } |
---|
| 134 | return false; |
---|
[819] | 135 | } |
---|
[1315] | 136 | if (excitation <= (_levelManager->MaxLevelEnergy() + tolerance)) |
---|
| 137 | { |
---|
| 138 | if (_verbose > 0) { |
---|
| 139 | G4cout << "G4ContinuumGammaDeexcitation::CanDoTransition - Excitation " |
---|
| 140 | << excitation << " below max discrete level " |
---|
| 141 | << _levelManager->MaxLevelEnergy() << G4endl; |
---|
| 142 | } |
---|
| 143 | return false; |
---|
[819] | 144 | } |
---|
| 145 | |
---|
[1315] | 146 | if (_verbose > 1) { |
---|
| 147 | G4cout <<"G4ContinuumGammaDeexcitation::CanDoTransition - CanDo" |
---|
| 148 | << " Eex(keV)= " << excitation/CLHEP::keV |
---|
| 149 | << " Emax(keV)= " << _levelManager->MaxLevelEnergy()/CLHEP::keV |
---|
| 150 | << " Z= " << _nucleusZ << " A= " << _nucleusA |
---|
| 151 | << G4endl; |
---|
| 152 | } |
---|
| 153 | return true; |
---|
[819] | 154 | } |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | |
---|