73 m_bmtfBxOffset = iConfig.
getParameter<
int>(
"bmtfBxOffset");
74 m_barrelTfInputToken = consumes<l1t::RegionalMuonCandBxCollection>(m_barrelTfInputTag);
75 m_overlapTfInputToken = consumes<l1t::RegionalMuonCandBxCollection>(m_overlapTfInputTag);
76 m_endCapTfInputToken = consumes<l1t::RegionalMuonCandBxCollection>(m_endCapTfInputTag);
78 produces<RegionalMuonCandBxCollection>(
"BMTF");
79 produces<RegionalMuonCandBxCollection>(
"OMTF");
80 produces<RegionalMuonCandBxCollection>(
"EMTF");
104 iEvent.
getByToken(m_barrelTfInputToken, bmtfMuons);
105 iEvent.
getByToken(m_overlapTfInputToken, omtfMuons);
106 iEvent.
getByToken(m_endCapTfInputToken, emtfMuons);
108 if (bmtfMuons.isValid()) {
109 filteredBMTFMuons->setBXRange(bmtfMuons->getFirstBX(), bmtfMuons->getLastBX());
110 for (
int bx = bmtfMuons->getFirstBX();
bx <= bmtfMuons->getLastBX(); ++
bx) {
111 for (
auto mu = bmtfMuons->begin(
bx);
mu != bmtfMuons->end(
bx); ++
mu) {
115 filteredBMTFMuons->push_back(
bx + m_bmtfBxOffset, newMu);
122 if (emtfMuons.isValid()) {
123 filteredEMTFMuons->setBXRange(emtfMuons->getFirstBX(), emtfMuons->getLastBX());
124 for (
int bx = emtfMuons->getFirstBX();
bx <= emtfMuons->getLastBX(); ++
bx) {
125 for (
auto mu = emtfMuons->begin(
bx);
mu != emtfMuons->end(
bx); ++
mu) {
127 if (
mu->hwQual() == 11 ||
mu->hwQual() > 12)
131 filteredEMTFMuons->push_back(
bx, newMu);
138 if (omtfMuons.isValid()) {
139 filteredOMTFMuons->setBXRange(omtfMuons->getFirstBX(), omtfMuons->getLastBX());
140 for (
int bx = omtfMuons->getFirstBX();
bx <= omtfMuons->getLastBX(); ++
bx) {
141 for (
auto mu = omtfMuons->begin(
bx);
mu != omtfMuons->end(
bx); ++
mu) {
143 if (
mu->hwQual() > 0)
147 filteredOMTFMuons->push_back(
bx, newMu);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > m_endCapTfInputToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void endLuminosityBlock(const edm::LuminosityBlock &, edm::EventSetup const &) override
void endRun(const edm::Run &, edm::EventSetup const &) override
edm::InputTag m_endCapTfInputTag
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void beginRun(const edm::Run &, edm::EventSetup const &) override
void addDefault(ParameterSetDescription const &psetDescription)
L1TMuonQualityAdjuster(const edm::ParameterSet &)
~L1TMuonQualityAdjuster() override
edm::InputTag m_overlapTfInputTag
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > m_barrelTfInputToken
void produce(edm::Event &, const edm::EventSetup &) override
void setHwQual(int bits)
Set compressed quality code as transmitted by hardware (4 bits)
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > m_overlapTfInputToken
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T getParameter(std::string const &) const
void beginLuminosityBlock(const edm::LuminosityBlock &, edm::EventSetup const &) override
edm::InputTag m_barrelTfInputTag