a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
Particle.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 HEPfit Collaboration
3  *
4  *
5  * For the licensing terms see doc/COPYING.
6  */
7 
8 #ifndef PARTICLE_H
9 #define PARTICLE_H
10 
11 #include <vector>
12 #include <string>
13 
14 #define HCUT 6.5821195E-13 // GeV psec
15 
26 class Particle {
27 public:
28 
34  {
35  name = "";
36  mass = 0.;
37  mass_scale = 0.;
38  width = 0.;
39  charge = 0.;
40  isospin = 0.;
41  setIndex();
42  };
43 
54  Particle(std::string name, double mass, double mass_scale = 0., double width = 0., double charge = 0., double isospin = 0.);
55 
56  virtual ~Particle(){};
61  const double& getMass() const
62  {
63  return mass;
64  }
65 
70  void setMass(double mass)
71  {
72  this->mass = mass;
73  }
74 
79  const double& getWidth() const
80  {
81  return width;
82  }
83 
88  void setWidth(double width)
89  {
90  this->width = width;
91  }
92 
97  double getCharge() const
98  {
99  return charge;
100  }
101 
106  void setCharge(double charge)
107  {
108  this->charge = charge;
109  }
110 
115  double getIsospin() const
116  {
117  return isospin;
118  }
119 
124  void setIsospin(double isospin)
125  {
126  this->isospin = isospin;
127  }
128 
133  double getMass_scale() const
134  {
135  return mass_scale;
136  }
137 
143  {
144  this->mass_scale = mass_scale;
145  }
146 
147  std::string getName() const
148  {
149  return name;
150  }
151 
152  void setName(std::string name)
153  {
154  this->name = name;
155  setIndex();
156  }
157 
158  bool is(std::string name_i) const;
159 
160  int getIndex() const
161  {
162  return index;
163  }
164 
165 protected:
166  double mass;
167  double width;
168  double charge;
169  double mass_scale;
170  double isospin;
171  std::string name;
172  int index;
173 
174  void setIndex();
175 };
176 
177 #endif /* PARTICLE_H */
Particle::setIsospin
void setIsospin(double isospin)
A set method to fix the particle isospin.
Definition: Particle.h:124
Particle::is
bool is(std::string name_i) const
Definition: Particle.cpp:23
Particle
A class for particles.
Definition: Particle.h:26
Particle::setCharge
void setCharge(double charge)
A set method to fix the particle charge.
Definition: Particle.h:106
Particle::getWidth
const double & getWidth() const
A get method to access the particle width.
Definition: Particle.h:79
Particle::setIndex
void setIndex()
Definition: Particle.cpp:40
Particle::getMass_scale
double getMass_scale() const
A get method to access the scale at which the particle mass is defined.
Definition: Particle.h:133
Particle::getIsospin
double getIsospin() const
A get method to access the particle isospin.
Definition: Particle.h:115
Particle::~Particle
virtual ~Particle()
Definition: Particle.h:56
Particle::getMass
const double & getMass() const
A get method to access the particle mass.
Definition: Particle.h:61
Particle::mass_scale
double mass_scale
The scale in GeV at which the particle mass is defined.
Definition: Particle.h:169
Particle::name
std::string name
The particle name.
Definition: Particle.h:171
Particle::isospin
double isospin
The particle isospin.
Definition: Particle.h:170
Particle::setMass_scale
void setMass_scale(double mass_scale)
A set method to fix the scale at which the particle mass is defined.
Definition: Particle.h:142
Particle::getCharge
double getCharge() const
A get method to access the particle charge.
Definition: Particle.h:97
Particle::setName
void setName(std::string name)
Definition: Particle.h:152
Particle::setMass
void setMass(double mass)
A set method to fix the particle mass.
Definition: Particle.h:70
Particle::charge
double charge
The particle charge.
Definition: Particle.h:168
Particle::getIndex
int getIndex() const
Definition: Particle.h:160
Particle::width
double width
The particle width in GeV.
Definition: Particle.h:167
Particle::mass
double mass
The particle mass in GeV.
Definition: Particle.h:166
Particle::index
int index
The index of the particle.
Definition: Particle.h:172
Particle::setWidth
void setWidth(double width)
A set method to fix the particle width.
Definition: Particle.h:88
Particle::Particle
Particle()
The default constructor.
Definition: Particle.h:33
Particle::getName
std::string getName() const
Definition: Particle.h:147