GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 <Target.h>

Inheritance diagram for genie::Target:
Inheritance graph
[legend]
Collaboration diagram for genie::Target:
Collaboration graph
[legend]

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 <c.andreopoulos cern.ch> University of Liverpool
Created:
May 03, 2004
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 40 of file Target.h.

Constructor & Destructor Documentation

Target::Target ( )

Definition at line 41 of file Target.cxx.

References Init().

41  :
42 TObject()
43 {
44  this->Init();
45 }
void Init(void)
Definition: Target.cxx:99
Target::Target ( int  pdgc)

Definition at line 47 of file Target.cxx.

References Init(), and SetId().

47  :
48 TObject()
49 {
50  this->Init();
51  this->SetId(pdgc);
52 }
void SetId(int pdgc)
Definition: Target.cxx:149
void Init(void)
Definition: Target.cxx:99
Target::Target ( int  Z,
int  A 
)

Definition at line 54 of file Target.cxx.

References Init(), and SetId().

54  :
55 TObject()
56 {
57  this->Init();
58  this->SetId(ZZ,AA);
59 }
void SetId(int pdgc)
Definition: Target.cxx:149
void Init(void)
Definition: Target.cxx:99
Target::Target ( int  Z,
int  A,
int  hit_nucleon_pdgc 
)

Definition at line 61 of file Target.cxx.

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

61  :
62 TObject()
63 {
64  this->Init();
65  this->SetId(ZZ,AA);
66  this->SetHitNucPdg(hit_nucleon_pdgc);
67 }
void SetId(int pdgc)
Definition: Target.cxx:149
void Init(void)
Definition: Target.cxx:99
void SetHitNucPdg(int pdgc)
Definition: Target.cxx:171
Target::Target ( const Target tgt)

Definition at line 69 of file Target.cxx.

References Copy(), and Init().

69  :
70 TObject()
71 {
72  this->Init();
73  this->Copy(tgt);
74 }
void Init(void)
Definition: Target.cxx:99
void Copy(const Target &t)
Definition: Target.cxx:116
Target::Target ( TRootIOCtor *  )

Definition at line 76 of file Target.cxx.

76  :
77 TObject(),
78 fZ(0),
79 fA(0),
80 fTgtPDG(0),
81 fHitNucPDG(0),
82 fHitSeaQrk(false),
83 fHitNucP4(0)
84 {
85 
86 }
int fZ
nuclear target Z
Definition: Target.h:117
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:120
int fTgtPDG
nuclear target PDG code
Definition: Target.h:119
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:123
bool fHitSeaQrk
hit quark from sea?
Definition: Target.h:122
int fA
nuclear target A
Definition: Target.h:118
Target::~Target ( )

Definition at line 88 of file Target.cxx.

References CleanUp().

89 {
90  this->CleanUp();
91 }
void CleanUp(void)
Definition: Target.cxx:111

Member Function Documentation

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

Definition at line 70 of file Target.h.

References fA.

Referenced by genie::InitialStateAppender::AddNucleus(), genie::NuETargetRemnantGenerator::AddTargetNucleusRemnant(), genie::DMETargetRemnantGenerator::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(), genie::QELEventGeneratorSM::ComputeMaxXSec(), genie::MECInteractionListGenerator::CreateInteractionList(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), genie::MArunAxialFormFactorModel::FA(), genie::FGMBodekRitchie::FermiMomentum(), genie::utils::nuclear::FermiMomentumForIsoscalarNucleonParametrization(), genie::EngelFormFactor::FormFactor(), genie::EffectiveSF::GenerateNucleon(), genie::FGMBodekRitchie::GenerateNucleon(), genie::PauliBlocker::GetFermiMomentum(), genie::utils::config::GetValueFromNuclearMaps(), genie::EmpiricalMECPXSec2015::Integral(), genie::NormXSec::Integral(), genie::LwlynSmithQELCCPXSec::Integral(), genie::SmithMonizQELCCXSec::Integrate(), genie::NewQELXSec::Integrate(), genie::NievesQELCCPXSec::LmunuAnumu(), genie::LocalFGM::LocalFermiMomentum(), genie::EffectiveSF::MakeEffectiveSF(), genie::QPMDISStrucFuncBase::NuclMod(), genie::QPMDMDISStrucFuncBase::NuclMod(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::InitialState::Print(), 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::NormXSec::XSec(), genie::PhotonCOHPXSec::XSec(), genie::AlvarezRusoCOHPiPXSec::XSec(), genie::BergerSehgalFMCOHPiPXSec2015::XSec(), genie::BergerSehgalCOHPiPXSec2015::XSec(), genie::ReinSehgalCOHPiPXSec::XSec(), genie::BostedChristyEMPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), and genie::MKSPPPXSec2020::XSec().

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

Definition at line 383 of file Target.cxx.

References HitNucIsSet(), HitNucPdg(), HitQrkIsSet(), HitQrkPdg(), HitSeaQrk(), Pdg(), and genie::units::s.

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

