13#include <TParticlePDG.h>
14#include <TRootIOCtor.h>
25using std::ostringstream;
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 ) &&
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
ClassImp(Target) namespace genie
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
void SetHitSeaQrk(bool tf)
string AsString(void) const
void SetHitNucP4(const TLorentzVector &p4)
int HitNucPdg(void) const
void SetHitQrkPdg(int pdgc)
void SetHitNucPosition(double r)
void SetHitNucPdg(int pdgc)
void Print(ostream &stream) const
bool IsNeutron(void) const
Target & operator=(const Target &t)
copy
void Copy(const Target &t)
TLorentzVector * HitNucP4Ptr(void) const
int HitQrkPdg(void) const
void ForceHitNucOnMassShell(void)
int fHitNucPDG
hit nucleon PDG code
TLorentzVector * fHitNucP4
hit nucleon 4p
double fHitNucRad
hit nucleon position
bool IsEvenEven(void) const
void ForceNucleusValidity(void)
double Charge(void) const
bool IsOddOdd(void) const
int fTgtPDG
nuclear target PDG code
bool IsValidNucleus(void) const
bool IsParticle(void) const
bool HitSeaQrk(void) const
bool IsFreeNucleon(void) const
bool IsProton(void) const
bool operator==(const Target &t) const
equal?
bool ForceHitNucValidity(void)
double HitNucMass(void) const
bool IsNucleus(void) const
bool fHitSeaQrk
hit quark from sea?
int fHitQrkPDG
hit quark PDG code
bool Compare(const Target &t) const
bool HitQrkIsSet(void) const
bool IsEvenOdd(void) const
bool HitNucIsSet(void) const
static const double kNucleonMass
bool Is2NucleonCluster(int pdgc)
int IonPdgCode(int A, int Z)
bool IsAntiQuark(int pdgc)
int IonPdgCodeToZ(int pdgc)
int IonPdgCodeToA(int pdgc)
string BoolAsYNString(bool b)
string P4AsString(const TLorentzVector *p)
THE MAIN GENIE PROJECT NAMESPACE
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)