Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
genie::Target Class Reference

A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems such as a nuclear target, a 'spectator' nuclear target with a Hit nucleon, a free nucleon or a free particle (eg a e- target in the inverse muon decay reaction) More...

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+2.6-2.12-e17-debug/GENIE-Generator/src/Framework/Interaction/Target.h"

Inheritance diagram for genie::Target:

Public Member Functions

 Target ()
 
 Target (int pdgc)
 
 Target (int Z, int A)
 
 Target (int Z, int A, int hit_nucleon_pdgc)
 
 Target (const Target &tgt)
 
 Target (TRootIOCtor *)
 
 ~Target ()
 
void SetId (int pdgc)
 
void SetId (int Z, int A)
 
void SetHitNucPdg (int pdgc)
 
void SetHitNucP4 (const TLorentzVector &p4)
 
void SetHitNucPosition (double r)
 
void SetHitQrkPdg (int pdgc)
 
void SetHitSeaQrk (bool tf)
 
void ForceHitNucOnMassShell (void)
 
int Z (void) const
 
int N (void) const
 
int A (void) const
 
int Pdg (void) const
 
double Mass (void) const
 
double Charge (void) const
 
bool IsFreeNucleon (void) const
 
bool IsProton (void) const
 
bool IsNeutron (void) const
 
bool IsNucleus (void) const
 
bool IsParticle (void) const
 
bool IsValidNucleus (void) const
 
bool HitNucIsSet (void) const
 
bool HitQrkIsSet (void) const
 
bool HitSeaQrk (void) const
 
bool IsEvenEven (void) const
 
bool IsEvenOdd (void) const
 
bool IsOddOdd (void) const
 
int HitNucPdg (void) const
 
int HitQrkPdg (void) const
 
double HitNucMass (void) const
 
double HitNucPosition (void) const
 
const TLorentzVector & HitNucP4 (void) const
 
TLorentzVector * HitNucP4Ptr (void) const
 
void Reset (void)
 
void Copy (const Target &t)
 
bool Compare (const Target &t) const
 
string AsString (void) const
 
void Print (ostream &stream) const
 
bool operator== (const Target &t) const
 equal? More...
 
Targetoperator= (const Target &t)
 copy More...
 

Private Member Functions

void Init (void)
 
void CleanUp (void)
 
void ForceNucleusValidity (void)
 
bool ForceHitNucValidity (void)
 
void AutoSetHitNuc (void)
 

Private Attributes

int fZ
 nuclear target Z More...
 
int fA
 nuclear target A More...
 
int fTgtPDG
 nuclear target PDG code More...
 
int fHitNucPDG
 hit nucleon PDG code More...
 
int fHitQrkPDG
 hit quark PDG code More...
 
bool fHitSeaQrk
 hit quark from sea? More...
 
TLorentzVector * fHitNucP4
 hit nucleon 4p More...
 
double fHitNucRad
 hit nucleon position More...
 

Friends

ostream & operator<< (ostream &stream, const Target &t)
 print More...
 

Detailed Description

A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems such as a nuclear target, a 'spectator' nuclear target with a Hit nucleon, a free nucleon or a free particle (eg a e- target in the inverse muon decay reaction)

Author
Costas Andreopoulos <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

May 03, 2004

Copyright (c) 2003-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Definition at line 41 of file Target.h.

Constructor & Destructor Documentation

Target::Target ( )

Definition at line 58 of file Target.cxx.

References Init().

58  :
59 TObject()
60 {
61  this->Init();
62 }
void Init(void)
Definition: Target.cxx:116
Target::Target ( int  pdgc)

Definition at line 64 of file Target.cxx.

References Init(), and SetId().

64  :
65 TObject()
66 {
67  this->Init();
68  this->SetId(pdgc);
69 }
void SetId(int pdgc)
Definition: Target.cxx:166
void Init(void)
Definition: Target.cxx:116
Target::Target ( int  Z,
int  A 
)

Definition at line 71 of file Target.cxx.

References Init(), and SetId().

71  :
72 TObject()
73 {
74  this->Init();
75  this->SetId(ZZ,AA);
76 }
void SetId(int pdgc)
Definition: Target.cxx:166
void Init(void)
Definition: Target.cxx:116
Target::Target ( int  Z,
int  A,
int  hit_nucleon_pdgc 
)

Definition at line 78 of file Target.cxx.

References Init(), SetHitNucPdg(), and SetId().

78  :
79 TObject()
80 {
81  this->Init();
82  this->SetId(ZZ,AA);
83  this->SetHitNucPdg(hit_nucleon_pdgc);
84 }
void SetId(int pdgc)
Definition: Target.cxx:166
void Init(void)
Definition: Target.cxx:116
void SetHitNucPdg(int pdgc)
Definition: Target.cxx:188
Target::Target ( const Target tgt)

Definition at line 86 of file Target.cxx.

References Copy(), and Init().

86  :
87 TObject()
88 {
89  this->Init();
90  this->Copy(tgt);
91 }
void Init(void)
Definition: Target.cxx:116
void Copy(const Target &t)
Definition: Target.cxx:133
Target::Target ( TRootIOCtor *  )

Definition at line 93 of file Target.cxx.

93  :
94 TObject(),
95 fZ(0),
96 fA(0),
97 fTgtPDG(0),
98 fHitNucPDG(0),
99 fHitSeaQrk(false),
100 fHitNucP4(0)
101 {
102 
103 }
int fZ
nuclear target Z
Definition: Target.h:118
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:121
int fTgtPDG
nuclear target PDG code
Definition: Target.h:120
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:124
bool fHitSeaQrk
hit quark from sea?
Definition: Target.h:123
int fA
nuclear target A
Definition: Target.h:119
Target::~Target ( )

Definition at line 105 of file Target.cxx.

References CleanUp().

106 {
107  this->CleanUp();
108 }
void CleanUp(void)
Definition: Target.cxx:128

Member Function Documentation

int genie::Target::A ( void  ) const
inline

Definition at line 71 of file Target.h.

References fA.

