UtilPDG Namespace Reference

Functions

Int_t name2PDG (std::string pname)
 Utility to convert particle name to PDG code.
bool isLepton (int ipdg)
 Some common tests.
bool isLepton (const TParticle *part)
bool isNeutrino (int ipdg)
bool isNeutrino (const TParticle *part)
bool isElectron (int ipdg)
bool isElectron (const TParticle *part)
bool isMuon (int ipdg)
bool isMuon (const TParticle *part)
bool isTau (int ipdg)
bool isTau (const TParticle *part)
bool isProton (int ipdg)
bool isProton (const TParticle *part)
bool isNeutron (int ipdg)
bool isNeutron (const TParticle *part)
bool isNeugenSpecial (int ipdg)
bool isNeugenSpecial (const TParticle *part)
bool isCharm (int ipdg)
bool isCharm (const TParticle *part)
bool hasQuark (int ipdg, int iq)
int stdIonNumber (int ipdg, ionscheme_t ischeme=UtilPDG::kDefaultIonScheme)
 Convert ion to preferred ion scheme.
ionscheme_t getIonAZJ (int ipdg, int &ia, int &iz, int &ij)
 Get ion's A,Z and spin (return false if not ion).
ionscheme_t getIonAZJ (int ipdg, int &ia, int &iz, int &ij, int &nlambda)
int makeIonPDG (int ia, int iz, int ij=0, ionscheme_t ischeme=UtilPDG::kDefaultIonScheme)
 construct an ion PDG number
int makeIonPDG (int ia, int iz, int ij, int nlambda, ionscheme_t ischeme)
bool isIon (int ipdg)
 test if PDG code is an ion (in any scheme)
const char * ionSchemeName (ionscheme_t ischeme)
 Get name of an ion numbering scheme.
ionscheme_t getDfltStdIonScheme ()
 Get/Set global default translation/construction ion schemes.
void setDfltStdIonScheme (ionscheme_t dflt=UtilPDG::kIonUnchanged)
ionscheme_t getDfltMakeIonScheme ()
void setDfltMakeIonScheme (ionscheme_t dflt=UtilPDG::kPDG2006)

Function Documentation

ionscheme_t UtilPDG::getDfltMakeIonScheme (  ) 
ionscheme_t UtilPDG::getDfltStdIonScheme (  ) 

Get/Set global default translation/construction ion schemes.

Referenced by WriteStdHepFileModule::Ana(), HepevtModule::Get(), and RerootToTruthModule::Get().

ionscheme_t UtilPDG::getIonAZJ ( int  ipdg,
int &  ia,
int &  iz,
int &  ij,
int &  nlambda 
)
ionscheme_t UtilPDG::getIonAZJ ( int  ipdg,
int &  ia,
int &  iz,
int &  ij 
)

Get ion's A,Z and spin (return false if not ion).

Referenced by MCApplication::AddIons(), and HepevtModule::FillNeuKinStructFromStdHepRange().

bool UtilPDG::hasQuark ( int  ipdg,
int  iq 
)
const char* UtilPDG::ionSchemeName ( ionscheme_t  ischeme  ) 

Get name of an ion numbering scheme.

Referenced by RerootToTruthModule::Config(), WriteStdHepFileModule::Config(), and HepevtModule::Config().

bool UtilPDG::isCharm ( const TParticle *  part  ) 
bool UtilPDG::isCharm ( int  ipdg  ) 
bool UtilPDG::isElectron ( const TParticle *  part  )  [inline]

Definition at line 108 of file StdHepUtil.h.

References StdHepUtil::kElectron.

Referenced by HepevtModule::FillNeuKinStructFromStdHepRange().

00109     {
00110       Int_t pdg = part->GetPdgCode();
00111       if ( pdg == kElectron || pdg == -kElectron ) return true;
00112       return false;
00113     }

bool UtilPDG::isElectron ( int  ipdg  ) 

Referenced by GenieModule::FillNeuKin().

bool UtilPDG::isIon ( int  ipdg  ) 

test if PDG code is an ion (in any scheme)

Referenced by GenieModule::FillNeuKin(), PTSimApplication::SnarlSplitFull(), and PTSimApplication::SnarlSplitSimple().

bool UtilPDG::isLepton ( const TParticle *  part  )  [inline]

Definition at line 85 of file StdHepUtil.h.

Referenced by NuEvtKin::LinkStdHepIndexToEvent().

