1 |
dhidas |
1.1 |
/*
|
2 |
|
|
* Lepton.cpp
|
3 |
|
|
*
|
4 |
|
|
*/
|
5 |
|
|
|
6 |
|
|
#include "../../interface/RecoObjects/Lepton.h"
|
7 |
|
|
|
8 |
|
|
namespace BAT {
|
9 |
|
|
|
10 |
|
|
static const float initialBigValue = 123456789;
|
11 |
|
|
|
12 |
|
|
Lepton::Lepton() :
|
13 |
|
|
Particle(),
|
14 |
|
|
xyDistanceToPrimaryVertex(initialBigValue),
|
15 |
|
|
zDistanceToPrimaryVertex(initialBigValue),
|
16 |
|
|
PFGamma_Isolation(initialBigValue),
|
17 |
|
|
PFChargedHadron_Isolation(initialBigValue),
|
18 |
|
|
PFNeutralHadron_Isolation(initialBigValue)
|
19 |
|
|
{
|
20 |
|
|
}
|
21 |
|
|
|
22 |
|
|
Lepton::Lepton(float energy, float px, float py, float pz) :
|
23 |
|
|
Particle(energy, px, py, pz),
|
24 |
|
|
xyDistanceToPrimaryVertex(initialBigValue),
|
25 |
|
|
zDistanceToPrimaryVertex(initialBigValue),
|
26 |
|
|
PFGamma_Isolation(initialBigValue),
|
27 |
|
|
PFChargedHadron_Isolation(initialBigValue),
|
28 |
|
|
PFNeutralHadron_Isolation(initialBigValue)
|
29 |
|
|
{
|
30 |
|
|
}
|
31 |
|
|
|
32 |
|
|
Lepton::~Lepton() {
|
33 |
|
|
}
|
34 |
|
|
|
35 |
|
|
void Lepton::setXyDistanceToPrimaryVertex (float dist) {
|
36 |
|
|
xyDistanceToPrimaryVertex = dist;
|
37 |
|
|
}
|
38 |
|
|
|
39 |
|
|
void Lepton::setZDistanceToPrimaryVertex(float dist) {
|
40 |
|
|
zDistanceToPrimaryVertex = dist;
|
41 |
|
|
}
|
42 |
|
|
|
43 |
|
|
void Lepton::setPFGammaIsolation(float pfGammaIso) {
|
44 |
|
|
PFGamma_Isolation = pfGammaIso;
|
45 |
|
|
}
|
46 |
|
|
|
47 |
|
|
void Lepton::setPFChargedHadronIsolation(float chargedHadronIso) {
|
48 |
|
|
PFChargedHadron_Isolation = chargedHadronIso;
|
49 |
|
|
}
|
50 |
|
|
|
51 |
|
|
void Lepton::setPFNeutralHadronIsolation(float neutralHadronIso) {
|
52 |
|
|
PFNeutralHadron_Isolation = neutralHadronIso;
|
53 |
|
|
}
|
54 |
|
|
|
55 |
|
|
float Lepton::PFGammaIsolation() const {
|
56 |
|
|
return PFGamma_Isolation;
|
57 |
|
|
}
|
58 |
|
|
|
59 |
|
|
float Lepton::PFChargedHadronIsolation() const {
|
60 |
|
|
return PFChargedHadron_Isolation;
|
61 |
|
|
}
|
62 |
|
|
|
63 |
|
|
float Lepton::PFNeutralHadronIsolation() const {
|
64 |
|
|
return PFNeutralHadron_Isolation;
|
65 |
|
|
}
|
66 |
|
|
|
67 |
|
|
float Lepton::XyDistanceToPrimaryVertex () const {
|
68 |
|
|
return xyDistanceToPrimaryVertex ;
|
69 |
|
|
}
|
70 |
|
|
|
71 |
|
|
float Lepton::ZDistanceToPrimaryVertex() const {
|
72 |
|
|
return zDistanceToPrimaryVertex;
|
73 |
|
|
}
|
74 |
|
|
|
75 |
|
|
float Lepton::pfIsolation() const {
|
76 |
|
|
return (PFGamma_Isolation + PFChargedHadron_Isolation + PFNeutralHadron_Isolation) / pt();
|
77 |
|
|
// Previously was divided by et, but I think pt is correct.
|
78 |
|
|
}
|
79 |
|
|
|
80 |
|
|
}
|