75 delete theFragmentsFactory;
76 delete theFragmentsVector;
81 if (theFragmentsFactory) {
delete theFragmentsFactory; }
83 if (theFragmentsVector) {
84 theFragmentsVector->SetVector(theFragmentsFactory->GetFragmentVector());
93 if (theFragmentsFactory)
delete theFragmentsFactory;
95 if (theFragmentsVector) {
96 theFragmentsVector->SetVector(theFragmentsFactory->GetFragmentVector());
109 theFragmentsVector->ChooseFragment();
110 if (thePreFragment ==
nullptr)
112 G4cout <<
"G4PreCompoundEmission::PerformEmission : "
113 <<
"I couldn't choose a fragment\n"
114 <<
"while trying to de-excite\n"
122 kinEnergy = std::max(kinEnergy, 0.0);
125 if(fUseAngularGenerator) {
126 AngularDistribution(thePreFragment,aFragment,kinEnergy);
129 std::sqrt(kinEnergy*(kinEnergy + 2.0*thePreFragment->
GetNuclearMass()));
137 G4LorentzVector Emitted4Momentum(theFinalMomentum,EmittedMass + kinEnergy);
141 << thePreFragment->
GetZ() <<
" A=" << thePreFragment->
GetA()
142 <<
" Ekin(MeV)=" << kinEnergy <<
" 4-mom C.M.S.: "
143 << Emitted4Momentum <<
G4endl;
156 Rest4Momentum -= Emitted4Momentum;
167 thePreFragment->
GetA());
170 thePreFragment->
GetZ());
186void G4PreCompoundEmission::AngularDistribution(
202 G4double Eav = 2*p*(p+1)/((p+h)*gg);
205 G4double Uf = std::max(U - (p - h)*fFermiEnergy , 0.0);
208 G4double w_num = rho(p+1, h, gg, Uf, fFermiEnergy);
209 G4double w_den = rho(p, h, gg, Uf, fFermiEnergy);
210 if (w_num > 0.0 && w_den > 0.0)
212 Eav *= (w_num/w_den);
213 Eav += - Uf/(p+h) + fFermiEnergy;
223 G4double Eeff = ekin + Bemission + fFermiEnergy;
226 G4double zeta = std::max(1.0,9.3/std::sqrt(ekin/CLHEP::MeV));
234 an = 3*std::sqrt((ProjEnergy+fFermiEnergy)*Eeff)/(zeta*Eav);
237 if ( ne > 1 ) {
an /=
static_cast<G4double>(ne); }
240 if ( an > 10. ) {
an = 10.; }
247 if(an < 0.1) { cost = 1. - 2*random; }
250 cost = 1. +
G4Log(1-random*(1-exp2an))/
an;
251 if(cost > 1.) { cost = 1.; }
252 else if(cost < -1.) {cost = -1.; }
261 G4double sint = std::sqrt((1.0-cost)*(1.0+cost));
263 theFinalMomentum.set(pmag*std::cos(phi)*sint,pmag*std::sin(phi)*sint,
268 theFinalMomentum.
rotateUz(theIncidentDirection);
275 G4double Aph = (p*p + h*h + p - 3.0*h)/(4.0*gg);
277 if ( E - Aph < 0.0) {
return 0.0; }
280 - g4calc->logfactorial(p+h-1) - g4calc->logfactorial(p)
281 - g4calc->logfactorial(h);
289 if(logt3 > logmax) { logt3 = logmax; }
295 for(
G4int j=1; j<=h; ++j)
298 if(Eeff < 0.0) {
break; }
301 logt3 = (p+h-1) *
G4Log( Eeff) + logConst;
302 if(logt3 > logmax) { logt3 = logmax; }
303 tot += t1*t2*
G4Exp(logt3);
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
CLHEP::HepLorentzVector G4LorentzVector
G4ThreeVector G4RandomDirection()
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
Hep3Vector & rotateUz(const Hep3Vector &)
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
G4bool UseAngularGen() const
G4double GetFermiEnergy() const
G4int GetNumberOfParticles() const
G4int GetNumberOfHoles() const
void SetZandA_asInt(G4int Znew, G4int Anew, G4int Lnew=0)
void SetNumberOfCharged(G4int value)
G4double GetExcitationEnergy() const
const G4LorentzVector & GetMomentum() const
void SetCreatorModelID(G4int value)
G4int GetNumberOfExcitons() const
void SetMomentum(const G4LorentzVector &value)
void SetNumberOfParticles(G4int value)
G4int GetNumberOfCharged() const
G4double GetLevelDensity(G4int Z, G4int A, G4double U)
static G4NuclearLevelData * GetInstance()
static G4int GetModelID(const G4int modelIndex)
static G4Pow * GetInstance()
G4ReactionProduct * PerformEmission(G4Fragment &aFragment)
void SetCreatorModelID(const G4int mod)
G4double GetNuclearMass() const
virtual G4double SampleKineticEnergy(const G4Fragment &)
void SetMomentum(const G4LorentzVector &lv)
G4double GetBindingEnergy() const
G4ReactionProduct * GetReactionProduct() const