00086     {
00087       UInt_t abspdg = TMath::Abs(part->GetPdgCode());
00088       if ( abspdg >=  11 && abspdg <= 16 ) return true;
00089       return false;
00090     }

bool UtilPDG::isLepton ( int  ipdg  ) 

Some common tests.

bool UtilPDG::isMuon ( const TParticle *  part  )  [inline]

Definition at line 101 of file StdHepUtil.h.

References StdHepUtil::kMuon.

Referenced by HepevtModule::FillNeuKinStructFromStdHepRange().

00102     {
00103       Int_t pdg = part->GetPdgCode();
00104       if ( pdg == kMuon || pdg == -kMuon ) return true;
00105       return false;
00106     }

bool UtilPDG::isMuon ( int  ipdg  ) 

Referenced by GenieModule::FillNeuKin().

bool UtilPDG::isNeugenSpecial ( const TParticle *  part  ) 
bool UtilPDG::isNeugenSpecial ( int  ipdg  ) 
bool UtilPDG::isNeutrino ( const TParticle *  part  )  [inline]

Definition at line 92 of file StdHepUtil.h.

References StdHepUtil::kNuE, StdHepUtil::kNuMu, and StdHepUtil::kNuTau.

Referenced by HepevtModule::FillNeuKinStructFromStdHepRange(), StdHepUtil::indexPrimaryNu(), and NuEvtKin::LinkStdHepIndexToEvent().

00093     {
00094       Int_t pdg = part->GetPdgCode();
00095       if ( pdg ==  kNuE   || pdg == -kNuE   ||
00096            pdg ==  kNuMu  || pdg == -kNuMu  ||
00097            pdg ==  kNuTau || pdg == -kNuTau    ) return true;
00098       return false;
00099     }

bool UtilPDG::isNeutrino ( int  ipdg  ) 

Referenced by GenieModule::FillNeuKin().

bool UtilPDG::isNeutron ( const TParticle *  part  )  [inline]

Definition at line 129 of file StdHepUtil.h.

References StdHepUtil::kNeutron.

Referenced by NuEvtKin::LinkStdHepIndexToEvent().

00130     {
00131       Int_t pdg = part->GetPdgCode();
00132       if ( pdg == kNeutron || pdg == -kNeutron ) return true;
00133       return false;
00134     }

bool UtilPDG::isNeutron ( int  ipdg  ) 
bool UtilPDG::isProton ( const TParticle *  part  )  [inline]

Definition at line 122 of file StdHepUtil.h.

References StdHepUtil::kProton.

Referenced by NuEvtKin::LinkStdHepIndexToEvent().

00123     {
00124       Int_t pdg = part->GetPdgCode();
00125       if ( pdg == kProton || pdg == -kProton ) return true;
00126       return false;
00127     }

bool UtilPDG::isProton ( int  ipdg  ) 
bool UtilPDG::isTau ( const TParticle *  part  )  [inline]

Definition at line 115 of file StdHepUtil.h.

References StdHepUtil::kTau.

Referenced by HepevtModule::FillNeuKinStructFromStdHepRange(), and NuEvtKin::LinkStdHepIndexToEvent().

00116     {
00117       Int_t pdg = part->GetPdgCode();
00118       if ( pdg == kTau || pdg == -kTau ) return true;
00119       return false;
00120     }

bool UtilPDG::isTau ( int  ipdg  ) 

Referenced by GenieModule::FillNeuKin().

int UtilPDG::makeIonPDG ( int  ia,
int  iz,
int  ij,
int  nlambda,
ionscheme_t  ischeme 
)
int UtilPDG::makeIonPDG ( int  ia,
int  iz,
int  ij = 0,
ionscheme_t  ischeme = UtilPDG::kDefaultIonScheme 
)

construct an ion PDG number

Int_t UtilPDG::name2PDG ( std::string  pname  ) 

Utility to convert particle name to PDG code.

void UtilPDG::setDfltMakeIonScheme ( ionscheme_t  dflt = UtilPDG::kPDG2006  ) 
void UtilPDG::setDfltStdIonScheme ( ionscheme_t  dflt = UtilPDG::kIonUnchanged  ) 
int UtilPDG::stdIonNumber ( int  ipdg,
ionscheme_t  ischeme = UtilPDG::kDefaultIonScheme 
)

Convert ion to preferred ion scheme.

Referenced by make_std_hep_list(), PTSimApplication::SnarlSplitFull(), and PTSimApplication::SnarlSplitSimple().


Generated on 21 Jun 2018 for loon by  doxygen 1.6.1