]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TUHKMgen/UHKM/ParticlePDG.h
Macros for calculating em et correction for hadronic deposits
[u/mrichter/AliRoot.git] / TUHKMgen / UHKM / ParticlePDG.h
1 //
2 //  Copyright   : The FASTMC and SPHMC Collaboration
3 //  Author      : Ionut Cristian Arsene 
4 //  Affiliation : Oslo University, Norway & Institute for Space Sciences, Bucharest, Romania
5 //  e-mail      : i.c.arsene@fys.uio.no
6 //  Date        : 2007/05/30
7 //
8 //  This class is using the particle and decay lists provided by the 
9 //  THERMINATOR (Computer Physics Communications 174 669 (2006)) and
10 //  SHARE (Computer Physics Communications 167 229 (2005)) collaborations.
11 //
12
13 #ifndef PARTICLEPDG_H
14 #define PARTICLEPDG_H
15
16 #include <Rtypes.h>
17 #include "DecayChannel.h"
18
19 const Int_t kMaxDecayChannels = 100;
20
21 class ParticlePDG {
22  public:
23   ParticlePDG();
24   ParticlePDG(const Char_t * const name, Int_t pdg, Double_t mass, Double_t width);
25   ~ParticlePDG();
26   
27   void AddChannel(DecayChannel* channel);
28   void SetName(const Char_t * const name) {
29     for(Int_t i=0; i<9; i++)
30       if(*(name+i) != '\0') fName[i] = *(name+i);
31       else break;
32   }
33   void SetPDG(Int_t value) {fPDG = value;}
34   void SetMass(Double_t value) {fMass = value;}
35   void SetWidth(Double_t value) {fWidth = value;}
36   void SetSpin(Double_t value) {fSpin = value;}
37   void SetIsospin(Double_t value) {fIsospin = value;}
38   void SetIsospinZ(Double_t value) {fIsospinZ = value;}
39   void SetLightQNumber(Double_t value) {fLightQuarkNumber = value;}
40   void SetLightAQNumber(Double_t value) {fAntiLightQuarkNumber = value;}
41   void SetStrangeQNumber(Double_t value) {fStrangeQuarkNumber = value;}
42   void SetStrangeAQNumber(Double_t value) {fAntiStrangeQuarkNumber = value;}
43   void SetCharmQNumber(Double_t value) {fCharmQuarkNumber = value;}
44   void SetCharmAQNumber(Double_t value) {fAntiCharmQuarkNumber = value;}
45   void SetStable(Bool_t value) {fStable = value;}
46   
47   const Char_t* GetName() const {return fName;}
48   Int_t GetPDG() const {return fPDG;}
49   Double_t GetMass() const {return fMass;}
50   Double_t GetWidth() const {return fWidth;}
51   Int_t GetNDecayChannels() const {return fNDecayChannels;}
52   Double_t GetSpin() const {return fSpin;}
53   Double_t GetIsospin() const {return fIsospin;}
54   Double_t GetIsospinZ() const {return fIsospinZ;}
55   Double_t GetLightQNumber() const {return fLightQuarkNumber;}
56   Double_t GetLightAQNumber() const {return fAntiLightQuarkNumber;}
57   Double_t GetStrangeQNumber() const {return fStrangeQuarkNumber;}
58   Double_t GetStrangeAQNumber() const {return fAntiStrangeQuarkNumber;}
59   Double_t GetCharmQNumber() const {return fCharmQuarkNumber;}
60   Double_t GetCharmAQNumber() const {return fAntiCharmQuarkNumber;}
61   Double_t GetBaryonNumber() const {return (fLightQuarkNumber     + fStrangeQuarkNumber     + fCharmQuarkNumber -  
62                                       fAntiLightQuarkNumber - fAntiStrangeQuarkNumber - fAntiCharmQuarkNumber)/3.;}
63   Double_t GetStrangeness() const {return (fAntiStrangeQuarkNumber - fStrangeQuarkNumber);}
64   Double_t GetCharmness() const {return (fCharmQuarkNumber - fAntiCharmQuarkNumber);}
65   Double_t GetElectricCharge() const {return fIsospinZ + (GetBaryonNumber()+GetStrangeness()+GetCharmness())/2.;}
66   Bool_t GetStableStatus() const {
67     return fStable;
68   }  
69
70   Double_t GetFullBranching();
71   DecayChannel* GetDecayChannel(Int_t i) const {
72     if(0<=i && i<fNDecayChannels) return fDecayChannels[i];
73     else return 0x0;
74   }
75
76  private:
77   ParticlePDG(const ParticlePDG&);
78   ParticlePDG& operator=(const ParticlePDG&);
79
80   Char_t        fName[9];                      // particle name
81   Int_t         fPDG;                          // PDG code
82   Double_t      fMass;                         // mass
83   Double_t      fWidth;                        // width
84   Double_t      fSpin;                         // J
85   Double_t      fIsospin;                      // I
86   Double_t      fIsospinZ;                     // I3
87   Double_t      fLightQuarkNumber;             // u, d quark number
88   Double_t      fAntiLightQuarkNumber;         // u-, d- quark number
89   Double_t      fStrangeQuarkNumber;           // s quark number
90   Double_t      fAntiStrangeQuarkNumber;       // s- quark number
91   Double_t      fCharmQuarkNumber;             // c quark number
92   Double_t      fAntiCharmQuarkNumber;         // c- quark number
93   Int_t         fNDecayChannels;               // number of decay channels
94   Bool_t        fStable;                       // flag to turn on/off decay
95   DecayChannel* fDecayChannels[kMaxDecayChannels];   // array of decay channels
96 };
97
98 #endif