Referenced by genie::InitialStateAppender::AddNucleus(), genie::NuETargetRemnantGenerator::AddTargetNucleusRemnant(), genie::utils::nuclear::BindEnergy(), genie::utils::nuclear::BindEnergyLastNucleon(), genie::utils::nuclear::BindEnergyPerNucleon(), genie::utils::nuclear::BindEnergyPerNucleonParametrization(), genie::utils::BindHitNucleon(), genie::COHKinematicsGenerator::CalculateKin_BergerSehgal(), genie::COHKinematicsGenerator::CalculateKin_ReinSehgal(), novarwgt::ConvertGenieEvent(), genie::MECInteractionListGenerator::CreateInteractionList(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), genie::KuzminNaumov2016AxialFormFactorModel::FA(), genie::utils::nuclear::FermiMomentumForIsoscalarNucleonParametrization(), genie::EffectiveSF::GenerateNucleon(), genie::FGMBodekRitchie::GenerateNucleon(), genie::PauliBlocker::GetFermiMomentum(), genie::utils::config::GetValueFromNuclearMaps(), genie::EmpiricalMECPXSec2015::Integral(), genie::LwlynSmithQELCCPXSec::Integral(), genie::SmithMonizQELCCXSec::Integrate(), genie::NewQELXSec::Integrate(), genie::FermiMover::KickHitNucleon(), genie::NievesQELCCPXSec::LmunuAnumu(), genie::EffectiveSF::MakeEffectiveSF(), genie::QPMDISStrucFuncBase::NuclMod(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::InitialState::Print(), genie::FGMBodekRitchie::ProbDistro(), genie::LocalFGM::ProbDistro(), genie::QELEventGeneratorSM::ProcessEventRecord(), genie::SmithMonizUtils::SetInteraction(), genie::ReinDFRPXSec::ValidProcess(), genie::AlvarezRusoCOHPiPXSec::ValidProcess(), genie::BergerSehgalFMCOHPiPXSec2015::ValidProcess(), genie::BergerSehgalCOHPiPXSec2015::ValidProcess(), genie::ReinSehgalCOHPiPXSec::ValidProcess(), genie::NievesQELCCPXSec::vcr(), genie::AlvarezRusoCOHPiPXSec::XSec(), genie::BergerSehgalFMCOHPiPXSec2015::XSec(), genie::BergerSehgalCOHPiPXSec2015::XSec(), genie::ReinSehgalCOHPiPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), and genie::BSKLNBaseRESPXSec2014::XSec().

71 { return fA; }
int fA
nuclear target A
Definition: Target.h:119
string Target::AsString ( void  ) const

Definition at line 400 of file Target.cxx.

References HitNucIsSet(), HitNucPdg(), HitQrkIsSet(), HitQrkPdg(), HitSeaQrk(), and Pdg().

Referenced by HitNucP4(), genie::EffectiveSF::MakeEffectiveSF(), genie::EffectiveSF::ProbDistro(), genie::FGMBodekRitchie::ProbDistro(), and genie::LocalFGM::ProbDistro().

401 {
402  ostringstream s;
403 
404  s << this->Pdg();
405  if(this->HitNucIsSet())
406  s << "[N=" << this->HitNucPdg() << "]";
407  if(this->HitQrkIsSet()) {
408  s << "[q=" << this->HitQrkPdg();
409  s << (this->HitSeaQrk() ? "(s)" : "(v)");
410  s << "]";
411  }
412 
413  return s.str();
414 }
bool HitSeaQrk(void) const
Definition: Target.cxx:316
int HitNucPdg(void) const
Definition: Target.cxx:321
int HitQrkPdg(void) const
Definition: Target.cxx:259
int Pdg(void) const
Definition: Target.h:72
const XML_Char * s
Definition: expat.h:262
bool HitNucIsSet(void) const
Definition: Target.cxx:300
bool HitQrkIsSet(void) const
Definition: Target.cxx:309
void Target::AutoSetHitNuc ( void  )
private

Definition at line 390 of file Target.cxx.

References IsFreeNucleon(), IsProton(), genie::kPdgNeutron, genie::kPdgProton, and SetHitNucPdg().

Referenced by HitNucP4().

391 {
392 // for free nucleon targets -> (auto)set struck nucleon = target
393 
394  if( this->IsFreeNucleon() ) {
395  if( this->IsProton() ) this->SetHitNucPdg(kPdgProton);
396  else this->SetHitNucPdg(kPdgNeutron);
397  }
398 }
void SetHitNucPdg(int pdgc)
Definition: Target.cxx:188
const int kPdgProton
Definition: PDGCodes.h:65
bool IsProton(void) const
Definition: Target.cxx:279
const int kPdgNeutron
Definition: PDGCodes.h:67
bool IsFreeNucleon(void) const
Definition: Target.cxx:274
double Target::Charge ( void  ) const

Definition at line 232 of file Target.cxx.

References genie::PDGLibrary::Find(), fTgtPDG, and genie::PDGLibrary::Instance().

Referenced by Pdg().

233 {
234 // Shortcut for commonly used code for extracting the nucleus charge from PDG
235 //
236  TParticlePDG * p = PDGLibrary::Instance()->Find(fTgtPDG);
237  if(p) return p->Charge() / 3.; // in +e
238  return 0;
239 }
const char * p
Definition: xmltok.h:285
int fTgtPDG
nuclear target PDG code
Definition: Target.h:120
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
void Target::CleanUp ( void  )
private

Definition at line 128 of file Target.cxx.

References fHitNucP4.

Referenced by HitNucP4(), Reset(), and ~Target().

129 {
130  delete fHitNucP4;
131 }
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:124
bool Target::Compare ( const Target t) const

Definition at line 439 of file Target.cxx.

References gov::fnal::cd::rms::provider::equal(), fHitNucPDG, fHitQrkPDG, fHitSeaQrk, fTgtPDG, HitNucPdg(), HitQrkPdg(), HitSeaQrk(), and Pdg().

Referenced by HitNucP4(), and operator==().

440 {
441  int tgt_pdg = target.Pdg();
442  int struck_nuc_pdg = target.HitNucPdg();
443  int struck_qrk_pdg = target.HitQrkPdg();
444  bool struck_sea_qrk = target.HitSeaQrk();
445 
446  bool equal = ( fTgtPDG == tgt_pdg ) &&
447  ( fHitNucPDG == struck_nuc_pdg ) &&
448  ( fHitQrkPDG == struck_qrk_pdg ) &&
449  ( fHitSeaQrk == struck_sea_qrk );
450  return equal;
451 }
const XML_Char * target
Definition: expat.h:268
bool equal(T *first, T *second)
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:121
int fHitQrkPDG
hit quark PDG code
Definition: Target.h:122
int fTgtPDG
nuclear target PDG code
Definition: Target.h:120
bool fHitSeaQrk
hit quark from sea?
Definition: Target.h:123
void Target::Copy ( const Target t)

Definition at line 133 of file Target.cxx.

References fA, fHitNucP4, fHitNucPDG, fHitNucRad, fHitQrkPDG, fHitSeaQrk, ForceHitNucValidity(), ForceNucleusValidity(), fTgtPDG, fZ, genie::pdg::IsIon(), and make_associated_cosmic_defs::p4.

Referenced by genie::InitialState::Copy(), HitNucP4(), operator=(), and Target().

