21 int phi1 = region.
hwPhi();
22 int phi2 = neighbor.
hwPhi();
23 int diff = phi1 - phi2;
35 std::vector<l1t::Jet> * uncalibjets)
38 for(std::vector<CaloRegion>::const_iterator region = regions->begin(); region != regions->end(); region++) {
39 double regionET = region->hwPt();
40 if (regionET <= jetSeedThreshold)
continue;
41 double neighborN_et = 0;
42 double neighborS_et = 0;
43 double neighborE_et = 0;
44 double neighborW_et = 0;
45 double neighborNE_et = 0;
46 double neighborSW_et = 0;
47 double neighborNW_et = 0;
48 double neighborSE_et = 0;
49 unsigned int nNeighbors = 0;
50 for(std::vector<CaloRegion>::const_iterator neighbor = regions->begin(); neighbor != regions->end(); neighbor++) {
51 double neighborET = neighbor->hwPt();
53 (region->hwEta() ) == neighbor->hwEta()) {
54 neighborN_et = neighborET;
59 (region->hwEta() ) == neighbor->hwEta()) {
60 neighborS_et = neighborET;
65 (region->hwEta() + 1) == neighbor->hwEta()) {
66 neighborE_et = neighborET;
71 (region->hwEta() - 1) == neighbor->hwEta()) {
72 neighborW_et = neighborET;
77 (region->hwEta() + 1) == neighbor->hwEta()) {
78 neighborNE_et = neighborET;
83 (region->hwEta() - 1) == neighbor->hwEta()) {
84 neighborSW_et = neighborET;
89 (region->hwEta() - 1) == neighbor->hwEta()) {
90 neighborNW_et = neighborET;
95 (region->hwEta() + 1) == neighbor->hwEta()) {
96 neighborSE_et = neighborET;
101 if(regionET > neighborN_et &&
102 regionET > neighborNW_et &&
103 regionET > neighborW_et &&
104 regionET > neighborSW_et &&
105 regionET >= neighborNE_et &&
106 regionET >= neighborE_et &&
107 regionET >= neighborSE_et &&
108 regionET >= neighborS_et) {
109 unsigned int jetET = regionET +
110 neighborN_et + neighborS_et + neighborE_et + neighborW_et +
111 neighborNE_et + neighborSW_et + neighborSE_et + neighborNW_et;
129 int jetPhi = region->hwPhi();
130 int jetEta = region->hwEta();
132 bool neighborCheck = (nNeighbors == 8);
134 if (!neighborCheck && (jetEta == 0 || jetEta == 21) && nNeighbors == 5)
135 neighborCheck =
true;
137 if (!neighborCheck) {
138 std::cout <<
"phi: " << jetPhi <<
" eta: " << jetEta <<
" n: " << nNeighbors << std::endl;
144 const bool forward = (jetEta < 4 || jetEta > 17);
149 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > *jetLorentz =
150 new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >();
151 l1t::Jet theJet(*jetLorentz, jetET, jetEta, jetPhi, jetQual);
154 uncalibjets->push_back(theJet);
405 std::reverse(uncalibjets->begin(), uncalibjets->end());
Abs< T >::type abs(const T &t)
int deltaGctPhi(const CaloRegion ®ion, const CaloRegion &neighbor)
void slidingWindowJetFinder(const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
bool compareJets(l1t::Jet i, l1t::Jet j)
static const unsigned N_PHI