21 #include <TRootIOCtor.h> 28 using namespace genie;
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 : " 476 stream <<
" |--> target 4P : " 488 stream <<
" |--> nucleon 4P : " 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)
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 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?
Q_EXPORT QTSManip setprecision(int p)
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)
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?
bool IsDMBN(void) const
is anti-dark matter + neutron?
void Print(ostream &stream) const
Q_EXPORT QTSManip setw(int w)
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
std::string nucl(const std::string &A, const std::string &elem)
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
QTextStream & endl(QTextStream &s)
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const
Initial State information.