Functions
genie::pdg Namespace Reference

Utilities for improving the code readability when using PDG codes. More...

Functions

bool IsPseudoParticle (int pdgc)
 
bool IsIon (int pdgc)
 
bool IsParticle (int pdgc)
 not ion or pseudo-particle More...
 
int IonPdgCodeToZ (int pdgc)
 
int IonPdgCodeToA (int pdgc)
 
int IonPdgCode (int A, int Z)
 
int IonPdgCode (int A, int Z, int L, int I)
 
bool IsLepton (int pdgc)
 
bool IsNeutralLepton (int pdgc)
 
bool IsChargedLepton (int pdgc)
 
bool IsNeutrino (int pdgc)
 
bool IsAntiNeutrino (int pdgc)
 
bool IsNegChargedLepton (int pdgc)
 
bool IsPosChargedLepton (int pdgc)
 
bool IsDarkMatter (int pdgc)
 
bool IsNuE (int pdgc)
 
bool IsNuMu (int pdgc)
 
bool IsNuTau (int pdgc)
 
bool IsAntiNuE (int pdgc)
 
bool IsAntiNuMu (int pdgc)
 
bool IsAntiNuTau (int pdgc)
 
bool IsElectron (int pdgc)
 
bool IsPositron (int pdgc)
 
bool IsMuon (int pdgc)
 
bool IsAntiMuon (int pdgc)
 
bool IsTau (int pdgc)
 
bool IsAntiTau (int pdgc)
 
bool IsDiQuark (int pdgc)
 
bool IsQuark (int pdgc)
 
bool IsUQuark (int pdgc)
 
bool IsDQuark (int pdgc)
 
bool IsSQuark (int pdgc)
 
bool IsCQuark (int pdgc)
 
bool IsAntiQuark (int pdgc)
 
bool IsAntiUQuark (int pdgc)
 
bool IsAntiDQuark (int pdgc)
 
bool IsAntiSQuark (int pdgc)
 
bool IsAntiCQuark (int pdgc)
 
bool IsKaon (int pdgc)
 
bool IsPion (int pdgc)
 
bool IsProton (int pdgc)
 
bool IsNeutron (int pdgc)
 
bool IsNucleon (int pdgc)
 
bool IsNeutronOrProton (int pdgc)
 
bool IsHadron (int pdgc)
 
bool IsBaryonResonance (int pdgc)
 
bool Is2NucleonCluster (int pdgc)
 
int SwitchProtonNeutron (int pdgc)
 
int ModifyNucleonCluster (int pdgc, int dQ)
 
int Neutrino2ChargedLepton (int pdgc)
 
int GeantToPdg (int geant_code)
 

Detailed Description

Utilities for improving the code readability when using PDG codes.

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

Changes required to implement the GENIE Boosted Dark Matter module were installed by Josh Berger (Univ. of Wisconsin)

May 06, 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

Function Documentation

int genie::pdg::GeantToPdg ( int  geant_code)

Definition at line 374 of file PDGUtils.cxx.

References genie::kPdgAntiD0, genie::kPdgAntiLambda, genie::kPdgAntiMuon, genie::kPdgAntiNeutron, genie::kPdgAntiOmegaP, genie::kPdgAntiProton, genie::kPdgAntiSigma0, genie::kPdgAntiSigmaM, genie::kPdgAntiSigmaP, genie::kPdgAntiTau, genie::kPdgAntiXi0, genie::kPdgAntiXiP, genie::kPdgD0, genie::kPdgDM, genie::kPdgDMs, genie::kPdgDP, genie::kPdgDPs, genie::kPdgElectron, genie::kPdgEta, genie::kPdgGamma, genie::kPdgK0L, genie::kPdgK0S, genie::kPdgKM, genie::kPdgKP, genie::kPdgLambda, genie::kPdgMuon, genie::kPdgNeutron, genie::kPdgOmegaM, genie::kPdgPi0, genie::kPdgPiM, genie::kPdgPiP, genie::kPdgPositron, genie::kPdgProton, genie::kPdgSigma0, genie::kPdgSigmaM, genie::kPdgSigmaP, genie::kPdgTau, genie::kPdgWM, genie::kPdgWP, genie::kPdgXi0, genie::kPdgXiM, genie::kPdgZ0, LOG, and pWARN.

Referenced by genie::flux::GNuMIFluxPassThroughInfo::ConvertPartCodes(), ConvertToGRooTracker(), and genie::flux::operator<<().

