/usr/include/root/TDatabasePDG.h is in libroot-montecarlo-eg-dev 5.34.30-0ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | // @(#)root/eg:$Id$
// Author: Pasha Murat 12/02/99
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TDatabasePDG
#define ROOT_TDatabasePDG
#ifndef ROOT_TParticlePDG
#include "TParticlePDG.h"
#endif
#ifndef ROOT_TParticleClassPDG
#include "TParticleClassPDG.h"
#endif
class THashList;
class TExMap;
class TDatabasePDG: public TNamed {
protected:
static TDatabasePDG *fgInstance; // protect against multiple instances
THashList *fParticleList; // list of PDG particles
TObjArray *fListOfClasses; // list of classes (leptons etc.)
mutable TExMap *fPdgMap; //!hash-map from pdg-code to particle
// make copy-constructor and assigment protected since class cannot be copied
TDatabasePDG(const TDatabasePDG& db)
: TNamed(db), fParticleList(db.fParticleList),
fListOfClasses(db.fListOfClasses), fPdgMap(0) { }
TDatabasePDG& operator=(const TDatabasePDG& db)
{if(this!=&db) {TNamed::operator=(db); fParticleList=db.fParticleList;
fListOfClasses=db.fListOfClasses; fPdgMap=db.fPdgMap;}
return *this;}
void BuildPdgMap() const;
public:
TDatabasePDG();
virtual ~TDatabasePDG();
static TDatabasePDG* Instance();
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 Int_t ConvertGeant3ToPdg(Int_t Geant3Number) const;
virtual Int_t ConvertPdgToGeant3(Int_t pdgNumber) const;
virtual Int_t ConvertIsajetToPdg(Int_t isaNumber) const;
virtual TParticlePDG* AddAntiParticle(const char* Name, Int_t PdgCode);
TParticlePDG *GetParticle(Int_t pdgCode) const;
TParticlePDG *GetParticle(const char *name) const;
TParticleClassPDG* GetParticleClass(const char* name) {
if (fParticleList == 0) ((TDatabasePDG*)this)->ReadPDGTable();
return (TParticleClassPDG*) fListOfClasses->FindObject(name);
}
const THashList *ParticleList() const { return fParticleList; }
virtual void Print(Option_t *opt = "") const;
Bool_t IsFolder() const { return kTRUE; }
virtual void Browse(TBrowser* b);
virtual void ReadPDGTable (const char *filename = "");
virtual Int_t WritePDGTable(const char *filename);
ClassDef(TDatabasePDG,2) // PDG particle database
};
#endif
|