ROOT logo
ROOT » MONTECARLO » EG » TDatabasePDG

class TDatabasePDG: public TNamed


  Particle database manager class

  This manager creates a list of particles which by default is
  initialised from with the constants used by PYTHIA6 (plus some
  other particles added). See definition and the format of the default
  particle list in $ROOTSYS/etc/pdg_table.txt

  there are 2 ways of redefining the name of the file containing the
  particle properties

  1. one can define the name in .rootrc file:

  Root.DatabasePDG: $(HOME)/my_pdg_table.txt

  2. one can use TDatabasePDG::ReadPDGTable method explicitly:

     - TDatabasePDG *pdg = new TDatabasePDG();
     - pdg->ReadPDGtable(filename)

  See TParticlePDG for the description of a static particle properties.
  See TParticle    for the description of a dynamic particle particle.


Function Members (Methods)

public:
TDatabasePDG()
virtual~TDatabasePDG()
voidTObject::AbstractMethod(const char* method) const
virtual TParticlePDG*AddAntiParticle(const char* Name, Int_t PdgCode)
virtual TParticlePDG*AddParticle(const char* Name, const char* Title, Double_t Mass, Bool_t Stable, Double_t DecayWidth, Double_t Charge, const char* ParticleClass, Int_t PdgCode, Int_t Anti = -1, Int_t TrackingCode = 0)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidBrowse(TBrowser* b)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
static TClass*TNamed::Class()
static TClass*TObject::Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual Int_tConvertGeant3ToPdg(Int_t Geant3Number)
virtual Int_tConvertIsajetToPdg(Int_t isaNumber)
virtual Int_tConvertPdgToGeant3(Int_t pdgNumber)
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
TParticlePDG*GetParticle(Int_t pdgCode) const
TParticlePDG*GetParticle(const char* name) const
TParticleClassPDG*GetParticleClass(const char* name)
virtual const char*TNamed::GetTitle() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
static TDatabasePDG*Instance()
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual TClass*TNamed::IsA() const
virtual TClass*TObject::IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tIsFolder() const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TNamed&TNamed::operator=(const TNamed& rhs)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
const THashList*ParticleList() const
virtual voidTObject::Pop()
virtual voidPrint(Option_t* opt = "") const
virtual voidTNamed::Print(Option_t* option = "") const
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidReadPDGTable(const char* filename = "")
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTNamed::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTObject::ShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
virtual voidTNamed::Streamer(TBuffer& b)
virtual voidTObject::Streamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidTNamed::StreamerNVirtual(TBuffer& b)
voidTObject::StreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual Int_tWritePDGTable(const char* filename)
protected:
TDatabasePDG(const TDatabasePDG& db)
voidBuildPdgMap() const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
TDatabasePDG&operator=(const TDatabasePDG& db)

Data Members

protected:
TObjArray*fListOfClasseslist of classes (leptons etc.)
TStringTNamed::fNameobject identifier
THashList*fParticleListlist of PDG particles
TExMap*fPdgMap!hash-map from pdg-code to particle
TStringTNamed::fTitleobject title
static TDatabasePDG*fgInstanceprotect against multiple instances

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TDatabasePDG()
 Create PDG database. Initialization of the DB has to be done via explicit
 call to ReadDataBasePDG (also done by GetParticle methods)
~TDatabasePDG()
 Cleanup the PDG database.
TDatabasePDG* Instance()
static function
void BuildPdgMap() const
 Build fPdgMap mapping pdg-code to particle.

 Initial size is set so as to be able to hold at least 600
 particles: 521 in default table, ALICE adds 54 more.
 To be revisited after LHC discovers SUSY.
TParticlePDG* AddParticle(const char* Name, const char* Title, Double_t Mass, Bool_t Stable, Double_t DecayWidth, Double_t Charge, const char* ParticleClass, Int_t PdgCode, Int_t Anti = -1, Int_t TrackingCode = 0)
  Particle definition normal constructor. If the particle is set to be
  stable, the decay width parameter does have no meaning and can be set to
  any value. The parameters granularity, LowerCutOff and HighCutOff are
  used for the construction of the mean free path look up tables. The
  granularity will be the number of logwise energy points for which the
  mean free path will be calculated.

TParticlePDG* AddAntiParticle(const char* Name, Int_t PdgCode)
 assuming particle has already been defined
TParticlePDG * GetParticle(const char *name)
  Get a pointer to the particle object according to the name given

TParticlePDG * GetParticle(Int_t PDGcode)
  Get a pointer to the particle object according to the MC code number

void Print(Option_t* opt = "") const
 Print contents of PDG database.
Int_t ConvertGeant3ToPdg(Int_t Geant3Number)
 Converts Geant3 particle codes to PDG convention. (Geant4 uses
 PDG convention already)
 Source: BaBar User Guide, Neil I. Geddes,


/* see Conversion table */
 with some fixes by PB, marked with (PB) below. Checked against
 PDG listings from 2000.

 Paul Balm, Nov 19, 2001
Int_t ConvertPdgToGeant3(Int_t pdgNumber)
 Converts pdg code to geant3 id
Int_t ConvertIsajetToPdg(Int_t isaNumber)
  Converts the ISAJET Particle number into the PDG MC number

void ReadPDGTable(const char* filename = "")
 read list of particles from a file
 if the particle list does not exist, it is created, otherwise
 particles are added to the existing list
 See $ROOTSYS/etc/pdg_table.txt to see the file format
void Browse(TBrowser* b)
browse data base
Int_t WritePDGTable(const char* filename)
 write contents of the particle DB into a file
TDatabasePDG(const TDatabasePDG& db)
{ }
TDatabasePDG& operator=(const TDatabasePDG& db)
TParticleClassPDG* GetParticleClass(const char* name)
const THashList * ParticleList() const
{ return fParticleList; }
Bool_t IsFolder() const
{ return kTRUE; }