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);
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 int neighborN_et = 0;
275 int neighborS_et = 0;
276 int neighborE_et = 0;
277 int neighborW_et = 0;
278 int neighborNE_et = 0;
279 int neighborSW_et = 0;
280 int neighborNW_et = 0;
281 int neighborSE_et = 0;
282 unsigned int nNeighbors = 0;
283 for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
284 int neighborET = neighbor->hwPt();
286 (
region->hwEta() ) == neighbor->hwEta()) {
287 neighborN_et = neighborET;
292 (
region->hwEta() ) == neighbor->hwEta()) {
293 neighborS_et = neighborET;
298 (
region->hwEta() + 1) == neighbor->hwEta()) {
299 neighborE_et = neighborET;
304 (
region->hwEta() - 1) == neighbor->hwEta()) {
305 neighborW_et = neighborET;
310 (
region->hwEta() + 1) == neighbor->hwEta()) {
311 neighborNE_et = neighborET;
316 (
region->hwEta() - 1) == neighbor->hwEta()) {
317 neighborSW_et = neighborET;
322 (
region->hwEta() - 1) == neighbor->hwEta()) {
323 neighborNW_et = neighborET;
328 (
region->hwEta() + 1) == neighbor->hwEta()) {
329 neighborSE_et = neighborET;
335 if(regionET > neighborN_et &&
336 regionET > neighborNW_et &&
337 regionET > neighborW_et &&
338 regionET > neighborSW_et &&
339 regionET >= neighborNE_et &&
340 regionET >= neighborE_et &&
341 regionET >= neighborSE_et &&
342 regionET >= neighborS_et) {
345 unsigned int jetET_NW;
346 unsigned int jetET_NE;
347 unsigned int jetET_SW;
348 unsigned int jetET_SE;
350 jetET_NW = regionET + neighborW_et + neighborNW_et + neighborN_et;
351 jetET_NE = regionET + neighborE_et + neighborNE_et + neighborN_et;
352 jetET_SW = regionET + neighborS_et + neighborSW_et + neighborW_et;
353 jetET_SE = regionET + neighborS_et + neighborSE_et + neighborE_et;
355 unsigned int jetET =
std::max(jetET_NW, jetET_NE);
362 bool neighborCheck = (nNeighbors == 8);
364 if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
365 neighborCheck =
true;
367 if (!neighborCheck) {
368 std::cout <<
"phi: " << jetPhi <<
" eta: " << jetEta <<
" n: " << nNeighbors << std::endl;
373 const bool forward = (jetEta < 4 || jetEta > 17);
378 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > jetLorentz(0,0,0,0);
379 l1t::Jet theJet(*&jetLorentz, jetET, jetEta, jetPhi, jetQual);
380 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