52 vector<pair<int,double> > etaGT;
54 for(
int i=0;
i<115;
i++)
55 etaGT.push_back( make_pair(
i,
i*(0.087/2.)) );
57 vector<pair<int,double> > phiGT;
59 for(
int i=0;
i<145;
i++)
60 phiGT.push_back( make_pair(
i,
i*(
M_PI/72.)) );
61 phiGT[144] = make_pair(0,2*
M_PI);
63 outputEGammas = inputEGammas;
65 for(
auto&
egamma : outputEGammas){
72 double minDistance = 99999.;
73 pair<int, double> closestPoint = make_pair(0,0.);
75 for(
const auto&
p : etaGT){
77 if(distance < minDistance){
83 int hwEta_GT = (eta>0) ? closestPoint.first : - closestPoint.first;
84 double eta_GT = (eta>0) ? closestPoint.second : - closestPoint.second;
87 closestPoint = make_pair(0,0.);
89 for(
const auto&
p : phiGT){
90 double distance =
abs(phi -
p.second);
91 if(distance < minDistance){
97 int hwPhi_GT = closestPoint.first;
98 double phi_GT = closestPoint.second;
100 egamma.setHwEta(hwEta_GT);
101 egamma.setHwPhi(hwPhi_GT);
114 std::vector<l1t::EGamma>::iterator start_ = outputEGammas.begin();
115 std::vector<l1t::EGamma>::iterator end_ = outputEGammas.end();
116 BitonicSort<l1t::EGamma>(
down, start_, end_);
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Abs< T >::type abs(const T &t)
CaloParamsHelper const * params_