34 std::vector<l1t::CaloRegion> *subRegions =
new std::vector<l1t::CaloRegion>();
35 std::vector<l1t::EGamma> *preSortEGammas =
new std::vector<l1t::EGamma>();
36 std::vector<l1t::EGamma> *preGtEGammas =
new std::vector<l1t::EGamma>();
44 std::vector<l1t::Jet> *unCorrJets =
new std::vector<l1t::Jet>();
51 egCand != EMCands.end(); egCand++) {
53 int eg_et = egCand->hwPt();
54 int eg_eta = egCand->hwEta();
55 int eg_phi = egCand->hwPhi();
56 int index = (egCand->hwIso()*4 + egCand->hwQual()) ;
61 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > egLorentz(0,0,0,0);
65 bool isinBarrel = (eg_eta>=7 && eg_eta<=14);
66 unsigned int lutAddress =
isoLutIndex(eg_et,ijet_pt);
69 enum {MAX_LUT_ADDRESS = 0x7fff};
70 enum {LUT_BARREL_OFFSET = 0x0, LUT_ENDCAP_OFFSET = 0x8000};
71 enum {LUT_RCT_OFFSET = 0x10000};
73 unsigned int rct_offset=0;
74 if (egCand->hwIso()) rct_offset=LUT_RCT_OFFSET;
77 if (lutAddress > MAX_LUT_ADDRESS) lutAddress = MAX_LUT_ADDRESS;
88 l1t::EGamma theEG(*&egLorentz, eg_et, eg_eta, eg_phi, index, isoFlag);
89 preSortEGammas->push_back(theEG);
113 printf(
"EGammas Isolated\n");
114 for(std::vector<l1t::EGamma>::const_iterator itEGamma = egammas->begin();
115 itEGamma != egammas->end(); ++itEGamma){
116 if(itEGamma->hwIso() != 1)
continue;
118 unsigned int packed =
pack15bits(itEGamma->hwPt(), itEGamma->hwEta(), itEGamma->hwPhi());
119 cout << bitset<15>(packed).
to_string() << endl;
120 if(cEGammas == 4)
break;
123 printf(
"EGammas Non-isolated\n");
124 for(std::vector<l1t::EGamma>::const_iterator itEGamma = egammas->begin();
125 itEGamma != egammas->end(); ++itEGamma){
126 if(itEGamma->hwIso() != 0)
continue;
128 unsigned int packed =
pack15bits(itEGamma->hwPt(), itEGamma->hwEta(), itEGamma->hwPhi());
129 cout << bitset<15>(packed).
to_string() << endl;
130 if(fEGammas == 4)
break;
136 delete preSortEGammas;
void RegionCorrection(const std::vector< l1t::CaloRegion > ®ions, std::vector< l1t::CaloRegion > *subRegions, CaloParamsHelper *params)
------— New region correction (PUsub, no response correction at the moment) --------— ...
void EGammaToGtScales(CaloParamsHelper *params, const std::vector< l1t::EGamma > *input, std::vector< l1t::EGamma > *output)
void TwelveByTwelveFinder(const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
std::string to_string(const T &t)
unsigned isoLutIndex(unsigned int etaPt, unsigned int jetPt) const
void SortEGammas(std::vector< l1t::EGamma > *input, std::vector< l1t::EGamma > *output)
CaloParamsHelper *const params_
int AssociatedJetPt(int ieta, int iphi, const std::vector< l1t::Jet > *jets) const
unsigned int pack15bits(int pt, int eta, int phi)
int data(unsigned int address) const
l1t::LUT * egIsolationLUT()
std::vector< CaloEmCand >::const_iterator const_iterator