375 {
376  if(geant_code == 3) return kPdgElectron; // 11 / e-
377  if(geant_code == 2) return kPdgPositron; // -11 / e+
378  if(geant_code == 6) return kPdgMuon; // 13 / mu-
379  if(geant_code == 5) return kPdgAntiMuon; // -13 / mu+
380  if(geant_code == 34) return kPdgTau; // 15 / tau-
381  if(geant_code == 33) return kPdgAntiTau; // -15 / tau+
382  if(geant_code == 8) return kPdgPiP; // 211 / pi+
383  if(geant_code == 9) return kPdgPiM; // -211 / pi-
384  if(geant_code == 7) return kPdgPi0; // 111 / pi0
385  if(geant_code == 17) return kPdgEta; // 221 / eta
386  if(geant_code == 11) return kPdgKP; // 321 / K+
387  if(geant_code == 12) return kPdgKM; // -321 / K-
388  if(geant_code == 10) return kPdgK0L; // 130 / K0_{long}
389  if(geant_code == 16) return kPdgK0S; // 310 / K0_{short}
390  if(geant_code == 35) return kPdgDP; // 411 / D+
391  if(geant_code == 36) return kPdgDM; // -411 / D-
392  if(geant_code == 37) return kPdgD0; // 421 / D0
393  if(geant_code == 38) return kPdgAntiD0; // -421 / \bar{D0}
394  if(geant_code == 39) return kPdgDPs; // 431 / D+_{s}
395  if(geant_code == 40) return kPdgDMs; // -431 / D-_{s}
396  if(geant_code == 1) return kPdgGamma; // 22 / photon
397  if(geant_code == 44) return kPdgZ0; // 23 / Z
398  if(geant_code == 42) return kPdgWP; // 24 / W+
399  if(geant_code == 43) return kPdgWM; // -24 / W-
400  if(geant_code == 14) return kPdgProton; // 2212
401  if(geant_code == 15) return kPdgAntiProton; // -2212
402  if(geant_code == 13) return kPdgNeutron; // 2112
403  if(geant_code == 25) return kPdgAntiNeutron; // -2112
404  if(geant_code == 18) return kPdgLambda; // 3122 / Lambda
405  if(geant_code == 26) return kPdgAntiLambda; // -3122 / \bar{Lambda}
406  if(geant_code == 19) return kPdgSigmaP; // 3222 / Sigma+
407  if(geant_code == 20) return kPdgSigma0; // 3212 / Sigma0
408  if(geant_code == 21) return kPdgSigmaM; // 3112 / Sigma-
409  if(geant_code == 29) return kPdgAntiSigmaP; // -3112 / \bar{Sigma+}
410  if(geant_code == 28) return kPdgAntiSigma0; // -3212 / \bar{Sigma0}
411  if(geant_code == 27) return kPdgAntiSigmaM; // -3112 / \bar{Sigma-}
412  if(geant_code == 22) return kPdgXi0; // 3322 / Xi0
413  if(geant_code == 23) return kPdgXiM; // 3312 / Xi-
414  if(geant_code == 30) return kPdgAntiXi0; // -3322 / \bar{Xi0}
415  if(geant_code == 31) return kPdgAntiXiP; // -3312 / \bar{Xi+}
416  if(geant_code == 24) return kPdgOmegaM; // 3334 / Omega-
417  if(geant_code == 32) return kPdgAntiOmegaP; // -3334 / \bar{Omega+}
418 
419  // some rare Geant3 codes that don't really need definitions in PDGCodes.h
420  const int kPdgDeuteron = 1000010020; // pdg::IonPdgCode(2,1);
421  const int kPdgTritium = 1000010030; // pdg::IonPdgCode(3,1);
422  const int kPdgAlpha = 1000020040; // pdg::IonPdgCode(4,2);
423  const int kPdgHe3 = 1000020030; // pdg::IonPdgCode(3,2);
424  if(geant_code == 45) return kPdgDeuteron;
425  if(geant_code == 46) return kPdgTritium;
426  if(geant_code == 47) return kPdgAlpha;
427  if(geant_code == 49) return kPdgHe3;
428 
429  LOG("PDG", pWARN)
430  << "Can not convert geant code: " << geant_code << " to PDG";
431  return 0;
432 }
const int kPdgAntiD0
Definition: PDGCodes.h:161
const int kPdgDPs
Definition: PDGCodes.h:162
const int kPdgAntiXi0
Definition: PDGCodes.h:79
const int kPdgXi0
Definition: PDGCodes.h:77
const int kPdgLambda
Definition: PDGCodes.h:69
const int kPdgAntiSigma0
Definition: PDGCodes.h:75
const int kPdgWM
Definition: PDGCodes.h:169
const int kPdgAntiMuon
Definition: PDGCodes.h:38
const int kPdgSigma0
Definition: PDGCodes.h:72
const int kPdgElectron
Definition: PDGCodes.h:35
const int kPdgZ0
Definition: PDGCodes.h:167
const int kPdgAntiOmegaP
Definition: PDGCodes.h:82
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
const int kPdgTau
Definition: PDGCodes.h:39
const int kPdgKM
Definition: PDGCodes.h:150
const int kPdgGamma
Definition: PDGCodes.h:166
const int kPdgKP
Definition: PDGCodes.h:149
const int kPdgEta
Definition: PDGCodes.h:138
const int kPdgPiP
Definition: PDGCodes.h:135
const int kPdgPi0
Definition: PDGCodes.h:137
const int kPdgK0L
Definition: PDGCodes.h:153
const int kPdgOmegaM
Definition: PDGCodes.h:81
#define pWARN
Definition: Messenger.h:61
const int kPdgSigmaM
Definition: PDGCodes.h:73
const int kPdgDP
Definition: PDGCodes.h:158
const int kPdgAntiSigmaM
Definition: PDGCodes.h:76
const int kPdgXiM
Definition: PDGCodes.h:78
const int kPdgAntiNeutron
Definition: PDGCodes.h:68
const int kPdgDMs
Definition: PDGCodes.h:163
const int kPdgDM
Definition: PDGCodes.h:159
const int kPdgAntiProton
Definition: PDGCodes.h:66
const int kPdgPiM
Definition: PDGCodes.h:136
const int kPdgAntiTau
Definition: PDGCodes.h:40
const int kPdgSigmaP
Definition: PDGCodes.h:71
const int kPdgAntiXiP
Definition: PDGCodes.h:80
const int kPdgProton
Definition: PDGCodes.h:65
const int kPdgAntiLambda
Definition: PDGCodes.h:70
const int kPdgMuon
Definition: PDGCodes.h:37
const int kPdgK0S
Definition: PDGCodes.h:154
const int kPdgAntiSigmaP
Definition: PDGCodes.h:74
const int kPdgPositron
Definition: PDGCodes.h:36
const int kPdgNeutron
Definition: PDGCodes.h:67
const int kPdgWP
Definition: PDGCodes.h:168
const int kPdgD0
Definition: PDGCodes.h:160
int genie::pdg::IonPdgCode ( int  A,
int  Z 
)

Definition at line 69 of file PDGUtils.cxx.

