20 if ( a.
pt() == b.
pt() ){
30 return a.
pt() > b.
pt();
50 std::vector<l1t::Tau> & outputTaus) {
53 vector<pair<int,double> > etaGT;
55 for(
int i=0;
i<115;
i++)
56 etaGT.push_back( make_pair(
i,
i*(0.087/2.)) );
58 vector<pair<int,double> > phiGT;
60 for(
int i=0;
i<145;
i++)
61 phiGT.push_back( make_pair(
i,
i*(
M_PI/72.)) );
62 phiGT[144] = make_pair(0,2*
M_PI);
64 outputTaus = inputTaus;
66 for(
auto&
tau : outputTaus){
69 double phi =
tau.phi();
73 double minDistance = 99999.;
74 pair<int, double> closestPoint = make_pair(0,0.);
76 for(
const auto&
p : etaGT){
78 if(distance < minDistance){
84 int hwEta_GT = (eta>0) ? closestPoint.first : - closestPoint.first;
85 double eta_GT = (eta>0) ? closestPoint.second : - closestPoint.second;
88 closestPoint = make_pair(0,0.);
90 for(
const auto&
p : phiGT){
92 if(distance < minDistance){
98 int hwPhi_GT = closestPoint.first;
99 double phi_GT = closestPoint.second;
101 tau.setHwEta(hwEta_GT);
102 tau.setHwPhi(hwPhi_GT);
114 std::vector<l1t::Tau>::iterator start_ = outputTaus.begin();
115 std::vector<l1t::Tau>::iterator end_ = outputTaus.end();
116 BitonicSort<l1t::Tau>(
down, start_, end_);
double pt() const final
transverse momentum
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
CaloParamsHelper const * params_
Abs< T >::type abs(const T &t)
void processEvent(const std::vector< Tau > &inputTaus, std::vector< Tau > &outputTaus) override
Stage2Layer2DemuxTauAlgoFirmwareImp1(CaloParamsHelper const *params)
~Stage2Layer2DemuxTauAlgoFirmwareImp1() override
bool operator>(const l1t::Jet &a, l1t::Jet &b)