Geant4-11
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4VEmissionProbability Class Reference

#include <G4VEmissionProbability.hh>

Inheritance diagram for G4VEmissionProbability:
G4EvaporationProbability G4FissionProbability G4GEMProbability G4GEMProbabilityVI G4AlphaEvaporationProbability G4DeuteronEvaporationProbability G4He3EvaporationProbability G4NeutronEvaporationProbability G4ProtonEvaporationProbability G4TritonEvaporationProbability G4AlphaGEMProbability G4B10GEMProbability G4B11GEMProbability G4B12GEMProbability G4B13GEMProbability G4B8GEMProbability G4Be10GEMProbability G4Be11GEMProbability G4Be12GEMProbability G4Be7GEMProbability G4Be9GEMProbability G4C10GEMProbability G4C11GEMProbability G4C12GEMProbability G4C13GEMProbability G4C14GEMProbability G4C15GEMProbability G4C16GEMProbability G4DeuteronGEMProbability G4F17GEMProbability G4F18GEMProbability G4F19GEMProbability G4F20GEMProbability G4F21GEMProbability G4He3GEMProbability G4He6GEMProbability G4He8GEMProbability G4Li6GEMProbability G4Li7GEMProbability G4Li8GEMProbability G4Li9GEMProbability G4Mg22GEMProbability G4Mg23GEMProbability G4Mg24GEMProbability G4Mg25GEMProbability G4Mg26GEMProbability G4Mg27GEMProbability G4Mg28GEMProbability G4N12GEMProbability G4N13GEMProbability G4N14GEMProbability G4N15GEMProbability G4N16GEMProbability G4N17GEMProbability G4Na21GEMProbability G4Na22GEMProbability G4Na23GEMProbability G4Na24GEMProbability G4Na25GEMProbability G4Ne18GEMProbability G4Ne19GEMProbability G4Ne20GEMProbability G4Ne21GEMProbability G4Ne22GEMProbability G4Ne23GEMProbability G4Ne24GEMProbability G4NeutronGEMProbability G4O14GEMProbability G4O15GEMProbability G4O16GEMProbability G4O17GEMProbability G4O18GEMProbability G4O19GEMProbability G4O20GEMProbability G4ProtonGEMProbability G4TritonGEMProbability

Public Member Functions

virtual G4double ComputeProbability (G4double anEnergy, G4double CB)
 
virtual G4double EmissionProbability (const G4Fragment &fragment, G4double anEnergy)
 
 G4VEmissionProbability (G4int Z, G4int A)
 
G4int GetA (void) const
 
G4double GetProbability () const
 
G4double GetRecoilExcitation () const
 
G4int GetZ (void) const
 
void Initialise ()
 
void ResetProbability ()
 
G4double SampleEnergy ()
 
void SetDecayKinematics (G4int Z, G4int A, G4double rmass, G4double fmass)
 
void SetEvapExcitation (G4double exc)
 
virtual ~G4VEmissionProbability ()
 

Protected Member Functions

G4double IntegrateProbability (G4double elow, G4double ehigh, G4double CB)
 
void ResetIntegrator (size_t nbin, G4double de, G4double eps)
 

Protected Attributes

G4int OPTxs
 
G4double pEvapMass
 
G4PowpG4pow
 
G4double pMass
 
G4NuclearLevelDatapNuclearLevelData
 
G4double pProbability
 
G4double pResMass
 
G4int pVerbose
 
G4int resA
 
G4int resZ
 
G4int theA
 
G4int theZ
 

Private Member Functions

G4double FindRecoilExcitation (G4double e)
 
 G4VEmissionProbability (const G4VEmissionProbability &right)
 
G4bool operator!= (const G4VEmissionProbability &right) const
 
const G4VEmissionProbabilityoperator= (const G4VEmissionProbability &right)
 
G4bool operator== (const G4VEmissionProbability &right) const
 

Private Attributes

G4double accuracy
 
G4double eCoulomb
 
G4double elimit
 
G4double emax
 
G4double emin
 
G4double fExc
 
G4double fExcRes
 
G4bool fFD
 
size_t length
 
size_t nbin
 
G4double probmax
 

