34 std::vector<l1t::EtSum> & etsums) {
39 for (
int etaSide=1; etaSide>=-1; etaSide-=2) {
41 int32_t ex(0), ey(0), et(0);
43 std::vector<int> rings;
46 for (
unsigned etaIt=0; etaIt<rings.size(); etaIt++) {
48 int ieta = rings.at(etaIt);
52 int32_t ringEx(0), ringEy(0), ringEt(0);
54 for (
int iphi=phiMin; iphi<=phiMax; iphi++) {
58 ringEx += (int32_t) (tower.
hwPt() *
std::trunc ( 511. *
cos ( 2 *
M_PI * (72 - iphi) / 72.0 ) )) >> 9;
60 ringEt += tower.
hwPt();
74 l1t::EtSum etSumTotalEt(p4,l1t::EtSum::EtSumType::kTotalEt,et,0,0,0);
75 l1t::EtSum etSumEx(p4,l1t::EtSum::EtSumType::kTotalEtx,ex,0,0,0);
76 l1t::EtSum etSumEy(p4,l1t::EtSum::EtSumType::kTotalEty,ey,0,0,0);
78 etsums.push_back(etSumTotalEt);
79 etsums.push_back(etSumEx);
80 etsums.push_back(etSumEy);
Stage2Layer2EtSumAlgorithmFirmwareImp1(CaloParamsHelper *params)
int32_t etSumEtThresholdHwEt_
Sin< T >::type sin(const T &t)
double etSumEtThreshold(unsigned isum) const
int etSumEtaMax(unsigned isum) const
int32_t etSumEtThresholdHwMet_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
int etSumEtaMin(unsigned isum) const
Cos< T >::type cos(const T &t)
virtual void processEvent(const std::vector< l1t::CaloTower > &towers, std::vector< l1t::EtSum > &sums)
CaloParamsHelper * params_
virtual ~Stage2Layer2EtSumAlgorithmFirmwareImp1()
double towerLsbSum() const