21 #include <TRootIOCtor.h>
28 using namespace genie;
31 using std::setprecision;
33 using std::ostringstream;
41 init_state.
Print(stream);
55 this->
Init(target_pdgc, probe_pdgc);
62 this->
Init(target_pdgc, probe_pdgc);
68 int target_pdgc = tgt.
Pdg();
69 this->
Init(target_pdgc, probe_pdgc);
76 this->
Copy(init_state);
98 fProbeP4 =
new TLorentzVector(0, 0, 0, 0);
99 fTgtP4 =
new TLorentzVector(0, 0, 0, 0);
109 double m = p->Mass();
110 double M = t->Mass();
114 fProbeP4 =
new TLorentzVector(0, 0, 0, m);
115 fTgtP4 =
new TLorentzVector(0, 0, 0, M);
156 this->
Init(tgt_pdgc, probe_pdgc);
164 this->
Init(tgt_pdgc, probe_pdgc);
169 int tgt_pdgc = this->
TgtPdg();
172 this->
Init(tgt_pdgc, probe_pdgc);
193 fTgtP4 -> SetE ( P4.E() );
194 fTgtP4 -> SetPx ( P4.Px() );
195 fTgtP4 -> SetPy ( P4.Py() );
196 fTgtP4 -> SetPz ( P4.Pz() );
301 double bx = pnuc4->Px() / pnuc4->Energy();
302 double by = pnuc4->Py() / pnuc4->Energy();
303 double bz = pnuc4->Pz() / pnuc4->Energy();
306 TLorentzVector * p4 =
new TLorentzVector(*
fTgtP4);
307 p4->Boost(-bx,-by,-bz);
315 TLorentzVector * p4 =
new TLorentzVector(*
fTgtP4);
320 LOG(
"Interaction",
pERROR) <<
"Uknown reference frame";
339 TLorentzVector * p4 =
new TLorentzVector(*
fProbeP4);
355 double bx = pnuc4->Px() / pnuc4->Energy();
356 double by = pnuc4->Py() / pnuc4->Energy();
357 double bz = pnuc4->Pz() / pnuc4->Energy();
361 TLorentzVector * p4 =
new TLorentzVector(*
fProbeP4);
363 p4->Boost(-bx,-by,-bz);
372 TLorentzVector * p4 =
new TLorentzVector(*
fProbeP4);
379 LOG(
"Interaction",
pERROR) <<
"Uknown reference frame";
386 TLorentzVector * p4 = this->
GetProbeP4(ref_frame);
387 double E = p4->Energy();
400 double s = k4->Dot(*k4);
401 double E = TMath::Sqrt(s);
414 ostringstream init_state;
417 init_state <<
"dm_mass:" << this->
Probe()->Mass() <<
";";
420 init_state <<
"nu-pdg:" << this->
ProbePdg() <<
";";
422 init_state <<
"tgt-pdg:" << this->
Tgt().
Pdg() <<
";";
424 return init_state.str();
429 stream <<
"[-] [Init-State] " << endl;
431 stream <<
" |--> probe : "
433 <<
" (" << this->
Probe()->GetName() <<
")" << endl;
435 stream <<
" |--> nucl. target : "
436 <<
"Z = " <<
fTgt->
Z()
437 <<
", A = " <<
fTgt->
A()
438 <<
", PDG-Code = " <<
fTgt->
Pdg();
442 stream <<
" (" << tgt->GetName() <<
")";
446 stream <<
" |--> hit nucleon : ";
451 stream <<
"PDC-Code = " << nuc_pdgc <<
" (" << p->GetName() <<
")";
457 stream <<
" |--> hit quark : ";
462 stream <<
"PDC-Code = " << qrk_pdgc <<
" (" << p->GetName() <<
") ";
469 stream <<
" |--> probe 4P : "
470 <<
"(E = " << setw(12) << setprecision(6) <<
fProbeP4->E()
471 <<
", Px = " << setw(12) << setprecision(6) <<
fProbeP4->Px()
472 <<
", Py = " << setw(12) << setprecision(6) <<
fProbeP4->Py()
473 <<
", Pz = " << setw(12) << setprecision(6) <<
fProbeP4->Pz()
476 stream <<
" |--> target 4P : "
477 <<
"(E = " << setw(12) << setprecision(6) <<
fTgtP4->E()
478 <<
", Px = " << setw(12) << setprecision(6) <<
fTgtP4->Px()
479 <<
", Py = " << setw(12) << setprecision(6) <<
fTgtP4->Py()
480 <<
", Pz = " << setw(12) << setprecision(6) <<
fTgtP4->Pz()
488 stream <<
" |--> nucleon 4P : "
489 <<
"(E = " << setw(12) << setprecision(6) << nuc_p4->E()
490 <<
", Px = " << setw(12) << setprecision(6) << nuc_p4->Px()
491 <<
", Py = " << setw(12) << setprecision(6) << nuc_p4->Py()
492 <<
", Pz = " << setw(12) << setprecision(6) << nuc_p4->Pz()
500 const Target & target = init_state.
Tgt();
509 return this->
Compare(init_state);
514 this->
Copy(init_state);
void SetTgtP4(const TLorentzVector &P4)
bool HitSeaQrk(void) const
bool IsNuBarN(void) const
is anti-neutrino + neutron?
bool IsNeutrino(int pdgc)
void SetProbeP4(const TLorentzVector &P4)
void SetTgtPdg(int pdg_code)
int HitNucPdg(void) const
int HitQrkPdg(void) const
bool IsNuN(void) const
is neutrino + neutron?
static constexpr double s
bool IsAntiQuark(int pdgc)
bool IsDarkMatter(int pdgc)
TParticlePDG * Probe(void) const
double Mass(Resonance_t res)
resonance mass (GeV)
bool Compare(const InitialState &init_state) const
enum genie::ERefFrame RefFrame_t
bool operator==(const InitialState &i) const
equal?
bool IsDMN(void) const
is dark matter + neutron?
bool IsDMBP(void) const
is anti-dark matter + proton?
bool IsNuP(void) const
is neutrino + proton?
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool IsAntiDarkMatter(int pdgc)
void Copy(const InitialState &init_state)
static constexpr double A
Target * fTgt
nuclear target
TLorentzVector * fProbeP4
probe 4-momentum in LAB-frame
bool IsAntiNeutrino(int pdgc)
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
string AsString(void) const
TLorentzVector * fTgtP4
nuclear target 4-momentum in LAB-frame
void SetPdgs(int tgt_pdgc, int probe_pdgc)
bool IsDMP(void) const
is dark matter + proton?
bool IsDMBN(void) const
is anti-dark matter + neutron?
void Print(ostream &stream) const
TLorentzVector * HitNucP4Ptr(void) const
static PDGLibrary * Instance(void)
bool HitNucIsSet(void) const
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
TLorentzVector * GetTgtP4(RefFrame_t rf=kRfLab) const
double CMEnergy() const
centre-of-mass energy (sqrt s)
bool IsNeutronOrProton(int pdgc)
bool IsNuBarP(void) const
is anti-neutrino + proton?
int IonPdgCode(int A, int Z)
InitialState & operator=(const InitialState &i)
copy
void Copy(const Target &t)
int fProbePdg
probe PDG code
void SetProbePdg(int pdg_code)
TParticlePDG * Find(int pdgc, bool must_exist=true)
const Target & Tgt(void) const
double ProbeE(RefFrame_t rf) const
static constexpr double m
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const
Initial State information.