Detailed Description

Definition at line 47 of file G4VEmissionProbability.hh.

Constructor & Destructor Documentation

◆ G4VEmissionProbability() [1/2]

G4VEmissionProbability::G4VEmissionProbability ( G4int  Z,
G4int  A 
)
explicit

Definition at line 39 of file G4VEmissionProbability.cc.

40 : OPTxs(3),pVerbose(1),theZ(Z),theA(A),resZ(0),resA(0),
41 pMass(0.0),pEvapMass(0.0),pResMass(0.0),fExc(0.0),fExcRes(0.0),
42 elimit(CLHEP::MeV),accuracy(0.02),fFD(false)
43{
47 // G4cout << "G4VEvaporationProbability: Z= " << theZ << " A= " << theA
48 // << " M(GeV)= " << pEvapMass/1000. << G4endl;
49 length = nbin = 0;
51}
const G4int Z[17]
const G4double A[17]
static G4NuclearLevelData * GetInstance()
static G4double GetNuclearMass(const G4double A, const G4double Z)
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4NuclearLevelData * pNuclearLevelData
static constexpr double MeV

References A, eCoulomb, emax, emin, G4Pow::GetInstance(), G4NuclearLevelData::GetInstance(), G4NucleiProperties::GetNuclearMass(), length, nbin, pEvapMass, pG4pow, pNuclearLevelData, pProbability, probmax, theA, and theZ.

◆ ~G4VEmissionProbability()

G4VEmissionProbability::~G4VEmissionProbability ( )
virtual

Definition at line 53 of file G4VEmissionProbability.cc.

54{}

◆ G4VEmissionProbability() [2/2]

G4VEmissionProbability::G4VEmissionProbability ( const G4VEmissionProbability right)
private

Member Function Documentation

◆ ComputeProbability()

G4double G4VEmissionProbability::ComputeProbability ( G4double  anEnergy,
G4double  CB 
)
virtual

Reimplemented in G4GEMProbabilityVI, and G4EvaporationProbability.

Definition at line 76 of file G4VEmissionProbability.cc.

77{
78 return 0.0;
79}

Referenced by IntegrateProbability(), and SampleEnergy().

◆ EmissionProbability()

G4double G4VEmissionProbability::EmissionProbability ( const G4Fragment fragment,
G4double  anEnergy 
)
virtual

Reimplemented in G4FissionProbability, and G4GEMProbability.

Definition at line 71 of file G4VEmissionProbability.cc.

72{
73 return 0.0;
74}

Referenced by G4CompetitiveFission::GetEmissionProbability().

◆ FindRecoilExcitation()

G4double G4VEmissionProbability::FindRecoilExcitation ( G4double  e)
private

Definition at line 187 of file G4VEmissionProbability.cc.

