25 Stage1Layer2EGammaAlgorithmImpPP::Stage1Layer2EGammaAlgorithmImpPP(
CaloParamsHelper const* params) : params_(params) {};
40 std::vector<l1t::CaloRegion> subRegions;
41 std::vector<l1t::EGamma> preSortEGammas;
42 std::vector<l1t::EGamma> preGtEGammas;
50 std::vector<l1t::Jet> *unCorrJets =
new std::vector<l1t::Jet>();
56 egCand != EMCands.end(); egCand++) {
58 int eg_et = egCand->hwPt();
59 int eg_eta = egCand->hwEta();
60 int eg_phi = egCand->hwPhi();
61 int index = (egCand->hwIso()*4 + egCand->hwQual()) ;
63 if(eg_et <= egSeedThreshold)
continue;
65 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > egLorentz(0,0,0,0);
72 if(eg_et>=egMinPtHOverEIsolation && eg_et < egMaxPtHOverEIsolation ) {
73 if(egCand->hwIso()) isoFlagRct =1;
79 bool isinBarrel = (eg_eta>=7 && eg_eta<=14);
80 if (ijet_pt>0 && eg_et>=egMinPtJetIsolation && eg_et<egMaxPtJetIsolation){
83 enum {MAX_LUT_ADDRESS = 0x7fff};
84 enum {LUT_BARREL_OFFSET = 0x0, LUT_ENDCAP_OFFSET = 0x8000};
86 unsigned int lutAddress =
isoLutIndex(eg_et,ijet_pt);
89 if (lutAddress > MAX_LUT_ADDRESS) lutAddress = MAX_LUT_ADDRESS;
102 int fullIsoFlag=isoFlag*isoFlagRct;
105 l1t::EGamma theEG(*&egLorentz, eg_et, eg_eta, eg_phi, index, fullIsoFlag);
107 preSortEGammas.push_back(theEG);
122 const std::vector<l1t::CaloRegion> &
regions)
const {
126 region != regions.end(); region++) {
128 int regionPhi = region->hwPhi();
129 int regionEta = region->hwEta();
133 deltaPhi = -deltaPhi/
std::abs(deltaPhi);
137 if ((deltaPhi + deltaEta) > 0 && deltaPhi < 2 && deltaEta < 2)
138 isolation += region->hwPt();
148 const unsigned int nbitsEG=6;
151 unsigned int address= (jetPt << nbitsEG) + egPt;
158 const std::vector<l1t::Jet> *
jets)
const {
164 itJet != jets->end(); ++itJet){
166 int jetEta = itJet->hwEta();
167 int jetPhi = itJet->hwPhi();
168 if ((jetEta == ieta) && (jetPhi == iphi)){
182 const std::vector<l1t::CaloRegion> &
regions)
const {
186 region != regions.end(); region++) {
188 int regionET = region->hwPt();
189 int regionPhi = region->hwPhi();
190 int regionEta = region->hwEta();
192 if(iphi == regionPhi && ieta == regionEta) {
193 hadronicET = regionET;
202 if( hadronicET >0 && et > 0)
203 hoe = (double) hadronicET / (
double)
et;
int egMinPtHOverEIsolation() const
double HoverE(int et, int ieta, int iphi, const std::vector< l1t::CaloRegion > ®ions) const
--— Compute H/E -----------------—
int AssociatedJetPt(int ieta, int iphi, const std::vector< l1t::Jet > *jets) const
double Isolation(int ieta, int iphi, const std::vector< l1t::CaloRegion > ®ions) const
–— Compute isolation sum --------------——
int egMinPtJetIsolation() const
void TwelveByTwelveFinder(const int, const std::vector< l1t::CaloRegion > *regions, std::vector< l1t::Jet > *uncalibjets)
int egMaxPtHOverEIsolation() const
static const double deltaEta
l1t::LUT const * egIsolationLUT() const
void RegionCorrection(const std::vector< l1t::CaloRegion > ®ions, std::vector< l1t::CaloRegion > *subRegions, CaloParamsHelper const *params)
------— New region correction (PUsub, no response correction at the moment) --------— ...
double egSeedThreshold() const
CaloParamsHelper const *const params_
void SortEGammas(std::vector< l1t::EGamma > *input, std::vector< l1t::EGamma > *output)
Abs< T >::type abs(const T &t)
int egMaxPtJetIsolation() const
void processEvent(const std::vector< l1t::CaloEmCand > &EMCands, const std::vector< l1t::CaloRegion > ®ions, const std::vector< l1t::Jet > *jets, std::vector< l1t::EGamma > *egammas) override
et
define resolution functions of each parameter
unsigned isoLutIndex(unsigned int etaPt, unsigned int jetPt) const
int data(unsigned int address) const
static const unsigned N_PHI
double jetSeedThreshold() const
void EGammaToGtScales(CaloParamsHelper const *params, const std::vector< l1t::EGamma > *input, std::vector< l1t::EGamma > *output)
std::vector< T >::const_iterator const_iterator