Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TAttParticle.h
Go to the documentation of this file.
1// @(#)root/eg:$Id$
2// Author: Ola Nordmann 29/09/95
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12
13//////////////////////////////////////////////////////////////////////////
14// //
15// TAttParticle //
16// //
17// Particle definition, based on GEANT3 particle definition //
18// //
19// //
20//////////////////////////////////////////////////////////////////////////
21
22#ifndef ROOT_TAttParticle
23#define ROOT_TAttParticle
24
25#include "TNamed.h"
26#include "TAttLine.h"
27
28class THashList;
29
30class TAttParticle : public TNamed {
31private:
32 Double_t fPDGMass; //Mass of the particle in GeV/c2
33 Bool_t fPDGStable; //Logical indicator, if TRUE the particle can not decay
34 Double_t fPDGDecayWidth; //Life time of the particle in sec.
35 Double_t fPDGCharge; //Charge of the particle in units of e
36 TString fParticleType; //Text indicator for the particle family
37 Int_t fMCnumberOfPDG; //PDG MC number followed by
38 //http://pdg.lbl.gov/rpp/mcdata/all.mc
39 Double_t fEnergyCut; //Lower energy cut off, the default is 10 keV
40 Double_t fEnergyLimit; //High energy cut off, the default is 10 TeV
41 Double_t fGranularity; //Granularity of the fLogEScale
42
43public:
45 TAttParticle(const char *name, const char *title,
46 Double_t Mass, Bool_t Stable,
47 Double_t DecayWidth, Double_t Charge, const char *Type,
48 Int_t MCnumber, Int_t granularity=90,
49 Double_t LowerCutOff=1.e-5, Double_t HighCutOff=1.e4);
50 ~TAttParticle() override;
52 static Int_t ConvertISAtoPDG(Int_t isaNumber);
53 static void DefinePDG();
54 virtual Double_t GetCharge() const { return fPDGCharge; }
55 virtual Double_t GetEnergyCut() const { return fEnergyCut; }
56 virtual Double_t GetEnergyLimit() const { return fEnergyLimit; }
57 virtual Double_t GetGranularity() const { return fGranularity; }
58 virtual Double_t GetDecayWidth() const { return fPDGDecayWidth; }
59 virtual Double_t GetMass() const { return fPDGMass; }
60 virtual Int_t GetMCNumber() const { return fMCnumberOfPDG; }
61 static TAttParticle *GetParticle(const char *name);
62 static TAttParticle *GetParticle(Int_t mcnumber);
63 virtual const char *GetParticleType() const { return fParticleType.Data(); }
64 virtual Bool_t GetStable() const { return fPDGStable; }
65 void Print(Option_t *option="") const override ;
66 virtual Double_t SampleMass() const ;
67 virtual Double_t SampleMass(Double_t widthcut) const ;
68
69 ClassDefOverride(TAttParticle,1) //Particle definition
70};
71
72#endif
int Int_t
Definition RtypesCore.h:45
double Double_t
Definition RtypesCore.h:59
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
char name[80]
Definition TGX11.cxx:110
Particle definition, partly based on GEANT3 particle definition.
static TAttParticle * GetParticle(const char *name)
Get a pointer to the particle object according to the name given.
virtual Double_t GetMass() const
virtual Int_t GetMCNumber() const
~TAttParticle() override
Particle destructor.
virtual Bool_t GetStable() const
TAttParticle()
Particle definition default constructor.
Double_t fEnergyCut
virtual Double_t GetEnergyLimit() const
virtual Double_t GetCharge() const
static Int_t ConvertISAtoPDG(Int_t isaNumber)
Converts the ISAJET Particle number into the PDG MC number.
Double_t fPDGMass
virtual Double_t SampleMass() const
Samples a mass according to the Breit-Wigner resonance distribution.
static void DefinePDG()
Defines particles according to the Particle Data Group.
virtual const char * GetParticleType() const
Double_t fPDGDecayWidth
virtual Double_t GetGranularity() const
static THashList * fgList
Double_t fPDGCharge
Bool_t fPDGStable
Int_t fMCnumberOfPDG
void Print(Option_t *option="") const override
Print the entire information of this kind of particle.
TString fParticleType
virtual Double_t GetEnergyCut() const
Double_t fEnergyLimit
Double_t fGranularity
virtual Double_t GetDecayWidth() const
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
Definition THashList.h:34
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376