384 {
385  ostringstream s;
386 
387  s << this->Pdg();
388  if(this->HitNucIsSet())
389  s << "[N=" << this->HitNucPdg() << "]";
390  if(this->HitQrkIsSet()) {
391  s << "[q=" << this->HitQrkPdg();
392  s << (this->HitSeaQrk() ? "(s)" : "(v)");
393  s << "]";
394  }
395 
396  return s.str();
397 }
bool HitSeaQrk(void) const
Definition: Target.cxx:299
int HitNucPdg(void) const
Definition: Target.cxx:304
int HitQrkPdg(void) const
Definition: Target.cxx:242
int Pdg(void) const
Definition: Target.h:71
static constexpr double s
Definition: Units.h:95
bool HitNucIsSet(void) const
Definition: Target.cxx:283
bool HitQrkIsSet(void) const
Definition: Target.cxx:292
void Target::AutoSetHitNuc ( void  )
private

Definition at line 373 of file Target.cxx.

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

374 {
375 // for free nucleon targets -> (auto)set struck nucleon = target
376 
377  if( this->IsFreeNucleon() ) {
378  if( this->IsProton() ) this->SetHitNucPdg(kPdgProton);
379  else this->SetHitNucPdg(kPdgNeutron);
380  }
381 }
void SetHitNucPdg(int pdgc)
Definition: Target.cxx:171
const int kPdgProton
Definition: PDGCodes.h:81
bool IsProton(void) const
Definition: Target.cxx:262
const int kPdgNeutron
Definition: PDGCodes.h:83
bool IsFreeNucleon(void) const
Definition: Target.cxx:257
double Target::Charge ( void  ) const

Definition at line 215 of file Target.cxx.

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

216 {
217 // Shortcut for commonly used code for extracting the nucleus charge from PDG
218 //
219  TParticlePDG * p = PDGLibrary::Instance()->Find(fTgtPDG);
220  if(p) return p->Charge() / 3.; // in +e
221  return 0;
222 }
int fTgtPDG
nuclear target PDG code
Definition: Target.h:119
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:68
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
void Target::CleanUp ( void  )
private

Definition at line 111 of file Target.cxx.

References fHitNucP4.

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

112 {
113  delete fHitNucP4;
114 }
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:123
bool Target::Compare ( const Target t) const

Definition at line 422 of file Target.cxx.

References fHitNucPDG, fHitQrkPDG, fHitSeaQrk, fTgtPDG, HitNucPdg(), HitQrkPdg(), HitSeaQrk(), and Pdg().

Referenced by operator==().

423 {
424  int tgt_pdg = target.Pdg();
425  int struck_nuc_pdg = target.HitNucPdg();
426  int struck_qrk_pdg = target.HitQrkPdg();
427  bool struck_sea_qrk = target.HitSeaQrk();
428 
429  bool equal = ( fTgtPDG == tgt_pdg ) &&
430  ( fHitNucPDG == struck_nuc_pdg ) &&
431  ( fHitQrkPDG == struck_qrk_pdg ) &&
432  ( fHitSeaQrk == struck_sea_qrk );
433  return equal;
434 }
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:120
int fHitQrkPDG
hit quark PDG code
Definition: Target.h:121
int fTgtPDG
nuclear target PDG code
Definition: Target.h:119
bool fHitSeaQrk
hit quark from sea?
Definition: Target.h:122
void Target::Copy ( const Target t)

Definition at line 116 of file Target.cxx.

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

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

117 {
118  fTgtPDG = tgt.fTgtPDG;
119 
120  if( pdg::IsIon(fTgtPDG) ) {
121 
122  fZ = tgt.fZ; // copy A,Z
123  fA = tgt.fA;
124  fHitNucPDG = tgt.fHitNucPDG; // struck nucleon PDG
125  fHitQrkPDG = tgt.fHitQrkPDG; // struck quark PDG
126  fHitSeaQrk = tgt.fHitSeaQrk; // struck quark is from sea?
127 
128  //// valgrind warns about this ... try something else
129  // (*fHitNucP4) = (*tgt.fHitNucP4);
130  const TLorentzVector& p4 = *(tgt.fHitNucP4);
131  // *fHitNucP4 = p4; // nope
132  //// this works for valgrind
133  fHitNucP4->SetX(p4.X());
134  fHitNucP4->SetY(p4.Y());
135  fHitNucP4->SetZ(p4.Z());
136  fHitNucP4->SetT(p4.T());
137 
138  fHitNucRad = tgt.fHitNucRad;
139 
140  // look-up the nucleus in the isotopes chart
141  this->ForceNucleusValidity();
142 
143  // make sure the hit nucleus constituent object is either
144  // a nucleon (p or n) or a di-nucleon cluster (p+p, p+n, n+n)
145  this->ForceHitNucValidity();
146  }
147 }
int fZ
nuclear target Z
Definition: Target.h:117
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:120
int fHitQrkPDG
hit quark PDG code
Definition: Target.h:121
int fTgtPDG
nuclear target PDG code
Definition: Target.h:119
bool IsIon(int pdgc)
Definition: PDGUtils.cxx:42
double fHitNucRad
hit nucleon position
Definition: Target.h:124
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:123
bool fHitSeaQrk
hit quark from sea?
Definition: Target.h:122
bool ForceHitNucValidity(void)
Definition: Target.cxx:350
void ForceNucleusValidity(void)
Definition: Target.cxx:362
int fA
nuclear target A
Definition: Target.h:118
void Target::ForceHitNucOnMassShell ( void  )