188{
189 fExcRes = 0.0;
190 G4double mass = pEvapMass + fExc;
191 // abnormal case - should never happens
192 if(pMass < mass + pResMass) { return 0.0; }
193
194 G4double m02 = pMass*pMass;
195 G4double m12 = mass*mass;
197 G4double mres = std::sqrt(m02 + m12 - 2.*pMass*(mass + e));
198
199 fExcRes = mres - pResMass;
200 const G4double tolerance = 0.1*CLHEP::keV;
201
202 if(pVerbose > 1) {
203 G4cout << "### G4VEmissionProbability::FindRecoilExcitation for resZ= "
204 << resZ << " resA= " << resA
205 << " evaporated Z= " << theZ << " A= " << theA
206 << " Ekin= " << e << " Eexc= " << fExcRes << G4endl;
207 }
208
209 // residual nucleus is in the ground state
210 if(fExcRes < tolerance) {
211 fExcRes = 0.0;
212 //G4cout<<"Ground state Ekin= "<< 0.5*(m02 + m12 - m22)/pMass - mass<<G4endl;
213 return std::max(0.5*(m02 + m12 - m22)/pMass - mass,0.0);
214 }
215 // select final state excitation
216 auto lManager = pNuclearLevelData->GetLevelManager(resZ, resA);
217 if(!lManager) { return e; }
218
219 //G4cout<<"ExcMax= "<< lManager->MaxLevelEnergy()<<" CB= "<<eCoulomb<<G4endl;
220 // levels are not known
221 if(fExcRes > lManager->MaxLevelEnergy() + tolerance) { return e; }
222
223 // find level
224 auto idx = lManager->NearestLevelIndex(fExcRes);
225 //G4cout << "idx= " << idx << " Exc= " << fExcRes
226 // << " Elevel= " << lManager->LevelEnergy(idx) << G4endl;
227 for(; idx > 0; --idx) {
228 fExcRes = lManager->LevelEnergy(idx);
229 // excited level
230 if(pMass > mass + pResMass + fExcRes && lManager->FloatingLevel(idx) == 0) {
231 G4double massR = pResMass + fExcRes;
232 G4double mr2 = massR*massR;
233 //G4cout << "Result idx= " << idx << " Eexc= " << fExcRes
234 // << " Ekin= " << 0.5*(m02 + m12 - mr2)/pMass - mass << G4endl;
235 return std::max(0.5*(m02 + m12 - mr2)/pMass - mass,0.0);
236 }
237 }
238 // ground level
239 fExcRes = 0.0;
240 //G4cout << "Ground state Ekin= " << 0.5*(m02 + m12 - m22)/pMass - mass << G4endl;
241 return std::max(0.5*(m02 + m12 - m22)/pMass - mass,0.0);
242}
double G4double
Definition: G4Types.hh:83
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
size_t NearestLevelIndex(G4double energy, size_t index=0) const
const G4LevelManager * GetLevelManager(G4int Z, G4int A)
static constexpr double keV
T max(const T t1, const T t2)
brief Return the largest of the two arguments

References fExc, fExcRes, G4cout, G4endl, G4NuclearLevelData::GetLevelManager(), CLHEP::keV, G4INCL::Math::max(), G4LevelManager::NearestLevelIndex(), pEvapMass, pMass, pNuclearLevelData, pResMass, pVerbose, resA, resZ, theA, and theZ.

Referenced by SampleEnergy().

◆ GetA()

G4int G4VEmissionProbability::GetA ( void  ) const
inline

Definition at line 63 of file G4VEmissionProbability.hh.

63{ return theA; }

References theA.

◆ GetProbability()

G4double G4VEmissionProbability::GetProbability ( ) const
inline

Definition at line 75 of file G4VEmissionProbability.hh.

75{ return pProbability; };

References pProbability.

◆ GetRecoilExcitation()

G4double G4VEmissionProbability::GetRecoilExcitation ( ) const
inline

Definition at line 71 of file G4VEmissionProbability.hh.

71{ return fExcRes; };

References fExcRes.

◆ GetZ()

G4int G4VEmissionProbability::GetZ ( void  ) const
inline

◆ Initialise()

void G4VEmissionProbability::Initialise ( )

◆ IntegrateProbability()

G4double G4VEmissionProbability::IntegrateProbability ( G4double  elow,
G4double  ehigh,
G4double  CB 
)
protected

Definition at line 81 of file G4VEmissionProbability.cc.

