62 using namespace G4InuclSpecialFunctions;
69 excTolerance(tolerance), inputEkin(0.),
70 recoilA(0), recoilZ(0), excitationEnergy(0.) {
85 G4cout <<
" >>> G4CascadeRecoilMaker::collide" <<
G4endl;
91 balance->
collide(bullet, target, output);
100 const std::vector<G4CascadParticle>& cparticles) {
102 G4cout <<
" >>> G4CascadeRecoilMaker::collide(<EP>,<CP>)" <<
G4endl;
108 balance->
collide(bullet, target, output, cparticles);
117 recoilZ = -(balance->
deltaQ());
118 recoilA = -(balance->
deltaB());
119 recoilMomentum = -(balance->
deltaLV());
128 if (std::abs(excitationEnergy) < excTolerance) excitationEnergy = 0.;
131 G4cout <<
" recoil px " << recoilMomentum.
px()
132 <<
" py " << recoilMomentum.
py() <<
" pz " << recoilMomentum.
pz()
133 <<
" E " << recoilMomentum.
e() <<
" baryon " << recoilA
134 <<
" charge " << recoilZ
135 <<
"\n recoil mass " << recoilMomentum.
m()
136 <<
" 'excitation' energy " << excitationEnergy <<
G4endl;
146 G4cout <<
" >>> G4CascadeRecoilMaker::makeRecoilNuclei" <<
G4endl;
155 theRecoilNuclei.
fill(recoilMomentum, recoilA, recoilZ,
156 excitationEnergy, model);
159 return &theRecoilNuclei;
167 G4cout <<
" >>> G4CascadeRecoilMaker::makeRecoilFragment" <<
G4endl;
195 return &theRecoilFragment;
203 return (recoilMomentum.
m() - nucMass);
210 return (recoilA>0 && recoilZ>=0 && recoilA >= recoilZ);
214 return (
goodFragment() && excitationEnergy > -excTolerance);
219 G4cout <<
" >>> G4CascadeRecoilMaker::wholeEvent:"
220 <<
" A " << recoilA <<
" Z " << recoilZ
221 <<
" P " << recoilMomentum.
rho() <<
" E " << recoilMomentum.
e()
222 <<
"\n wholeEvent returns "
223 << (recoilA==0 && recoilZ==0 &&
224 recoilMomentum.
rho() < excTolerance/
GeV &&
225 std::abs(recoilMomentum.
e()) < excTolerance/
GeV) <<
G4endl;
228 return (recoilA==0 && recoilZ==0 &&
229 recoilMomentum.
rho() < excTolerance/
GeV &&
230 std::abs(recoilMomentum.
e()) < excTolerance/
GeV);
237 G4cout <<
" >>> G4CascadeRecoilMaker::goodNucleus" <<
G4endl;
241 const G4double reasonableExcitation = 7.0;
242 const G4double fractionalExcitation = 0.2;
247 else if (excitationEnergy < -excTolerance)
248 G4cerr <<
" goodNucleus: negative excitation" <<
G4endl;
253 if (excitationEnergy <= minExcitation)
return true;
257 G4double exc_max0z = fractionalExcitation * inputEkin*
GeV;
258 G4double exc_dm = reasonableExcitation * dm;
259 G4double exc_max = (exc_max0z > exc_dm) ? exc_max0z : exc_dm;
262 G4cout <<
" eexs " << excitationEnergy <<
" max " << exc_max
263 <<
" dm " << dm <<
G4endl;
267 G4cerr <<
" goodNucleus: too much excitation" <<
G4endl;
269 return (excitationEnergy < exc_max);
void fill(G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
G4bool goodNucleus() const
G4LorentzVector deltaLV() const
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
void SetNumberOfHoles(G4int valueTot, G4int valueP=0)
G4bool wholeEvent() const
virtual void setVerboseLevel(G4int verbose=0)
G4double getKineticEnergy() const
void setVectM(const Hep3Vector &spatial, double mass)
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
void SetNumberOfExcitedParticle(G4int valueTot, G4int valueP)
virtual ~G4CascadeRecoilMaker()
G4bool goodRecoil() const
G4GLOB_DLL std::ostream G4cout
G4bool goodFragment() const
void SetMomentum(const G4LorentzVector &value)
G4double getNucleiMass() const
G4InuclNuclei * makeRecoilNuclei(G4InuclParticle::Model model=G4InuclParticle::DefaultModel)
void setExitonConfiguration(const G4ExitonConfiguration &config)
void SetZandA_asInt(G4int Znew, G4int Anew)
static constexpr double GeV
G4CascadeRecoilMaker(G4double tolerance=0.001 *CLHEP::MeV)
G4double bindingEnergy(G4int A, G4int Z)
static constexpr double keV
const XML_Char XML_Content * model
G4Fragment * makeRecoilFragment()
G4GLOB_DLL std::ostream G4cerr
G4int neutronQuasiParticles
G4int protonQuasiParticles