395 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 397 <<
"AbsorbHN() is invoked for a : " << p->
Name()
422 int pcode, t1code, t2code, scode, s2code;
423 double M1, M2_1, M2_2, M3, M4;
424 double E1L, P1L, E2L, P2L, E3L, P3L, E4L, P4L;
429 double Theta1, Theta2, theta5;
431 double E1CM, E3CM, E4CM, P3CM;
432 double P3zL, P3tL, P4zL, P4tL;
434 TVector3 tP2_1L, tP2_2L, tP1L, tP2L, tPtot, P1zCM, P2zCM;
436 TVector3 bDir, tTrans, tbeta, tVect;
473 <<
"AbsorbHN() cannot handle probe: " << pdgc;
478 M1 = pLib->
Find(pcode) ->Mass();
479 M2_1 = pLib->
Find(t1code)->Mass();
480 M2_2 = pLib->
Find(t2code)->Mass();
481 M3 = pLib->
Find(scode) ->Mass();
482 M4 = pLib->
Find(s2code)->Mass();
487 target.SetHitNucPdg(t1code);
490 E2_1L = TMath::Sqrt(tP2_1L.Mag2() + M2_1*M2_1);
492 target.SetHitNucPdg(t2code);
495 E2_2L = TMath::Sqrt(tP2_2L.Mag2() + M2_2*M2_2);
499 tP2_1L.SetXYZ(0.0, 0.0, 0.0);
502 tP2_2L.SetXYZ(0.0, 0.0, 0.0);
517 S3CM = TMath::Sqrt(1.0 - C3CM*C3CM);
521 if(E1L<0.001) E1L=0.001;
522 P1L = TMath::Sqrt(E1L*E1L - M1*M1);
523 tP1L = p->
P4()->Vect();
524 tP2L = tP2_1L + tP2_2L;
530 Theta1 = tP1L.Angle(bDir);
531 Theta2 = tP2L.Angle(bDir);
534 P1zL = P1L*TMath::Cos(Theta1);
535 P2zL = P2L*TMath::Cos(Theta2);
537 if(TMath::Abs((tVect - bDir).Mag())<.01) tVect.SetXYZ(0,1,0);
538 theta5 = tVect.Angle(bDir);
539 tTrans = (tVect - TMath::Cos(theta5)*bDir).Unit();
542 tbeta = tPtot * (1.0 / (E1L + E2L));
544 gm = 1.0 / TMath::Sqrt(1.0 - beta*beta);
547 E1CM = gm*E1L - gm*beta*P1zL;
548 P1zCM = gm*P1zL*bDir - gm*tbeta*E1L;
549 E2CM = gm*E2L - gm*beta*P2zL;
550 P2zCM = gm*P2zL*bDir - gm*tbeta*E2L;
552 E3CM = (Et*Et + (M3*M3) - (M4*M4)) / (2.0*Et);
554 P3CM = TMath::Sqrt(E3CM*E3CM - M3*M3);
557 P3zL = gm*beta*E3CM + gm*P3CM*C3CM;
559 P4zL = gm*beta*E4CM + gm*P3CM*(-C3CM);
562 P3L = TMath::Sqrt(P3zL*P3zL + P3tL*P3tL);
563 P4L = TMath::Sqrt(P4zL*P4zL + P4tL*P4tL);
567 if(!(TMath::Finite(P3L))||P3L<.001)
570 <<
"Particle 3 " << M3 <<
" momentum small or non-finite: " << P3L
571 <<
"\n" <<
"--> Assigning .001 as new momentum";
575 E3L = TMath::Sqrt(P3L*P3L + M3*M3);
578 if(!(TMath::Finite(P4L))||P4L<.001)
581 <<
"Particle 4 " << M4 <<
" momentum small or non-finite: " << P4L
582 <<
"\n" <<
"--> Assigning .001 as new momentum";
586 E4L = TMath::Sqrt(P4L*P4L + M4*M4);
594 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 595 LOG(
"HNIntranuke2018",
pINFO) <<
"AbsorbHN failed: Pauli blocking";
605 LOG(
"HNIntranuke2018",
pINFO) <<
"AbsorbHN failed: Pauli blocking";
607 exception.
SetReason(
"hN absorption failed");
614 fRemnP4 -= TLorentzVector(tP2_1L,E2_1L);
615 fRemnP4 -= TLorentzVector(tP2_2L,E2_2L);
620 tP3L = P3zL*bDir + P3tL*tTrans;
621 tP4L = P4zL*bDir + P4tL*tTrans;
623 tP3L.Rotate(PHI3,bDir);
624 tP4L.Rotate(PHI3,bDir);
626 E3L = TMath::Sqrt(P3L*P3L + M3*M3);
627 E4L = TMath::Sqrt(P4L*P4L + M4*M4);
635 TLorentzVector t4P4L(tP4L,E4L);
641 TLorentzVector t4P3L(tP3L,E3L);
646 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 648 <<
"|p3| = " << (P3L) <<
", E3 = " << (E3L);
650 <<
"|p4| = " << (P4L) <<
", E4 = " << (E4L);
An exception thrown by SimulateHadronState for kinematics problems. TwoBodyCollision/Kinematics used ...
void SetFirstMother(int m)
TRandom3 & RndFsi(void) const
rnd number generator used by intranuclear cascade monte carlos
double fFermiMomentum
whether or not particle collision is pauli blocked
double beta(double KE, const simb::MCParticle *part)
double E(void) const
Get energy.
static RandomGen * Instance()
Access instance.
const TLorentzVector * P4(void) const
double fFermiFac
testing parameter to modify fermi momentum
int fRemnA
remnant nucleus A
void SetMomentum(const TLorentzVector &p4)
static constexpr double MeV
A singleton holding random number generator classes. All random number generation in GENIE should tak...
const NuclearModelI * fNuclmodel
nuclear model used to generate fermi momentum
const TVector3 & Momentum3(void) const
int LastMother(void) const
int FirstMother(void) const
string Name(void) const
Name that corresponds to the PDG code.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void SetReason(string reason)
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
virtual GHepParticle * TargetNucleus(void) const
bool fDoFermi
whether or not to do fermi mom.
double KinE(bool mass_from_pdg=false) const
Get kinetic energy.
static PDGLibrary * Instance(void)
void SetLastMother(int m)
Singleton class to load & serve a TDatabasePDG.
void SetStatus(GHepStatus_t s)
static string AsString(INukeFateHN_t fate)
INukeHadroData2018 * fHadroData2018
a collection of h+N,h+A data & calculations
virtual bool GenerateNucleon(const Target &) const =0
virtual void AddParticle(const GHepParticle &p)
TParticlePDG * Find(int pdgc, bool must_exist=true)
bool fUseOset
Oset model for low energy pion in hN.
STDHEP-like event record entry that can fit a particle or a nucleus.
cet::coded_exception< error, detail::translate > exception
double IntBounce(const GHepParticle *p, int target, int s1, INukeFateHN_t fate)
int fRemnZ
remnant nucleus Z
TLorentzVector fRemnP4
P4 of remnant system.