Definition at line 200 of file Target.cxx.

References e, HitNucIsSet(), HitNucMass(), HitNucP4Ptr(), and genie::units::m.

201 {
202  if(this->HitNucIsSet()) {
203  double m = this->HitNucMass();
204  double p = this->HitNucP4Ptr()->P();
205  double e = TMath::Sqrt(p*p+m*m);
206  this->HitNucP4Ptr()->SetE(e);
207  }
208 }
double HitNucMass(void) const
Definition: Target.cxx:233
const double e
TLorentzVector * HitNucP4Ptr(void) const
Definition: Target.cxx:247
bool HitNucIsSet(void) const
Definition: Target.cxx:283
static constexpr double m
Definition: Units.h:71
bool Target::ForceHitNucValidity ( void  )
private

Definition at line 350 of file Target.cxx.

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

Referenced by Copy(), and SetHitNucPdg().

351 {
352 // resets the struck nucleon pdg-code if it is found not to be a valid one
353 
354  bool valid =
357  (fHitNucPDG==0); /* not set */
358 
359  return valid;
360 }
bool IsNucleon(int pdgc)
Definition: PDGUtils.cxx:346
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:120
bool Is2NucleonCluster(int pdgc)
Definition: PDGUtils.cxx:402
void Target::ForceNucleusValidity ( void  )
private

Definition at line 362 of file Target.cxx.

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

Referenced by Copy(), and SetId().

363 {
364 // resets the target pdg-code if it is found not to be a valid one
365 
366  if( ! this->IsValidNucleus() ) {
367  LOG("Target", pWARN) << "Invalid target -- Reseting to Z = 0, A = 0";
368  fZ = 0;
369  fA = 0;
370  }
371 }
int fZ
nuclear target Z
Definition: Target.h:117
bool IsValidNucleus(void) const
Definition: Target.cxx:309
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
#define pWARN
Definition: Messenger.h:60
int fA
nuclear target A
Definition: Target.h:118
bool Target::HitNucIsSet ( void  ) const
double Target::HitNucMass ( void  ) const

Definition at line 233 of file Target.cxx.

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

