392 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 394 <<
"AbsorbHN() is invoked for a : " << p->
Name()
419 int pcode, t1code, t2code, scode, s2code;
420 double M1, M2_1, M2_2, M3, M4;
421 double E1L, P1L, E2L, P2L, E3L, P3L, E4L, P4L;
426 double Theta1, Theta2, theta5;
428 double E1CM, E3CM, E4CM, P3CM;
429 double P3zL, P3tL, P4zL, P4tL;
431 TVector3 tP2_1L, tP2_2L, tP1L, tP2L, tPtot, P1zCM, P2zCM;
433 TVector3 bDir, tTrans, tbeta, tVect;
470 <<
"AbsorbHN() cannot handle probe: " << pdgc;
475 M1 = pLib->
Find(pcode) ->Mass();
476 M2_1 = pLib->
Find(t1code)->Mass();
477 M2_2 = pLib->
Find(t2code)->Mass();
478 M3 = pLib->
Find(scode) ->Mass();
479 M4 = pLib->
Find(s2code)->Mass();
484 target.SetHitNucPdg(t1code);
487 E2_1L = TMath::Sqrt(tP2_1L.Mag2() + M2_1*M2_1);
489 target.SetHitNucPdg(t2code);
492 E2_2L = TMath::Sqrt(tP2_2L.Mag2() + M2_2*M2_2);
496 tP2_1L.SetXYZ(0.0, 0.0, 0.0);
499 tP2_2L.SetXYZ(0.0, 0.0, 0.0);
514 S3CM = TMath::Sqrt(1.0 - C3CM*C3CM);
518 if(E1L<0.001) E1L=0.001;
519 P1L = TMath::Sqrt(E1L*E1L - M1*M1);
520 tP1L = p->
P4()->Vect();
521 tP2L = tP2_1L + tP2_2L;
527 Theta1 = tP1L.Angle(bDir);
528 Theta2 = tP2L.Angle(bDir);
531 P1zL = P1L*TMath::Cos(Theta1);
532 P2zL = P2L*TMath::Cos(Theta2);
534 if(TMath::Abs((tVect - bDir).Mag())<.01) tVect.SetXYZ(0,1,0);
535 theta5 = tVect.Angle(bDir);
536 tTrans = (tVect - TMath::Cos(theta5)*bDir).Unit();
539 tbeta = tPtot * (1.0 / (E1L + E2L));
541 gm = 1.0 / TMath::Sqrt(1.0 - beta*beta);
544 E1CM = gm*E1L - gm*beta*P1zL;
545 P1zCM = gm*P1zL*bDir - gm*tbeta*E1L;
546 E2CM = gm*E2L - gm*beta*P2zL;
547 P2zCM = gm*P2zL*bDir - gm*tbeta*E2L;
549 E3CM = (Et*Et + (M3*M3) - (M4*M4)) / (2.0*Et);
551 P3CM = TMath::Sqrt(E3CM*E3CM - M3*M3);
554 P3zL = gm*beta*E3CM + gm*P3CM*C3CM;
556 P4zL = gm*beta*E4CM + gm*P3CM*(-C3CM);
559 P3L = TMath::Sqrt(P3zL*P3zL + P3tL*P3tL);
560 P4L = TMath::Sqrt(P4zL*P4zL + P4tL*P4tL);
564 if(!(TMath::Finite(P3L))||P3L<.001)
567 <<
"Particle 3 " << M3 <<
" momentum small or non-finite: " << P3L
568 <<
"\n" <<
"--> Assigning .001 as new momentum";
572 E3L = TMath::Sqrt(P3L*P3L + M3*M3);
575 if(!(TMath::Finite(P4L))||P4L<.001)
578 <<
"Particle 4 " << M4 <<
" momentum small or non-finite: " << P4L
579 <<
"\n" <<
"--> Assigning .001 as new momentum";
583 E4L = TMath::Sqrt(P4L*P4L + M4*M4);
591 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 592 LOG(
"HNIntranuke2015",
pINFO) <<
"AbsorbHN failed: Pauli blocking";
602 LOG(
"HNIntranuke2015",
pINFO) <<
"AbsorbHN failed: Pauli blocking";
604 exception.
SetReason(
"hN absorption failed");
611 fRemnP4 -= TLorentzVector(tP2_1L,E2_1L);
612 fRemnP4 -= TLorentzVector(tP2_2L,E2_2L);
617 tP3L = P3zL*bDir + P3tL*tTrans;
618 tP4L = P4zL*bDir + P4tL*tTrans;
620 tP3L.Rotate(PHI3,bDir);
621 tP4L.Rotate(PHI3,bDir);
623 E3L = TMath::Sqrt(P3L*P3L + M3*M3);
624 E4L = TMath::Sqrt(P4L*P4L + M4*M4);
632 TLorentzVector t4P4L(tP4L,E4L);
638 TLorentzVector t4P3L(tP3L,E3L);
643 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 645 <<
"|p3| = " << (P3L) <<
", E3 = " << (E3L);
647 <<
"|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
bool fUseOset
Oset model for low energy pion in hN.
double E(void) const
Get energy.
double IntBounce(const GHepParticle *p, int target, int s1, INukeFateHN_t fate)
static RandomGen * Instance()
Access instance.
void SetMomentum(const TLorentzVector &p4)
double fFermiMomentum
whether or not particle collision is pauli blocked
A singleton holding random number generator classes. All random number generation in GENIE should tak...
int LastMother(void) const
int FirstMother(void) const
string Name(void) const
Name that corresponds to the PDG code.
INukeHadroData2015 * fHadroData2015
a collection of h+N,h+A data & calculations
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
const NuclearModelI * fNuclmodel
nuclear model used to generate fermi momentum
void SetReason(string reason)
bool fDoFermi
whether or not to do fermi mom.
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
double fFermiFac
testing parameter to modify fermi momentum
virtual GHepParticle * TargetNucleus(void) const
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)
virtual TVector3 Momentum3(void) const
static string AsString(INukeFateHN_t fate)
TParticlePDG * Find(int pdgc)
int fRemnZ
remnant nucleus Z
TLorentzVector fRemnP4
P4 of remnant system.
virtual bool GenerateNucleon(const Target &) const =0
virtual void AddParticle(const GHepParticle &p)
TLorentzVector * P4(void) const
int fRemnA
remnant nucleus A
STDHEP-like event record entry that can fit a particle or a nucleus.
cet::coded_exception< error, detail::translate > exception