-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparticle.hpp
More file actions
68 lines (42 loc) · 1.29 KB
/
Copy pathparticle.hpp
File metadata and controls
68 lines (42 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef PARTICLE_HPP
#define PARTICLE_HPP
#include <vector>
#include "particleType.hpp"
#include "resonanceType.hpp"
class Particle {
public:
Particle(std::string const& name, double px = 0., double py = 0.,
double pz = 0.);
// Default constructor
Particle();
// Method used to add particles in fParticleType
static void AddParticleType(std::string const& name, double mass, int charge,
double width = 0.);
void SetIndex(int index);
void SetIndex(std::string const& name);
void SetP(double px, double py, double pz);
// Getters and printers
int GetIndex() const;
static void PrintParticle();
void PrintIndex() const;
double GetPx() const;
double GetPy() const;
double GetPz() const;
double GetMass() const;
double GetEnergy() const;
double GetInvMass(Particle const& p) const;
// Used to get fParticleType's size in tests and in member funtions above
static int GetSize();
int GetCharge() const;
// Decay in two particles
int Decay2Body(Particle& dau1, Particle& dau2) const;
private:
static std::vector<ParticleType*> fParticleType;
int fIndex;
double fPx;
double fPy;
double fPz;
static int FindParticle(std::string const& particleName);
void Boost(double bx, double by, double bz);
};
#endif