56G4float G4PhotonEvaporation::GREnergy[] = {0.0f};
57G4float G4PhotonEvaporation::GRWidth[] = {0.0f};
64 : fLevelManager(nullptr), fTransition(p), fPolarization(nullptr),
65 fVerbose(1), fPoints(0), vShellNumber(-1), fIndex(0),
67 fICM(true), fRDM(false), fSampleTime(true),
68 fCorrelatedGamma(false), fIsomerFlag(false), isInitialised(false)
72 Tolerance = 20*CLHEP::eV;
76 theA = theZ = fCode = 0;
77 fLevelEnergyMax = fStep = fExcEnergy = fProbability = 0.0;
80 if(0.0f == GREnergy[1]) { InitialiseGRData(); }
90 if(isInitialised) {
return; }
99 if(fRDM) { fIsomerFlag =
true; }
106 G4cout <<
"### G4PhotonEvaporation is initialized " <<
this <<
G4endl;
110void G4PhotonEvaporation::InitialiseGRData()
112#ifdef G4MULTITHREADED
113 G4MUTEXLOCK(&G4PhotonEvaporation::PhotonEvaporationMutex);
115 if(0.0f == GREnergy[1]) {
117 const G4float GRWfactor = 0.3f;
119 GREnergy[
A] = (
G4float)(40.3*CLHEP::MeV/g4calc->
powZ(A,0.2));
120 GRWidth[
A] = GRWfactor*GREnergy[
A];
123#ifdef G4MULTITHREADED
132 fSampleTime = (fRDM) ?
false :
true;
137 if(fCorrelatedGamma && fRDM) {
149 G4cout <<
"G4PhotonEvaporation::EmittedFragment: "
151 if(fPolarization) {
G4cout <<
"NucPolar: " << fPolarization <<
G4endl; }
152 G4cout <<
" CorrGamma: " << fCorrelatedGamma <<
" RDM: " << fRDM
153 <<
" fPolarization: " << fPolarization <<
G4endl;
158 if(fNucPStore && fPolarization && 0 == fIndex) {
160 G4cout <<
"G4PhotonEvaporation::EmittedFragment: remove "
161 << fPolarization <<
G4endl;
163 fNucPStore->
RemoveMe(fPolarization);
164 fPolarization =
nullptr;
169 G4cout <<
"G4PhotonEvaporation::EmittedFragment: RDM= "
170 << fRDM <<
" done:" <<
G4endl;
186 products->push_back(aNucleus);
195 G4cout <<
"G4PhotonEvaporation::BreakUpChain RDM= " << fRDM <<
" "
199 fSampleTime = (fRDM) ?
false :
true;
202 if(fCorrelatedGamma) {
210 gamma = GenerateGamma(nucleus);
212 products->push_back(gamma);
214 G4cout <<
"G4PhotonEvaporation::BreakUpChain: "
226 delete fPolarization;
227 fPolarization =
nullptr;
243 G4cout <<
"G4PhotonEvaporation::GetEmissionProbability: Z="
244 << Z <<
" A=" <<
A <<
" Eexc(MeV)= " << fExcEnergy <<
G4endl;
248 if(0 >= Z || 1 >=
A || Z ==
A || Tolerance >= fExcEnergy)
249 {
return fProbability; }
255 static const G4float GREfactor = 5.0f;
256 if(fExcEnergy >= (
G4double)(GREfactor*GRWidth[
A] + GREnergy[
A])) {
266 emax = std::min(emax, fExcEnergy);
268 if(0.0 == emax || fExcEnergy*eexcfac <= emax) { emax = fExcEnergy*eexcfac; }
271 const G4double MaxDeltaEnergy = CLHEP::MeV;
275 G4cout <<
"Emax= " << emax <<
" Npoints= " << fPoints
276 <<
" Eex= " << fExcEnergy <<
G4endl;
284 G4double xsqr = std::sqrt(levelDensity*fExcEnergy);
291 G4double p0 =
G4Exp(-2.0*xsqr)*gammaR2*gammaE2/(egdp2*egdp2 + gammaR2);
294 for(
G4int i=1; i<fPoints; ++i) {
297 gammaR2 = gammaE2*wres2;
298 egdp2 = gammaE2 - eres2;
299 p1 =
G4Exp(2.0*(std::sqrt(levelDensity*std::abs(fExcEnergy - egam)) - xsqr))
300 *gammaR2*gammaE2/(egdp2*egdp2 + gammaR2);
301 fProbability += (p1 + p0);
302 fCummProbability[i] = fProbability;
304 G4cout <<
"Egamma= " << egam <<
" Eex= " << fExcEnergy
305 <<
" p0= " << p0 <<
" p1= " << p1 <<
" sum= "
306 << fCummProbability[i] <<
G4endl;
311 static const G4double NormC = 1.25*CLHEP::millibarn
312 /(CLHEP::pi2*CLHEP::hbarc*CLHEP::hbarc);
313 fProbability *= fStep*NormC*
A;
314 if(fVerbose > 1) {
G4cout <<
"prob= " << fProbability <<
G4endl; }
322 InitialiseLevelManager(Z,
A);
325 if(E > fLevelEnergyMax + Tolerance) { E = energy; }
332 InitialiseLevelManager(Z,
A);
333 return fLevelEnergyMax;
337G4PhotonEvaporation::GenerateGamma(
G4Fragment* nucleus)
342 if(eexc <= Tolerance) {
return result; }
355 G4bool isDiscrete =
false;
361 G4cout <<
"GenerateGamma: " <<
" Eex= " << eexc
362 <<
" Eexmax= " << fLevelEnergyMax <<
G4endl;
365 if(fLevelManager && eexc <= fLevelEnergyMax + Tolerance) {
368 if(0 == fIndex && eexc >= Tolerance
372 G4cout <<
" index= " << fIndex
377 level = fLevelManager->
GetLevel(fIndex);
380 JP1 = fLevelManager->
SpinTwo(fIndex);
382 G4cout <<
" ntrans= " << ntrans <<
" JP= " << JP1
383 <<
" RDM: " << fRDM <<
G4endl;
385 if(0 == ntrans && fLevelManager->
FloatingLevel(fIndex) > 0) {
387 level = fLevelManager->
GetLevel(fIndex);
389 JP1 = fLevelManager->
SpinTwo(fIndex);
398 <<
" Exc= " << eexc <<
" Emax= "
399 << fLevelEnergyMax <<
" idx= " << fIndex
400 <<
" fCode= " << fCode <<
" fPoints= " << fPoints
401 <<
" Ntr= " << ntrans <<
" discrete: " << isDiscrete
402 <<
" fProb= " << fProbability <<
G4endl;
410 if(fCode != 1000*theZ + theA || eexc != fExcEnergy) {
413 if(fProbability == 0.0) {
418 for(
G4int i=1; i<fPoints; ++i) {
420 G4cout <<
"y= " << y <<
" cummProb= " << fCummProbability[i]
421 <<
" fPoints= " << fPoints <<
" fStep= " << fStep <<
G4endl;
423 if(y <= fCummProbability[i]) {
424 efinal = fStep*((i - 1) + (y - fCummProbability[i-1])
425 /(fCummProbability[i] - fCummProbability[i-1]));
432 G4cout <<
"Continues proposes Efinal= " << efinal <<
G4endl;
435 if(efinal < fLevelEnergyMax) {
439 if(efinal >= eexc && 0 < fIndex) {
448 efinal = fLevelEnergyMax;
453 G4cout <<
"Continues emission efinal(MeV)= " << efinal <<
G4endl;
456 }
else if(0 == fIndex) {
463 G4cout <<
"Discrete emission from level Index= " << fIndex
464 <<
" Elevel= " << fLevelManager->
LevelEnergy(fIndex)
465 <<
" Ltime= " << fLevelManager->
LifeTime(fIndex)
466 <<
" LtimeMax= " << fMaxLifeTime
467 <<
" RDM= " << fRDM <<
" ICM= " << fICM <<
G4endl;
473 if(ltime < 0.0 || (!fRDM && ltime > fMaxLifeTime)) {
return result; }
477 G4int ii = fIndex - 1;
489 G4cout <<
"Ntrans= " << ntrans <<
" idx= " << idx
490 <<
" ICM= " << fICM <<
" JP1= " << JP1 <<
G4endl;
494 if(fICM && prob < 1.0) {
498 rndm = (rndm - prob)/(1.0 - prob);
507 JP2 = fLevelManager->
SpinTwo(fIndex);
513 if(fSampleTime && fIsomerFlag && ltime > 0.0) {
519 if(std::abs(efinal - eexc) <= Tolerance) {
return result; }
522 JP2, multiP, vShellNumber,
523 isDiscrete, isGamma);
532 if(efinal == 0.0 && fIndex > 0) {
538 G4cout <<
"Final level E= " << efinal <<
" time= " << time
539 <<
" idxFinal= " << fIndex <<
" isDiscrete: " << isDiscrete
540 <<
" isGamma: " << isGamma <<
" multiP= " << multiP
541 <<
" shell= " << vShellNumber
542 <<
" JP1= " << JP1 <<
" JP2= " << JP2 <<
G4endl;
549 if(p != fTransition) {
double A(double temperature)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
std::vector< G4Fragment * > G4FragmentVector
G4double G4Log(G4double x)
#define G4MUTEX_INITIALIZER
#define G4MUTEXLOCK(mutex)
#define G4MUTEXUNLOCK(mutex)
G4GLOB_DLL std::ostream G4cout
G4bool CorrelatedGamma() const
G4double GetMaxLifeTime() const
G4bool IsomerProduction() const
G4double GetMinExcitation() const
G4bool GetInternalConversionFlag() const
void SetFloatingLevelNumber(G4int value)
G4double GetGroundStateMass() const
G4NuclearPolarization * GetNuclearPolarization() const
G4double GetExcitationEnergy() const
G4double GetCreationTime() const
void SetNuclearPolarization(G4NuclearPolarization *)
void SetCreationTime(G4double time)
G4double ComputeGroundStateMass(G4int Z, G4int A) const
void SetSpin(G4double value)
void SetPolarizationFlag(G4bool val)
void SetTwoJMAX(G4int val)
void SetVerbose(G4int val)
virtual G4Fragment * SampleTransition(G4Fragment *nucleus, G4double newExcEnergy, G4double mpRatio, G4int JP1, G4int JP2, G4int MP, G4int shell, G4bool isDiscrete, G4bool isGamma)
G4double LifeTime(size_t i) const
const G4NucLevel * GetLevel(size_t i) const
size_t NearestLevelIndex(G4double energy, size_t index=0) const
G4double NearestLevelEnergy(G4double energy, size_t index=0) const
G4int FloatingLevel(size_t i) const
G4int SpinTwo(size_t i) const
size_t NumberOfTransitions() const
G4double LevelEnergy(size_t i) const
G4int TransitionType(size_t idx) const
G4float MultipolarityRatio(size_t idx) const
G4float GammaProbability(size_t idx) const
size_t NumberOfTransitions() const
size_t FinalExcitationIndex(size_t idx) const
size_t SampleGammaTransition(G4double rndm) const
G4int SampleShell(size_t idx, G4double rndm) const
G4double GetLevelDensity(G4int Z, G4int A, G4double U)
G4DeexPrecoParameters * GetParameters()
static G4NuclearLevelData * GetInstance()
static G4NuclearPolarizationStore * GetInstance()
void RemoveMe(G4NuclearPolarization *ptr)
G4NuclearPolarization * FindOrBuild(G4int Z, G4int A, G4double Eexc)
void SetExcitationEnergy(G4double val)
virtual G4double GetFinalLevelEnergy(G4int Z, G4int A, G4double energy) final
virtual G4Fragment * EmittedFragment(G4Fragment *theNucleus) final
virtual G4double GetEmissionProbability(G4Fragment *theNucleus) final
virtual void Initialise() final
virtual void SetICM(G4bool)
virtual ~G4PhotonEvaporation()
virtual G4double GetUpperLevelEnergy(G4int Z, G4int A) final
void SetGammaTransition(G4GammaTransition *)
G4PhotonEvaporation(G4GammaTransition *ptr=nullptr)
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)
virtual void RDMForced(G4bool)
virtual G4bool BreakUpChain(G4FragmentVector *theResult, G4Fragment *theNucleus) final
static G4Pow * GetInstance()
G4double powZ(G4int Z, G4double y) const