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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
#ifndef HcalIsolatedTrack_IsolatedPixelTrackCandidate_h
#define HcalIsolatedTrack_IsolatedPixelTrackCandidate_h
/** \class reco::IsolatedPixelTrackCandidate
*
*
*/
#include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/L1Trigger/interface/L1JetParticle.h"
#include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
#include "DataFormats/L1Trigger/interface/Jet.h"
#include "DataFormats/L1Trigger/interface/Tau.h"
#include "DataFormats/HcalIsolatedTrack/interface/IsolatedPixelTrackCandidateFwd.h"
#include <vector>
#include <map>
#include <utility>
namespace reco {
class IsolatedPixelTrackCandidate : public RecoCandidate {
public:
// default constructor
IsolatedPixelTrackCandidate() : RecoCandidate() {
enIn_ = -1;
enOut_ = -1;
nhitIn_ = -1;
nhitOut_ = -1;
maxPtPxl_ = -1;
sumPtPxl_ = -1;
etaEcal_ = 0;
phiEcal_ = 0;
etaPhiEcal_ = false;
}
///constructor from LorentzVector
IsolatedPixelTrackCandidate(const LorentzVector& v) : RecoCandidate(0, v) {
enIn_ = -1;
enOut_ = -1;
nhitIn_ = -1;
nhitOut_ = -1;
maxPtPxl_ = -1;
sumPtPxl_ = -1;
etaEcal_ = 0;
phiEcal_ = 0;
etaPhiEcal_ = false;
}
/// constructor from a track
IsolatedPixelTrackCandidate(const reco::TrackRef& tr,
const l1extra::L1JetParticleRef& tauRef,
double max,
double sum)
: RecoCandidate(0, LorentzVector((tr.get()->px()), (tr.get())->py(), (tr.get())->pz(), (tr.get())->p())),
track_(tr),
l1tauJet_(tauRef),
maxPtPxl_(max),
sumPtPxl_(sum) {
enIn_ = -1;
enOut_ = -1;
nhitIn_ = -1;
nhitOut_ = -1;
etaEcal_ = 0;
phiEcal_ = 0;
etaPhiEcal_ = false;
}
// constructor from a track using l1t
IsolatedPixelTrackCandidate(const reco::TrackRef& tr, const l1t::TauRef& tauRef, double max, double sum)
: RecoCandidate(0, LorentzVector((tr.get()->px()), (tr.get())->py(), (tr.get())->pz(), (tr.get())->p())),
track_(tr),
l1ttauJet_(tauRef),
maxPtPxl_(max),
sumPtPxl_(sum) {
enIn_ = -1;
enOut_ = -1;
nhitIn_ = -1;
nhitOut_ = -1;
etaEcal_ = 0;
phiEcal_ = 0;
etaPhiEcal_ = false;
}
///constructor from tau jet
IsolatedPixelTrackCandidate(
const l1extra::L1JetParticleRef& tauRef, double enIn, double enOut, int nhitIn, int nhitOut)
: RecoCandidate(0, LorentzVector(tauRef->px(), tauRef->py(), tauRef->pz(), tauRef->p())),
l1tauJet_(tauRef),
enIn_(enIn),
enOut_(enOut),
nhitIn_(nhitIn),
nhitOut_(nhitOut) {
maxPtPxl_ = -1;
sumPtPxl_ = -1;
etaEcal_ = 0;
phiEcal_ = 0;
etaPhiEcal_ = false;
}
///constructor from tau jet using l1t
IsolatedPixelTrackCandidate(const l1t::TauRef& tauRef, double enIn, double enOut, int nhitIn, int nhitOut)
: RecoCandidate(0, LorentzVector(tauRef->px(), tauRef->py(), tauRef->pz(), tauRef->p())),
l1ttauJet_(tauRef),
enIn_(enIn),
enOut_(enOut),
nhitIn_(nhitIn),
nhitOut_(nhitOut) {
maxPtPxl_ = -1;
sumPtPxl_ = -1;
etaEcal_ = 0;
phiEcal_ = 0;
etaPhiEcal_ = false;
}
/// Copy constructor
IsolatedPixelTrackCandidate(const IsolatedPixelTrackCandidate&);
/// destructor
~IsolatedPixelTrackCandidate() override;
/// returns a clone of the candidate
IsolatedPixelTrackCandidate* clone() const override;
/// refrence to a Track
reco::TrackRef track() const override;
void setTrack(const reco::TrackRef& tr) { track_ = tr; }
/// highest Pt of other pixel tracks in the cone around the candidate
double maxPtPxl() const { return maxPtPxl_; }
void setMaxPtPxl(double mptpxl) { maxPtPxl_ = mptpxl; }
/// Pt sum of other pixel tracks in the cone around the candidate
double sumPtPxl() const { return sumPtPxl_; }
void setSumPtPxl(double sumptpxl) { sumPtPxl_ = sumptpxl; }
/// get reference to L1 tau jet
virtual l1extra::L1JetParticleRef l1tau() const;
void setL1TauJet(const l1extra::L1JetParticleRef& tauRef) { l1tauJet_ = tauRef; }
/// get reference to L1 tau jet from lt1
virtual l1t::TauRef l1ttau() const;
void setL1TTauJet(const l1t::TauRef& tauRef) { l1ttauJet_ = tauRef; }
/// ECAL energy in the inner cone around tau jet
double energyIn() const { return enIn_; }
void setEnergyIn(double a) { enIn_ = a; }
/// ECAL energy in the outer cone around tau jet
double energyOut() const { return enOut_; }
void setEnergyOut(double a) { enOut_ = a; }
/// number of ECAL hits in the inner cone around tau jet
int nHitIn() const { return nhitIn_; }
void setNHitIn(int a) { nhitIn_ = a; }
/// number of ECAL hits in the outer cone around tau jet
int nHitOut() const { return nhitOut_; }
void setNHitOut(int a) { nhitOut_ = a; }
///get index of tower which track is hitting
std::pair<int, int> towerIndex() const;
///eta, phi at ECAL surface
void setEtaPhiEcal(double eta, double phi) {
etaEcal_ = eta;
phiEcal_ = phi;
etaPhiEcal_ = true;
}
std::pair<double, double> etaPhiEcal() const {
return ((etaPhiEcal_) ? std::pair<double, double>(etaEcal_, phiEcal_) : std::pair<double, double>(0, 0));
}
bool etaPhiEcalValid() const { return etaPhiEcal_; }
private:
/// check overlap with another candidate
bool overlap(const Candidate&) const override;
/// reference to a Track
reco::TrackRef track_;
/// reference to a L1 tau jet
l1extra::L1JetParticleRef l1tauJet_;
/// reference to a S2 L1 tau jet
l1t::TauRef l1ttauJet_;
/// highest Pt of other pixel tracks in the cone around the candidate
double maxPtPxl_;
/// Pt sum of other pixel tracks in the cone around the candidate
double sumPtPxl_;
/// energy in inner cone around L1 tau jet
double enIn_;
/// energy in outer cone around L1 tau jet
double enOut_;
/// number of hits in inner cone
int nhitIn_;
/// number of hits in inner cone
int nhitOut_;
/// eta, phi at ECAL
bool etaPhiEcal_;
double etaEcal_, phiEcal_;
};
} // namespace reco
#endif
|