Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VEmissionProbability Class Reference

#include <G4VEmissionProbability.hh>

+ Inheritance diagram for G4VEmissionProbability:

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 47 of file G4VEmissionProbability.hh.

Constructor & Destructor Documentation

◆ G4VEmissionProbability()

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;
50 emin = emax = eCoulomb = pProbability = probmax = 0.0;
51}
static G4NuclearLevelData * GetInstance()
static G4double GetNuclearMass(const G4double A, const G4double Z)
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4NuclearLevelData * pNuclearLevelData

◆ ~G4VEmissionProbability()

G4VEmissionProbability::~G4VEmissionProbability ( )
virtual

Definition at line 53 of file G4VEmissionProbability.cc.

54{}

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().

◆ GetA()

G4int G4VEmissionProbability::GetA ( void  ) const
inline

Definition at line 63 of file G4VEmissionProbability.hh.

63{ return theA; }

◆ GetProbability()

G4double G4VEmissionProbability::GetProbability ( ) const
inline

Definition at line 75 of file G4VEmissionProbability.hh.

75{ return pProbability; };

◆ GetRecoilExcitation()

G4double G4VEmissionProbability::GetRecoilExcitation ( ) const
inline

Definition at line 71 of file G4VEmissionProbability.hh.

71{ return fExcRes; };

◆ GetZ()

◆ Initialise()

void G4VEmissionProbability::Initialise ( )

Definition at line 56 of file G4VEmissionProbability.cc.

Referenced by G4EvaporationChannel::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;
121 y = ComputeProbability(xx, eCoulomb);
122 if(pVerbose > 2) {
123 G4cout << " " << i << ". E= " << x << " prob= " << y
124 << " Edel= " << edelta << G4endl;
125 }
126 probmax = std::max(probmax, y);
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}
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
virtual G4double ComputeProbability(G4double anEnergy, G4double CB)

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

◆ 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}

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;
168 g = ComputeProbability(ekin, eCoulomb);
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}
int G4int
Definition: G4Types.hh:85
virtual double flat()=0

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}
double A(double temperature)

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; };

Member Data Documentation

◆ OPTxs

G4int G4VEmissionProbability::OPTxs
protected

◆ pEvapMass

◆ pG4pow

◆ pMass

◆ pNuclearLevelData

◆ pProbability

◆ pResMass

◆ pVerbose

G4int G4VEmissionProbability::pVerbose
protected

Definition at line 90 of file G4VEmissionProbability.hh.

Referenced by Initialise(), IntegrateProbability(), and SampleEnergy().

◆ resA

◆ resZ

◆ theA

◆ theZ


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