84{
85 pProbability = 0.0;
86 if(elow >= ehigh) { return pProbability; }
87
88 emin = elow;
89 emax = ehigh;
90 eCoulomb = cb;
91
92 G4double edelta = elimit;
93 nbin = (size_t)((emax - emin)/edelta) + 1;
94 const G4double edeltamin = 0.2*CLHEP::MeV;
95 const G4double edeltamax = 2*CLHEP::MeV;
96 if(nbin < 4) {
97 nbin = 4;
98 edelta = (emax - emin)/(G4double)nbin;
99 } else if(nbin > length) {
100 nbin = length;
101 }
102
103 G4double x(emin), del, y;
104 G4double edelmicro= edelta*0.02;
105 probmax = ComputeProbability(x + edelmicro, eCoulomb);
106 G4double problast = probmax;
107 if(pVerbose > 2) {
108 G4cout << "### G4VEmissionProbability::IntegrateProbability: "
109 << " Emax= " << emax << " QB= " << cb << " nbin= " << nbin
110 << G4endl;
111 G4cout << " 0. E= " << emin << " prob= " << probmax << G4endl;
112 }
113 for(size_t i=1; i<=nbin; ++i) {
114 x += edelta;
115 if(x > emax) {
116 edelta += (emax - x);
117 x = emax;
118 }
119 G4bool endpoint = (std::abs(x - emax) < edelmicro) ? true : false;
120 G4double xx = endpoint ? x - edelmicro : x;
122 if(pVerbose > 2) {
123 G4cout << " " << i << ". E= " << x << " prob= " << y
124 << " Edel= " << edelta << G4endl;
125 }
127 del = (y + problast)*edelta*0.5;
128 pProbability += del;
129 // end of the loop
130 if(del < accuracy*pProbability || endpoint) { break; }
131 problast = y;
132
133 // smart step definition
134 if(del != pProbability && del > 0.8*pProbability &&
135 0.7*edelta > edeltamin) {
136 edelta *= 0.7;
137 } else if(del < 0.1*pProbability && 1.5*edelta < edeltamax) {
138 edelta *= 1.5;
139 }
140 }
141
142 if(pVerbose > 1) {
143 G4cout << " Probability= " << pProbability << " probmax= "
144 << probmax << G4endl;
145 }
146 return pProbability;
147}
bool G4bool
Definition: G4Types.hh:86
virtual G4double ComputeProbability(G4double anEnergy, G4double CB)

References accuracy, ComputeProbability(), eCoulomb, elimit, emax, emin, G4cout, G4endl, length, G4INCL::Math::max(), CLHEP::MeV, nbin, pProbability, probmax, and pVerbose.

Referenced by G4GEMProbabilityVI::ComputeTotalProbability(), and G4EvaporationProbability::TotalProbability().

◆ operator!=()

G4bool G4VEmissionProbability::operator!= ( const G4VEmissionProbability right) const
private

◆ operator=()

const G4VEmissionProbability & G4VEmissionProbability::operator= ( const G4VEmissionProbability right)
private

◆ operator==()

G4bool G4VEmissionProbability::operator== ( const G4VEmissionProbability right) const
private

◆ ResetIntegrator()

void G4VEmissionProbability::ResetIntegrator ( size_t  nbin,
G4double  de,
G4double  eps 
)
protected

Definition at line 64 of file G4VEmissionProbability.cc.

65{
66 if(nbins > 0) { length = nbins; }
67 if(de > 0.0) { elimit = de; }
68 if(eps > 0.0) { accuracy = eps; }
69}
static const G4double eps

References accuracy, elimit, eps, and length.

Referenced by G4EvaporationProbability::G4EvaporationProbability(), and G4GEMProbabilityVI::G4GEMProbabilityVI().

◆ ResetProbability()

void G4VEmissionProbability::ResetProbability ( )
inline

◆ SampleEnergy()

G4double G4VEmissionProbability::SampleEnergy ( )

Definition at line 149 of file G4VEmissionProbability.cc.

150{
151 static const G4double fact = 1.05;
152 probmax *= fact;
153
154 if(pVerbose > 1) {
155 G4cout << "### G4VEmissionProbability::SampleEnergy: "
156 << " Emin= " << emin << " Emax= " << emax
157 << " probmax= " << probmax << G4endl;
158 }
159
160 CLHEP::HepRandomEngine* rndm = G4Random::getTheEngine();
161 const G4int nmax = 100;
162 G4double del = emax - emin;
163 G4double ekin, g;
164 G4int n = 0;
165 do {
166 ekin = del*rndm->flat() + emin;
167 ++n;
169 if(pVerbose > 2) {
170 G4cout << " " << n
171 << ". prob= " << g << " probmax= " << probmax
172 << " Ekin= " << ekin << G4endl;
173 }
174 if((g > probmax || n > nmax) && pVerbose > 1) {
175 G4cout << "### G4VEmissionProbability::SampleEnergy for Z= " << theZ
176 << " A= " << theA
177 << "\n Warning n= " << n
178 << " prob/probmax= " << g/probmax
179 << " prob= " << g << " probmax= " << probmax
180 << "\n Ekin= " << ekin << " Emin= " << emin
181 << " Emax= " << emax << G4endl;
182 }
183 } while(probmax*rndm->flat() > g && n < nmax);
184 return (fFD) ? FindRecoilExcitation(ekin) : ekin;
185}
static constexpr double g
Definition: G4SIunits.hh:168
int G4int
Definition: G4Types.hh:85
virtual double flat()=0
G4double FindRecoilExcitation(G4double e)