134 {
135  fTgtPDG = tgt.fTgtPDG;
136 
137  if( pdg::IsIon(fTgtPDG) ) {
138 
139  fZ = tgt.fZ; // copy A,Z
140  fA = tgt.fA;
141  fHitNucPDG = tgt.fHitNucPDG; // struck nucleon PDG
142  fHitQrkPDG = tgt.fHitQrkPDG; // struck quark PDG
143  fHitSeaQrk = tgt.fHitSeaQrk; // struck quark is from sea?
144 
145  //// valgrind warns about this ... try something else
146  // (*fHitNucP4) = (*tgt.fHitNucP4);
147  const TLorentzVector& p4 = *(tgt.fHitNucP4);
148  // *fHitNucP4 = p4; // nope
149  //// this works for valgrind
150  fHitNucP4->SetX(p4.X());
151  fHitNucP4->SetY(p4.Y());
152  fHitNucP4->SetZ(p4.Z());
153  fHitNucP4->SetT(p4.T());
154 
155  fHitNucRad = tgt.fHitNucRad;
156 
157  // look-up the nucleus in the isotopes chart
158  this->ForceNucleusValidity();
159 
160  // make sure the hit nucleus constituent object is either
161  // a nucleon (p or n) or a di-nucleon cluster (p+p, p+n, n+n)
162  this->ForceHitNucValidity();
163  }
164 }
int fZ
nuclear target Z
Definition: Target.h:118
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:121
int fHitQrkPDG
hit quark PDG code
Definition: Target.h:122
int fTgtPDG
nuclear target PDG code
Definition: Target.h:120
bool IsIon(int pdgc)
Definition: PDGUtils.cxx:40
double fHitNucRad
hit nucleon position
Definition: Target.h:125
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:124
bool fHitSeaQrk
hit quark from sea?
Definition: Target.h:123
bool ForceHitNucValidity(void)
Definition: Target.cxx:367
void ForceNucleusValidity(void)
Definition: Target.cxx:379
int fA
nuclear target A
Definition: Target.h:119
void Target::ForceHitNucOnMassShell ( void  )

Definition at line 217 of file Target.cxx.

References e, HitNucIsSet(), HitNucMass(), HitNucP4Ptr(), m, and ana::Sqrt().

218 {
219  if(this->HitNucIsSet()) {
220  double m = this->HitNucMass();
221  double p = this->HitNucP4Ptr()->P();
222  double e = TMath::Sqrt(p*p+m*m);
223  this->HitNucP4Ptr()->SetE(e);
224  }
225 }
double HitNucMass(void) const
Definition: Target.cxx:250
const char * p
Definition: xmltok.h:285
TLorentzVector * HitNucP4Ptr(void) const
Definition: Target.cxx:264
bool HitNucIsSet(void) const
Definition: Target.cxx:300
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:326
Float_t e
Definition: plot.C:35
bool Target::ForceHitNucValidity ( void  )
private

Definition at line 367 of file Target.cxx.

References fHitNucPDG, genie::pdg::Is2NucleonCluster(), and genie::pdg::IsNucleon().

Referenced by Copy(), HitNucP4(), and SetHitNucPdg().

368 {
369 // resets the struck nucleon pdg-code if it is found not to be a valid one
370 
371  bool valid =
374  (fHitNucPDG==0); /* not set */
375 
376  return valid;
377 }
bool IsNucleon(int pdgc)
Definition: PDGUtils.cxx:309
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:121
bool Is2NucleonCluster(int pdgc)
Definition: PDGUtils.cxx:365
void Target::ForceNucleusValidity ( void  )
private

Definition at line 379 of file Target.cxx.

References fA, fZ, IsValidNucleus(), LOG, and pWARN.

Referenced by Copy(), HitNucP4(), and SetId().

380 {
381 // resets the target pdg-code if it is found not to be a valid one
382 
383  if( ! this->IsValidNucleus() ) {
384  LOG("Target", pWARN) << "Invalid target -- Reseting to Z = 0, A = 0";
385  fZ = 0;
386  fA = 0;
387  }
388 }
int fZ
nuclear target Z
Definition: Target.h:118
bool IsValidNucleus(void) const
Definition: Target.cxx:326
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pWARN
Definition: Messenger.h:61
int fA
nuclear target A
Definition: Target.h:119
bool Target::HitNucIsSet ( void  ) const
double Target::HitNucMass ( void  ) const

Definition at line 250 of file Target.cxx.

References fHitNucPDG, genie::PDGLibrary::Find(), genie::PDGLibrary::Instance(), LOG, and pWARN.

