20 int phi1 = region.
hwPhi();
21 int phi2 = neighbor.
hwPhi();
22 int diff = phi1 - phi2;
31 std::vector<l1t::Jet> * uncalibjets)
33 for(std::vector<CaloRegion>::const_iterator
region = regions->begin();
region != regions->end();
region++) {
37 int jetET =
region->hwPt();
41 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
42 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
43 uncalibjets->push_back(theJet);
48 const std::vector<l1t::CaloRegion> * regions,
49 std::vector<l1t::Jet> * uncalibjets)
52 for(std::vector<CaloRegion>::const_iterator
region = regions->begin();
region != regions->end();
region++) {
53 int regionET =
region->hwPt();
54 if (regionET <= jetSeedThreshold)
continue;
59 int neighborNE_et = 0;
60 int neighborSW_et = 0;
61 int neighborNW_et = 0;
62 int neighborSE_et = 0;
63 unsigned int nNeighbors = 0;
64 for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
65 int neighborET = neighbor->hwPt();
67 (
region->hwEta() ) == neighbor->hwEta()) {
68 neighborN_et = neighborET;
73 (
region->hwEta() ) == neighbor->hwEta()) {
74 neighborS_et = neighborET;
79 (
region->hwEta() + 1) == neighbor->hwEta()) {
80 neighborE_et = neighborET;
85 (
region->hwEta() - 1) == neighbor->hwEta()) {
86 neighborW_et = neighborET;
91 (
region->hwEta() + 1) == neighbor->hwEta()) {
92 neighborNE_et = neighborET;
97 (
region->hwEta() - 1) == neighbor->hwEta()) {
98 neighborSW_et = neighborET;
103 (
region->hwEta() - 1) == neighbor->hwEta()) {
104 neighborNW_et = neighborET;
109 (
region->hwEta() + 1) == neighbor->hwEta()) {
110 neighborSE_et = neighborET;
115 if(regionET > neighborN_et &&
116 regionET > neighborNW_et &&
117 regionET > neighborW_et &&
118 regionET > neighborSW_et &&
119 regionET >= neighborNE_et &&
120 regionET >= neighborE_et &&
121 regionET >= neighborSE_et &&
122 regionET >= neighborS_et) {
123 unsigned int jetET = regionET +
124 neighborN_et + neighborS_et + neighborE_et + neighborW_et +
125 neighborNE_et + neighborSW_et + neighborSE_et + neighborNW_et;
130 bool neighborCheck = (nNeighbors == 8);
132 if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
133 neighborCheck =
true;
135 if (!neighborCheck) {
136 std::cout <<
"phi: " << jetPhi <<
" eta: " << jetEta <<
" n: " << nNeighbors << std::endl;
142 const bool forward = (jetEta < 4 || jetEta > 17);
147 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
148 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
151 uncalibjets->push_back(theJet);
157 const std::vector<l1t::CaloRegion> * regions,
158 std::vector<l1t::Jet> * uncalibjets)
161 for(std::vector<CaloRegion>::const_iterator
region = regions->begin();
region != regions->end();
region++) {
162 int regionET =
region->hwPt();
163 if (regionET < jetSeedThreshold)
continue;
164 int neighborN_et = 0;
165 int neighborS_et = 0;
166 int neighborE_et = 0;
167 int neighborW_et = 0;
168 int neighborNE_et = 0;
169 int neighborSW_et = 0;
170 int neighborNW_et = 0;
171 int neighborSE_et = 0;
172 unsigned int nNeighbors = 0;
173 for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
174 int neighborET = neighbor->hwPt();
176 (
region->hwEta() ) == neighbor->hwEta()) {
177 neighborN_et = neighborET;
182 (
region->hwEta() ) == neighbor->hwEta()) {
183 neighborS_et = neighborET;
188 (
region->hwEta() + 1) == neighbor->hwEta()) {
189 neighborE_et = neighborET;
194 (
region->hwEta() - 1) == neighbor->hwEta()) {
195 neighborW_et = neighborET;
200 (
region->hwEta() + 1) == neighbor->hwEta()) {
201 neighborNE_et = neighborET;
206 (
region->hwEta() - 1) == neighbor->hwEta()) {
207 neighborSW_et = neighborET;
212 (
region->hwEta() - 1) == neighbor->hwEta()) {
213 neighborNW_et = neighborET;
218 (
region->hwEta() + 1) == neighbor->hwEta()) {
219 neighborSE_et = neighborET;
224 unsigned int jetET = regionET +
225 neighborN_et + neighborS_et + neighborE_et + neighborW_et +
226 neighborNE_et + neighborSW_et + neighborSE_et + neighborNW_et;
231 bool neighborCheck = (nNeighbors == 8);
233 if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
234 neighborCheck =
true;
236 if (!neighborCheck) {
237 std::cout <<
"phi: " << jetPhi <<
" eta: " << jetEta <<
" n: " << nNeighbors << std::endl;
243 const bool forward = (jetEta < 4 || jetEta > 17);
248 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
249 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
252 uncalibjets->push_back(theJet);
257 std::vector<l1t::Jet> * uncalibjets)
259 for(std::vector<CaloRegion>::const_iterator
region = regions->begin();
region != regions->end();
region++) {
260 int regionET =
region->hwPt();
261 int neighborN_et = 0;
262 int neighborS_et = 0;
263 int neighborE_et = 0;
264 int neighborW_et = 0;
265 int neighborNE_et = 0;
266 int neighborSW_et = 0;
267 int neighborNW_et = 0;
268 int neighborSE_et = 0;
269 unsigned int nNeighbors = 0;
270 for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
271 int neighborET = neighbor->hwPt();
273 (
region->hwEta() ) == neighbor->hwEta()) {
274 neighborN_et = neighborET;
279 (
region->hwEta() ) == neighbor->hwEta()) {
280 neighborS_et = neighborET;
285 (
region->hwEta() + 1) == neighbor->hwEta()) {
286 neighborE_et = neighborET;
291 (
region->hwEta() - 1) == neighbor->hwEta()) {
292 neighborW_et = neighborET;
297 (
region->hwEta() + 1) == neighbor->hwEta()) {
298 neighborNE_et = neighborET;
303 (
region->hwEta() - 1) == neighbor->hwEta()) {
304 neighborSW_et = neighborET;
309 (
region->hwEta() - 1) == neighbor->hwEta()) {
310 neighborNW_et = neighborET;
315 (
region->hwEta() + 1) == neighbor->hwEta()) {
316 neighborSE_et = neighborET;
322 if(regionET > neighborN_et &&
323 regionET > neighborNW_et &&
324 regionET > neighborW_et &&
325 regionET > neighborSW_et &&
326 regionET >= neighborNE_et &&
327 regionET >= neighborE_et &&
328 regionET >= neighborSE_et &&
329 regionET >= neighborS_et) {
332 unsigned int jetET_NW;
333 unsigned int jetET_NE;
334 unsigned int jetET_SW;
335 unsigned int jetET_SE;
337 jetET_NW = regionET + neighborW_et + neighborNW_et + neighborN_et;
338 jetET_NE = regionET + neighborE_et + neighborNE_et + neighborN_et;
339 jetET_SW = regionET + neighborS_et + neighborSW_et + neighborW_et;
340 jetET_SE = regionET + neighborS_et + neighborSE_et + neighborE_et;
342 unsigned int jetET =
std::max(jetET_NW, jetET_NE);
349 bool neighborCheck = (nNeighbors == 8);
351 if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
352 neighborCheck =
true;
354 if (!neighborCheck) {
355 std::cout <<
"phi: " << jetPhi <<
" eta: " << jetEta <<
" n: " << nNeighbors << std::endl;
360 const bool forward = (jetEta < 4 || jetEta > 17);
365 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
366 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
367 uncalibjets->push_back(theJet);
void TwelveByTwelveFinder(const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
void TwoByTwoFinder(const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
Abs< T >::type abs(const T &t)
void passThroughJets(const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
int deltaGctPhi(const CaloRegion ®ion, const CaloRegion &neighbor)
void slidingWindowJetFinder(const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
static const unsigned N_PHI