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:
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)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual Int_tConvertGeant3ToPdg(Int_t Geant3Number) const
virtual Int_tConvertIsajetToPdg(Int_t isaNumber) const
virtual Int_tConvertPdgToGeant3(Int_t pdgNumber) const
virtual voidTNamed::Copy(TObject& named) 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 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 UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::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 Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tIsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
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)
virtual voidTObject::Paint(Option_t* option = "")
const THashList*ParticleList() const
virtual voidTObject::Pop()
virtual voidPrint(Option_t* opt = "") 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(ostream& 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) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
TDatabasePDG()
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:
voidBuildPdgMap() const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
TDatabasePDG&operator=(const TDatabasePDG& db)
TDatabasePDG(const TDatabasePDG& db)

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
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) const
  Get a pointer to the particle object according to the name given

TParticlePDG * GetParticle(Int_t pdgCode) const
  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) const
 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) const
 Converts pdg code to geant3 id
Int_t ConvertIsajetToPdg(Int_t isaNumber) const
  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)
 make copy-constructor and assigment protected since class cannot be copied
{ }
TDatabasePDG& operator=(const TDatabasePDG& db)
TParticleClassPDG* GetParticleClass(const char* name)
const THashList * ParticleList() const
{ return fParticleList; }
Bool_t IsFolder() const
{ return kTRUE; }