37 for (
int etaSide=1; etaSide>=-1; etaSide-=2) {
39 int32_t hx(0), hy(0), ht(0);
41 std::vector<int> rings;
45 for (
unsigned etaIt=0; etaIt<rings.size(); etaIt++) {
47 int ieta = rings.at(etaIt);
49 int32_t ringHx(0), ringHy(0), ringHt(0);
52 for (
int iphi=phiMin; iphi<=phiMax; iphi++) {
56 bool foundJet =
false;
57 for (
unsigned jetIt=0; jetIt<alljets.size(); jetIt++) {
58 if (alljets.at(jetIt).hwEta()==ieta && alljets.at(jetIt).hwPhi()==iphi) {
59 thisJet = alljets.at(jetIt);
63 if (!foundJet)
continue;
65 if (thisJet.
hwPt()>etSumEtThresholdHwMet_ && thisJet.
hwEta()>=etSumEtaMinMet_ && thisJet.
hwEta()<=etSumEtaMaxMet_) {
66 ringHx += (int32_t) ( thisJet.
hwPt() *
std::trunc ( 511. *
cos ( 2 *
M_PI * (72 - iphi) / 72.0 ) )) >> 10;
70 if (thisJet.
hwPt()>etSumEtThresholdHwEt_ && thisJet.
hwEta()>=etSumEtaMinEt_ && thisJet.
hwEta()<=etSumEtaMaxEt_) {
71 ringHt += thisJet.
hwPt();
83 l1t::EtSum htSumHt(p4,l1t::EtSum::EtSumType::kTotalHt,ht,0,0,0);
84 l1t::EtSum htSumHx(p4,l1t::EtSum::EtSumType::kTotalHtx,hx,0,0,0);
85 l1t::EtSum htSumHy(p4,l1t::EtSum::EtSumType::kTotalHty,hy,0,0,0);
87 htsums.push_back(htSumHt);
88 htsums.push_back(htSumHx);
89 htsums.push_back(htSumHy);
Sin< T >::type sin(const T &t)
double etSumEtThreshold(unsigned isum) const
int etSumEtaMax(unsigned isum) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Stage2Layer2JetSumAlgorithmFirmwareImp1(CaloParamsHelper *params)
int etSumEtaMin(unsigned isum) const
Cos< T >::type cos(const T &t)
int32_t etSumEtThresholdHwEt_
CaloParamsHelper * params_
virtual ~Stage2Layer2JetSumAlgorithmFirmwareImp1()
virtual void processEvent(const std::vector< l1t::Jet > &alljets, std::vector< l1t::EtSum > &htsums)
int32_t etSumEtThresholdHwMet_