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++) {
35 if( region->hwEta() < 4 || region->hwEta() > 17)
37 int jetET = region->hwPt();
38 int jetEta = region->hwEta();
39 int jetPhi = region->hwPhi();
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)
51 for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
52 int regionET = region->hwPt();
53 if (regionET <= jetSeedThreshold)
continue;
58 int neighborNE_et = 0;
59 int neighborSW_et = 0;
60 int neighborNW_et = 0;
61 int neighborSE_et = 0;
62 unsigned int nNeighbors = 0;
63 for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
64 int neighborET = neighbor->hwPt();
66 (region->hwEta() ) == neighbor->hwEta()) {
67 neighborN_et = neighborET;
72 (region->hwEta() ) == neighbor->hwEta()) {
73 neighborS_et = neighborET;
78 (region->hwEta() + 1) == neighbor->hwEta()) {
79 neighborE_et = neighborET;
84 (region->hwEta() - 1) == neighbor->hwEta()) {
85 neighborW_et = neighborET;
90 (region->hwEta() + 1) == neighbor->hwEta()) {
91 neighborNE_et = neighborET;
96 (region->hwEta() - 1) == neighbor->hwEta()) {
97 neighborSW_et = neighborET;
102 (region->hwEta() - 1) == neighbor->hwEta()) {
103 neighborNW_et = neighborET;
108 (region->hwEta() + 1) == neighbor->hwEta()) {
109 neighborSE_et = neighborET;
114 if(regionET > neighborN_et &&
115 regionET > neighborNW_et &&
116 regionET > neighborW_et &&
117 regionET > neighborSW_et &&
118 regionET >= neighborNE_et &&
119 regionET >= neighborE_et &&
120 regionET >= neighborSE_et &&
121 regionET >= neighborS_et) {
122 unsigned int jetET = regionET +
123 neighborN_et + neighborS_et + neighborE_et + neighborW_et +
124 neighborNE_et + neighborSW_et + neighborSE_et + neighborNW_et;
126 int jetPhi = region->hwPhi();
127 int jetEta = region->hwEta();
129 bool neighborCheck = (nNeighbors == 8);
131 if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
132 neighborCheck =
true;
134 if (!neighborCheck) {
135 std::cout <<
"phi: " << jetPhi <<
" eta: " << jetEta <<
" n: " << nNeighbors << std::endl;
141 const bool forward = (jetEta < 4 || jetEta > 17);
147 if(forward && regionET == 255) {
149 }
else if(!forward && regionET == 1023) {
151 }
else if(region->hwEta() == 17) {
152 if(neighborNE_et == 255 || neighborE_et == 255 || neighborSE_et == 255)
154 }
else if(region->hwEta() == 4) {
155 if(neighborNW_et == 255 || neighborW_et == 255 || neighborSW_et == 255)
159 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
160 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
163 uncalibjets->push_back(theJet);
169 const std::vector<l1t::CaloRegion> * regions,
170 std::vector<l1t::Jet> * uncalibjets)
172 for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
173 int regionET = region->hwPt();
174 if (regionET < jetSeedThreshold)
continue;
175 int neighborN_et = 0;
176 int neighborS_et = 0;
177 int neighborE_et = 0;
178 int neighborW_et = 0;
179 int neighborNE_et = 0;
180 int neighborSW_et = 0;
181 int neighborNW_et = 0;
182 int neighborSE_et = 0;
183 unsigned int nNeighbors = 0;
184 for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
185 int neighborET = neighbor->hwPt();
187 (region->hwEta() ) == neighbor->hwEta()) {
188 neighborN_et = neighborET;
193 (region->hwEta() ) == neighbor->hwEta()) {
194 neighborS_et = neighborET;
199 (region->hwEta() + 1) == neighbor->hwEta()) {
200 neighborE_et = neighborET;
205 (region->hwEta() - 1) == neighbor->hwEta()) {
206 neighborW_et = neighborET;
211 (region->hwEta() + 1) == neighbor->hwEta()) {
212 neighborNE_et = neighborET;
217 (region->hwEta() - 1) == neighbor->hwEta()) {
218 neighborSW_et = neighborET;
223 (region->hwEta() - 1) == neighbor->hwEta()) {
224 neighborNW_et = neighborET;
229 (region->hwEta() + 1) == neighbor->hwEta()) {
230 neighborSE_et = neighborET;
235 unsigned int jetET = regionET +
236 neighborN_et + neighborS_et + neighborE_et + neighborW_et +
237 neighborNE_et + neighborSW_et + neighborSE_et + neighborNW_et;
239 int jetPhi = region->hwPhi();
240 int jetEta = region->hwEta();
242 bool neighborCheck = (nNeighbors == 8);
244 if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
245 neighborCheck =
true;
247 if (!neighborCheck) {
248 std::cout <<
"phi: " << jetPhi <<
" eta: " << jetEta <<
" n: " << nNeighbors << std::endl;
254 const bool forward = (jetEta < 4 || jetEta > 17);
259 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
260 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
263 uncalibjets->push_back(theJet);
269 const std::vector<l1t::CaloRegion> * regions,
270 std::vector<l1t::Jet> * uncalibjets)
272 for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
273 int regionET = region->hwPt();
274 if (regionET <= jetSeedThreshold)
continue;
275 int subEta = region->hwEta();
276 if((etaMask & (1<<subEta))>>subEta) regionET = 0;
277 int neighborN_et = 0;
278 int neighborS_et = 0;
279 int neighborE_et = 0;
280 int neighborW_et = 0;
281 int neighborNE_et = 0;
282 int neighborSW_et = 0;
283 int neighborNW_et = 0;
284 int neighborSE_et = 0;
285 unsigned int nNeighbors = 0;
286 for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
287 int neighborET = neighbor->hwPt();
288 int subEta2 = neighbor->hwEta();
289 if((etaMask & (1<<subEta2))>>subEta2) neighborET = 0;
292 (region->hwEta() ) == neighbor->hwEta()) {
293 neighborN_et = neighborET;
298 (region->hwEta() ) == neighbor->hwEta()) {
299 neighborS_et = neighborET;
304 (region->hwEta() + 1) == neighbor->hwEta()) {
305 neighborE_et = neighborET;
310 (region->hwEta() - 1) == neighbor->hwEta()) {
311 neighborW_et = neighborET;
316 (region->hwEta() + 1) == neighbor->hwEta()) {
317 neighborNE_et = neighborET;
322 (region->hwEta() - 1) == neighbor->hwEta()) {
323 neighborSW_et = neighborET;
328 (region->hwEta() - 1) == neighbor->hwEta()) {
329 neighborNW_et = neighborET;
334 (region->hwEta() + 1) == neighbor->hwEta()) {
335 neighborSE_et = neighborET;
341 if(regionET > neighborN_et &&
342 regionET > neighborNW_et &&
343 regionET > neighborW_et &&
344 regionET > neighborSW_et &&
345 regionET >= neighborNE_et &&
346 regionET >= neighborE_et &&
347 regionET >= neighborSE_et &&
348 regionET >= neighborS_et) {
351 unsigned int jetET_NW;
352 unsigned int jetET_NE;
353 unsigned int jetET_SW;
354 unsigned int jetET_SE;
356 jetET_NW = regionET + neighborW_et + neighborNW_et + neighborN_et;
357 jetET_NE = regionET + neighborE_et + neighborNE_et + neighborN_et;
358 jetET_SW = regionET + neighborS_et + neighborSW_et + neighborW_et;
359 jetET_SE = regionET + neighborS_et + neighborSE_et + neighborE_et;
361 unsigned int jetET =
std::max(jetET_NW, jetET_NE);
365 int jetPhi = region->hwPhi();
366 int jetEta = region->hwEta();
368 bool neighborCheck = (nNeighbors == 8);
370 if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
371 neighborCheck =
true;
373 if (!neighborCheck) {
374 std::cout <<
"phi: " << jetPhi <<
" eta: " << jetEta <<
" n: " << nNeighbors << std::endl;
379 const bool forward = (jetEta < 4 || jetEta > 17);
384 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
385 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
386 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