30 #include <TParticlePDG.h> 31 #include <TRootIOCtor.h> 42 using std::ostringstream;
44 using namespace genie;
237 if(p)
return p->Charge() / 3.;
246 if(p)
return p->Mass();
253 LOG(
"Target",
pWARN) <<
"Returning struck nucleon mass = 0";
267 LOG(
"Target",
pWARN) <<
"Returning NULL struck nucleon 4-momentum";
276 return (
fA == 1 && (
fZ == 0 ||
fZ == 1));
281 return (
fA == 1 &&
fZ == 1);
286 return (
fA == 1 &&
fZ == 0);
297 return (p &&
fA==0 &&
fZ==0);
344 if( NN % 2 == 0 && ZZ % 2 == 0 )
return true;
362 if( NN % 2 == 1 && ZZ % 2 == 1 )
return true;
384 LOG(
"Target",
pWARN) <<
"Invalid target -- Reseting to Z = 0, A = 0";
409 s << (this->
HitSeaQrk() ?
"(s)" :
"(v)");
418 stream <<
" target PDG code = " <<
fTgtPDG <<
endl;
421 stream <<
" Z = " <<
fZ <<
", A = " <<
fA <<
endl;
426 stream <<
" struck nucleon = " << p->GetName()
432 stream <<
" struck quark = " << q->GetName()
441 int tgt_pdg = target.
Pdg();
444 bool struck_sea_qrk = target.
HitSeaQrk();
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
bool equal(T *first, T *second)
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)
constexpr bool is_valid(IDNumber_t< L > const id)
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...
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
Var Sqrt(const Var &v)
Use to take sqrt of a var.
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void SetHitNucPdg(int pdgc)
ClassImp(Target) namespace genie
TParticlePDG * Find(int pdgc)
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)
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
bool ForceHitNucValidity(void)
void ForceNucleusValidity(void)
bool IsFreeNucleon(void) const
void ForceHitNucOnMassShell(void)