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);
148 if(forward && regionET == 255) {
150 }
else if(!forward && regionET == 1023) {
152 }
else if(
region->hwEta() == 17) {
153 if(neighborNE_et == 255 || neighborE_et == 255 || neighborSE_et == 255)
155 }
else if(
region->hwEta() == 4) {
156 if(neighborNW_et == 255 || neighborW_et == 255 || neighborSW_et == 255)
160 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
161 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
164 uncalibjets->push_back(theJet);
170 const std::vector<l1t::CaloRegion> * regions,
171 std::vector<l1t::Jet> * uncalibjets)
174 for(std::vector<CaloRegion>::const_iterator
region = regions->begin();
region != regions->end();
region++) {
175 int regionET =
region->hwPt();
176 if (regionET < jetSeedThreshold)
continue;
177 int neighborN_et = 0;
178 int neighborS_et = 0;
179 int neighborE_et = 0;
180 int neighborW_et = 0;
181 int neighborNE_et = 0;
182 int neighborSW_et = 0;
183 int neighborNW_et = 0;
184 int neighborSE_et = 0;
185 unsigned int nNeighbors = 0;
186 for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
187 int neighborET = neighbor->hwPt();
189 (
region->hwEta() ) == neighbor->hwEta()) {
190 neighborN_et = neighborET;
195 (
region->hwEta() ) == neighbor->hwEta()) {
196 neighborS_et = neighborET;
201 (
region->hwEta() + 1) == neighbor->hwEta()) {
202 neighborE_et = neighborET;
207 (
region->hwEta() - 1) == neighbor->hwEta()) {
208 neighborW_et = neighborET;
213 (
region->hwEta() + 1) == neighbor->hwEta()) {
214 neighborNE_et = neighborET;
219 (
region->hwEta() - 1) == neighbor->hwEta()) {
220 neighborSW_et = neighborET;
225 (
region->hwEta() - 1) == neighbor->hwEta()) {
226 neighborNW_et = neighborET;
231 (
region->hwEta() + 1) == neighbor->hwEta()) {
232 neighborSE_et = neighborET;
237 unsigned int jetET = regionET +
238 neighborN_et + neighborS_et + neighborE_et + neighborW_et +
239 neighborNE_et + neighborSW_et + neighborSE_et + neighborNW_et;
244 bool neighborCheck = (nNeighbors == 8);
246 if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
247 neighborCheck =
true;
249 if (!neighborCheck) {
250 std::cout <<
"phi: " << jetPhi <<
" eta: " << jetEta <<
" n: " << nNeighbors << std::endl;
256 const bool forward = (jetEta < 4 || jetEta > 17);
261 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
262 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
265 uncalibjets->push_back(theJet);
271 const std::vector<l1t::CaloRegion> * regions,
272 std::vector<l1t::Jet> * uncalibjets)
274 for(std::vector<CaloRegion>::const_iterator
region = regions->begin();
region != regions->end();
region++) {
275 int regionET =
region->hwPt();
276 if (regionET <= jetSeedThreshold)
continue;
277 int subEta =
region->hwEta();
278 if((etaMask & (1<<subEta))>>subEta) regionET = 0;
279 int neighborN_et = 0;
280 int neighborS_et = 0;
281 int neighborE_et = 0;
282 int neighborW_et = 0;
283 int neighborNE_et = 0;
284 int neighborSW_et = 0;
285 int neighborNW_et = 0;
286 int neighborSE_et = 0;
287 unsigned int nNeighbors = 0;
288 for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
289 int neighborET = neighbor->hwPt();
290 int subEta2 = neighbor->hwEta();
291 if((etaMask & (1<<subEta2))>>subEta2) neighborET = 0;
294 (
region->hwEta() ) == neighbor->hwEta()) {
295 neighborN_et = neighborET;
300 (
region->hwEta() ) == neighbor->hwEta()) {
301 neighborS_et = neighborET;
306 (
region->hwEta() + 1) == neighbor->hwEta()) {
307 neighborE_et = neighborET;
312 (
region->hwEta() - 1) == neighbor->hwEta()) {
313 neighborW_et = neighborET;
318 (
region->hwEta() + 1) == neighbor->hwEta()) {
319 neighborNE_et = neighborET;
324 (
region->hwEta() - 1) == neighbor->hwEta()) {
325 neighborSW_et = neighborET;
330 (
region->hwEta() - 1) == neighbor->hwEta()) {
331 neighborNW_et = neighborET;
336 (
region->hwEta() + 1) == neighbor->hwEta()) {
337 neighborSE_et = neighborET;
343 if(regionET > neighborN_et &&
344 regionET > neighborNW_et &&
345 regionET > neighborW_et &&
346 regionET > neighborSW_et &&
347 regionET >= neighborNE_et &&
348 regionET >= neighborE_et &&
349 regionET >= neighborSE_et &&
350 regionET >= neighborS_et) {
353 unsigned int jetET_NW;
354 unsigned int jetET_NE;
355 unsigned int jetET_SW;
356 unsigned int jetET_SE;
358 jetET_NW = regionET + neighborW_et + neighborNW_et + neighborN_et;
359 jetET_NE = regionET + neighborE_et + neighborNE_et + neighborN_et;
360 jetET_SW = regionET + neighborS_et + neighborSW_et + neighborW_et;
361 jetET_SE = regionET + neighborS_et + neighborSE_et + neighborE_et;
363 unsigned int jetET =
std::max(jetET_NW, jetET_NE);
370 bool neighborCheck = (nNeighbors == 8);
372 if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
373 neighborCheck =
true;
375 if (!neighborCheck) {
376 std::cout <<
"phi: " << jetPhi <<
" eta: " << jetEta <<
" n: " << nNeighbors << std::endl;
381 const bool forward = (jetEta < 4 || jetEta > 17);
386 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
387 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
388 uncalibjets->push_back(theJet);
void TwelveByTwelveFinder(const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
void TwoByTwoFinder(const int, const int, 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