CMS 3D CMS Logo

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
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
ParticlePDG::SetSpin
void SetSpin(double value)
Definition: ParticlePDG.h:58
mps_fire.i
i
Definition: mps_fire.py:428
ParticlePDG::SetWidth
void SetWidth(double value)
Definition: ParticlePDG.h:57
ParticlePDG::fMass
double fMass
Definition: ParticlePDG.h:28
ParticlePDG::GetFullBranching
double GetFullBranching()
Definition: ParticlePDG.cc:49
ParticlePDG::AddChannel
void AddChannel(DecayChannel &channel)
Definition: ParticlePDG.cc:56
ParticlePDG::GetDecayChannel
DecayChannel * GetDecayChannel(int i)
Definition: ParticlePDG.h:92
ParticlePDG::SetStrangeAQNumber
void SetStrangeAQNumber(double value)
Definition: ParticlePDG.h:64
ParticlePDG::fAntiStrangeQuarkNumber
double fAntiStrangeQuarkNumber
Definition: ParticlePDG.h:36
ParticlePDG::fNDecayChannels
int fNDecayChannels
Definition: ParticlePDG.h:39
ParticlePDG::fAntiCharmQuarkNumber
double fAntiCharmQuarkNumber
Definition: ParticlePDG.h:38
ParticlePDG::GetIsospin
double GetIsospin()
Definition: ParticlePDG.h:74
ParticlePDG::GetName
char * GetName()
Definition: ParticlePDG.h:68
ParticlePDG::GetNDecayChannels
int GetNDecayChannels()
Definition: ParticlePDG.h:72
ParticlePDG::fName
char fName[9]
Definition: ParticlePDG.h:26
ParticlePDG::SetStrangeQNumber
void SetStrangeQNumber(double value)
Definition: ParticlePDG.h:63
ParticlePDG::fPDG
int fPDG
Definition: ParticlePDG.h:27
DecayChannel
Definition: DecayChannel.h:22
ParticlePDG::GetIsospinZ
double GetIsospinZ()
Definition: ParticlePDG.h:75
ParticlePDG::GetStrangeness
double GetStrangeness()
Definition: ParticlePDG.h:87
ParticlePDG
Definition: ParticlePDG.h:24
ParticlePDG::GetCharmAQNumber
double GetCharmAQNumber()
Definition: ParticlePDG.h:81
ParticlePDG::SetIsospinZ
void SetIsospinZ(double value)
Definition: ParticlePDG.h:60
ParticlePDG::fDecayChannels
DecayChannel * fDecayChannels[kMaxDecayChannels]
Definition: ParticlePDG.h:40
ParticlePDG::fCharmQuarkNumber
double fCharmQuarkNumber
Definition: ParticlePDG.h:37
ParticlePDG::SetCharmQNumber
void SetCharmQNumber(double value)
Definition: ParticlePDG.h:65
ParticlePDG::fLightQuarkNumber
double fLightQuarkNumber
Definition: ParticlePDG.h:33
ParticlePDG::GetCharmQNumber
double GetCharmQNumber()
Definition: ParticlePDG.h:80
ParticlePDG::GetStrangeAQNumber
double GetStrangeAQNumber()
Definition: ParticlePDG.h:79
ParticlePDG::GetCharmness
double GetCharmness()
Definition: ParticlePDG.h:88
ParticlePDG::fIsospinZ
double fIsospinZ
Definition: ParticlePDG.h:32
DecayChannel.h
kMaxDecayChannels
const int kMaxDecayChannels
Definition: ParticlePDG.h:22
ParticlePDG::fWidth
double fWidth
Definition: ParticlePDG.h:29
value
Definition: value.py:1
ParticlePDG::GetSpin
double GetSpin()
Definition: ParticlePDG.h:73
ParticlePDG::GetMass
double GetMass()
Definition: ParticlePDG.h:70
ParticlePDG::GetWidth
double GetWidth()
Definition: ParticlePDG.h:71
ParticlePDG::fSpin
double fSpin
Definition: ParticlePDG.h:30
ParticlePDG::GetElectricCharge
double GetElectricCharge()
Definition: ParticlePDG.h:89
ParticlePDG::SetName
void SetName(char *name)
Definition: ParticlePDG.h:48
ParticlePDG::fStrangeQuarkNumber
double fStrangeQuarkNumber
Definition: ParticlePDG.h:35
ParticlePDG::GetLightQNumber
double GetLightQNumber()
Definition: ParticlePDG.h:76
ParticlePDG::GetStrangeQNumber
double GetStrangeQNumber()
Definition: ParticlePDG.h:78
relativeConstraints.value
value
Definition: relativeConstraints.py:53
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
ParticlePDG::GetBaryonNumber
double GetBaryonNumber()
Definition: ParticlePDG.h:82
pdg
Definition: pdg_functions.h:28
ParticlePDG::GetLightAQNumber
double GetLightAQNumber()
Definition: ParticlePDG.h:77
ParticlePDG::fAntiLightQuarkNumber
double fAntiLightQuarkNumber
Definition: ParticlePDG.h:34
ParticlePDG::SetLightQNumber
void SetLightQNumber(double value)
Definition: ParticlePDG.h:61
ParticlePDG::~ParticlePDG
~ParticlePDG()
Definition: ParticlePDG.cc:44
ParticlePDG::ParticlePDG
ParticlePDG()
Definition: ParticlePDG.cc:21
ParticlePDG::SetPDG
void SetPDG(int value)
Definition: ParticlePDG.h:55
ParticlePDG::GetPDG
int GetPDG()
Definition: ParticlePDG.h:69
ParticlePDG::SetIsospin
void SetIsospin(double value)
Definition: ParticlePDG.h:59
ParticlePDG::SetLightAQNumber
void SetLightAQNumber(double value)
Definition: ParticlePDG.h:62
ParticlePDG::SetMass
void SetMass(double value)
Definition: ParticlePDG.h:56
ParticlePDG::fIsospin
double fIsospin
Definition: ParticlePDG.h:31
ParticlePDG::SetCharmAQNumber
void SetCharmAQNumber(double value)
Definition: ParticlePDG.h:66