Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-14 11:45:20

0001 #include "L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeTfMuonShower.h"
0002 #include <cmath>
0003 L1Analysis::L1AnalysisL1UpgradeTfMuonShower::L1AnalysisL1UpgradeTfMuonShower() {}
0004 
0005 L1Analysis::L1AnalysisL1UpgradeTfMuonShower::~L1AnalysisL1UpgradeTfMuonShower() {}
0006 
0007 void L1Analysis::L1AnalysisL1UpgradeTfMuonShower::SetTfMuonShower(const l1t::RegionalMuonShowerBxCollection& muonShower,
0008                                                                   unsigned maxL1UpgradeTfMuonShower) {
0009   for (int ibx = muonShower.getFirstBX(); ibx <= muonShower.getLastBX(); ++ibx) {
0010     for (auto it = muonShower.begin(ibx);
0011          it != muonShower.end(ibx) && l1upgradetfmuonshower_.nTfMuonShowers < maxL1UpgradeTfMuonShower;
0012          ++it) {
0013       if (it->isValid()) {
0014         l1upgradetfmuonshower_.tfMuonShowerBx.push_back(ibx);
0015         l1upgradetfmuonshower_.tfMuonShowerEndcap.push_back(it->trackFinderType() == l1t::tftype::emtf_pos ? 1 : -1);
0016         l1upgradetfmuonshower_.tfMuonShowerSector.push_back(it->processor() + 1);
0017         l1upgradetfmuonshower_.tfMuonShowerOneNominal.push_back(it->isOneNominalInTime());
0018         l1upgradetfmuonshower_.tfMuonShowerOneTight.push_back(it->isOneTightInTime());
0019         l1upgradetfmuonshower_.tfMuonShowerTwoLoose.push_back(it->isTwoLooseInTime());
0020         l1upgradetfmuonshower_.nTfMuonShowers++;
0021       }
0022     }
0023   }
0024 }