Referenced by genie::NucleonDecayPrimaryVtxGenerator::AddInitialState(), genie::NNBarOscPrimaryVtxGenerator::AddInitialState(), genie::InitialStateAppender::AddNucleus(), genie::NuETargetRemnantGenerator::AddTargetNucleusRemnant(), genie::HadronicSystemGenerator::AddTargetNucleusRemnant(), genie::FermiMover::AddTargetNucleusRemnant(), genie::QELEventGenerator::AddTargetNucleusRemnant(), genie::QELEventGeneratorSM::AddTargetNucleusRemnant(), genie::AMNuGammaGenerator::AddTargetRemnant(), genie::MECGenerator::AddTargetRemnant(), genie::utils::BindHitNucleon(), genie::FermiMomentumTable::FindClosestKF(), genie::geometry::ROOTGeomAnalyzer::GetTargetPdgCode(), genie::utils::config::GetValueFromNuclearMaps(), genie::HAIntranuke2018::Inelastic(), genie::HAIntranuke2018::InelasticHA(), genie::InitialState::InitialState(), genie::LwlynSmithQELCCPXSec::Integral(), genie::Target::IsValidNucleus(), genie::FermiMover::KickHitNucleon(), genie::utils::config::LoadAllIsotopesForKey(), genie::IBDXSecMap::LoadConfig(), genie::SpectralFunc1d::LoadConfig(), genie::LocalFGM::LoadConfig(), genie::EffectiveSF::LoadConfig(), genie::EffectiveSF::MakeEffectiveSF(), genie::FGMBodekRitchie::ProbDistro(), genie::QELEventGenerator::ProcessEventRecord(), genie::Target::SetId(), genie::SmithMonizUtils::SetInteraction(), genie::ReinSehgalRESPXSec::XSec(), and genie::BSKLNBaseRESPXSec2014::XSec().

70 {
71 // Build ion PDG code from A,Z
72 
73  return IonPdgCode(A,Z,0,0);
74 }
Float_t Z
Definition: plot.C:38
static const double A
Definition: Units.h:82
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:69
int genie::pdg::IonPdgCode ( int  A,
int  Z,
int  L,
int  I 
)

Definition at line 76 of file PDGUtils.cxx.

77 {
78 // Build ion PDG code from A,Z,L,I
79 
80  int ion_pdgc = 1000000000 + L*100000000 + Z*10000 + A*10 + I;
81  return ion_pdgc;
82 }
Float_t Z
Definition: plot.C:38
static constexpr double L
static const double A
Definition: Units.h:82
int genie::pdg::IonPdgCodeToA ( int  pdgc)
int genie::pdg::IonPdgCodeToZ ( int  pdgc)
bool genie::pdg::Is2NucleonCluster ( int  pdgc)

Definition at line 365 of file PDGUtils.cxx.

References genie::kPdgClusterNN, genie::kPdgClusterNP, and genie::kPdgClusterPP.

Referenced by genie::Target::ForceHitNucValidity(), genie::Target::HitNucIsSet(), genie::GHepRecord::HitNucleonPosition(), ModifyNucleonCluster(), genie::Interaction::RecoilNucleonPdg(), and SaveGraphsToRootFile().

366 {
367  return (
368  pdgc == kPdgClusterNN ||
369  pdgc == kPdgClusterNP ||
370  pdgc == kPdgClusterPP
371  );
372 }
const int kPdgClusterNP
Definition: PDGCodes.h:192
const int kPdgClusterNN
Definition: PDGCodes.h:191
const int kPdgClusterPP
Definition: PDGCodes.h:193
bool genie::pdg::IsAntiCQuark ( int  pdgc)

Definition at line 284 of file PDGUtils.cxx.

References genie::kPdgAntiCQuark.

Referenced by genie::QPMDISStrucFuncBase::Calculate(), and SaveGraphsToRootFile().

285 {
286  return (pdgc == kPdgAntiCQuark);
287 }
const int kPdgAntiCQuark
Definition: PDGCodes.h:49
bool genie::pdg::IsAntiDQuark ( int  pdgc)
bool genie::pdg::IsAntiMuon ( int  pdgc)

Definition at line 195 of file PDGUtils.cxx.

References genie::kPdgAntiMuon.

196 {
197  return (pdgc == kPdgAntiMuon);
198 }
const int kPdgAntiMuon
Definition: PDGCodes.h:38
bool genie::pdg::IsAntiNeutrino ( int  pdgc)

Definition at line 116 of file PDGUtils.cxx.

References genie::kPdgAntiNuE, genie::kPdgAntiNuMu, and genie::kPdgAntiNuTau.

