57 G4float G4PhotonEvaporation::GREnergy[] = {0.0f};
58 G4float G4PhotonEvaporation::GRWidth[] = {0.0f};
61 : fLevelManager(nullptr), fTransition(p), fVerbose(0), fPoints(0),
62 vShellNumber(-1), fIndex(0), fMaxLifeTime(
DBL_MAX),
63 fICM(false), fRDM(false), fSampleTime(true), isInitialised(false)
72 theA = theZ = fCode = 0;
73 fLevelEnergyMax = fStep = fExcEnergy = fProbability = 0.0;
76 if(0.0f == GREnergy[1]) {
78 static const G4float GRWfactor = 0.3f;
81 GRWidth[
A] = GRWfactor*GREnergy[
A];
93 if(isInitialised) {
return; }
97 G4cout <<
"### G4PhotonEvaporation is initialized " <<
this <<
G4endl;
111 if(fRDM) { fSampleTime =
false; }
112 else { fSampleTime =
true; }
116 G4cout <<
"G4PhotonEvaporation::EmittedFragment: RDM= " << fRDM <<
G4endl;
132 products->push_back(aNucleus);
141 G4cout <<
"G4PhotonEvaporation::BreakUpChain RDM= " << fRDM <<
" "
145 if(fRDM) { fSampleTime =
false; }
146 else { fSampleTime =
true; }
149 gamma = GenerateGamma(nucleus);
151 products->push_back(gamma);
153 G4cout <<
"G4PhotonEvaporation::BreakUpChain: "
175 G4cout <<
"G4PhotonEvaporation::GetEmissionProbability: Z="
176 << Z <<
" A=" << A <<
" Eexc(MeV)= " << fExcEnergy <<
G4endl;
180 if(0 >= Z || 1 >= A || Z == A || Tolerance >= fExcEnergy)
181 {
return fProbability; }
187 static const G4float GREfactor = 5.0f;
188 if(fExcEnergy >= (
G4double)(GREfactor*GRWidth[A] + GREnergy[A])) {
200 if(0.0 == emax || fExcEnergy*eexcfac <= emax) { emax = fExcEnergy*eexcfac; }
207 G4cout <<
"Emax= " << emax <<
" Npoints= " << fPoints
208 <<
" Eex= " << fExcEnergy <<
G4endl;
215 G4double xsqr = std::sqrt(A*LevelDensity*fExcEnergy);
222 G4double p0 =
G4Exp(-2.0*xsqr)*gammaR2*gammaE2/(egdp2*egdp2 + gammaR2);
225 for(
G4int i=1; i<fPoints; ++i) {
228 gammaR2 = gammaE2*wres2;
229 egdp2 = gammaE2 - eres2;
230 p1 =
G4Exp(2.0*(std::sqrt(A*LevelDensity*std::abs(fExcEnergy - egam)) - xsqr))
231 *gammaR2*gammaE2/(egdp2*egdp2 + gammaR2);
232 fProbability += (p1 + p0);
233 fCummProbability[i] = fProbability;
241 fProbability *= fStep*NormC*
A;
242 if(fVerbose > 1) {
G4cout <<
"prob= " << fProbability <<
G4endl; }
250 InitialiseLevelManager(Z, A);
253 if(E > fLevelEnergyMax + Tolerance) { E =
energy; }
260 InitialiseLevelManager(Z, A);
261 return fLevelEnergyMax;
265 G4PhotonEvaporation::GenerateGamma(
G4Fragment* nucleus)
270 if(eexc <= Tolerance) {
return result; }
283 G4bool isDiscrete =
false;
288 if(fLevelManager && eexc <= fLevelEnergyMax + Tolerance) {
292 level = fLevelManager->
GetLevel(fIndex);
295 JP1 = fLevelManager->
SpinTwo(fIndex);
296 if(ntrans > 0) { isDiscrete =
true; }
299 level = fLevelManager->
GetLevel(fIndex);
301 JP1 = fLevelManager->
SpinTwo(fIndex);
302 if(ntrans > 0) { isDiscrete =
true; }
311 <<
" Exc= " << eexc <<
" Emax= "
312 << fLevelEnergyMax <<
" idx= " << fIndex
313 <<
" fCode= " << fCode <<
" fPoints= " << fPoints
314 <<
" Ntr= " << ntrans <<
" discrete: " << isDiscrete
315 <<
" fProb= " << fProbability <<
G4endl;
325 if(fCode != 1000*theZ + theA || eexc != fExcEnergy) {
328 if(fProbability == 0.0) {
return result; }
330 for(
G4int i=1; i<fPoints; ++i) {
332 if(y <= fCummProbability[i]) {
333 efinal = fStep*((i - 1) + (y - fCummProbability[i-1])
334 /(fCummProbability[i] - fCummProbability[i-1]));
340 if(efinal < fLevelEnergyMax) {
345 if(efinal >= eexc && 0 < fIndex) {
354 efinal = fLevelEnergyMax;
359 G4cout <<
"Continues emission efinal(MeV)= " << efinal <<
G4endl;
364 G4cout <<
"Discrete emission from level Index= " << fIndex
365 <<
" Elevel= " << fLevelManager->
LevelEnergy(fIndex)
366 <<
" RDM= " << fRDM <<
" ICM= " << fICM <<
G4endl;
368 if(0 == fIndex || !level) {
return result; }
373 if(ltime < 0.0 || (!fRDM && ltime > fMaxLifeTime)) {
return result; }
380 G4cout <<
"Ntrans= " << ntrans <<
" idx= " << idx
381 <<
" ICM= " << fICM <<
G4endl;
390 rndm = (rndm - prob)/(1.0 - prob);
399 JP2 = fLevelManager->
SpinTwo(fIndex);
403 if(fSampleTime && ltime > 0.0) {
409 if(std::abs(efinal - eexc) <= Tolerance) {
return result; }
412 JP2, multiP, vShellNumber,
413 isDiscrete, isGamma);
418 if(efinal == 0.0 && fIndex > 0) {
424 G4cout <<
"Final level E= " << efinal <<
" time= " << time
425 <<
" idxFinal= " << fIndex <<
" isDiscrete: " << isDiscrete
426 <<
" isGamma: " << isGamma <<
" multiP= " << multiP
427 <<
" shell= " << vShellNumber <<
G4endl;
437 if(p != fTransition) {
G4double G4ParticleHPJENDLHEData::G4double result
virtual void SetICM(G4bool)
G4float GammaProbability(size_t idx) const
static G4Pow * GetInstance()
void SetMaxHalfLife(G4double)
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)
G4int SpinTwo(size_t i) const
virtual G4bool BreakUpChain(G4FragmentVector *theResult, G4Fragment *theNucleus) final
virtual void RDMForced(G4bool)
static constexpr double pi2
static constexpr double millibarn
static constexpr double hbarc
G4PhotonEvaporation(G4GammaTransition *ptr=nullptr)
G4float LifeTime(size_t i) const
virtual G4Fragment * EmittedFragment(G4Fragment *theNucleus) final
virtual void Initialise() final
G4double GetLevelDensity() const
const G4NucLevel * GetLevel(size_t i) const
G4float MixingRatio(size_t idx) const
G4double GetMaxLifeTime() const
void SetPolarizationFlag(G4bool val)
virtual G4double GetEmissionProbability(G4Fragment *theNucleus) final
G4bool CorrelatedGamma() const
G4float LevelEnergy(size_t i) const
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
G4double GetCreationTime() const
static constexpr double neutron_mass_c2
static constexpr double MeV
std::vector< G4Fragment * > G4FragmentVector
G4DeexPrecoParameters * GetParameters()
void SetGammaTransition(G4GammaTransition *)
G4double GetGroundStateMass() const
size_t SampleGammaTransition(G4double rndm) const
G4float NearestLevelEnergy(G4double energy, size_t index=0) const
size_t NearestLevelIndex(G4double energy, size_t index=0) const
static constexpr double eV
static const G4double emax
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
virtual G4Fragment * SampleTransition(G4Fragment *nucleus, G4double newExcEnergy, G4double mpRatio, G4int JP1, G4int JP2, G4int MP, G4int shell, G4bool isDiscrete, G4bool isGamma)
void SetCreationTime(G4double time)
size_t NumberOfTransitions() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double energy(const ThreeVector &p, const G4double m)
G4int FloatingLevel(size_t i) const
G4int TransitionType(size_t idx) const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
void SetFloatingLevelNumber(G4int value)
G4int SampleShell(size_t idx, G4double rndm) const
G4double powZ(G4int Z, G4double y) const
size_t FinalExcitationIndex(size_t idx) const
virtual G4double GetUpperLevelEnergy(G4int Z, G4int A) final
G4double ComputeGroundStateMass(G4int Z, G4int A) const
static G4NuclearLevelData * GetInstance()
G4double GetMinExcitation() const
G4double GetExcitationEnergy() const
virtual ~G4PhotonEvaporation()
virtual G4double GetFinalLevelEnergy(G4int Z, G4int A, G4double energy) final
void SetVerbose(G4int val)