13 #include <TParticlePDG.h> 14 #include <TRootIOCtor.h> 25 using std::ostringstream;
27 using namespace genie;
130 const TLorentzVector& p4 = *(tgt.
fHitNucP4);
205 double e = TMath::Sqrt(p*p+m*m);
220 if(p)
return p->Charge() / 3.;
229 if(p)
return p->Mass();
236 LOG(
"Target",
pWARN) <<
"Returning struck nucleon mass = 0";
250 LOG(
"Target",
pWARN) <<
"Returning NULL struck nucleon 4-momentum";
259 return (
fA == 1 && (
fZ == 0 ||
fZ == 1));
264 return (
fA == 1 &&
fZ == 1);
269 return (
fA == 1 &&
fZ == 0);
280 return (p &&
fA==0 &&
fZ==0);
327 if( NN % 2 == 0 && ZZ % 2 == 0 )
return true;
345 if( NN % 2 == 1 && ZZ % 2 == 1 )
return true;
367 LOG(
"Target",
pWARN) <<
"Invalid target -- Reseting to Z = 0, A = 0";
392 s << (this->
HitSeaQrk() ?
"(s)" :
"(v)");
401 stream <<
" target PDG code = " <<
fTgtPDG <<
endl;
404 stream <<
" Z = " <<
fZ <<
", A = " <<
fA <<
endl;
409 stream <<
" struck nucleon = " << p->GetName()
415 stream <<
" struck quark = " << q->GetName()
424 int tgt_pdg = target.
Pdg();
427 bool struck_sea_qrk = target.
HitSeaQrk();
429 bool equal = (
fTgtPDG == tgt_pdg ) &&
Target & operator=(const Target &t)
copy
string AsString(void) const
bool HitSeaQrk(void) const
THE MAIN GENIE PROJECT NAMESPACE
static const double kNucleonMass
int HitNucPdg(void) const
bool IsNeutron(void) const
int HitQrkPdg(void) const
bool operator==(const Target &t) const
equal?
string BoolAsYNString(bool b)
double HitNucMass(void) const
bool IsNucleus(void) const
int IonPdgCodeToA(int pdgc)
void SetHitNucP4(const TLorentzVector &p4)
bool IsAntiQuark(int pdgc)
void SetHitQrkPdg(int pdgc)
string P4AsString(const TLorentzVector *p)
void SetHitNucPosition(double r)
double Charge(void) const
bool IsValidNucleus(void) const
int fHitNucPDG
hit nucleon PDG code
int fHitQrkPDG
hit quark PDG code
bool IsEvenEven(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
constexpr bool is_valid(IDNumber_t< L > const id) noexcept
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
bool IsOddOdd(void) const
int fTgtPDG
nuclear target PDG code
bool IsEvenOdd(void) const
bool Is2NucleonCluster(int pdgc)
TLorentzVector * HitNucP4Ptr(void) const
static PDGLibrary * Instance(void)
bool Compare(const Target &t) const
bool HitNucIsSet(void) const
bool HitQrkIsSet(void) const
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void SetHitNucPdg(int pdgc)
ClassImp(Target) namespace genie
int IonPdgCode(int A, int Z)
double fHitNucRad
hit nucleon position
TLorentzVector * fHitNucP4
hit nucleon 4p
void Copy(const Target &t)
int IonPdgCodeToZ(int pdgc)
TParticlePDG * Find(int pdgc, bool must_exist=true)
void SetHitSeaQrk(bool tf)
void Print(ostream &stream) const
bool fHitSeaQrk
hit quark from sea?
bool IsProton(void) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
bool IsParticle(void) const
QTextStream & endl(QTextStream &s)
bool ForceHitNucValidity(void)
void ForceNucleusValidity(void)
bool IsFreeNucleon(void) const
void ForceHitNucOnMassShell(void)