-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCandidate.h
85 lines (65 loc) · 1.66 KB
/
Candidate.h
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#pragma once
#include <Rtypes.h>
namespace pec
{
/**
* \class Candidate
* \brief Stores four-momentum
*
* Components of the four-momentum are compressed using minifloat functions.
*/
class Candidate
{
public:
/**
* \brief Constructor with no parameters
*
* It must be defined in order to use the class with the ROOT i/o system.
*/
Candidate() noexcept;
/// Default move constructor
Candidate(Candidate &&) = default;
/// Default copy constructor
Candidate(Candidate const &) = default;
/// Default assignment operator
Candidate &operator=(Candidate const &) = default;
/// Default virtual destructor
virtual ~Candidate() = default;
public:
/// Resets the object to a state right after the default initialisation
virtual void Reset();
/// Sets transverse momentum (GeV/c)
void SetPt(float pt);
/// Sets pseudorapidity
void SetEta(float eta);
/**
* \brief Sets azimuthal angle
*
* The range is [-pi, pi).
*/
void SetPhi(float phi);
/// Sets mass (GeV/c^2)
void SetM(float mass);
/// Returns transverse momentum (GeV/c)
float Pt() const;
/// Returns pseudorapidity
float Eta() const;
/**
* \brief Returns azimuthal angle
*
* The range is [-pi, pi).
*/
float Phi() const;
/// Returns mass (GeV/c^2)
float M() const;
private:
/// Transverse momentum, GeV/c
Float_t pt;
/// Pseudorapidity
Float_t eta;
/// Azimuthal angle, [-pi, pi)
Float_t phi;
/// Mass, GeV/c^2
Float_t mass;
};
} // end of namespace pec