Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

UtilPDG.h File Reference

#include "TMath.h"
#include "TParticle.h"

Go to the source code of this file.

Namespaces

namespace  UtilPDG

Functions

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 getDfltMakeIonScheme  ) 
 

ionscheme_t getDfltStdIonScheme  ) 
 

Get/Set global default translation/construction ion schemes.

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

ionscheme_t getIonAZJ int  ipdg,
int &  ia,
int &  iz,
int &  ij,
int &  nlambda
 

ionscheme_t 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().

bool hasQuark int  ipdg,
int  iq
 

const char* ionSchemeName ionscheme_t  ischeme  ) 
 

Get name of an ion numbering scheme.

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

bool isCharm const TParticle *  part  ) 
 

bool isCharm int  ipdg  ) 
 

bool isElectron const TParticle *  part  )  [inline]
 

Definition at line 108 of file StdHepUtil.h.

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

bool isElectron int  ipdg  ) 
 

Referenced by GenieModule::FillNeuKin().

bool isIon int  ipdg  ) 
 

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

Referenced by GenieModule::FillNeuKin(), and PTSimApplication::InitSnarl().

bool 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 isLepton int  ipdg  ) 
 

Some common tests.

bool isMuon const TParticle *  part  )  [inline]
 

Definition at line 101 of file StdHepUtil.h.

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

bool isMuon int  ipdg  ) 
 

Referenced by GenieModule::FillNeuKin().

bool isNeugenSpecial const TParticle *  part  ) 
 

bool isNeugenSpecial int  ipdg  ) 
 

bool isNeutrino const TParticle *  part  )  [inline]
 

Definition at line 92 of file StdHepUtil.h.

Referenced by 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 isNeutrino int  ipdg  ) 
 

Referenced by GenieModule::FillNeuKin().

bool isNeutron const TParticle *  part  )  [inline]
 

Definition at line 129 of file StdHepUtil.h.

Referenced by NuEvtKin::LinkStdHepIndexToEvent().

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

bool isNeutron int  ipdg  ) 
 

bool isProton const TParticle *  part  )  [inline]
 

Definition at line 122 of file StdHepUtil.h.

Referenced by NuEvtKin::LinkStdHepIndexToEvent().

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

bool isProton int  ipdg  ) 
 

bool isTau const TParticle *  part  )  [inline]
 

Definition at line 115 of file StdHepUtil.h.

Referenced by NuEvtKin::LinkStdHepIndexToEvent().

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

bool isTau int  ipdg  ) 
 

Referenced by GenieModule::FillNeuKin().

int makeIonPDG int  ia,
int  iz,
int  ij,
int  nlambda,
ionscheme_t  ischeme
 

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

construct an ion PDG number

Referenced by MCApplication::AddIons().

void setDfltMakeIonScheme ionscheme_t  dflt = UtilPDG::kPDG2006  ) 
 

void setDfltStdIonScheme ionscheme_t  dflt = UtilPDG::kIonUnchanged  ) 
 

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

int stdIonNumber int  ipdg,
ionscheme_t  ischeme = UtilPDG::kDefaultIonScheme
 

Convert ion to preferred ion scheme.

Referenced by PTSimApplication::InitSnarl(), and make_std_hep_list().


Generated on Mon Nov 23 05:29:52 2009 for loon by  doxygen 1.3.9.1