22 #include <TRootIOCtor.h> 29 using namespace genie;
32 using std::setprecision;
34 using std::ostringstream;
42 init_state.
Print(stream);
56 this->
Init(target_pdgc, probe_pdgc);
63 this->
Init(target_pdgc, probe_pdgc);
69 int target_pdgc = tgt.
Pdg();
70 this->
Init(target_pdgc, probe_pdgc);
77 this->
Copy(init_state);
99 fProbeP4 =
new TLorentzVector(0, 0, 0, 0);
100 fTgtP4 =
new TLorentzVector(0, 0, 0, 0);
110 double m = p->Mass();
111 double M = t->Mass();
115 fProbeP4 =
new TLorentzVector(0, 0, 0, m);
116 fTgtP4 =
new TLorentzVector(0, 0, 0, M);
157 this->
Init(tgt_pdgc, probe_pdgc);
165 this->
Init(tgt_pdgc, probe_pdgc);
170 int tgt_pdgc = this->
TgtPdg();
173 this->
Init(tgt_pdgc, probe_pdgc);
194 fTgtP4 -> SetE ( P4.E() );
195 fTgtP4 -> SetPx ( P4.Px() );
196 fTgtP4 -> SetPy ( P4.Py() );
197 fTgtP4 -> SetPz ( P4.Pz() );
282 double bx = pnuc4->Px() / pnuc4->Energy();
283 double by = pnuc4->Py() / pnuc4->Energy();
284 double bz = pnuc4->Pz() / pnuc4->Energy();
287 TLorentzVector *
p4 =
new TLorentzVector(*
fTgtP4);
288 p4->Boost(-bx,-by,-bz);
296 TLorentzVector *
p4 =
new TLorentzVector(*
fTgtP4);
301 LOG(
"Interaction",
pERROR) <<
"Uknown reference frame";
320 TLorentzVector *
p4 =
new TLorentzVector(*
fProbeP4);
336 double bx = pnuc4->Px() / pnuc4->Energy();
337 double by = pnuc4->Py() / pnuc4->Energy();
338 double bz = pnuc4->Pz() / pnuc4->Energy();
342 TLorentzVector *
p4 =
new TLorentzVector(*
fProbeP4);
344 p4->Boost(-bx,-by,-bz);
353 TLorentzVector *
p4 =
new TLorentzVector(*
fProbeP4);
360 LOG(
"Interaction",
pERROR) <<
"Uknown reference frame";
368 double E = p4->Energy();
381 double s = k4->Dot(*k4);
395 ostringstream init_state;
398 init_state <<
"dm_mass:" << this->
Probe()->Mass() <<
";";
401 init_state <<
"nu-pdg:" << this->
ProbePdg() <<
";";
403 init_state <<
"tgt-pdg:" << this->
Tgt().
Pdg() <<
";";
405 return init_state.str();
410 stream <<
"[-] [Init-State] " <<
endl;
412 stream <<
" |--> probe : " 414 <<
" (" << this->
Probe()->GetName() <<
")" <<
endl;
416 stream <<
" |--> nucl. target : " 417 <<
"Z = " <<
fTgt->
Z()
418 <<
", A = " <<
fTgt->
A()
419 <<
", PDG-Code = " <<
fTgt->
Pdg();
423 stream <<
" (" << tgt->GetName() <<
")";
427 stream <<
" |--> hit nucleon : ";
432 stream <<
"PDC-Code = " << nuc_pdgc <<
" (" << p->GetName() <<
")";
438 stream <<
" |--> hit quark : ";
443 stream <<
"PDC-Code = " << qrk_pdgc <<
" (" << p->GetName() <<
") ";
450 stream <<
" |--> probe 4P : " 451 <<
"(E = " << setw(12) << setprecision(6) <<
fProbeP4->E()
452 <<
", Px = " << setw(12) << setprecision(6) <<
fProbeP4->Px()
453 <<
", Py = " << setw(12) << setprecision(6) <<
fProbeP4->Py()
454 <<
", Pz = " << setw(12) << setprecision(6) <<
fProbeP4->Pz()
457 stream <<
" |--> target 4P : " 458 <<
"(E = " << setw(12) << setprecision(6) <<
fTgtP4->E()
459 <<
", Px = " << setw(12) << setprecision(6) <<
fTgtP4->Px()
460 <<
", Py = " << setw(12) << setprecision(6) <<
fTgtP4->Py()
461 <<
", Pz = " << setw(12) << setprecision(6) <<
fTgtP4->Pz()
469 stream <<
" |--> nucleon 4P : " 470 <<
"(E = " << setw(12) << setprecision(6) << nuc_p4->E()
471 <<
", Px = " << setw(12) << setprecision(6) << nuc_p4->Px()
472 <<
", Py = " << setw(12) << setprecision(6) << nuc_p4->Py()
473 <<
", Pz = " << setw(12) << setprecision(6) << nuc_p4->Pz()
490 return this->
Compare(init_state);
495 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)
THE MAIN GENIE PROJECT NAMESPACE
void SetTgtPdg(int pdg_code)
int HitNucPdg(void) const
int HitQrkPdg(void) const
bool IsNuN(void) const
is neutrino + neutron?
bool equal(T *first, T *second)
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 IsNuP(void) const
is neutrino + proton?
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void Copy(const InitialState &init_state)
ClassImp(InitialState) namespace genie
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?
void Print(ostream &stream) const
TLorentzVector * HitNucP4Ptr(void) const
static PDGLibrary * Instance(void)
bool HitNucIsSet(void) const
Var Sqrt(const Var &v)
Use to take sqrt of a var.
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?
TParticlePDG * Find(int pdgc)
int IonPdgCode(int A, int Z)
InitialState & operator=(const InitialState &i)
copy
assert(nhit_max >=nhit_nbins)
void Copy(const Target &t)
int fProbePdg
probe PDG code
void SetProbePdg(int pdg_code)
const Target & Tgt(void) const
double ProbeE(RefFrame_t rf) const
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const
Initial State information.