Referenced by genie::NievesQELCCPXSec::CompareNievesTensors(), genie::utils::CosTheta0Max(), genie::HEDISStrucFunc::CreateQrkSF(), genie::SmithMonizQELCCPXSec::d3sQES_dQ2dvdkF_SM(), genie::KNOTunedQPMDISPXSec::DISRESJoinSuppressionFactor(), genie::KovalenkoQELCharmPXSec::DR(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), ForceHitNucOnMassShell(), genie::LwlynSmithFFNC::Fp(), genie::LwlynSmithFF::Fp(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::GalsterELFormFactorsModel::Gen(), genie::BBA03ELFormFactorsModel::Gen(), genie::LocalFGM::GenerateNucleon(), genie::DFRHadronicSystemGenerator::ProcessEventRecord(), genie::PhotonRESGenerator::ProcessEventRecord(), genie::SmithMonizUtils::SetInteraction(), genie::QELKinematicsGenerator::SpectralFuncExperimentalCode(), genie::DMELKinematicsGenerator::SpectralFuncExperimentalCode(), genie::BBA05ELFormFactorsModel::tau(), genie::LwlynSmithFF::tau(), genie::KPhaseSpace::TLim(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::HEDISPXSec::XSec(), genie::PhotonRESPXSec::XSec(), genie::ReinDFRPXSec::XSec(), genie::RosenbluthPXSec::XSec(), genie::AhrensNCELPXSec::XSec(), genie::QPMDISPXSec::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::AhrensDMELPXSec::XSec(), genie::P33PaschosLalakulichPXSec::XSec(), genie::LwlynSmithQELCCPXSec::XSec(), genie::QPMDMDISPXSec::XSec(), genie::PaisQELLambdaPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::NievesQELCCPXSec::XSec(), genie::KovalenkoQELCharmPXSec::XSec(), and genie::BSKLNBaseRESPXSec2014::XSec().

234 {
235  if(!fHitNucPDG) {
236  LOG("Target", pWARN) << "Returning struck nucleon mass = 0";
237  return 0;
238  }
239  return PDGLibrary::Instance()->Find(fHitNucPDG)->Mass();
240 }
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:120
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
#define pWARN
Definition: Messenger.h:60
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:68
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
const TLorentzVector& genie::Target::HitNucP4 ( void  ) const
inline

Definition at line 91 of file Target.h.

References HitNucP4Ptr().

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

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

Definition at line 247 of file Target.cxx.

References fHitNucP4, LOG, and pWARN.

Referenced by genie::utils::BindHitNucleon(), genie::InitialState::CMEnergy(), 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::QPMDMDISStrucFuncBase::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::UpdateWYFromXQ2(), 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().

248 {
249  if(!fHitNucP4) {
250  LOG("Target", pWARN) << "Returning NULL struck nucleon 4-momentum";
251  return 0;
252  }
253 
254  return fHitNucP4;
255 }
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
#define pWARN
Definition: Messenger.h:60
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:123
int Target::HitNucPdg ( void  ) const

Definition at line 304 of file Target.cxx.

References fHitNucPDG.

Referenced by genie::InitialStateAppender::AddStruckParticle(), genie::AGKYLowW2019::ApplyRijk(), genie::PythiaBaseHadro2019::AssertValidity(), genie::Interaction::AsString(), AsString(), genie::utils::BindHitNucleon(), genie::DISXSec::CacheFreeNucleonXSec(), genie::DMDISXSec::CacheFreeNucleonXSec(), genie::ReinSehgalRESXSecWithCache::CacheResExcitationXSec(), genie::ReinSehgalRESXSecWithCacheFast::CacheResExcitationXSec(), genie::SPPXSecWithCache::CacheResExcitationXSec(), genie::QPMDISStrucFuncBase::CalcPDFs(), genie::QPMDMDISStrucFuncBase::CalcPDFs(), genie::QPMDISStrucFuncBase::Calculate(), genie::QPMDMDISStrucFuncBase::Calculate(), Compare(), genie::HEDISStrucFunc::CreateQrkSF(), genie::SmithMonizQELCCPXSec::d2sQES_dQ2dv_SM(), genie::SmithMonizQELCCPXSec::d3sQES_dQ2dvdkF_SM(), genie::KNOTunedQPMDISPXSec::DISRESJoinSuppressionFactor(), genie::KovalenkoQELCharmPXSec::DR(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), genie::SppChannel::FromInteraction(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::LocalFGM::GenerateNucleon(), genie::LeptoHadronization::Hadronize(), genie::AGCharm2019::Hadronize(), genie::HadronicSystemGenerator::HadronShowerCharge(), genie::AGKYLowW2019::HadronShowerCharge(), genie::H3AMNuGammaPXSec::Integral(), genie::EmpiricalMECPXSec2015::Integral(), genie::LwlynSmithQELCCPXSec::Integral(), genie::DISXSec::Integrate(), genie::HEDISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::HELeptonXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::SPPXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalSPPXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), genie::InitialState::IsDMBN(), genie::InitialState::IsDMBP(), genie::InitialState::IsDMN(), genie::InitialState::IsDMP(), genie::InitialState::IsNuBarN(), genie::InitialState::IsNuBarP(), genie::InitialState::IsNuN(), genie::InitialState::IsNuP(), genie::NievesQELCCPXSec::LmunuAnumu(), genie::PythiaBaseHadro2019::MakeQuarkDiquarkAssignments(), genie::AGKYLowW2019::MultiplicityProb(), genie::utils::ghep::NeutReactionCode(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::HEDISStrucFunc::NucSFCode(), genie::HEDISStrucFunc::NucSFName(), genie::InitialState::Print(), genie::EffectiveSF::ProbDistro(), genie::FGMBodekRitchie::ProbDistro(), genie::LocalFGM::ProbDistro(), genie::NucleonDecayPrimaryVtxGenerator::ProcessEventRecord(), genie::HEDISStrucFunc::QrkSFCode(), genie::HEDISStrucFunc::QrkSFName(), genie::Interaction::RecoilNucleonPdg(), SaveGraphsToRootFile(), genie::MECGenerator::SelectEmpiricalKinematics(), genie::SmithMonizUtils::SetInteraction(), genie::KPhaseSpace::Threshold(), genie::HEDISPXSec::ValidProcess(), genie::SlowRsclCharmDISPXSecLO::ValidProcess(), genie::PhotonRESPXSec::ValidProcess(), genie::RosenbluthPXSec::ValidProcess(), genie::AivazisCharmPXSecLO::ValidProcess(), genie::QPMDISPXSec::ValidProcess(), genie::QPMDMDISPXSec::ValidProcess(), genie::LwlynSmithQELCCPXSec::ValidProcess(), genie::PaisQELLambdaPXSec::ValidProcess(), genie::SuSAv2QELPXSec::ValidProcess(), genie::BostedChristyEMPXSec::ValidProcess(), genie::ReinSehgalRESPXSec::ValidProcess(), genie::KovalenkoQELCharmPXSec::ValidProcess(), genie::NievesQELCCPXSec::ValidProcess(), genie::SmithMonizQELCCPXSec::ValidProcess(), genie::BSKLNBaseRESPXSec2014::ValidProcess(), genie::EmpiricalMECPXSec2015::XSec(), genie::HEDISPXSec::XSec(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::PhotonRESPXSec::XSec(), genie::AhrensNCELPXSec::XSec(), genie::ReinDFRPXSec::XSec(), genie::RosenbluthPXSec::XSec(), genie::QPMDISPXSec::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::AhrensDMELPXSec::XSec(), genie::P33PaschosLalakulichPXSec::XSec(), genie::QPMDMDISPXSec::XSec(), genie::LwlynSmithQELCCPXSec::XSec(), genie::PaisQELLambdaPXSec::XSec(), genie::SuSAv2MECPXSec::XSec(), genie::NievesSimoVacasMECPXSec2016::XSec(), genie::SuSAv2QELPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::KovalenkoQELCharmPXSec::XSec(), genie::NievesQELCCPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), genie::MKSPPPXSec2020::XSec(), genie::SuSAv2QELPXSec::XSecScaling(), and genie::KovalenkoQELCharmPXSec::ZR().

305 {
306  return fHitNucPDG;
307 }
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:120
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 99 of file Target.cxx.

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

Referenced by Reset(), and Target().

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

Definition at line 322 of file Target.cxx.

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

Referenced by IsEvenOdd().

323 {
324  if( this->IsNucleus() ) {
325  int NN = this->N();
326  int ZZ = this->Z();
327  if( NN % 2 == 0 && ZZ % 2 == 0 ) return true;
328  }
329  return false;
330 }
bool IsNucleus(void) const
Definition: Target.cxx:272
int Z(void) const
Definition: Target.h:68
int N(void) const
Definition: Target.h:69
bool Target::IsEvenOdd ( void  ) const

Definition at line 332 of file Target.cxx.

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

333 {
334  if( this->IsNucleus() ) {
335  if(! this->IsEvenEven() && ! this->IsOddOdd() ) return true;
336  }
337  return false;
338 }
bool IsNucleus(void) const
Definition: Target.cxx:272
bool IsEvenEven(void) const
Definition: Target.cxx:322
bool IsOddOdd(void) const
Definition: Target.cxx:340
bool Target::IsFreeNucleon ( void  ) const

Definition at line 257 of file Target.cxx.

References fA, and fZ.

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

258 {
259  return (fA == 1 && (fZ == 0 || fZ == 1));
260 }
int fZ
nuclear target Z
Definition: Target.h:117
int fA
nuclear target A
Definition: Target.h:118
bool Target::IsNeutron ( void  ) const

Definition at line 267 of file Target.cxx.

References fA, and fZ.

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

268 {
269  return (fA == 1 && fZ == 0);
270 }
int fZ
nuclear target Z
Definition: Target.h:117
int fA
nuclear target A
Definition: Target.h:118
bool Target::IsNucleus ( void  ) const

Definition at line 272 of file Target.cxx.

References fA.

Referenced by genie::InitialStateAppender::AddNucleus(), genie::QELHadronicSystemGenerator::AddRecoilBaryon(), genie::IBDHadronicSystemGenerator::AddRecoilBaryon(), genie::RSPPHadronicSystemGenerator::AddResonanceDecayProducts(), genie::InitialStateAppender::AddStruckParticle(), genie::NuETargetRemnantGenerator::AddTargetNucleusRemnant(), genie::DMETargetRemnantGenerator::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::CEvNSInteractionListGenerator::CreateInteractionList(), genie::COHInteractionListGenerator::CreateInteractionList(), genie::COHDNuInteractionListGenerator::CreateInteractionList(), genie::utils::nuclear::FermiMomentumForIsoscalarNucleonParametrization(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::QELEventGeneratorSuSA::GenerateNucleon(), genie::evtlib::EventLibraryInterface::GetRecord(), genie::Pythia6Hadro2019::Hadronize(), genie::Pythia8Hadro2019::Hadronize(), genie::LwlynSmithQELCCPXSec::Integral(), genie::DISXSec::Integrate(), genie::HEDISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::SPPXSec::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(), Print(), genie::DFRHadronicSystemGenerator::ProcessEventRecord(), genie::QELEventGenerator::ProcessEventRecord(), genie::SRCNuclearRecoil::ProcessEventRecord(), genie::QELEventGeneratorSuSA::ProcessEventRecord(), genie::DMELEventGenerator::ProcessEventRecord(), genie::FermiMover::ProcessEventRecord(), genie::AGCharm2019::ProcessEventRecord(), genie::QELEventGeneratorSM::ProcessEventRecord(), genie::SPPEventGenerator::ProcessEventRecord(), genie::AGKYLowW2019::ProcessEventRecord(), genie::PattonCEvNSPXSec::ValidProcess(), genie::BertuzzoDNuCOHPXSec::ValidProcess(), genie::SuSAv2QELPXSec::ValidProcess(), genie::NievesQELCCPXSec::vcr(), and genie::NievesQELCCPXSec::XSec().

273 {
274  return (fA > 1); // IsValidNucleus() was ensured when A,Z were set
275 }
int fA
nuclear target A
Definition: Target.h:118
bool Target::IsOddOdd ( void  ) const

Definition at line 340 of file Target.cxx.

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

Referenced by IsEvenOdd().

341 {
342  if( this->IsNucleus() ) {
343  int NN = this->N();
344  int ZZ = this->Z();
345  if( NN % 2 == 1 && ZZ % 2 == 1 ) return true;
346  }
347  return false;
348 }
bool IsNucleus(void) const
Definition: Target.cxx:272
int Z(void) const
Definition: Target.h:68
int N(void) const
Definition: Target.h:69
bool Target::IsParticle ( void  ) const

Definition at line 277 of file Target.cxx.

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

278 {
279  TParticlePDG * p = PDGLibrary::Instance()->Find(fTgtPDG);
280  return (p && fA==0 && fZ==0);
281 }
int fZ
nuclear target Z
Definition: Target.h:117
int fTgtPDG
nuclear target PDG code
Definition: Target.h:119
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:68
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
int fA
nuclear target A
Definition: Target.h:118
bool Target::IsProton ( void  ) const

Definition at line 262 of file Target.cxx.

References fA, and fZ.

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

263 {
264  return (fA == 1 && fZ == 1);
265 }
int fZ
nuclear target Z
Definition: Target.h:117
int fA
nuclear target A
Definition: Target.h:118
bool Target::IsValidNucleus ( void  ) const

Definition at line 309 of file Target.cxx.

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

Referenced by ForceNucleusValidity(), and genie::EngelFormFactor::FormFactor().

310 {
311  //-- it is valid if it is a free nucleon...
312  if(this->IsFreeNucleon()) return true;
313 
314  //-- ... or a nucleus that can be found in the MINOS ion PDG extensions
315  int pdg_code = pdg::IonPdgCode(fA, fZ);
316  TParticlePDG * p = PDGLibrary::Instance()->Find(pdg_code);
317  if(p) return true;
318 
319  return false;
320 }
int fZ
nuclear target Z
Definition: Target.h:117
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:68
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:71
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
bool IsFreeNucleon(void) const
Definition: Target.cxx:257
int fA
nuclear target A
Definition: Target.h:118
double Target::Mass ( void  ) const
int genie::Target::N ( void  ) const
inline

Definition at line 69 of file Target.h.

References fA, and fZ.

Referenced by genie::QPMDISStrucFuncBase::Calculate(), genie::QPMDMDISStrucFuncBase::Calculate(), genie::AMNuGammaInteractionListGenerator::CreateInteractionList(), genie::DFRInteractionListGenerator::CreateInteractionList(), genie::RESInteractionListGenerator::CreateInteractionList(), genie::SKInteractionListGenerator::CreateInteractionList(), genie::IBDInteractionListGenerator::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::FGMBodekRitchie::FermiMomentum(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::PauliBlocker::GetFermiMomentum(), genie::H3AMNuGammaPXSec::Integral(), genie::DISXSec::Integrate(), genie::HEDISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::HELeptonXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::SPPXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalSPPXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), IsEvenEven(), IsOddOdd(), genie::NievesQELCCPXSec::LmunuAnumu(), genie::LocalFGM::LocalFermiMomentum(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::HELeptonInteractionListGenerator::PhotonRESInteraction(), genie::PhotonCOHGenerator::ProcessEventRecord(), genie::KPhaseSpace::Threshold(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::HEDISPXSec::XSec(), genie::PattonCEvNSPXSec::XSec(), genie::AlamSimoAtharVacasSKPXSec2014::XSec(), genie::PhotonRESPXSec::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::NievesQELCCPXSec::XSec(), genie::KovalenkoQELCharmPXSec::XSec(), and genie::SuSAv2QELPXSec::XSecScaling().

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

copy

Definition at line 441 of file Target.cxx.

References Copy().

442 {
443  this->Copy(target);
444  return (*this);
445 }
void Copy(const Target &t)
Definition: Target.cxx:116
bool Target::operator== ( const Target t) const

equal?

Definition at line 436 of file Target.cxx.

References Compare().

437 {
438  return this->Compare(target);
439 }
bool Compare(const Target &t) const
Definition: Target.cxx:422
int genie::Target::Pdg ( void  ) const
inline
void Target::Print ( ostream &  stream) const

Definition at line 399 of file Target.cxx.

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

Referenced by genie::operator<<().

400 {
401  stream << " target PDG code = " << fTgtPDG << endl;
402 
403  if( this->IsNucleus() || this->IsFreeNucleon() ) {
404  stream << " Z = " << fZ << ", A = " << fA << endl;
405  }
406 
407  if( this->HitNucIsSet() ) {
408  TParticlePDG * p = PDGLibrary::Instance()->Find(fHitNucPDG);
409  stream << " struck nucleon = " << p->GetName()
410  << ", P4 = " << utils::print::P4AsString(fHitNucP4) << endl;
411  }
412 
413  if( this->HitQrkIsSet() ) {
414  TParticlePDG * q = PDGLibrary::Instance()->Find(fHitQrkPDG);
415  stream << " struck quark = " << q->GetName()
416  << " (from sea: "
418  << ")";
419  }
420 }
bool HitSeaQrk(void) const
Definition: Target.cxx:299
int fZ
nuclear target Z
Definition: Target.h:117
string BoolAsYNString(bool b)
Definition: PrintUtils.cxx:108
bool IsNucleus(void) const
Definition: Target.cxx:272
string P4AsString(const TLorentzVector *p)
Definition: PrintUtils.cxx:27
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:120
int fHitQrkPDG
hit quark PDG code
Definition: Target.h:121
int fTgtPDG
nuclear target PDG code
Definition: Target.h:119
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:68
bool HitNucIsSet(void) const
Definition: Target.cxx:283
bool HitQrkIsSet(void) const
Definition: Target.cxx:292
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:123
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
bool IsFreeNucleon(void) const
Definition: Target.cxx:257
int fA
nuclear target A
Definition: Target.h:118
void Target::Reset ( void  )

Definition at line 93 of file Target.cxx.

References CleanUp(), and Init().

94 {
95  this->CleanUp();
96  this->Init();
97 }
void Init(void)
Definition: Target.cxx:99
void CleanUp(void)
Definition: Target.cxx:111
void Target::SetHitNucP4 ( const TLorentzVector &  p4)

Definition at line 189 of file Target.cxx.

References fHitNucP4.

Referenced by main(), and genie::SPPEventGenerator::ProcessEventRecord().

190 {
191  if(fHitNucP4) delete fHitNucP4;
192  fHitNucP4 = new TLorentzVector(p4);
193 }
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:123
void Target::SetHitNucPdg ( int  pdgc)

Definition at line 171 of file Target.cxx.

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

Referenced by genie::Interaction::AMNuGamma(), AutoSetHitNuc(), genie::ReinSehgalRESXSecWithCache::CacheResExcitationXSec(), genie::ReinSehgalRESXSecWithCacheFast::CacheResExcitationXSec(), genie::SPPXSecWithCache::CacheResExcitationXSec(), genie::HEDISInteractionListGenerator::CreateHEDISlist(), 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::DMEInteractionListGenerator::DMEELInteractionList(), genie::HNIntranuke2018::ElasHN(), genie::HNIntranuke2018::GammaInelasticHN(), genie::NNBarOscPrimaryVtxGenerator::GenerateDecayProducts(), genie::NucleonDecayPrimaryVtxGenerator::GenerateFermiMomentum(), genie::NNBarOscPrimaryVtxGenerator::GenerateFermiMomentum(), genie::QELEventGeneratorSuSA::GenerateNucleon(), genie::Interaction::GLR(), genie::HELeptonInteractionListGenerator::GLRESInteraction(), genie::HELeptonInteractionListGenerator::HENuElectronInteraction(), genie::Interaction::IBD(), genie::NuEInteractionListGenerator::IMDAnnihilationInteractionList(), genie::NuEInteractionListGenerator::IMDInteractionList(), genie::HAIntranuke::Inelastic(), genie::HAIntranuke2018::Inelastic(), main(), genie::Interaction::MECCC(), genie::Interaction::MECEM(), genie::Interaction::MECNC(), genie::Interaction::NDecay(), genie::NuEInteractionListGenerator::NuEELInteractionList(), genie::HELeptonInteractionListGenerator::PhotonRESInteraction(), genie::Interaction::QELCC(), genie::Interaction::QELEM(), genie::Interaction::QELNC(), genie::Interaction::RESCC(), genie::Interaction::RESEM(), genie::Interaction::RESNC(), genie::MECGenerator::SelectNSVLeptonKinematics(), genie::MECGenerator::SelectSuSALeptonKinematics(), Target(), genie::utils::intranuke::ThreeBodyKinematics(), and genie::utils::intranuke2018::ThreeBodyKinematics().

172 {
173  fHitNucPDG = nucl_pdgc;
174  bool is_valid = this->ForceHitNucValidity(); // p, n or a di-nucleon
175 
176  // If it is a valid struck nucleon pdg code, initialize its 4P:
177  // at-rest + on-mass-shell
178  if(is_valid) {
179  double M = PDGLibrary::Instance()->Find(nucl_pdgc)->Mass();
180  fHitNucP4->SetPxPyPzE(0,0,0,M);
181  }
182 }
int fHitNucPDG
hit nucleon PDG code
Definition: Target.h:120
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:68
TLorentzVector * fHitNucP4
hit nucleon 4p
Definition: Target.h:123
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
bool ForceHitNucValidity(void)
Definition: Target.cxx:350
void Target::SetHitNucPosition ( double  r)
void Target::SetHitQrkPdg ( int  pdgc)
void Target::SetHitSeaQrk ( bool  tf)
void Target::SetId ( int  pdgc)

Definition at line 149 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::HEDISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::HELeptonXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::SPPXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), and Target().

150 {
151  fTgtPDG = pdgc;
152  if( pdg::IsIon(pdgc) ) {
153  fZ = pdg::IonPdgCodeToZ(pdgc);
154  fA = pdg::IonPdgCodeToA(pdgc);
155  }
156 
157  this->ForceNucleusValidity(); // search at the isotopes chart
158  //this->AutoSetHitNuc(); // struck nuc := tgt for free nucleon tgt
159 }
int fZ
nuclear target Z
Definition: Target.h:117
int IonPdgCodeToA(int pdgc)
Definition: PDGUtils.cxx:63
int fTgtPDG
nuclear target PDG code
Definition: Target.h:119
bool IsIon(int pdgc)
Definition: PDGUtils.cxx:42
int IonPdgCodeToZ(int pdgc)
Definition: PDGUtils.cxx:55
void ForceNucleusValidity(void)
Definition: Target.cxx:362
int fA
nuclear target A
Definition: Target.h:118
void Target::SetId ( int  Z,
int  A 
)

Definition at line 161 of file Target.cxx.

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

162 {
163  fTgtPDG = pdg::IonPdgCode(AA,ZZ);
164  fZ = ZZ;
165  fA = AA;
166 
167  this->ForceNucleusValidity(); // search at the isotopes chart
168  //this->AutoSetHitNuc(); // struck nuc := tgt for free nucleon tgt
169 }
int fZ
nuclear target Z
Definition: Target.h:117
int fTgtPDG
nuclear target PDG code
Definition: Target.h:119
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:71
void ForceNucleusValidity(void)
Definition: Target.cxx:362
int fA
nuclear target A
Definition: Target.h:118
int genie::Target::Z ( void  ) const
inline

Definition at line 68 of file Target.h.

References fZ.

Referenced by genie::InitialStateAppender::AddNucleus(), genie::NuETargetRemnantGenerator::AddTargetNucleusRemnant(), genie::DMETargetRemnantGenerator::AddTargetNucleusRemnant(), genie::utils::nuclear::BindEnergy(), genie::utils::nuclear::BindEnergyPerNucleonParametrization(), genie::utils::BindHitNucleon(), genie::QPMDISStrucFuncBase::Calculate(), genie::QPMDMDISStrucFuncBase::Calculate(), genie::AMNuGammaInteractionListGenerator::CreateInteractionList(), genie::DFRInteractionListGenerator::CreateInteractionList(), genie::RESInteractionListGenerator::CreateInteractionList(), genie::SKInteractionListGenerator::CreateInteractionList(), genie::IBDInteractionListGenerator::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::FGMBodekRitchie::FermiMomentum(), 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::HEDISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::HELeptonXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::SPPXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalSPPXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), IsEvenEven(), IsOddOdd(), genie::NievesQELCCPXSec::LmunuAnumu(), genie::LocalFGM::LocalFermiMomentum(), genie::EffectiveSF::MakeEffectiveSF(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::HELeptonInteractionListGenerator::PhotonRESInteraction(), genie::InitialState::Print(), genie::SpectralFunc1d::Prob(), genie::PhotonCOHGenerator::ProcessEventRecord(), genie::NuclearModelMap::SelectModel(), genie::SmithMonizUtils::SetInteraction(), genie::KPhaseSpace::Threshold(), genie::ReinDFRPXSec::ValidProcess(), genie::NievesQELCCPXSec::vcr(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::PattonCEvNSPXSec::XSec(), genie::HEDISPXSec::XSec(), genie::AlamSimoAtharVacasSKPXSec2014::XSec(), genie::HENuElPXSec::XSec(), genie::PhotonCOHPXSec::XSec(), genie::PhotonRESPXSec::XSec(), genie::GLRESPXSec::XSec(), genie::ReinDFRPXSec::XSec(), genie::RosenbluthPXSec::XSec(), genie::AhrensNCELPXSec::XSec(), genie::IMDAnnihilationPXSec::XSec(), genie::AlvarezRusoCOHPiPXSec::XSec(), genie::QPMDISPXSec::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::AhrensDMELPXSec::XSec(), genie::P33PaschosLalakulichPXSec::XSec(), genie::BertuzzoDNuCOHPXSec::XSec(), genie::LwlynSmithQELCCPXSec::XSec(), genie::QPMDMDISPXSec::XSec(), genie::NuElectronPXSec::XSec(), genie::PaisQELLambdaPXSec::XSec(), genie::DMElectronPXSec::XSec(), genie::BardinIMDRadCorPXSec::XSec(), genie::BostedChristyEMPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::NievesQELCCPXSec::XSec(), genie::KovalenkoQELCharmPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), genie::MKSPPPXSec2020::XSec(), and genie::SuSAv2QELPXSec::XSecScaling().

68 { return fZ; }
int fZ
nuclear target Z
Definition: Target.h:117

Friends And Related Function Documentation

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

print

Definition at line 34 of file Target.cxx.

35  {
36  target.Print(stream);
37  return stream;
38  }

Member Data Documentation

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

hit nucleon 4p

Definition at line 123 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 120 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 124 of file Target.h.

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

int genie::Target::fHitQrkPDG
private

hit quark PDG code

Definition at line 121 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 122 of file Target.h.

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

int genie::Target::fTgtPDG
private

nuclear target PDG code

Definition at line 119 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 117 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: