CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ParticlePDG.h
Go to the documentation of this file.
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 PARTICLE_PDG
14 #define PARTICLE_PDG
15 
16 #include "Rtypes.h"
17 
18 #ifndef DECAY_CHANNEL
19 #include "DecayChannel.h"
20 #endif
21 
22 const int kMaxDecayChannels = 100;
23 
24 class ParticlePDG {
25 private:
26  char fName[9];
27  int fPDG;
28  double fMass;
29  double fWidth;
30  double fSpin; // J
31  double fIsospin; // I
32  double fIsospinZ; // I3
33  double fLightQuarkNumber; // u, d quark number
34  double fAntiLightQuarkNumber; // u-, d- quark number
35  double fStrangeQuarkNumber; // s quark number
36  double fAntiStrangeQuarkNumber; // s- quark number
37  double fCharmQuarkNumber; // c quark number
38  double fAntiCharmQuarkNumber; // c- quark number
41 
42 public:
43  ParticlePDG();
44  ParticlePDG(char* name, int pdg, double mass, double width);
45  ~ParticlePDG();
46 
47  void AddChannel(DecayChannel& channel);
48  void SetName(char* name) {
49  for (int i = 0; i < 9; i++)
50  if (*(name + i) != '\0')
51  fName[i] = *(name + i);
52  else
53  break;
54  }
55  void SetPDG(int value) { fPDG = value; }
56  void SetMass(double value) { fMass = value; }
57  void SetWidth(double value) { fWidth = value; }
58  void SetSpin(double value) { fSpin = value; }
59  void SetIsospin(double value) { fIsospin = value; }
60  void SetIsospinZ(double value) { fIsospinZ = value; }
67 
68  char* GetName() { return fName; }
69  int GetPDG() { return fPDG; }
70  double GetMass() { return fMass; }
71  double GetWidth() { return fWidth; }
73  double GetSpin() { return fSpin; }
74  double GetIsospin() { return fIsospin; }
75  double GetIsospinZ() { return fIsospinZ; }
76  double GetLightQNumber() { return fLightQuarkNumber; }
80  double GetCharmQNumber() { return fCharmQuarkNumber; }
82  double GetBaryonNumber() {
85  3.;
86  }
89  double GetElectricCharge() { return fIsospinZ + (GetBaryonNumber() + GetStrangeness() + GetCharmness()) / 2.; }
90 
91  double GetFullBranching();
93  if (0 <= i && i < fNDecayChannels)
94  return fDecayChannels[i];
95  else
96  return nullptr;
97  }
98 };
99 
100 #endif
double GetStrangeQNumber()
Definition: ParticlePDG.h:78
int fNDecayChannels
Definition: ParticlePDG.h:39
double GetIsospin()
Definition: ParticlePDG.h:74
void SetLightQNumber(double value)
Definition: ParticlePDG.h:61
void SetStrangeQNumber(double value)
Definition: ParticlePDG.h:63
int GetPDG()
Definition: ParticlePDG.h:69
void SetIsospin(double value)
Definition: ParticlePDG.h:59
void SetLightAQNumber(double value)
Definition: ParticlePDG.h:62
char fName[9]
Definition: ParticlePDG.h:26
void SetMass(double value)
Definition: ParticlePDG.h:56
DecayChannel * fDecayChannels[kMaxDecayChannels]
Definition: ParticlePDG.h:40
DecayChannel * GetDecayChannel(int i)
Definition: ParticlePDG.h:92
double GetCharmAQNumber()
Definition: ParticlePDG.h:81
void AddChannel(DecayChannel &channel)
Definition: ParticlePDG.cc:56
double GetSpin()
Definition: ParticlePDG.h:73
char * GetName()
Definition: ParticlePDG.h:68
double GetWidth()
Definition: ParticlePDG.h:71
double GetCharmness()
Definition: ParticlePDG.h:88
double GetElectricCharge()
Definition: ParticlePDG.h:89
double fWidth
Definition: ParticlePDG.h:29
double fAntiCharmQuarkNumber
Definition: ParticlePDG.h:38
int GetNDecayChannels()
Definition: ParticlePDG.h:72
const int kMaxDecayChannels
Definition: ParticlePDG.h:22
double fSpin
Definition: ParticlePDG.h:30
void SetName(char *name)
Definition: ParticlePDG.h:48
double GetBaryonNumber()
Definition: ParticlePDG.h:82
double GetStrangeness()
Definition: ParticlePDG.h:87
void SetIsospinZ(double value)
Definition: ParticlePDG.h:60
double fCharmQuarkNumber
Definition: ParticlePDG.h:37
double GetIsospinZ()
Definition: ParticlePDG.h:75
double GetLightAQNumber()
Definition: ParticlePDG.h:77
double fLightQuarkNumber
Definition: ParticlePDG.h:33
double fAntiLightQuarkNumber
Definition: ParticlePDG.h:34
double fIsospin
Definition: ParticlePDG.h:31
void SetPDG(int value)
Definition: ParticlePDG.h:55
double fIsospinZ
Definition: ParticlePDG.h:32
void SetCharmAQNumber(double value)
Definition: ParticlePDG.h:66
void SetCharmQNumber(double value)
Definition: ParticlePDG.h:65
double GetCharmQNumber()
Definition: ParticlePDG.h:80
double GetMass()
Definition: ParticlePDG.h:70
double GetStrangeAQNumber()
Definition: ParticlePDG.h:79
double GetFullBranching()
Definition: ParticlePDG.cc:49
void SetStrangeAQNumber(double value)
Definition: ParticlePDG.h:64
void SetSpin(double value)
Definition: ParticlePDG.h:58
double GetLightQNumber()
Definition: ParticlePDG.h:76
double fAntiStrangeQuarkNumber
Definition: ParticlePDG.h:36
void SetWidth(double value)
Definition: ParticlePDG.h:57
double fMass
Definition: ParticlePDG.h:28
double fStrangeQuarkNumber
Definition: ParticlePDG.h:35