References ComputeProbability(), eCoulomb, emax, emin, fFD, FindRecoilExcitation(), CLHEP::HepRandomEngine::flat(), g, G4cout, G4endl, CLHEP::detail::n, probmax, pVerbose, theA, and theZ.

Referenced by G4EvaporationChannel::EmittedFragment(), G4GEMProbabilityVI::SampleEvaporationFragment(), and G4EvaporationProbability::SampleKineticEnergy().

◆ SetDecayKinematics()

void G4VEmissionProbability::SetDecayKinematics ( G4int  Z,
G4int  A,
G4double  rmass,
G4double  fmass 
)
inline

Definition at line 131 of file G4VEmissionProbability.hh.

133{
134 resZ = Z;
135 resA = A;
136 pMass = fmass;
137 pResMass = rmass;
138}

References A, pMass, pResMass, resA, resZ, and Z.

Referenced by G4EvaporationChannel::GetEmissionProbability(), and G4GEMChannelVI::GetEmissionProbability().

◆ SetEvapExcitation()

void G4VEmissionProbability::SetEvapExcitation ( G4double  exc)
inline

Definition at line 73 of file G4VEmissionProbability.hh.

73{ fExc = exc; };

References fExc.

Field Documentation

◆ accuracy

G4double G4VEmissionProbability::accuracy
private

Definition at line 124 of file G4VEmissionProbability.hh.

Referenced by IntegrateProbability(), and ResetIntegrator().

◆ eCoulomb

G4double G4VEmissionProbability::eCoulomb
private

◆ elimit

G4double G4VEmissionProbability::elimit
private

Definition at line 122 of file G4VEmissionProbability.hh.

Referenced by IntegrateProbability(), and ResetIntegrator().

◆ emax

G4double G4VEmissionProbability::emax
private

◆ emin

G4double G4VEmissionProbability::emin
private

◆ fExc

G4double G4VEmissionProbability::fExc
private

Definition at line 117 of file G4VEmissionProbability.hh.

Referenced by FindRecoilExcitation(), and SetEvapExcitation().

◆ fExcRes

G4double G4VEmissionProbability::fExcRes
private

Definition at line 118 of file G4VEmissionProbability.hh.

Referenced by FindRecoilExcitation(), and GetRecoilExcitation().

◆ fFD

G4bool G4VEmissionProbability::fFD
private

Definition at line 127 of file G4VEmissionProbability.hh.

Referenced by Initialise(), and SampleEnergy().

◆ length

size_t G4VEmissionProbability::length
private

◆ nbin

size_t G4VEmissionProbability::nbin
private

Definition at line 115 of file G4VEmissionProbability.hh.

Referenced by G4VEmissionProbability(), and IntegrateProbability().

◆ OPTxs

G4int G4VEmissionProbability::OPTxs
protected

◆ pEvapMass

G4double G4VEmissionProbability::pEvapMass
protected

◆ pG4pow

G4Pow* G4VEmissionProbability::pG4pow
protected

◆ pMass

G4double G4VEmissionProbability::pMass
protected

◆ pNuclearLevelData

G4NuclearLevelData* G4VEmissionProbability::pNuclearLevelData
protected

◆ pProbability

G4double G4VEmissionProbability::pProbability
protected

◆ pResMass

G4double G4VEmissionProbability::pResMass
protected

◆ probmax

G4double G4VEmissionProbability::probmax
private

◆ pVerbose

G4int G4VEmissionProbability::pVerbose
protected

◆ resA

G4int G4VEmissionProbability::resA
protected

◆ resZ

G4int G4VEmissionProbability::resZ
protected

◆ theA

G4int G4VEmissionProbability::theA
protected

◆ theZ

G4int G4VEmissionProbability::theZ
protected

The documentation for this class was generated from the following files: