StRoot
1
|
Interface to PDG information. More...
#include <StarParticleData.h>
Public Member Functions | |
StarParticleData (const Char_t *name="PDG_Database", TDataSet *parent=0) | |
TParticlePDG * | GetParticle (const Char_t *name) |
Get a particle by name. | |
TParticlePDG * | GetParticle (const Int_t id) |
Get a particle by PDG ID. | |
TParticlePDG * | GetParticleG3 (const Int_t id) |
Get a particle by G3 ID. | |
void | AddParticle (const Char_t *name, TParticlePDG *particle) |
Add a particle to the database. | |
void | AddAlias (const Char_t *alias, const Char_t *realname) |
Add an alias to a particle in the database. | |
TParticlePDG * | AddParticle (const Char_t *name, const Char_t *title, Double_t mass, Bool_t Stable, Double_t Width, Double_t Charge3, const char *ParticleClass, Int_t PdgCode, Int_t Anti, Int_t geantCode) |
TParticlePDG * | AddParticleToG3 (const char *name, const double mass, const double lifetime, const double charge, const int tracktype, const int pdgcode, const int g3code, const double *bratio=0, const int *mode=0) |
TParticlePDG * | AddParticleToG3 (TParticlePDG *part, const int g3code) |
TParticlePDG * | SetTrackingCode (const int pdgid, const int g3id) |
Maps the particle with the given PDG id to G3 tracking ID and returns pointer to the particle data. | |
TParticlePDG * | operator() (const Char_t *name) |
TParticlePDG * | operator() (const Int_t id) |
const TObjArray & | GetParticles () const |
Returns a reference to the list of particles. | |
Public Member Functions inherited from TObjectSet | |
TObjectSet (const Char_t *name, TObject *obj=0, Bool_t makeOwner=kTRUE) | |
to be documented | |
TObjectSet (TObject *obj=0, Bool_t makeOwner=kTRUE) | |
to be documented | |
virtual | ~TObjectSet () |
to be documented | |
virtual TObject * | AddObject (TObject *obj, Bool_t makeOwner=kTRUE) |
Aliase for SetObject method. | |
virtual void | Browse (TBrowser *b) |
Browse this dataset (called by TBrowser). | |
virtual void | Delete (Option_t *opt="") |
to be documented | |
virtual Bool_t | DoOwner (Bool_t done=kTRUE) |
virtual Long_t | HasData () const |
virtual TObject * | GetObject () const |
The depricated method (left here for the sake of the backward compatibility) | |
virtual TDataSet * | Instance () const |
virtual Bool_t | IsOwner () const |
virtual void | SetObject (TObject *obj) |
The depricated method (left here for the sake of the backward compatibility) | |
virtual TObject * | SetObject (TObject *obj, Bool_t makeOwner) |
Public Member Functions inherited from TDataSet | |
TDataSet (const char *name="", TDataSet *parent=0, Bool_t arrayFlag=kFALSE) | |
TDataSet (const TDataSet &src, EDataSetPass iopt=kAll) | |
TDataSet (TNode &src) | |
This copy ctor has been depricated (left for thwe sake of the backweard compatibility) | |
virtual | ~TDataSet () |
std::cout << "Default destructor for " << GetName() << " - " << GetTitle() << std::endl; | |
virtual void | Add (TDataSet *dataset) |
virtual void | AddAt (TDataSet *dataset, Int_t idx=0) |
virtual void | AddAtAndExpand (TDataSet *dataset, Int_t idx=0) |
virtual void | AddFirst (TDataSet *dataset) |
Add TDataSet object at the beginning of the dataset list of this dataset. | |
virtual void | AddLast (TDataSet *dataset) |
Add TDataSet object at the end of the dataset list of this dataset. | |
TDataSet * | At (Int_t idx) const |
virtual TObject * | Clone (const char *newname="") const |
the custom implementation fo the TObject::Clone | |
virtual TDataSet * | Find (const char *path) const |
virtual TDataSet * | FindByName (const char *name, const char *path="", Option_t *opt="") const |
virtual TDataSet * | FindByPath (const char *path) const |
Aliase for TDataSet::Find(const Char_t *path) method. | |
virtual TDataSet * | FindByTitle (const char *title, const char *path="", Option_t *opt="") const |
TObject * | FindObject (const char *name) const |
TObject * | FindObject (const TObject *o) const |
virtual TDataSet * | First () const |
Return the first object in the list. Returns 0 when list is empty. | |
TObjArray * | GetObjArray () const |
virtual TSeqCollection * | GetCollection () const |
TList * | GetList () const |
virtual Int_t | GetListSize () const |
TObject * | GetMother () const |
virtual TDataSet * | GetParent () const |
virtual TString | Path () const |
return the full path of this data set | |
virtual EDataSetPass | Pass (EDataSetPass(*callback)(TDataSet *), Int_t depth=0) |
virtual EDataSetPass | Pass (EDataSetPass(*callback)(TDataSet *, void *), void *user, Int_t depth=0) |
virtual void | PrintContents (Option_t *opt="") const |
virtual Int_t | Purge (Option_t *opt="") |
virtual void | Remove (TDataSet *set) |
Remiove the "set" from this TDataSet. | |
virtual TDataSet * | RemoveAt (Int_t idx) |
virtual void | SetMother (TDataSet *parent=0) |
virtual void | SetParent (TDataSet *parent=0) |
virtual void | SetWrite () |
virtual void | Shunt (TDataSet *newParent=0) |
virtual void | Sort () |
Sort recursively all members of the TDataSet with TList::Sort method. | |
virtual Bool_t | IsEmpty () const |
return kTRUE if the "internal" collection has no member | |
virtual Bool_t | IsFolder () const |
virtual Bool_t | IsMarked () const |
virtual Bool_t | IsThisDir (const char *dirname, int len=-1, int ignorecase=0) const |
virtual TDataSet * | Last () const |
Return the last object in the list. Returns 0 when list is empty. | |
virtual void | ls (Option_t *option="") const |
virtual void | ls (Int_t depth) const |
void | Mark () |
void | UnMark () |
void | MarkAll () |
Mark all members of this dataset. | |
void | UnMarkAll () |
UnMark all members of this dataset. | |
void | InvertAllMarks () |
Invert mark bit for all members of this dataset. | |
void | Mark (UInt_t flag, EBitOpt reset=kSet) |
virtual TDataSet * | Next () const |
virtual TDataSet * | Prev () const |
virtual void | Update () |
virtual void | Update (TDataSet *set, UInt_t opt=0) |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const |
Static Public Member Functions | |
static StarParticleData & | instance () |
Returns a reference to the single instance of this class. More... | |
Static Public Member Functions inherited from TObjectSet | |
static TObjectSet * | instance () |
Static Public Member Functions inherited from TDataSet | |
static TDataSet * | GetMainSet () |
return pointer to the main dataset | |
static TDataSet * | instance () |
Protected Member Functions | |
ClassDef (StarParticleData, 1) | |
Protected Member Functions inherited from TDataSet | |
virtual void | SetMother (TObject *mother) |
TDataSet (const char *name, const char *title) | |
void | AddMain (TDataSet *set) |
add data set to main data set | |
TDataSet * | GetRealParent () |
return real parent | |
void | MakeCollection () |
Create the internal container at once if any. | |
Protected Attributes | |
TObjArray | mParticleList |
std::map< TString, TParticlePDG * > | mParticleNameMap |
std::map< Int_t, TParticlePDG * > | mParticleIdMap |
std::map< Int_t, TParticlePDG * > | mParticleG3IdMap |
Protected Attributes inherited from TObjectSet | |
TObject * | fObj |
Protected Attributes inherited from TDataSet | |
TDataSet * | fParent |
TSeqCollection * | fList |
Static Protected Attributes | |
static StarParticleData * | sInstance = nullptr |
Static Protected Attributes inherited from TDataSet | |
static TDataSet * | fgMainSet = &mainSet |
Additional Inherited Members | |
Public Types inherited from TDataSet | |
enum | EDataSetPass { kContinue, kPrune, kStop, kUp, kStruct, kAll, kRefs, kMarked } |
enum | ESetBits { kMark = BIT(22), kArray = BIT(20) } |
enum | EBitOpt { kSet = kTRUE, kReset = kFALSE } |
Protected Types inherited from TObjectSet | |
enum | EOwnerBits { kIsOwner = BIT(23) } |
Static Protected Member Functions inherited from TDataSet | |
static EDataSetPass | SortIt (TDataSet *ds) |
static EDataSetPass | SortIt (TDataSet *ds, void *user) |
Interface to PDG information.
Definition at line 22 of file StarParticleData.h.
TParticlePDG * StarParticleData::AddParticle | ( | const Char_t * | name, |
const Char_t * | title, | ||
Double_t | mass, | ||
Bool_t | Stable, | ||
Double_t | Width, | ||
Double_t | Charge3, | ||
const char * | ParticleClass, | ||
Int_t | PdgCode, | ||
Int_t | Anti, | ||
Int_t | geantCode | ||
) |
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.
name | Name of the particle |
title | Title |
mass | Mass of the particle [GeV] |
stable | True if the particle is stable |
width | Total width of the particle (meaningless if stable) [GeV] |
charge3 | Charge of the particle in units of |e|/3... i.e. proton would be charge3 = 3, down quark charge3 = -1. |
particleClass | is the class of the particle, e.g. lepton, hadron, ... |
pdgCode | is the Particle Data Group code |
geantCode | is the geant code of the particle |
Definition at line 204 of file StarParticleData.cxx.
References AddParticle().
TParticlePDG * StarParticleData::AddParticleToG3 | ( | const char * | name, |
const double | mass, | ||
const double | lifetime, | ||
const double | charge, | ||
const int | tracktype, | ||
const int | pdgcode, | ||
const int | g3code, | ||
const double * | bratio = 0 , |
||
const int * | mode = 0 |
||
) |
Particle definition to DB and G3
TODO: Add decay channels to PDG particle
Register particle and its decay modes with G3
Definition at line 262 of file StarParticleData.cxx.
References AgStarParticle::Add(), and AddParticle().
|
static |
Returns a reference to the single instance of this class.
Add a decay channel to the named particle
name | Name of the particle |
AddDecay( const Char_t *name, Int_t num, Int_t matrixCode, Double_t branchingRatio, TArrayI kids );
Definition at line 354 of file StarParticleData.cxx.
Referenced by StarPrimaryMaker::Finish(), StarPrimaryMaker::pdg(), StarGenParticle::Print(), StarGenParticle::SetId(), and StarPrimaryMaker::StarPrimaryMaker().