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);
void TwelveByTwelveFinder(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