64 delete theFragmentsFactory;
65 delete theFragmentsVector;
70 if (theFragmentsFactory) {
delete theFragmentsFactory; }
72 if (theFragmentsVector) {
73 theFragmentsVector->SetVector(theFragmentsFactory->GetFragmentVector());
82 if (theFragmentsFactory)
delete theFragmentsFactory;
84 if (theFragmentsVector) {
85 theFragmentsVector->SetVector(theFragmentsFactory->GetFragmentVector());
98 theFragmentsVector->ChooseFragment();
99 if (thePreFragment ==
nullptr) {
100 G4cout <<
"G4PreCompoundEmission::PerformEmission : "
101 <<
"I couldn't choose a fragment while trying to de-excite\n"
109 kinEnergy = std::max(kinEnergy, 0.0);
112 if(fUseAngularGenerator) {
113 AngularDistribution(thePreFragment,aFragment,kinEnergy);
116 std::sqrt(kinEnergy*(kinEnergy + 2.0*thePreFragment->
GetNuclearMass()));
124 G4LorentzVector Emitted4Momentum(theFinalMomentum,EmittedMass + kinEnergy);
128 << thePreFragment->
GetZ() <<
" A=" << thePreFragment->
GetA()
129 <<
" Ekin(MeV)=" << kinEnergy <<
" 4-mom C.M.S.: "
130 << Emitted4Momentum <<
G4endl;
141 Rest4Momentum -= Emitted4Momentum;
152 np = std::min(std::max(np, 0),
A);
154 nz = std::min(std::max(nz, 0), np);
174void G4PreCompoundEmissionInt::AngularDistribution(
190 G4double Eav = 2*p*(p+1)/((p+h)*gg);
193 G4double Uf = std::max(U - (p - h)*fFermiEnergy , 0.0);
196 G4double w_num = rho(p+1, h, gg, Uf, fFermiEnergy);
197 G4double w_den = rho(p, h, gg, Uf, fFermiEnergy);
198 if (w_num > 0.0 && w_den > 0.0)
200 Eav *= (w_num/w_den);
201 Eav += - Uf/(p+h) + fFermiEnergy;
211 G4double Eeff = ekin + Bemission + fFermiEnergy;
214 G4double zeta = std::max(1.0,9.3/std::sqrt(ekin/CLHEP::MeV));
222 an = 3*std::sqrt((ProjEnergy+fFermiEnergy)*Eeff)/(zeta*Eav);
225 if ( ne > 1 ) {
an /=
static_cast<G4double>(ne); }
228 if ( an > 10. ) {
an = 10.; }
235 if(an < 0.1) { cost = 1. - 2*random; }
238 cost = 1. +
G4Log(1-random*(1-exp2an))/
an;
239 if(cost > 1.) { cost = 1.; }
240 else if(cost < -1.) {cost = -1.; }
249 G4double sint = std::sqrt((1.0-cost)*(1.0+cost));
251 theFinalMomentum.set(pmag*std::cos(phi)*sint,pmag*std::sin(phi)*sint,
256 theFinalMomentum.
rotateUz(theIncidentDirection);
263 G4double Aph = (p*p + h*h + p - 3.0*h)/(4.0*gg);
265 if ( E - Aph < 0.0) {
return 0.0; }
268 - g4calc->logfactorial(p+h-1) - g4calc->logfactorial(p)
269 - g4calc->logfactorial(h);
277 if(logt3 > logmax) { logt3 = logmax; }
283 for(
G4int j=1; j<=h; ++j)
286 if(Eeff < 0.0) {
break; }
289 logt3 = (p+h-1) *
G4Log( Eeff) + logConst;
290 if(logt3 > logmax) { logt3 = logmax; }
291 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)
G4double GetExcitationEnergy() const
const G4LorentzVector & GetMomentum() const
void SetCreatorModelID(G4int value)
G4int GetNumberOfExcitons() const
void SetMomentum(const G4LorentzVector &value)
void SetNumberOfExcitedParticle(G4int valueTot, G4int valueP)
G4int GetNumberOfCharged() const
G4double GetLevelDensity(G4int Z, G4int A, G4double U)
static G4NuclearLevelData * GetInstance()
static G4int GetModelID(const G4int modelIndex)
static G4Pow * GetInstance()
G4PreCompoundEmissionInt(G4int verb)
G4ReactionProduct * PerformEmission(G4Fragment &aFragment)
~G4PreCompoundEmissionInt()
void SetCreatorModelID(const G4int mod)
G4double GetNuclearMass() const
virtual G4double SampleKineticEnergy(const G4Fragment &)
void SetMomentum(const G4LorentzVector &lv)
G4double GetBindingEnergy() const
G4ReactionProduct * GetReactionProduct() const