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);
140 G4cout <<
"G4PhotonEvaporation::BreakUpChain RDM= " << fRDM <<
" "
144 if(fRDM) { fSampleTime =
false; }
145 else { fSampleTime =
true; }
148 gamma = GenerateGamma(nucleus);
150 products->push_back(gamma);
152 G4cout <<
"G4PhotonEvaporation::BreakUpChain: "
174 G4cout <<
"G4PhotonEvaporation::GetEmissionProbability: Z="
175 << Z <<
" A=" << A <<
" Eexc(MeV)= " << fExcEnergy <<
G4endl;
179 if(0 >= Z || 1 >= A || Z == A || Tolerance >= fExcEnergy)
180 {
return fProbability; }
186 static const G4float GREfactor = 5.0f;
187 if(fExcEnergy >= (
G4double)(GREfactor*GRWidth[A] + GREnergy[A])) {
199 if(0.0 == emax || fExcEnergy*eexcfac <= emax) { emax = fExcEnergy*eexcfac; }
206 G4cout <<
"Emax= " << emax <<
" Npoints= " << fPoints
207 <<
" Eex= " << fExcEnergy <<
G4endl;
214 G4double xsqr = std::sqrt(A*LevelDensity*fExcEnergy);
221 G4double p0 =
G4Exp(-2.0*xsqr)*gammaR2*gammaE2/(egdp2*egdp2 + gammaR2);
224 for(
G4int i=1; i<fPoints; ++i) {
227 gammaR2 = gammaE2*wres2;
228 egdp2 = gammaE2 - eres2;
229 p1 =
G4Exp(2.0*(std::sqrt(A*LevelDensity*std::abs(fExcEnergy - egam)) - xsqr))
230 *gammaR2*gammaE2/(egdp2*egdp2 + gammaR2);
231 fProbability += (p1 + p0);
232 fCummProbability[i] = fProbability;
240 fProbability *= fStep*NormC*
A;
241 if(fVerbose > 1) {
G4cout <<
"prob= " << fProbability <<
G4endl; }
249 InitialiseLevelManager(Z, A);
252 if(E > fLevelEnergyMax + Tolerance) { E =
energy; }
259 InitialiseLevelManager(Z, A);
260 return fLevelEnergyMax;
264 G4PhotonEvaporation::GenerateGamma(
G4Fragment* nucleus)
269 if(eexc <= Tolerance) {
return result; }
282 G4bool isDiscrete =
false;
287 if(fLevelManager && eexc <= fLevelEnergyMax + Tolerance) {
291 level = fLevelManager->
GetLevel(fIndex);
294 JP1 = fLevelManager->
SpinTwo(fIndex);
295 if(ntrans > 0) { isDiscrete =
true; }
298 level = fLevelManager->
GetLevel(fIndex);
300 JP1 = fLevelManager->
SpinTwo(fIndex);
301 if(ntrans > 0) { isDiscrete =
true; }
310 <<
" Exc= " << eexc <<
" Emax= "
311 << fLevelEnergyMax <<
" idx= " << fIndex
312 <<
" fCode= " << fCode <<
" fPoints= " << fPoints
313 <<
" Ntr= " << ntrans <<
" discrete: " << isDiscrete
314 <<
" fProb= " << fProbability <<
G4endl;
324 if(fCode != 1000*theZ + theA || eexc != fExcEnergy) {
327 if(fProbability == 0.0) {
return result; }
329 for(
G4int i=1; i<fPoints; ++i) {
331 if(y <= fCummProbability[i]) {
332 efinal = fStep*((i - 1) + (y - fCummProbability[i-1])
333 /(fCummProbability[i] - fCummProbability[i-1]));
338 if(fLevelManager && efinal <= fLevelEnergyMax + Tolerance) {
343 if(efinal >= eexc && 0 < fIndex) {
350 G4cout <<
"Continues emission efinal(MeV)= " << efinal <<
G4endl;
355 G4cout <<
"Discrete emission from level Index= " << fIndex
356 <<
" Elevel= " << fLevelManager->
LevelEnergy(fIndex)
357 <<
" RDM= " << fRDM <<
" ICM= " << fICM <<
G4endl;
359 if(0 == fIndex || !level) {
return result; }
364 if(!fRDM && ltime >= fMaxLifeTime) {
return result; }
372 G4cout <<
"Ntrans= " << ntrans <<
" idx= " << idx
373 <<
" ICM= " << fICM <<
G4endl;
382 rndm = (rndm - prob)/(1.0 - prob);
391 JP2 = fLevelManager->
SpinTwo(fIndex);
395 if(fSampleTime && ltime > 0.0) {
401 if(std::abs(efinal - eexc) <= Tolerance) {
return result; }
404 JP2, multiP, vShellNumber,
405 isDiscrete, isGamma);
410 G4cout <<
"Final level E= " << efinal <<
" time= " << time
411 <<
" idxFinal= " << fIndex <<
" isDiscrete: " << isDiscrete
412 <<
" isGamma: " << isGamma <<
" multiP= " << multiP
413 <<
" shell= " << vShellNumber <<
G4endl;
423 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 keV
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 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)