File indexing completed on 2023-03-17 11:12:56
0001
0002
0003
0004
0005
0006
0007
0008 #include "L1Trigger/L1TMuonOverlapPhase1/interface/MuonStubsInput.h"
0009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0010
0011 MuonStubsInput::MuonStubsInput(const ProcConfigurationBase* config)
0012 : config(config), muonStubsInLayers(config->nLayers()) {}
0013
0014 std::ostream& operator<<(std::ostream& out, const MuonStubsInput& stubsInput) {
0015 out << "MuonStubsInput: " << std::endl;
0016 for (auto& layerStubs : stubsInput.getMuonStubs()) {
0017 for (auto& stub : layerStubs) {
0018 out << (*stub) << std::endl;
0019 }
0020 }
0021 return out;
0022 }
0023
0024
0025
0026 int MuonStubsInput::getPhiHw(unsigned int iLayer, unsigned int iInput) const {
0027 if (config->isBendingLayer(iLayer)) {
0028 if (iInput >= muonStubsInLayers[iLayer - 1].size())
0029 return MuonStub::EMTPY_PHI;
0030 return muonStubsInLayers[iLayer - 1][iInput]->phiBHw;
0031 } else {
0032 if (iInput >= muonStubsInLayers[iLayer].size())
0033 return MuonStub::EMTPY_PHI;
0034 return muonStubsInLayers[iLayer][iInput]->phiHw;
0035 }
0036 }