Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VEmissionProbability.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// Hadronic Process: Nuclear De-excitations
27// by V. Lara (Oct 1998)
28//
29// Modifications:
30// 28.10.2010 V.Ivanchenko defined members in constructor and cleaned up
31
33#include "G4NuclearLevelData.hh"
34#include "G4LevelManager.hh"
36#include "Randomize.hh"
37#include "G4Pow.hh"
38#include "G4Log.hh"
39#include "G4Exp.hh"
40
50
52{
53 G4DeexPrecoParameters* param = pNuclearLevelData->GetParameters();
54 pVerbose = param->GetVerbose();
55 fFD = param->GetDiscreteExcitationFlag();
56 fMaxLifeTime = param->GetMaxLifeTime();
59}
60
62{
63 InitialiseIntegrator(eps, 0.25, 1.25, de, 0.1*CLHEP::MeV, 2*CLHEP::MeV);
64}
65
70
75
77 G4double ehigh,
78 G4double cb)
79{
80 pProbability = 0.0;
81 if (elow >= ehigh) { return pProbability; }
82
83 eCoulomb = cb;
84 pProbability = ComputeIntegral(elow, ehigh);
85
86 if (pVerbose > 1) {
87 G4cout << "G4VEmissionProbability::IntegrateProbability Probability="
88 << pProbability << " Z=" << theZ << " A=" << theA << G4endl;
89 }
90 return pProbability;
91}
92
94{
95 G4double ekin = SampleValue();
96 G4double enew = FindRecoilExcitation(ekin);
97 if (pVerbose > 1) {
98 G4cout << "### G4VEmissionProbability::SampleEnergy: Efin(MeV)= "
99 << enew << " E=" << ekin << " Eexc=" << fExcRes << G4endl;
100 }
101 return enew;
102}
103
108
109G4double G4VEmissionProbability::FindRecoilExcitation(const G4double e)
110{
111 G4double mass = pEvapMass + fExc;
112
113 G4double m02 = pMass*pMass;
114 G4double m12 = mass*mass;
116 G4double mres = std::sqrt(m02 + m12 - 2.*pMass*(mass + e));
117
118 fExcRes = mres - pResMass;
119
120 if (pVerbose > 1) {
121 G4cout << "### FindRecoilExcitation for resZ= "
122 << resZ << " resA= " << resA
123 << " evaporated Z= " << theZ << " A= " << theA
124 << " Ekin= " << e << " Eexc= " << fExcRes << G4endl;
125 }
126
127 // residual nucleus is in the ground state
128 if(fExcRes < pTolerance) {
129 fExcRes = 0.0;
130 return std::max(0.5*(m02 + m12 - m22)/pMass - mass, 0.0);
131 }
132 if (!fFD) { return e; }
133
134 // select final state excitation
135 auto lManager = pNuclearLevelData->GetLevelManager(resZ, resA);
136 if(nullptr == lManager) { return e; }
137
138 // levels are not known
139 if(fExcRes > lManager->MaxLevelEnergy() + pTolerance) { return e; }
140
141 // find level
142 std::size_t idx = lManager->NearestLevelIndex(fExcRes);
143 auto level = lManager->GetLevel(idx);
144 G4double ltime = level->GetTimeGamma();
145 G4double elevel = lManager->LevelEnergy(idx);
146
147 G4double efinal = e;
148
149 // is possible to use level energy?
150 if ((idx <= 1 || std::abs(elevel - fExcRes) <= pWidth || ltime >= fMaxLifeTime) &&
151 (pMass >= mass + pResMass + elevel)) {
152 G4double massR = pResMass + elevel;
153 G4double mr2 = massR*massR;
154 fExcRes = elevel;
155 efinal = std::max(0.5*(m02 + m12 - mr2)/pMass - mass, 0.0);
156 }
157 return efinal;
158}
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
const G4double A[17]
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
G4bool GetDiscreteExcitationFlag() const
G4double GetNuclearLevelWidth() const
static G4NuclearLevelData * GetInstance()
static G4double GetNuclearMass(const G4double A, const G4double Z)
static G4Pow * GetInstance()
Definition G4Pow.cc:41
G4VEmissionProbability(G4int Z, G4int A)
G4double IntegrateProbability(G4double elow, G4double ehigh, G4double CB)
virtual G4double ComputeProbability(G4double anEnergy, G4double CB)
virtual G4double EmissionProbability(const G4Fragment &fragment, G4double anEnergy)
G4NuclearLevelData * pNuclearLevelData
G4double ProbabilityDensityFunction(G4double energy) override
void ResetIntegrator(G4double de, G4double eps)
G4double ComputeIntegral(const G4double emin, const G4double emax)
void InitialiseIntegrator(G4double accuracy, G4double fact1, G4double fact2, G4double de, G4double dmin, G4double dmax)