Referenced by genie::flux::GAtmoFlux::AddFluxFile(), genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::AssertValidity(), genie::KNOHadronization::AverageChMult(), genie::QPMDISStrucFuncBase::Calculate(), genie::DFRInteractionListGenerator::CreateInteractionList(), genie::MECInteractionListGenerator::CreateInteractionList(), genie::COHInteractionListGenerator::CreateInteractionList(), genie::IBDInteractionListGenerator::CreateInteractionList(), genie::RSPPInteractionListGenerator::CreateInteractionList(), genie::QELInteractionListGenerator::CreateInteractionListCC(), genie::QELInteractionListGenerator::CreateInteractionListNC(), DirNameToProbe(), FillQrkArray(), genie::SppChannel::FromInteraction(), genie::CharmHadronization::GenerateCharmHadron(), GetCommandLineArgs(), genie::DISInteractionListGenerator::GetHitQuarks(), genie::PythiaHadronization::Hadronize(), genie::CharmHadronization::Hadronize(), genie::EmpiricalMECPXSec2015::Integral(), IsNeutralLepton(), genie::InitialState::IsNuBarN(), genie::InitialState::IsNuBarP(), genie::KNOHadronization::KNO(), genie::utils::ghep::NeutReactionCode(), ParseFluxHst(), genie::SlowRsclCharmDISPXSecLO::ValidProcess(), genie::AlvarezRusoCOHPiPXSec::ValidProcess(), genie::AivazisCharmPXSecLO::ValidProcess(), genie::BergerSehgalFMCOHPiPXSec2015::ValidProcess(), genie::LwlynSmithQELCCPXSec::ValidProcess(), genie::BergerSehgalCOHPiPXSec2015::ValidProcess(), genie::ReinSehgalCOHPiPXSec::ValidProcess(), genie::SmithMonizQELCCPXSec::ValidProcess(), genie::NievesQELCCPXSec::ValidProcess(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::AhrensNCELPXSec::XSec(), genie::QPMDISPXSec::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::ReinSehgalRESPXSec::XSec(), and genie::BSKLNBaseRESPXSec2014::XSec().

117 {
118  bool is_nubar = (pdgc == kPdgAntiNuE) ||
119  (pdgc == kPdgAntiNuMu) ||
120  (pdgc == kPdgAntiNuTau);
121 
122  return is_nubar;
123 }
const int kPdgAntiNuE
Definition: PDGCodes.h:29
const int kPdgAntiNuTau
Definition: PDGCodes.h:33
const int kPdgAntiNuMu
Definition: PDGCodes.h:31
bool genie::pdg::IsAntiNuE ( int  pdgc)
bool genie::pdg::IsAntiNuMu ( int  pdgc)

Definition at line 170 of file PDGUtils.cxx.

References genie::kPdgAntiNuMu.

Referenced by genie::NuElectronPXSec::XSec().

171 {
172  return (pdgc == kPdgAntiNuMu);
173 }
const int kPdgAntiNuMu
Definition: PDGCodes.h:31
bool genie::pdg::IsAntiNuTau ( int  pdgc)

Definition at line 175 of file PDGUtils.cxx.

References genie::kPdgAntiNuTau.

Referenced by genie::NuElectronPXSec::XSec(), and genie::ReinSehgalRESPXSec::XSec().

176 {
177  return (pdgc == kPdgAntiNuTau);
178 }
const int kPdgAntiNuTau
Definition: PDGCodes.h:33
bool genie::pdg::IsAntiQuark ( int  pdgc)

Definition at line 241 of file PDGUtils.cxx.

References genie::kPdgAntiBQuark, genie::kPdgAntiCQuark, genie::kPdgAntiDQuark, genie::kPdgAntiSQuark, genie::kPdgAntiTQuark, and genie::kPdgAntiUQuark.

Referenced by genie::Target::HitQrkIsSet(), genie::InitialState::Print(), and genie::Target::SetHitQrkPdg().

242 {
243  return ( pdgc == kPdgAntiDQuark || pdgc == kPdgAntiUQuark ||
244  pdgc == kPdgAntiSQuark || pdgc == kPdgAntiCQuark ||
245  pdgc == kPdgAntiBQuark || pdgc == kPdgAntiTQuark
246  );
247 }
const int kPdgAntiUQuark
Definition: PDGCodes.h:43
const int kPdgAntiDQuark
Definition: PDGCodes.h:45
const int kPdgAntiTQuark
Definition: PDGCodes.h:53
const int kPdgAntiSQuark
Definition: PDGCodes.h:47
const int kPdgAntiCQuark
Definition: PDGCodes.h:49
const int kPdgAntiBQuark
Definition: PDGCodes.h:51
bool genie::pdg::IsAntiSQuark ( int  pdgc)
bool genie::pdg::IsAntiTau ( int  pdgc)

Definition at line 205 of file PDGUtils.cxx.

References genie::kPdgAntiTau.

206 {
207  return (pdgc == kPdgAntiTau);
208 }
const int kPdgAntiTau
Definition: PDGCodes.h:40
bool genie::pdg::IsAntiUQuark ( int  pdgc)
bool genie::pdg::IsBaryonResonance ( int  pdgc)

Definition at line 360 of file PDGUtils.cxx.

References genie::utils::res::IsBaryonResonance().

361 {
362  return utils::res::IsBaryonResonance(pdgc);
363 }
bool IsBaryonResonance(int pdgc)
is input a baryon resonance?
bool genie::pdg::IsChargedLepton ( int  pdgc)

Definition at line 99 of file PDGUtils.cxx.

References IsNegChargedLepton(), and IsPosChargedLepton().

Referenced by genie::DISHadronicSystemGenerator::AddFragmentationProducts(), genie::QPMDISStrucFuncBase::Calculate(), genie::QELInteractionListGenerator::CreateInteractionListEM(), IsLepton(), SaveGraphsToRootFile(), genie::RosenbluthPXSec::ValidProcess(), genie::ReinSehgalRESPXSec::ValidProcess(), and genie::BSKLNBaseRESPXSec2014::ValidProcess().

100 {
101  bool is_neg_lepton = genie::pdg::IsNegChargedLepton(pdgc);
102  bool is_pos_lepton = genie::pdg::IsPosChargedLepton(pdgc);
103 
104  bool is_charged_lepton = is_neg_lepton || is_pos_lepton;
105  return is_charged_lepton;
106 }
bool IsPosChargedLepton(int pdgc)
Definition: PDGUtils.cxx:140
bool IsNegChargedLepton(int pdgc)
Definition: PDGUtils.cxx:131
bool genie::pdg::IsCQuark ( int  pdgc)

Definition at line 264 of file PDGUtils.cxx.

References genie::kPdgCQuark.

Referenced by genie::QPMDISStrucFuncBase::Calculate(), and SaveGraphsToRootFile().

265 {
266  return (pdgc == kPdgCQuark);
267 }
const int kPdgCQuark
Definition: PDGCodes.h:48
bool genie::pdg::IsDarkMatter ( int  pdgc)
bool genie::pdg::IsDiQuark ( int  pdgc)

Definition at line 223 of file PDGUtils.cxx.

References genie::kPdgDDDiquarkS1, genie::kPdgSDDiquarkS0, genie::kPdgSDDiquarkS1, genie::kPdgSSDiquarkS1, genie::kPdgSUDiquarkS0, genie::kPdgSUDiquarkS1, genie::kPdgUDDiquarkS0, genie::kPdgUDDiquarkS1, and genie::kPdgUUDiquarkS1.

Referenced by genie::PythiaHadronization::Hadronize().

224 {
225  return ( pdgc == kPdgDDDiquarkS1 || pdgc == kPdgUDDiquarkS0 ||
226  pdgc == kPdgUDDiquarkS1 || pdgc == kPdgUUDiquarkS1 ||
227  pdgc == kPdgSDDiquarkS0 || pdgc == kPdgSDDiquarkS1 ||
228  pdgc == kPdgSUDiquarkS0 || pdgc == kPdgSUDiquarkS1 ||
229  pdgc == kPdgSSDiquarkS1
230  );
231 }
const int kPdgUUDiquarkS1
Definition: PDGCodes.h:58
const int kPdgSDDiquarkS1
Definition: PDGCodes.h:60
const int kPdgSUDiquarkS1
Definition: PDGCodes.h:62
const int kPdgSUDiquarkS0
Definition: PDGCodes.h:61
const int kPdgSSDiquarkS1
Definition: PDGCodes.h:63
const int kPdgSDDiquarkS0
Definition: PDGCodes.h:59
const int kPdgUDDiquarkS1
Definition: PDGCodes.h:57
const int kPdgUDDiquarkS0
Definition: PDGCodes.h:56
const int kPdgDDDiquarkS1
Definition: PDGCodes.h:55
bool genie::pdg::IsDQuark ( int  pdgc)
bool genie::pdg::IsElectron ( int  pdgc)
bool genie::pdg::IsHadron ( int  pdgc)

Definition at line 355 of file PDGUtils.cxx.

Referenced by genie::PythiaDecayer::Decay(), genie::BaryonResonanceDecayer::DecayExclusive(), and genie::GHepRecord::EventGenerationMode().

356 {
357  return ((pdgc>=100 && pdgc<=9999) || (pdgc>=-9999 && pdgc<=-100));
358 }
bool genie::pdg::IsIon ( int  pdgc)
bool genie::pdg::IsKaon ( int  pdgc)

Definition at line 294 of file PDGUtils.cxx.

References genie::kPdgK0, genie::kPdgKM, and genie::kPdgKP.

Referenced by genie::HAIntranuke::Inelastic(), and genie::HAIntranuke2018::Inelastic().

295 {
296  return (pdgc == kPdgKP || pdgc == kPdgK0 || pdgc == kPdgKM);
297 }
const int kPdgK0
Definition: PDGCodes.h:151
const int kPdgKM
Definition: PDGCodes.h:150
const int kPdgKP
Definition: PDGCodes.h:149
bool genie::pdg::IsLepton ( int  pdgc)

Definition at line 84 of file PDGUtils.cxx.

References IsChargedLepton(), and IsNeutralLepton().

Referenced by genie::GEVGDriver::AssertIsValidInitState(), genie::QPMDISStrucFuncBase::Calculate(), genie::DISInteractionListGenerator::CreateInteractionList(), genie::GHepRecord::EventGenerationMode(), filter::TruthFilter::produce(), and genie::QPMDISPXSec::ValidProcess().

85 {
86  bool is_neutral_lepton = genie::pdg::IsNeutralLepton(pdgc);
87  bool is_charged_lepton = genie::pdg::IsChargedLepton(pdgc);
88 
89  bool is_lepton = (is_neutral_lepton || is_charged_lepton);
90  return is_lepton;
91 }
bool IsChargedLepton(int pdgc)
Definition: PDGUtils.cxx:99
bool IsNeutralLepton(int pdgc)
Definition: PDGUtils.cxx:93
bool genie::pdg::IsMuon ( int  pdgc)

Definition at line 190 of file PDGUtils.cxx.

References genie::kPdgMuon.

Referenced by genie::PrimaryLeptonGenerator::SetPolarization(), and genie::OutgoingDarkGenerator::SetPolarization().

191 {
192  return (pdgc == kPdgMuon);
193 }
const int kPdgMuon
Definition: PDGCodes.h:37
bool genie::pdg::IsNegChargedLepton ( int  pdgc)

Definition at line 131 of file PDGUtils.cxx.

References genie::kPdgElectron, genie::kPdgMuon, and genie::kPdgTau.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::AssertValidity(), genie::KNOHadronization::AverageChMult(), IsChargedLepton(), genie::KNOHadronization::KNO(), genie::ReinSehgalRESPXSec::XSec(), and genie::BSKLNBaseRESPXSec2014::XSec().

132 {
133  bool is_neg_lepton = (pdgc == kPdgElectron) ||
134  (pdgc == kPdgMuon) ||
135  (pdgc == kPdgTau);
136 
137  return is_neg_lepton;
138 }
const int kPdgElectron
Definition: PDGCodes.h:35
const int kPdgTau
Definition: PDGCodes.h:39
const int kPdgMuon
Definition: PDGCodes.h:37
bool genie::pdg::IsNeutralLepton ( int  pdgc)

Definition at line 93 of file PDGUtils.cxx.

References IsAntiNeutrino(), and IsNeutrino().

Referenced by genie::DISHadronicSystemGenerator::AddFragmentationProducts(), IsLepton(), SaveGraphsToRootFile(), genie::ReinSehgalRESPXSec::ValidProcess(), and genie::BSKLNBaseRESPXSec2014::ValidProcess().

94 {
95  bool is_neutral_lepton = IsNeutrino(pdgc) || IsAntiNeutrino(pdgc);
96  return is_neutral_lepton;
97 }
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:108
bool IsAntiNeutrino(int pdgc)
Definition: PDGUtils.cxx:116
bool genie::pdg::IsNeutrino ( int  pdgc)

Definition at line 108 of file PDGUtils.cxx.

References genie::kPdgNuE, genie::kPdgNuMu, and genie::kPdgNuTau.

Referenced by genie::flux::GAtmoFlux::AddFluxFile(), genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::AssertValidity(), genie::KNOHadronization::AverageChMult(), genie::QPMDISStrucFuncBase::Calculate(), genie::NievesQELCCPXSec::CompareNievesTensors(), genie::MECInteractionListGenerator::CreateInteractionList(), genie::DFRInteractionListGenerator::CreateInteractionList(), genie::COHInteractionListGenerator::CreateInteractionList(), genie::IBDInteractionListGenerator::CreateInteractionList(), genie::RESInteractionListGenerator::CreateInteractionList(), genie::SKInteractionListGenerator::CreateInteractionList(), genie::RSPPInteractionListGenerator::CreateInteractionList(), genie::QELInteractionListGenerator::CreateInteractionListCC(), genie::QELInteractionListGenerator::CreateInteractionListCharmCC(), genie::QELInteractionListGenerator::CreateInteractionListNC(), genie::QELInteractionListGenerator::CreateInteractionListStrangeCC(), genie::SmithMonizQELCCPXSec::d2sQES_dQ2dv_SM(), DirNameToProbe(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), FillQrkArray(), genie::SppChannel::FromInteraction(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::CharmHadronization::GenerateCharmHadron(), GetCommandLineArgs(), genie::DISInteractionListGenerator::GetHitQuarks(), genie::PythiaHadronization::Hadronize(), genie::CharmHadronization::Hadronize(), genie::EmpiricalMECPXSec2015::Integral(), IsNeutralLepton(), genie::InitialState::IsNuN(), genie::InitialState::IsNuP(), genie::KNOHadronization::KNO(), genie::utils::ghep::NeutReactionCode(), ParseFluxHst(), genie::Interaction::RecoilNucleonPdg(), genie::PrimaryLeptonGenerator::SetPolarization(), genie::OutgoingDarkGenerator::SetPolarization(), genie::SlowRsclCharmDISPXSecLO::ValidProcess(), genie::AlvarezRusoCOHPiPXSec::ValidProcess(), genie::AivazisCharmPXSecLO::ValidProcess(), genie::BergerSehgalFMCOHPiPXSec2015::ValidProcess(), genie::LwlynSmithQELCCPXSec::ValidProcess(), genie::BergerSehgalCOHPiPXSec2015::ValidProcess(), genie::ReinSehgalCOHPiPXSec::ValidProcess(), genie::SmithMonizQELCCPXSec::ValidProcess(), genie::NievesQELCCPXSec::ValidProcess(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::LwlynSmithQELCCPXSec::XSec(), genie::PaisQELLambdaPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), and genie::NievesQELCCPXSec::XSec().

109 {
110  bool is_nu = (pdgc == kPdgNuE) ||
111  (pdgc == kPdgNuMu) ||
112  (pdgc == kPdgNuTau);
113  return is_nu;
114 }
const int kPdgNuE
Definition: PDGCodes.h:28
const int kPdgNuMu
Definition: PDGCodes.h:30
const int kPdgNuTau
Definition: PDGCodes.h:32
bool genie::pdg::IsNeutron ( int  pdgc)

Definition at line 304 of file PDGUtils.cxx.

References genie::kPdgNeutron.

Referenced by genie::FermiMover::AddTargetNucleusRemnant(), genie::QELEventGenerator::AddTargetNucleusRemnant(), genie::QELEventGeneratorSM::AddTargetNucleusRemnant(), genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::AssertValidity(), genie::KNOHadronization::AverageChMult(), genie::QPMDISStrucFuncBase::CalcPDFs(), genie::QPMDISStrucFuncBase::Calculate(), CheckForNumFinStateNucleonsInconsistentWithTarget(), genie::PauliBlocker::GetFermiMomentum(), genie::PythiaHadronization::Hadronize(), genie::CharmHadronization::Hadronize(), genie::HadronicSystemGenerator::HadronShowerCharge(), genie::KNOHadronization::HadronShowerCharge(), genie::HAIntranuke::Inelastic(), genie::HAIntranuke2018::Inelastic(), genie::InitialState::IsDMN(), genie::InitialState::IsNuBarN(), genie::InitialState::IsNuN(), genie::FermiMover::KickHitNucleon(), genie::KNOHadronization::KNO(), genie::EffectiveSF::ProbDistro(), genie::FGMBodekRitchie::ProbDistro(), genie::LocalFGM::ProbDistro(), SaveGraphsToRootFile(), SwitchProtonNeutron(), genie::SlowRsclCharmDISPXSecLO::ValidProcess(), genie::RosenbluthPXSec::ValidProcess(), genie::AivazisCharmPXSecLO::ValidProcess(), genie::LwlynSmithQELCCPXSec::ValidProcess(), genie::PaisQELLambdaPXSec::ValidProcess(), genie::KovalenkoQELCharmPXSec::ValidProcess(), genie::SmithMonizQELCCPXSec::ValidProcess(), genie::ReinSehgalRESPXSec::ValidProcess(), genie::BSKLNBaseRESPXSec2014::ValidProcess(), genie::NievesQELCCPXSec::ValidProcess(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::AhrensNCELPXSec::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::AhrensDMELPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), and genie::KovalenkoQELCharmPXSec::ZR().

305 {
306  return (pdgc == kPdgNeutron);
307 }
const int kPdgNeutron
Definition: PDGCodes.h:67
bool genie::pdg::IsNeutronOrProton ( int  pdgc)
bool genie::pdg::IsNucleon ( int  pdgc)
bool genie::pdg::IsNuE ( int  pdgc)
bool genie::pdg::IsNuMu ( int  pdgc)

Definition at line 155 of file PDGUtils.cxx.

References genie::kPdgNuMu.

Referenced by systematics_summary_from_pred_interp(), and genie::NuElectronPXSec::XSec().

156 {
157  return (pdgc == kPdgNuMu);
158 }
const int kPdgNuMu
Definition: PDGCodes.h:30
bool genie::pdg::IsNuTau ( int  pdgc)

Definition at line 160 of file PDGUtils.cxx.

References genie::kPdgNuTau.

Referenced by genie::NuElectronPXSec::XSec(), and genie::ReinSehgalRESPXSec::XSec().

161 {
162  return (pdgc == kPdgNuTau);
163 }
const int kPdgNuTau
Definition: PDGCodes.h:32
bool genie::pdg::IsParticle ( int  pdgc)

not ion or pseudo-particle

Definition at line 45 of file PDGUtils.cxx.

References IsIon(), and IsPseudoParticle().

Referenced by ConvertToGXML().

46 {
47  if( genie::pdg::IsPseudoParticle (pdgc) ) return false;
48  if( genie::pdg::IsIon (pdgc) ) return false;
49 
50  return true;
51 }
bool IsIon(int pdgc)
Definition: PDGUtils.cxx:40
bool IsPseudoParticle(int pdgc)
Definition: PDGUtils.cxx:25
bool genie::pdg::IsPion ( int  pdgc)
bool genie::pdg::IsPosChargedLepton ( int  pdgc)

Definition at line 140 of file PDGUtils.cxx.

References genie::kPdgAntiMuon, genie::kPdgAntiTau, and genie::kPdgPositron.

Referenced by genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::AssertValidity(), genie::KNOHadronization::AverageChMult(), IsChargedLepton(), genie::KNOHadronization::KNO(), genie::ReinSehgalRESPXSec::XSec(), and genie::BSKLNBaseRESPXSec2014::XSec().

141 {
142  bool is_pos_lepton = (pdgc == kPdgPositron) ||
143  (pdgc == kPdgAntiMuon) ||
144  (pdgc == kPdgAntiTau);
145 
146  return is_pos_lepton;
147 }
const int kPdgAntiMuon
Definition: PDGCodes.h:38
const int kPdgAntiTau
Definition: PDGCodes.h:40
const int kPdgPositron
Definition: PDGCodes.h:36
bool genie::pdg::IsPositron ( int  pdgc)

Definition at line 185 of file PDGUtils.cxx.

References genie::kPdgPositron.

186 {
187  return (pdgc == kPdgPositron);
188 }
const int kPdgPositron
Definition: PDGCodes.h:36
bool genie::pdg::IsProton ( int  pdgc)

Definition at line 299 of file PDGUtils.cxx.

References genie::kPdgProton.

Referenced by genie::HadronicSystemGenerator::AddTargetNucleusRemnant(), genie::FermiMover::AddTargetNucleusRemnant(), genie::QELEventGenerator::AddTargetNucleusRemnant(), genie::QELEventGeneratorSM::AddTargetNucleusRemnant(), genie::AMNuGammaGenerator::AddTargetRemnant(), genie::HadronizationModelBase::ApplyRijk(), genie::PythiaHadronization::AssertValidity(), genie::KNOHadronization::AverageChMult(), genie::utils::BindHitNucleon(), genie::DISXSec::CacheFreeNucleonXSec(), genie::DMDISXSec::CacheFreeNucleonXSec(), genie::QPMDISStrucFuncBase::CalcPDFs(), genie::QPMDISStrucFuncBase::Calculate(), CheckForNumFinStateNucleonsInconsistentWithTarget(), genie::SmithMonizQELCCPXSec::d2sQES_dQ2dv_SM(), genie::utils::gsl::wrap::KovQELCharmIntegrand::DoEval(), genie::SmithMonizQELCCPXSec::dsQES_dQ2_SM(), genie::BaryonResonanceDecayer::EvolveDeltaDecayWidth(), genie::FermiMomentumTable::FindClosestKF(), genie::SppChannel::FromInteraction(), genie::LwlynSmithQELCCPXSec::FullDifferentialXSec(), genie::PauliBlocker::GetFermiMomentum(), genie::PythiaHadronization::Hadronize(), genie::CharmHadronization::Hadronize(), genie::HadronicSystemGenerator::HadronShowerCharge(), genie::KNOHadronization::HadronShowerCharge(), genie::HAIntranuke::Inelastic(), genie::HAIntranuke2018::Inelastic(), genie::H3AMNuGammaPXSec::Integral(), genie::LwlynSmithQELCCPXSec::Integral(), genie::DISXSec::Integrate(), genie::DMDISXSec::Integrate(), genie::AlamSimoAtharVacasSKXSec::Integrate(), genie::ReinSehgalRESXSec::Integrate(), genie::ReinSehgalRESXSecFast::Integrate(), genie::ReinSehgalSPPXSec::Integrate(), genie::InitialState::IsDMP(), genie::InitialState::IsNuBarP(), genie::InitialState::IsNuP(), genie::FermiMover::KickHitNucleon(), genie::KNOHadronization::KNO(), genie::NievesQELCCPXSec::LmunuAnumu(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::utils::intranuke::PionProduction(), genie::utils::intranuke2018::PionProduction(), genie::EffectiveSF::ProbDistro(), genie::FGMBodekRitchie::ProbDistro(), genie::LocalFGM::ProbDistro(), genie::QELEventGenerator::ProcessEventRecord(), SaveGraphsToRootFile(), genie::SmithMonizUtils::SetInteraction(), SwitchProtonNeutron(), genie::SlowRsclCharmDISPXSecLO::ValidProcess(), genie::RosenbluthPXSec::ValidProcess(), genie::AivazisCharmPXSecLO::ValidProcess(), genie::LwlynSmithQELCCPXSec::ValidProcess(), genie::PaisQELLambdaPXSec::ValidProcess(), genie::KovalenkoQELCharmPXSec::ValidProcess(), genie::SmithMonizQELCCPXSec::ValidProcess(), genie::ReinSehgalRESPXSec::ValidProcess(), genie::BSKLNBaseRESPXSec2014::ValidProcess(), genie::NievesQELCCPXSec::ValidProcess(), genie::SlowRsclCharmDISPXSecLO::XSec(), genie::ReinDFRPXSec::XSec(), genie::AhrensNCELPXSec::XSec(), genie::RosenbluthPXSec::XSec(), genie::QPMDISPXSec::XSec(), genie::AivazisCharmPXSecLO::XSec(), genie::P33PaschosLalakulichPXSec::XSec(), genie::AhrensDMELPXSec::XSec(), genie::QPMDMDISPXSec::XSec(), genie::LwlynSmithQELCCPXSec::XSec(), genie::PaisQELLambdaPXSec::XSec(), genie::KovalenkoQELCharmPXSec::XSec(), genie::ReinSehgalRESPXSec::XSec(), genie::BSKLNBaseRESPXSec2014::XSec(), genie::NievesQELCCPXSec::XSec(), and genie::KovalenkoQELCharmPXSec::ZR().

300 {
301  return (pdgc == kPdgProton);
302 }
const int kPdgProton
Definition: PDGCodes.h:65
bool genie::pdg::IsPseudoParticle ( int  pdgc)

Definition at line 25 of file PDGUtils.cxx.

References genie::kPdgCluster, genie::kPdgIndep, and genie::kPdgString.

Referenced by AcceptEvent(), CheckForPseudoParticlesInFinState(), ConvertToGINuke(), ConvertToGST(), ConvertToGTracker(), ConvertToGXML(), genie::Intranuke::GenerateVertex(), genie::Intranuke2018::GenerateVertex(), IsParticle(), and genie::VertexGenerator::ProcessEventRecord().

26 {
27 // ROOT's rootino has PDG code=0
28 // GENIE pseudoparticles are in the 2000000000-2000100000 range
29 // Include PYTHIA's pseudoparticles
30 
31  bool is_fake =
32  ( (pdgc == 0) ||
33  (pdgc > 2000000000 && pdgc < 2000100000) ||
34  (pdgc == kPdgCluster || pdgc == kPdgString || pdgc == kPdgIndep)
35  );
36 
37  return is_fake;
38 }
const int kPdgIndep
Definition: PDGCodes.h:203
const int kPdgString
Definition: PDGCodes.h:202
const int kPdgCluster
Definition: PDGCodes.h:201
bool genie::pdg::IsQuark ( int  pdgc)

Definition at line 233 of file PDGUtils.cxx.

References genie::kPdgBQuark, genie::kPdgCQuark, genie::kPdgDQuark, genie::kPdgSQuark, genie::kPdgTQuark, and genie::kPdgUQuark.

Referenced by genie::PythiaHadronization::Hadronize(), genie::Target::HitQrkIsSet(), genie::InitialState::Print(), and genie::Target::SetHitQrkPdg().

234 {
235  return ( pdgc == kPdgDQuark || pdgc == kPdgUQuark ||
236  pdgc == kPdgSQuark || pdgc == kPdgCQuark ||
237  pdgc == kPdgBQuark || pdgc == kPdgTQuark
238  );
239 }
const int kPdgBQuark
Definition: PDGCodes.h:50
const int kPdgUQuark
Definition: PDGCodes.h:42
const int kPdgSQuark
Definition: PDGCodes.h:46
const int kPdgCQuark
Definition: PDGCodes.h:48
const int kPdgDQuark
Definition: PDGCodes.h:44
const int kPdgTQuark
Definition: PDGCodes.h:52
bool genie::pdg::IsSQuark ( int  pdgc)
bool genie::pdg::IsTau ( int  pdgc)

Definition at line 200 of file PDGUtils.cxx.

References genie::kPdgTau.

Referenced by genie::PrimaryLeptonGenerator::SetPolarization(), and genie::OutgoingDarkGenerator::SetPolarization().

201 {
202  return (pdgc == kPdgTau);
203 }
const int kPdgTau
Definition: PDGCodes.h:39
bool genie::pdg::IsUQuark ( int  pdgc)
int genie::pdg::ModifyNucleonCluster ( int  pdgc,
int  dQ 
)

Definition at line 327 of file PDGUtils.cxx.

References ana::assert(), Is2NucleonCluster(), genie::kPdgClusterNN, genie::kPdgClusterNP, and genie::kPdgClusterPP.

Referenced by genie::Interaction::RecoilNucleonPdg().

328 {
330 
331  if(pdgc == kPdgClusterNN) {
332  if (dQ == 0) { return kPdgClusterNN; }
333  else if (dQ == +1) { return kPdgClusterNP; }
334  else if (dQ == +2) { return kPdgClusterPP; }
335  else { return 0; }
336  }
337  else
338  if(pdgc == kPdgClusterNP) {
339  if (dQ == -1) { return kPdgClusterNN; }
340  else if (dQ == 0) { return kPdgClusterNP; }
341  else if (dQ == +1) { return kPdgClusterPP; }
342  else { return 0; }
343  }
344  else
345  if(pdgc == kPdgClusterPP) {
346  if (dQ == -2) { return kPdgClusterNN; }
347  else if (dQ == -1) { return kPdgClusterNP; }
348  else if (dQ == 0) { return kPdgClusterPP; }
349  else { return 0; }
350  }
351 
352  return 0;
353 }
const int kPdgClusterNP
Definition: PDGCodes.h:192
const int kPdgClusterNN
Definition: PDGCodes.h:191
bool Is2NucleonCluster(int pdgc)
Definition: PDGUtils.cxx:365
assert(nhit_max >=nhit_nbins)
const int kPdgClusterPP
Definition: PDGCodes.h:193
int genie::pdg::Neutrino2ChargedLepton ( int  pdgc)

Definition at line 210 of file PDGUtils.cxx.

References genie::kPdgAntiMuon, genie::kPdgAntiNuE, genie::kPdgAntiNuMu, genie::kPdgAntiNuTau, genie::kPdgAntiTau, genie::kPdgElectron, genie::kPdgMuon, genie::kPdgNuE, genie::kPdgNuMu, genie::kPdgNuTau, genie::kPdgPositron, and genie::kPdgTau.

Referenced by genie::Interaction::FSPrimLeptonPdg().

211 {
212  switch(pdgc) {
213  case (kPdgNuE) : return kPdgElectron; break;
214  case (kPdgAntiNuE) : return kPdgPositron; break;
215  case (kPdgNuMu) : return kPdgMuon; break;
216  case (kPdgAntiNuMu) : return kPdgAntiMuon; break;
217  case (kPdgNuTau) : return kPdgTau; break;
218  case (kPdgAntiNuTau): return kPdgAntiTau; break;
219  }
220  return -1;
221 }
const int kPdgNuE
Definition: PDGCodes.h:28
const int kPdgAntiNuE
Definition: PDGCodes.h:29
const int kPdgNuMu
Definition: PDGCodes.h:30
const int kPdgAntiMuon
Definition: PDGCodes.h:38
const int kPdgElectron
Definition: PDGCodes.h:35
const int kPdgTau
Definition: PDGCodes.h:39
const int kPdgAntiNuTau
Definition: PDGCodes.h:33
const int kPdgAntiNuMu
Definition: PDGCodes.h:31
const int kPdgNuTau
Definition: PDGCodes.h:32
const int kPdgAntiTau
Definition: PDGCodes.h:40
const int kPdgMuon
Definition: PDGCodes.h:37
const int kPdgPositron
Definition: PDGCodes.h:36
int genie::pdg::SwitchProtonNeutron ( int  pdgc)

Definition at line 319 of file PDGUtils.cxx.

References ana::assert(), IsNeutron(), IsProton(), genie::kPdgNeutron, and genie::kPdgProton.

Referenced by genie::SmithMonizQELCCPXSec::d2sQES_dQ2dv_SM(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::Interaction::RecoilNucleonPdg(), genie::SmithMonizUtils::SetInteraction(), and genie::KPhaseSpace::Threshold().

320 {
321  assert(IsProton(pdgc) || IsNeutron(pdgc));
322 
323  if (IsProton(pdgc)) return kPdgNeutron;
324  else return kPdgProton;
325 }
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:304
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:299
assert(nhit_max >=nhit_nbins)
const int kPdgProton
Definition: PDGCodes.h:65
const int kPdgNeutron
Definition: PDGCodes.h:67