Referenced by genie::NievesQELCCPXSec::CompareNievesTensors(), genie::utils::CosTheta0Max(), genie::SmithMonizQELCCPXSec::d2sQES_dQ2dv_SM(), genie::QPMDISPXSec::DISRESJoinSuppressionFactor(), genie::QPMDMDISPXSec::DMDISRESJoinSuppressionFactor(), genie::KovalenkoQELCharmPXSec::DR(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), ForceHitNucOnMassShell(), genie::LwlynSmithFFNC::Fp(), genie::LwlynSmithFF::Fp(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::BBA03ELFormFactorsModel::Gen(), Pdg(), genie::DFRHadronicSystemGenerator::ProcessEventRecord(), genie::SmithMonizUtils::SetInteraction(), genie::QELKinematicsGenerator::SpectralFuncExperimentalCode(), genie::DMELKinematicsGenerator::SpectralFuncExperimentalCode(), genie::BBA05ELFormFactorsModel::tau(), genie::LwlynSmithFF::tau(), genie::KPhaseSpace::TLim(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::AhrensNCELPXSec::XSec(), genie::ReinDFRPXSec::XSec(), genie::RosenbluthPXSec::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::QPMDISPXSec::XSec(), genie::AhrensDMELPXSec::XSec(), genie::P33PaschosLalakulichPXSec::XSec(), genie::QPMDMDISPXSec::XSec(), genie::LwlynSmithQELCCPXSec::XSec(), genie::PaisQELLambdaPXSec::XSec(), genie::KovalenkoQELCharmPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), and genie::NievesQELCCPXSec::XSec().

251 {
252  if(!fHitNucPDG) {
253  LOG("Target", pWARN) << "Returning struck nucleon mass = 0";
254  return 0;
255  }
256  return PDGLibrary::Instance()->Find(fHitNucPDG)->Mass();
257 }
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:121
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pWARN
Definition: Messenger.h:61
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
const TLorentzVector& genie::Target::HitNucP4 ( void  ) const
inline

Definition at line 92 of file Target.h.

References AsString(), AutoSetHitNuc(), CleanUp(), Compare(), Copy(), ForceHitNucValidity(), ForceNucleusValidity(), HitNucP4Ptr(), Init(), operator<<, operator=(), operator==(), Print(), Reset(), runNovaSAM::stream, and confusionMatrixTree::t.

Referenced by genie::MECGenerator::AddFinalStateLepton(), genie::InitialStateAppender::AddStruckParticle(), genie::QPMDISStrucFuncBase::CalcPDFs(), genie::SKHadronicSystemGenerator::CalculateHadronicSystem_AtharSingleKaon(), genie::SKKinematicsGenerator::CalculateKin_AtharSingleKaon(), genie::utils::CosTheta0Max(), genie::utils::EnergyDeltaFunctionSolutionQEL(), genie::PrimaryLeptonGenerator::NucRestFrame2Lab(), genie::OutgoingDarkGenerator::NucRestFrame2Lab(), genie::DFRKinematicsGenerator::ProcessEventRecord(), genie::QELKinematicsGenerator::ProcessEventRecord(), genie::RESKinematicsGenerator::ProcessEventRecord(), genie::DMELKinematicsGenerator::ProcessEventRecord(), genie::IBDKinematicsGenerator::ProcessEventRecord(), genie::DISKinematicsGenerator::ProcessEventRecord(), genie::QELEventGenerator::ProcessEventRecord(), genie::DMDISKinematicsGenerator::ProcessEventRecord(), genie::QELEventGeneratorSM::ProcessEventRecord(), genie::QELKinematicsGenerator::SpectralFuncExperimentalCode(), genie::DMELKinematicsGenerator::SpectralFuncExperimentalCode(), and genie::NievesQELCCPXSec::XSec().

92 { return *this->HitNucP4Ptr(); }
TLorentzVector * HitNucP4Ptr(void) const
Definition: Target.cxx:264
TLorentzVector * Target::HitNucP4Ptr ( void  ) const

Definition at line 264 of file Target.cxx.

References fHitNucP4, LOG, and pWARN.

Referenced by genie::utils::BindHitNucleon(), genie::InitialState::CMEnergy(), genie::utils::gsl::d2XSec_dWdQ2_E::DoEval(), ForceHitNucOnMassShell(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::InitialState::GetProbeP4(), genie::InitialState::GetTgtP4(), HitNucP4(), genie::LwlynSmithQELCCPXSec::Integral(), genie::utils::kinematics::Jacobian(), genie::FermiMover::KickHitNucleon(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::utils::kinematics::PhaseSpaceVolume(), genie::InitialState::Print(), genie::QELEventGeneratorSM::ProcessEventRecord(), genie::QPMDISStrucFuncBase::Q2(), genie::utils::kinematics::Q2(), genie::KPhaseSpace::Q2Lim(), genie::KPhaseSpace::Q2Lim_W(), genie::QELKinematicsGenerator::SpectralFuncExperimentalCode(), genie::DMELKinematicsGenerator::SpectralFuncExperimentalCode(), genie::KPhaseSpace::Threshold(), genie::utils::kinematics::UpdateWQ2FromXY(), genie::utils::kinematics::UpdateXFromQ2Y(), genie::utils::kinematics::UpdateXYFromWQ2(), genie::PaisQELLambdaPXSec::ValidKinematics(), genie::KovalenkoQELCharmPXSec::ValidKinematics(), genie::utils::kinematics::W(), genie::KPhaseSpace::WLim(), genie::KPhaseSpace::XLim(), genie::KPhaseSpace::YLim(), and genie::KPhaseSpace::YLim_X().

265 {
266  if(!fHitNucP4) {
267  LOG("Target", pWARN) << "Returning NULL struck nucleon 4-momentum";
268  return 0;
269  }
270 
271  return fHitNucP4;
272 }
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pWARN
Definition: Messenger.h:61
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:124
int Target::HitNucPdg ( void  ) const

Definition at line 321 of file Target.cxx.

References fHitNucPDG.

Referenced by genie::InitialStateAppender::AddStruckParticle(), genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::AssertValidity(), genie::Interaction::AsString(), AsString(), genie::utils::BindHitNucleon(), genie::DISXSec::CacheFreeNucleonXSec(), genie::DMDISXSec::CacheFreeNucleonXSec(), genie::ReinSehgalRESXSecWithCache::CacheResExcitationXSec(), genie::ReinSehgalRESXSecWithCacheFast::CacheResExcitationXSec(), genie::QPMDISStrucFuncBase::CalcPDFs(), genie::QPMDISStrucFuncBase::Calculate(), Compare(), novarwgt::ConvertGenieEvent(), genie::SmithMonizQELCCPXSec::d2sQES_dQ2dv_SM(), genie::QPMDISPXSec::DISRESJoinSuppressionFactor(), genie::QPMDMDISPXSec::DMDISRESJoinSuppressionFactor(), genie::KovalenkoQELCharmPXSec::DR(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), genie::SppChannel::FromInteraction(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::PythiaHadronization::Hadronize(), genie::CharmHadronization::Hadronize(), genie::HadronicSystemGenerator::HadronShowerCharge(), genie::KNOHadronization::HadronShowerCharge(), genie::H3AMNuGammaPXSec::Integral(), genie::EmpiricalMECPXSec2015::Integral(), genie::LwlynSmithQELCCPXSec::Integral(), genie::DISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), genie::ReinSehgalSPPXSec::Integrate(), genie::InitialState::IsDMN(), genie::InitialState::IsDMP(), genie::InitialState::IsNuBarN(), genie::InitialState::IsNuBarP(), genie::InitialState::IsNuN(), genie::InitialState::IsNuP(), genie::NievesQELCCPXSec::LmunuAnumu(), supernova::SnovaGen::MakeMCTruth(), genie::KNOHadronization::MultiplicityProb(), genie::utils::ghep::NeutReactionCode(), genie::utils::nuclear::NuclQELXSecSuppression(), Pdg(), genie::InitialState::Print(), genie::EffectiveSF::ProbDistro(), genie::FGMBodekRitchie::ProbDistro(), genie::LocalFGM::ProbDistro(), genie::NucleonDecayPrimaryVtxGenerator::ProcessEventRecord(), genie::Interaction::RecoilNucleonPdg(), SaveGraphsToRootFile(), genie::MECGenerator::SelectEmpiricalKinematics(), genie::SmithMonizUtils::SetInteraction(), genie::KPhaseSpace::Threshold(), genie::SlowRsclCharmDISPXSecLO::ValidProcess(), genie::RosenbluthPXSec::ValidProcess(), genie::AivazisCharmPXSecLO::ValidProcess(), genie::QPMDISPXSec::ValidProcess(), genie::QPMDMDISPXSec::ValidProcess(), genie::LwlynSmithQELCCPXSec::ValidProcess(), genie::PaisQELLambdaPXSec::ValidProcess(), genie::KovalenkoQELCharmPXSec::ValidProcess(), genie::ReinSehgalRESPXSec::ValidProcess(), genie::SmithMonizQELCCPXSec::ValidProcess(), genie::BSKLNBaseRESPXSec2014::ValidProcess(), genie::NievesQELCCPXSec::ValidProcess(), genie::EmpiricalMECPXSec2015::XSec(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::ReinDFRPXSec::XSec(), genie::AhrensNCELPXSec::XSec(), genie::RosenbluthPXSec::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::QPMDISPXSec::XSec(), genie::P33PaschosLalakulichPXSec::XSec(), genie::AhrensDMELPXSec::XSec(), genie::LwlynSmithQELCCPXSec::XSec(), genie::QPMDMDISPXSec::XSec(), genie::PaisQELLambdaPXSec::XSec(), genie::NievesSimoVacasMECPXSec2016::XSec(), genie::KovalenkoQELCharmPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), genie::NievesQELCCPXSec::XSec(), and genie::KovalenkoQELCharmPXSec::ZR().

322 {
323  return fHitNucPDG;
324 }
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:121
double genie::Target::HitNucPosition ( void  ) const
inline
bool Target::HitQrkIsSet ( void  ) const
int Target::HitQrkPdg ( void  ) const
bool Target::HitSeaQrk ( void  ) const
void Target::Init ( void  )
private

Definition at line 116 of file Target.cxx.

References fA, fHitNucP4, fHitNucPDG, fHitNucRad, fHitQrkPDG, fHitSeaQrk, fTgtPDG, fZ, and genie::constants::kNucleonMass.

Referenced by HitNucP4(), Reset(), and Target().

117 {
118  fZ = 0;
119  fA = 0;
120  fTgtPDG = 0;
121  fHitNucPDG = 0;
122  fHitQrkPDG = 0;
123  fHitSeaQrk = false;
124  fHitNucP4 = new TLorentzVector(0,0,0,kNucleonMass);
125  fHitNucRad = 0.;
126 }
static const double kNucleonMass
Definition: Constants.h:78
int fZ
nuclear target Z
Definition: Target.h:118
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:121
int fHitQrkPDG
hit quark PDG code
Definition: Target.h:122
int fTgtPDG
nuclear target PDG code
Definition: Target.h:120
double fHitNucRad
hit nucleon position
Definition: Target.h:125
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:124
bool fHitSeaQrk
hit quark from sea?
Definition: Target.h:123
int fA
nuclear target A
Definition: Target.h:119
bool Target::IsEvenEven ( void  ) const

Definition at line 339 of file Target.cxx.

References IsNucleus(), N(), NN, and Z().

Referenced by IsEvenOdd(), and Pdg().

340 {
341  if( this->IsNucleus() ) {
342  int NN = this->N();
343  int ZZ = this->Z();
344  if( NN % 2 == 0 && ZZ % 2 == 0 ) return true;
345  }
346  return false;
347 }
bool IsNucleus(void) const
Definition: Target.cxx:289
int Z(void) const
Definition: Target.h:69
int N(void) const
Definition: Target.h:70
#define NN
bool Target::IsEvenOdd ( void  ) const

Definition at line 349 of file Target.cxx.

References IsEvenEven(), IsNucleus(), and IsOddOdd().

Referenced by Pdg().

350 {
351  if( this->IsNucleus() ) {
352  if(! this->IsEvenEven() && ! this->IsOddOdd() ) return true;
353  }
354  return false;
355 }
bool IsNucleus(void) const
Definition: Target.cxx:289
bool IsEvenEven(void) const
Definition: Target.cxx:339
bool IsOddOdd(void) const
Definition: Target.cxx:357
bool Target::IsFreeNucleon ( void  ) const

Definition at line 274 of file Target.cxx.

References fA, and fZ.

Referenced by AutoSetHitNuc(), IsValidNucleus(), Pdg(), and Print().

275 {
276  return (fA == 1 && (fZ == 0 || fZ == 1));
277 }
int fZ
nuclear target Z
Definition: Target.h:118
int fA
nuclear target A
Definition: Target.h:119
bool Target::IsNeutron ( void  ) const

Definition at line 284 of file Target.cxx.

References fA, and fZ.

Referenced by genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), Pdg(), and genie::StrumiaVissaniIBDPXSec::ValidProcess().

285 {
286  return (fA == 1 && fZ == 0);
287 }
int fZ
nuclear target Z
Definition: Target.h:118
int fA
nuclear target A
Definition: Target.h:119
bool Target::IsNucleus ( void  ) const

Definition at line 289 of file Target.cxx.

References fA.

Referenced by genie::DISHadronicSystemGenerator::AddFragmentationProducts(), genie::InitialStateAppender::AddNucleus(), genie::QELHadronicSystemGenerator::AddRecoilBaryon(), genie::IBDHadronicSystemGenerator::AddRecoilBaryon(), genie::RSPPHadronicSystemGenerator::AddResonanceDecayProducts(), genie::InitialStateAppender::AddStruckParticle(), genie::NuETargetRemnantGenerator::AddTargetNucleusRemnant(), genie::utils::nuclear::BindEnergy(), genie::utils::nuclear::BindEnergyLastNucleon(), genie::utils::nuclear::BindEnergyPerNucleon(), genie::utils::nuclear::BindEnergyPerNucleonParametrization(), genie::utils::BindHitNucleon(), genie::SKHadronicSystemGenerator::CalculateHadronicSystem_AtharSingleKaon(), genie::utils::CosTheta0Max(), genie::COHInteractionListGenerator::CreateInteractionList(), genie::utils::nuclear::FermiMomentumForIsoscalarNucleonParametrization(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::LwlynSmithQELCCPXSec::Integral(), genie::DISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), genie::NewQELXSec::Integrate(), IsEvenEven(), IsEvenOdd(), IsOddOdd(), genie::FermiMover::KickHitNucleon(), genie::NievesQELCCPXSec::LmunuAnumu(), genie::utils::ghep::NeutReactionCode(), genie::utils::ghep::NuanceReactionCode(), genie::utils::nuclear::NuclQELXSecSuppression(), Pdg(), Print(), genie::DFRHadronicSystemGenerator::ProcessEventRecord(), genie::FermiMover::ProcessEventRecord(), genie::QELEventGenerator::ProcessEventRecord(), genie::QELEventGeneratorSM::ProcessEventRecord(), genie::COHElasticPXSec::ValidProcess(), genie::NievesQELCCPXSec::vcr(), genie::COHElasticPXSec::XSec(), and genie::NievesQELCCPXSec::XSec().

290 {
291  return (fA > 1); // IsValidNucleus() was ensured when A,Z were set
292 }
int fA
nuclear target A
Definition: Target.h:119
bool Target::IsOddOdd ( void  ) const

Definition at line 357 of file Target.cxx.

References IsNucleus(), N(), NN, and Z().

Referenced by IsEvenOdd(), and Pdg().

358 {
359  if( this->IsNucleus() ) {
360  int NN = this->N();
361  int ZZ = this->Z();
362  if( NN % 2 == 1 && ZZ % 2 == 1 ) return true;
363  }
364  return false;
365 }
bool IsNucleus(void) const
Definition: Target.cxx:289
int Z(void) const
Definition: Target.h:69
int N(void) const
Definition: Target.h:70
#define NN
bool Target::IsParticle ( void  ) const

Definition at line 294 of file Target.cxx.

References fA, genie::PDGLibrary::Find(), fTgtPDG, fZ, and genie::PDGLibrary::Instance().

Referenced by Pdg().

295 {
296  TParticlePDG * p = PDGLibrary::Instance()->Find(fTgtPDG);
297  return (p && fA==0 && fZ==0);
298 }
int fZ
nuclear target Z
Definition: Target.h:118
const char * p
Definition: xmltok.h:285
int fTgtPDG
nuclear target PDG code
Definition: Target.h:120
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
int fA
nuclear target A
Definition: Target.h:119
bool Target::IsProton ( void  ) const

Definition at line 279 of file Target.cxx.

References fA, and fZ.

Referenced by AutoSetHitNuc(), genie::DFRInteractionListGenerator::CreateInteractionList(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), Pdg(), genie::StrumiaVissaniIBDPXSec::ValidProcess(), and genie::StrumiaVissaniIBDPXSec::XSec().

280 {
281  return (fA == 1 && fZ == 1);
282 }
int fZ
nuclear target Z
Definition: Target.h:118
int fA
nuclear target A
Definition: Target.h:119
bool Target::IsValidNucleus ( void  ) const

Definition at line 326 of file Target.cxx.

References fA, genie::PDGLibrary::Find(), fZ, genie::PDGLibrary::Instance(), genie::pdg::IonPdgCode(), and IsFreeNucleon().

Referenced by ForceNucleusValidity(), and Pdg().

327 {
328  //-- it is valid if it is a free nucleon...
329  if(this->IsFreeNucleon()) return true;
330 
331  //-- ... or a nucleus that can be found in the MINOS ion PDG extensions
332  int pdg_code = pdg::IonPdgCode(fA, fZ);
333  TParticlePDG * p = PDGLibrary::Instance()->Find(pdg_code);
334  if(p) return true;
335 
336  return false;
337 }
int fZ
nuclear target Z
Definition: Target.h:118
const char * p
Definition: xmltok.h:285
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:69
bool IsFreeNucleon(void) const
Definition: Target.cxx:274
int fA
nuclear target A
Definition: Target.h:119
double Target::Mass ( void  ) const
int genie::Target::N ( void  ) const
inline

Definition at line 70 of file Target.h.

References fA, and fZ.

Referenced by genie::QPMDISStrucFuncBase::Calculate(), genie::AMNuGammaInteractionListGenerator::CreateInteractionList(), genie::DFRInteractionListGenerator::CreateInteractionList(), genie::RESInteractionListGenerator::CreateInteractionList(), genie::IBDInteractionListGenerator::CreateInteractionList(), genie::SKInteractionListGenerator::CreateInteractionList(), genie::RSPPInteractionListGenerator::CreateInteractionList(), genie::DISInteractionListGenerator::CreateInteractionList(), genie::DMDISInteractionListGenerator::CreateInteractionList(), genie::QELInteractionListGenerator::CreateInteractionListCC(), genie::QELInteractionListGenerator::CreateInteractionListCharmCC(), genie::DMELInteractionListGenerator::CreateInteractionListDM(), genie::QELInteractionListGenerator::CreateInteractionListEM(), genie::QELInteractionListGenerator::CreateInteractionListNC(), genie::QELInteractionListGenerator::CreateInteractionListStrangeCC(), genie::SmithMonizQELCCPXSec::d2sQES_dQ2dv_SM(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::PauliBlocker::GetFermiMomentum(), genie::H3AMNuGammaPXSec::Integral(), genie::DISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), genie::ReinSehgalSPPXSec::Integrate(), IsEvenEven(), IsOddOdd(), genie::FermiMover::KickHitNucleon(), genie::NievesQELCCPXSec::LmunuAnumu(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::FGMBodekRitchie::ProbDistro(), genie::LocalFGM::ProbDistro(), genie::COHElasticPXSec::XSec(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::AlamSimoAtharVacasSKPXSec2014::XSec(), genie::ReinDFRPXSec::XSec(), genie::AhrensNCELPXSec::XSec(), genie::RosenbluthPXSec::XSec(), genie::QPMDISPXSec::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::P33PaschosLalakulichPXSec::XSec(), genie::AhrensDMELPXSec::XSec(), genie::LwlynSmithQELCCPXSec::XSec(), genie::QPMDMDISPXSec::XSec(), genie::PaisQELLambdaPXSec::XSec(), genie::KovalenkoQELCharmPXSec::XSec(), and genie::NievesQELCCPXSec::XSec().

70 { return fA-fZ; }
int fZ
nuclear target Z
Definition: Target.h:118
int fA
nuclear target A
Definition: Target.h:119
Target & Target::operator= ( const Target t)

copy

Definition at line 458 of file Target.cxx.

References Copy().

Referenced by HitNucP4().

459 {
460  this->Copy(target);
461  return (*this);
462 }
const XML_Char * target
Definition: expat.h:268
void Copy(const Target &t)
Definition: Target.cxx:133
bool Target::operator== ( const Target t) const

equal?

Definition at line 453 of file Target.cxx.

References Compare().

Referenced by HitNucP4().

454 {
455  return this->Compare(target);
456 }
const XML_Char * target
Definition: expat.h:268
bool Compare(const Target &t) const
Definition: Target.cxx:439
int genie::Target::Pdg ( void  ) const
inline
void Target::Print ( ostream &  stream) const

Definition at line 416 of file Target.cxx.

References genie::utils::print::BoolAsYNString(), allTimeWatchdog::endl, fA, fHitNucP4, fHitNucPDG, fHitQrkPDG, genie::PDGLibrary::Find(), fTgtPDG, fZ, HitNucIsSet(), HitQrkIsSet(), HitSeaQrk(), genie::PDGLibrary::Instance(), IsFreeNucleon(), IsNucleus(), and genie::utils::print::P4AsString().

Referenced by ClassImp(), and HitNucP4().

417 {
418  stream << " target PDG code = " << fTgtPDG << endl;
419 
420  if( this->IsNucleus() || this->IsFreeNucleon() ) {
421  stream << " Z = " << fZ << ", A = " << fA << endl;
422  }
423 
424  if( this->HitNucIsSet() ) {
425  TParticlePDG * p = PDGLibrary::Instance()->Find(fHitNucPDG);
426  stream << " struck nucleon = " << p->GetName()
427  << ", P4 = " << utils::print::P4AsString(fHitNucP4) << endl;
428  }
429 
430  if( this->HitQrkIsSet() ) {
431  TParticlePDG * q = PDGLibrary::Instance()->Find(fHitQrkPDG);
432  stream << " struck quark = " << q->GetName()
433  << " (from sea: "
435  << ")";
436  }
437 }
bool HitSeaQrk(void) const
Definition: Target.cxx:316
int fZ
nuclear target Z
Definition: Target.h:118
string BoolAsYNString(bool b)
Definition: PrintUtils.cxx:115
const char * p
Definition: xmltok.h:285
bool IsNucleus(void) const
Definition: Target.cxx:289
string P4AsString(const TLorentzVector *p)
Definition: PrintUtils.cxx:34
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:121
int fHitQrkPDG
hit quark PDG code
Definition: Target.h:122
int fTgtPDG
nuclear target PDG code
Definition: Target.h:120
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
bool HitNucIsSet(void) const
Definition: Target.cxx:300
bool HitQrkIsSet(void) const
Definition: Target.cxx:309
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:124
bool IsFreeNucleon(void) const
Definition: Target.cxx:274
int fA
nuclear target A
Definition: Target.h:119
void Target::Reset ( void  )

Definition at line 110 of file Target.cxx.

References CleanUp(), and Init().

Referenced by HitNucP4().

111 {
112  this->CleanUp();
113  this->Init();
114 }
void Init(void)
Definition: Target.cxx:116
void CleanUp(void)
Definition: Target.cxx:128
void Target::SetHitNucP4 ( const TLorentzVector &  p4)

Definition at line 206 of file Target.cxx.

References fHitNucP4.

Referenced by main(), and cafrwgt::CAFReweight::RetrieveGHEP().

207 {
208  if(fHitNucP4) delete fHitNucP4;
209  fHitNucP4 = new TLorentzVector(p4);
210 }
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:124
void Target::SetHitNucPdg ( int  pdgc)

Definition at line 188 of file Target.cxx.

References fHitNucP4, fHitNucPDG, genie::PDGLibrary::Find(), ForceHitNucValidity(), genie::PDGLibrary::Instance(), and art::is_valid().

Referenced by genie::Interaction::AMNuGamma(), AutoSetHitNuc(), genie::ReinSehgalRESXSecWithCache::CacheResExcitationXSec(), genie::ReinSehgalRESXSecWithCacheFast::CacheResExcitationXSec(), genie::DFRInteractionListGenerator::CreateInteractionList(), genie::RESInteractionListGenerator::CreateInteractionList(), genie::SKInteractionListGenerator::CreateInteractionList(), genie::RSPPInteractionListGenerator::CreateInteractionList(), genie::DISInteractionListGenerator::CreateInteractionList(), genie::DMDISInteractionListGenerator::CreateInteractionList(), genie::QELInteractionListGenerator::CreateInteractionListCC(), genie::QELInteractionListGenerator::CreateInteractionListCharmCC(), genie::DMELInteractionListGenerator::CreateInteractionListDM(), genie::QELInteractionListGenerator::CreateInteractionListNC(), genie::QELInteractionListGenerator::CreateInteractionListStrangeCC(), genie::Interaction::DFRCC(), genie::Interaction::DISCC(), genie::Interaction::DISEM(), genie::Interaction::DISNC(), genie::Interaction::DMDI(), genie::Interaction::DME(), genie::NNBarOscPrimaryVtxGenerator::GenerateDecayProducts(), genie::NucleonDecayPrimaryVtxGenerator::GenerateFermiMomentum(), genie::NNBarOscPrimaryVtxGenerator::GenerateFermiMomentum(), genie::Interaction::GLR(), genie::Interaction::IBD(), genie::NuEInteractionListGenerator::IMDAnnihilationInteractionList(), genie::NuEInteractionListGenerator::IMDInteractionList(), main(), genie::Interaction::MECCC(), genie::Interaction::MECEM(), genie::Interaction::MECNC(), genie::Interaction::NDecay(), genie::NuEInteractionListGenerator::NuEELInteractionList(), genie::Interaction::QELCC(), genie::Interaction::QELEM(), genie::Interaction::QELNC(), genie::Interaction::RESCC(), genie::Interaction::RESEM(), genie::Interaction::RESNC(), cafrwgt::CAFReweight::RetrieveGHEP(), genie::MECGenerator::SelectNSVLeptonKinematics(), Target(), and testXsec().

189 {
190  fHitNucPDG = nucl_pdgc;
191  bool is_valid = this->ForceHitNucValidity(); // p, n or a di-nucleon
192 
193  // If it is a valid struck nucleon pdg code, initialize its 4P:
194  // at-rest + on-mass-shell
195  if(is_valid) {
196  double M = PDGLibrary::Instance()->Find(nucl_pdgc)->Mass();
197  fHitNucP4->SetPxPyPzE(0,0,0,M);
198  }
199 }
constexpr bool is_valid(IDNumber_t< L > const id)
Definition: IDNumber.h:112
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:121
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:43
TParticlePDG * Find(int pdgc)
Definition: PDGLibrary.cxx:61
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:124
bool ForceHitNucValidity(void)
Definition: Target.cxx:367
void Target::SetHitNucPosition ( double  r)
void Target::SetHitQrkPdg ( int  pdgc)
void Target::SetHitSeaQrk ( bool  tf)
void Target::SetId ( int  pdgc)

Definition at line 166 of file Target.cxx.

References fA, ForceNucleusValidity(), fTgtPDG, fZ, genie::pdg::IonPdgCodeToA(), genie::pdg::IonPdgCodeToZ(), and genie::pdg::IsIon().

Referenced by genie::DISXSec::CacheFreeNucleonXSec(), genie::DMDISXSec::CacheFreeNucleonXSec(), genie::DISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), and Target().

167 {
168  fTgtPDG = pdgc;
169  if( pdg::IsIon(pdgc) ) {
170  fZ = pdg::IonPdgCodeToZ(pdgc);
171  fA = pdg::IonPdgCodeToA(pdgc);
172  }
173 
174  this->ForceNucleusValidity(); // search at the isotopes chart
175  //this->AutoSetHitNuc(); // struck nuc := tgt for free nucleon tgt
176 }
int fZ
nuclear target Z
Definition: Target.h:118
int IonPdgCodeToA(int pdgc)
Definition: PDGUtils.cxx:61
int fTgtPDG
nuclear target PDG code
Definition: Target.h:120
bool IsIon(int pdgc)
Definition: PDGUtils.cxx:40
int IonPdgCodeToZ(int pdgc)
Definition: PDGUtils.cxx:53
void ForceNucleusValidity(void)
Definition: Target.cxx:379
int fA
nuclear target A
Definition: Target.h:119
void Target::SetId ( int  Z,
int  A 
)

Definition at line 178 of file Target.cxx.

References fA, ForceNucleusValidity(), fTgtPDG, fZ, and genie::pdg::IonPdgCode().

179 {
180  fTgtPDG = pdg::IonPdgCode(AA,ZZ);
181  fZ = ZZ;
182  fA = AA;
183 
184  this->ForceNucleusValidity(); // search at the isotopes chart
185  //this->AutoSetHitNuc(); // struck nuc := tgt for free nucleon tgt
186 }
int fZ
nuclear target Z
Definition: Target.h:118
int fTgtPDG
nuclear target PDG code
Definition: Target.h:120
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:69
void ForceNucleusValidity(void)
Definition: Target.cxx:379
int fA
nuclear target A
Definition: Target.h:119
int genie::Target::Z ( void  ) const
inline

Definition at line 69 of file Target.h.

References fZ.

Referenced by genie::InitialStateAppender::AddNucleus(), genie::NuETargetRemnantGenerator::AddTargetNucleusRemnant(), genie::utils::nuclear::BindEnergy(), genie::utils::nuclear::BindEnergyPerNucleonParametrization(), genie::utils::BindHitNucleon(), genie::QPMDISStrucFuncBase::Calculate(), genie::AMNuGammaInteractionListGenerator::CreateInteractionList(), genie::DFRInteractionListGenerator::CreateInteractionList(), genie::SKInteractionListGenerator::CreateInteractionList(), genie::IBDInteractionListGenerator::CreateInteractionList(), genie::RESInteractionListGenerator::CreateInteractionList(), genie::RSPPInteractionListGenerator::CreateInteractionList(), genie::DISInteractionListGenerator::CreateInteractionList(), genie::DMDISInteractionListGenerator::CreateInteractionList(), genie::QELInteractionListGenerator::CreateInteractionListCC(), genie::QELInteractionListGenerator::CreateInteractionListCharmCC(), genie::DMELInteractionListGenerator::CreateInteractionListDM(), genie::QELInteractionListGenerator::CreateInteractionListEM(), genie::QELInteractionListGenerator::CreateInteractionListNC(), genie::QELInteractionListGenerator::CreateInteractionListStrangeCC(), genie::SmithMonizQELCCPXSec::d2sQES_dQ2dv_SM(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::LocalFGM::GenerateNucleon(), genie::SpectralFunc1d::GenerateNucleon(), genie::FGMBodekRitchie::GenerateNucleon(), genie::PauliBlocker::GetFermiMomentum(), genie::utils::config::GetValueFromNuclearMaps(), genie::H3AMNuGammaPXSec::Integral(), genie::EmpiricalMECPXSec2015::Integral(), genie::LwlynSmithQELCCPXSec::Integral(), genie::DISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), genie::ReinSehgalSPPXSec::Integrate(), IsEvenEven(), IsOddOdd(), genie::FermiMover::KickHitNucleon(), genie::NievesQELCCPXSec::LmunuAnumu(), genie::EffectiveSF::MakeEffectiveSF(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::InitialState::Print(), genie::SpectralFunc1d::Prob(), genie::FGMBodekRitchie::ProbDistro(), genie::LocalFGM::ProbDistro(), genie::NuclearModelMap::SelectModel(), genie::SmithMonizUtils::SetInteraction(), genie::ReinDFRPXSec::ValidProcess(), genie::NievesQELCCPXSec::vcr(), genie::COHElasticPXSec::XSec(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::AlamSimoAtharVacasSKPXSec2014::XSec(), genie::ReinDFRPXSec::XSec(), genie::AhrensNCELPXSec::XSec(), genie::RosenbluthPXSec::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::AlvarezRusoCOHPiPXSec::XSec(), genie::QPMDISPXSec::XSec(), genie::IMDAnnihilationPXSec::XSec(), genie::AhrensDMELPXSec::XSec(), genie::P33PaschosLalakulichPXSec::XSec(), genie::LwlynSmithQELCCPXSec::XSec(), genie::QPMDMDISPXSec::XSec(), genie::NuElectronPXSec::XSec(), genie::PaisQELLambdaPXSec::XSec(), genie::KovalenkoQELCharmPXSec::XSec(), genie::BardinIMDRadCorPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), and genie::NievesQELCCPXSec::XSec().

69 { return fZ; }
int fZ
nuclear target Z
Definition: Target.h:118

Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const Target t 
)
friend

print

Referenced by HitNucP4().

Member Data Documentation

int genie::Target::fA
private
TLorentzVector* genie::Target::fHitNucP4
private

hit nucleon 4p

Definition at line 124 of file Target.h.

Referenced by CleanUp(), Copy(), HitNucP4Ptr(), Init(), Print(), SetHitNucP4(), and SetHitNucPdg().

int genie::Target::fHitNucPDG
private

hit nucleon PDG code

Definition at line 121 of file Target.h.

Referenced by Compare(), Copy(), ForceHitNucValidity(), HitNucIsSet(), HitNucMass(), HitNucPdg(), Init(), Print(), and SetHitNucPdg().

double genie::Target::fHitNucRad
private

hit nucleon position

Definition at line 125 of file Target.h.

Referenced by Copy(), HitNucPosition(), Init(), and SetHitNucPosition().

int genie::Target::fHitQrkPDG
private

hit quark PDG code

Definition at line 122 of file Target.h.

Referenced by Compare(), Copy(), HitQrkIsSet(), HitQrkPdg(), Init(), Print(), and SetHitQrkPdg().

bool genie::Target::fHitSeaQrk
private

hit quark from sea?

Definition at line 123 of file Target.h.

Referenced by Compare(), Copy(), HitSeaQrk(), Init(), and SetHitSeaQrk().

int genie::Target::fTgtPDG
private

nuclear target PDG code

Definition at line 120 of file Target.h.

Referenced by Charge(), Compare(), Copy(), Init(), IsParticle(), Mass(), Pdg(), Print(), and SetId().

int genie::Target::fZ
private

nuclear target Z

Definition at line 118 of file Target.h.

Referenced by Copy(), ForceNucleusValidity(), Init(), IsFreeNucleon(), IsNeutron(), IsParticle(), IsProton(), IsValidNucleus(), N(), Print(), SetId(), and Z().


The documentation for this class was generated from the following files: