60G4float G4PhotonEvaporation::GREnergy[] = {0.0f};
61G4float G4PhotonEvaporation::GRWidth[] = {0.0f};
64 : fLevelManager(nullptr), fTransition(p), fPolarization(nullptr),
65 fVerbose(1), fPoints(0), vShellNumber(-1), fIndex(0), fSecID(-1),
67 fICM(true), fRDM(false), fSampleTime(true),
68 fCorrelatedGamma(false), isInitialised(false)
72 fTolerance = 20*CLHEP::eV;
76 theA = theZ = fCode = 0;
78 fLevelEnergyMax = fStep = fExcEnergy = fProbability = 0.0;
81 if(0.0f == GREnergy[1]) { InitialiseGRData(); }
91 if(isInitialised) {
return; }
105 G4cout <<
"### G4PhotonEvaporation is initialized " <<
this <<
G4endl;
109void G4PhotonEvaporation::InitialiseGRData()
111 if(0.0f == GREnergy[1]) {
113 if(0.0f == GREnergy[1]) {
115 const G4float GRWfactor = 0.3f;
117 GREnergy[
A] = (
G4float)(40.3*CLHEP::MeV/g4calc->
powZ(
A,0.2));
118 GRWidth[
A] = GRWfactor*GREnergy[
A];
134 if(fCorrelatedGamma && fRDM) {
137 if(
nullptr != nucp) {
146 G4cout <<
"G4PhotonEvaporation::EmittedFragment: "
148 if(fPolarization) {
G4cout <<
"NucPolar: " << fPolarization <<
G4endl; }
149 G4cout <<
" CorrGamma: " << fCorrelatedGamma <<
" RDM: " << fRDM
150 <<
" fPolarization: " << fPolarization <<
G4endl;
157 if(fNucPStore && fPolarization && 0 == fIndex) {
159 G4cout <<
"G4PhotonEvaporation::EmittedFragment: remove "
160 << fPolarization <<
G4endl;
162 fNucPStore->
RemoveMe(fPolarization);
163 fPolarization =
nullptr;
168 G4cout <<
"G4PhotonEvaporation::EmittedFragment: RDM= "
169 << fRDM <<
" done:" <<
G4endl;
186 products->push_back(aNucleus);
195 G4cout <<
"G4PhotonEvaporation::BreakUpChain RDM= " << fRDM <<
" "
202 if(fCorrelatedGamma) {
210 gamma = GenerateGamma(nucleus);
213 products->push_back(gamma);
215 G4cout <<
"G4PhotonEvaporation::BreakUpChain: "
226 if(
nullptr != fPolarization) {
227 delete fPolarization;
228 fPolarization =
nullptr;
244 G4cout <<
"G4PhotonEvaporation::GetEmissionProbability: Z="
245 <<
Z <<
" A=" <<
A <<
" Eexc(MeV)= " << fExcEnergy <<
G4endl;
249 if(0 >=
Z || 1 >=
A ||
Z ==
A || fTolerance >= fExcEnergy)
250 {
return fProbability; }
256 static const G4float GREfactor = 5.0f;
257 if(fExcEnergy >= (
G4double)(GREfactor*GRWidth[
A] + GREnergy[
A])) {
267 emax = std::min(emax, fExcEnergy);
269 if(0.0 == emax || fExcEnergy*eexcfac <= emax) { emax = fExcEnergy*eexcfac; }
272 const G4double MaxDeltaEnergy = CLHEP::MeV;
276 G4cout <<
"Emax= " << emax <<
" Npoints= " << fPoints
277 <<
" Eex= " << fExcEnergy <<
G4endl;
285 G4double xsqr = std::sqrt(levelDensity*fExcEnergy);
292 G4double p0 =
G4Exp(-2.0*xsqr)*gammaR2*gammaE2/(egdp2*egdp2 + gammaR2);
295 for(
G4int i=1; i<fPoints; ++i) {
298 gammaR2 = gammaE2*wres2;
299 egdp2 = gammaE2 - eres2;
300 p1 =
G4Exp(2.0*(std::sqrt(levelDensity*std::abs(fExcEnergy - egam)) - xsqr))
301 *gammaR2*gammaE2/(egdp2*egdp2 + gammaR2);
302 fProbability += (p1 + p0);
303 fCummProbability[i] = fProbability;
305 G4cout <<
"Egamma= " << egam <<
" Eex= " << fExcEnergy
306 <<
" p0= " << p0 <<
" p1= " << p1 <<
" sum= "
307 << fCummProbability[i] <<
G4endl;
312 static const G4double NormC = 1.25*CLHEP::millibarn
313 /(CLHEP::pi2*CLHEP::hbarc*CLHEP::hbarc);
314 fProbability *= fStep*NormC*
A;
315 if(fVerbose > 1) {
G4cout <<
"prob= " << fProbability <<
G4endl; }
335 InitialiseLevelManager(
Z,
A);
338 if(E > fLevelEnergyMax + fTolerance) { E = energy; }
345 InitialiseLevelManager(
Z,
A);
346 return fLevelEnergyMax;
350G4PhotonEvaporation::GenerateGamma(
G4Fragment* nucleus)
355 if(eexc <= fTolerance) {
return result; }
369 G4bool isDiscrete =
false;
372 std::size_t ntrans = 0;
375 G4cout <<
"GenerateGamma: " <<
" Eex= " << eexc
376 <<
" Eexmax= " << fLevelEnergyMax <<
G4endl;
379 if(
nullptr != fLevelManager && eexc <= fLevelEnergyMax + fTolerance) {
382 isDiscrete = (std::abs(elevel - eexc) < fTolerance);
384 G4cout <<
" index= " << fIndex
387 if(isDiscrete && 0 < fIndex) {
389 level = fLevelManager->
GetLevel(fIndex);
390 if(
nullptr != level) {
392 G4cout <<
" ntrans= " << ntrans <<
" JP= " << JP1
393 <<
" RDM: " << fRDM <<
G4endl;
397 if(fLevelManager->
FloatingLevel(fIndex) > 0 && 0 == ntrans &&
398 std::abs(elevel - fLevelManager->
LevelEnergy(fIndex-1)) < fTolerance) {
399 auto newlevel = fLevelManager->
GetLevel(fIndex-1);
400 if(
nullptr != newlevel && newlevel->NumberOfTransitions() > 0) {
406 JP1 = fLevelManager->
SpinTwo(fIndex);
410 if(0 == ntrans) { isDiscrete =
false; }
416 <<
" Exc= " << eexc <<
" Emax= "
417 << fLevelEnergyMax <<
" idx= " << fIndex
418 <<
" fCode= " << fCode <<
" fPoints= " << fPoints
419 <<
" Ntr= " << ntrans <<
" discrete: " << isDiscrete
420 <<
" fProb= " << fProbability <<
G4endl;
428 if(fCode != 1000*theZ + theA || eexc != fExcEnergy) {
431 if(fProbability == 0.0) {
436 for(
G4int i=1; i<fPoints; ++i) {
438 G4cout <<
"y= " << y <<
" cummProb= " << fCummProbability[i]
439 <<
" fPoints= " << fPoints <<
" fStep= " << fStep <<
G4endl;
441 if(y <= fCummProbability[i]) {
442 efinal = fStep*((i - 1) + (y - fCummProbability[i-1])
443 /(fCummProbability[i] - fCummProbability[i-1]));
450 G4cout <<
"Continues proposes Efinal= " << efinal <<
G4endl;
452 if(
nullptr != fLevelManager) {
453 if(efinal < fLevelEnergyMax) {
457 if(efinal >= eexc && 0 < fIndex) {
466 efinal = fLevelEnergyMax;
471 G4cout <<
"Continues emission efinal(MeV)= " << efinal <<
G4endl;
474 }
else if(0 == fIndex) {
476 if(
nullptr != fLevelManager) {
478 if(ltime < 0.0 || ltime > fMaxLifeTime) { isLL =
true; }
487 G4cout <<
"Discrete emission from level Index= " << fIndex
488 <<
" Elevel= " << fLevelManager->
LevelEnergy(fIndex)
489 <<
" Ltime= " << fLevelManager->
LifeTime(fIndex)
490 <<
" LtimeMax= " << fMaxLifeTime
491 <<
" RDM= " << fRDM <<
" ICM= " << fICM <<
G4endl;
497 if(ltime < 0.0 || (!fRDM && ltime > fMaxLifeTime)) {
507 G4cout <<
"Ntrans= " << ntrans <<
" idx= " << idx
508 <<
" ICM= " << fICM <<
" JP1= " << JP1 <<
G4endl;
512 if(fICM && prob < 1.0) {
516 rndm = (rndm - prob)/(1.0 - prob);
524 JP2 = fLevelManager->
SpinTwo(fIndex);
530 if(fSampleTime && ltime > 0.0) {
537 if(
nullptr != fLevelManager) {
539 if(ltime < 0.0 || ltime > fMaxLifeTime) { isLL =
true; }
544 if(std::abs(efinal - eexc) <= fTolerance) {
return result; }
547 JP2, multiP, vShellNumber,
548 isDiscrete, isGamma);
557 if(efinal == 0.0 && fIndex > 0) {
563 G4cout <<
"Final level E= " << efinal <<
" time= " << time
564 <<
" idxFinal= " << fIndex <<
" isDiscrete: " << isDiscrete
565 <<
" isGamma: " << isGamma <<
" multiP= " << multiP
566 <<
" shell= " << vShellNumber
567 <<
" JP1= " << JP1 <<
" JP2= " << JP2 <<
G4endl;
574 if(p != fTransition) {
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
std::vector< G4Fragment * > G4FragmentVector
G4double G4Log(G4double x)
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cout
G4bool CorrelatedGamma() const
G4double GetMaxLifeTime() const
G4double GetMinExcitation() const
G4bool GetInternalConversionFlag() const
void SetFloatingLevelNumber(G4int value)
G4double GetGroundStateMass() const
G4NuclearPolarization * GetNuclearPolarization() const
G4double GetExcitationEnergy() const
void SetCreatorModelID(G4int value)
G4double GetCreationTime() const
void SetNuclearPolarization(G4NuclearPolarization *)
void SetCreationTime(G4double time)
G4double ComputeGroundStateMass(G4int Z, G4int A, G4int nLambdas=0) const
void SetLongLived(G4bool value)
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)
const G4NucLevel * GetLevel(const std::size_t i) const
std::size_t NearestLevelIndex(const G4double energy, const std::size_t index=0) const
G4int FloatingLevel(const std::size_t i) const
G4double LevelEnergy(const std::size_t i) const
G4int SpinTwo(const std::size_t i) const
G4double LifeTime(const std::size_t i) const
G4double NearestLevelEnergy(const G4double energy, const std::size_t index=0) const
std::size_t NumberOfTransitions() const
std::size_t SampleGammaTransition(G4double rndm) const
G4float MultipolarityRatio(std::size_t idx) const
G4int SampleShell(std::size_t idx, G4double rndm) const
G4float GammaProbability(std::size_t idx) const
std::size_t FinalExcitationIndex(std::size_t idx) const
G4int TransitionType(std::size_t idx) 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)
void RDMForced(G4bool) override
G4double GetEmissionProbability(G4Fragment *theNucleus) override
G4double GetUpperLevelEnergy(G4int Z, G4int A)
void SetICM(G4bool) override
G4double ComputeProbability(G4Fragment *theNucleus, G4double kinEnergy) override
G4double ComputeInverseXSection(G4Fragment *theNucleus, G4double kinEnergy) override
G4double GetFinalLevelEnergy(G4int Z, G4int A, G4double energy)
G4bool BreakUpChain(G4FragmentVector *theResult, G4Fragment *theNucleus) override
~G4PhotonEvaporation() override
void SetGammaTransition(G4GammaTransition *)
G4PhotonEvaporation(G4GammaTransition *ptr=nullptr)
G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)
void Initialise() override
G4Fragment * EmittedFragment(G4Fragment *theNucleus) override
static G4int GetModelID(const G4int modelIndex)
static G4Pow * GetInstance()
G4double powZ(G4int Z, G4double y) const