44 virtual void endJob()
override ;
77 m_bmtfBxOffset = iConfig.
getParameter<
int>(
"bmtfBxOffset");
78 m_barrelTfInputToken = consumes<l1t::RegionalMuonCandBxCollection>(m_barrelTfInputTag);
79 m_overlapTfInputToken = consumes<l1t::RegionalMuonCandBxCollection>(m_overlapTfInputTag);
80 m_endCapTfInputToken = consumes<l1t::RegionalMuonCandBxCollection>(m_endCapTfInputTag);
82 produces<RegionalMuonCandBxCollection>(
"BMTF");
83 produces<RegionalMuonCandBxCollection>(
"OMTF");
84 produces<RegionalMuonCandBxCollection>(
"EMTF");
114 iEvent.
getByToken(m_barrelTfInputToken, bmtfMuons);
115 iEvent.
getByToken(m_overlapTfInputToken, omtfMuons);
116 iEvent.
getByToken(m_endCapTfInputToken, emtfMuons);
119 if (bmtfMuons.isValid()){
120 filteredBMTFMuons->setBXRange(bmtfMuons->getFirstBX(), bmtfMuons->getLastBX());
121 for (
int bx = bmtfMuons->getFirstBX(); bx <= bmtfMuons->getLastBX(); ++bx) {
122 for (
auto mu = bmtfMuons->begin(bx);
mu != bmtfMuons->end(bx); ++
mu) {
126 filteredBMTFMuons->push_back(bx+m_bmtfBxOffset, newMu);
133 if (emtfMuons.isValid()){
134 filteredEMTFMuons->setBXRange(emtfMuons->getFirstBX(), emtfMuons->getLastBX());
135 for (
int bx = emtfMuons->getFirstBX(); bx <= emtfMuons->getLastBX(); ++bx) {
136 for (
auto mu = emtfMuons->begin(bx);
mu != emtfMuons->end(bx); ++
mu) {
138 if (
mu->hwQual() == 11 ||
mu->hwQual() > 12) newqual=12;
141 filteredEMTFMuons->push_back(bx, newMu);
148 if (omtfMuons.isValid()){
149 filteredOMTFMuons->setBXRange(omtfMuons->getFirstBX(), omtfMuons->getLastBX());
150 for (
int bx = omtfMuons->getFirstBX(); bx <= omtfMuons->getLastBX(); ++bx) {
151 for (
auto mu = omtfMuons->begin(bx);
mu != omtfMuons->end(bx); ++
mu) {
153 if (
mu->hwQual() > 0) newqual = 12;
156 filteredOMTFMuons->push_back(bx, newMu);
168 iEvent.
put(filteredBMTFMuons,
"BMTF");
169 iEvent.
put(filteredOMTFMuons,
"OMTF");
170 iEvent.
put(filteredEMTFMuons,
"EMTF");
T getParameter(std::string const &) const
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > m_endCapTfInputToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual void endJob() override
virtual void endLuminosityBlock(const edm::LuminosityBlock &, edm::EventSetup const &) override
virtual void endRun(const edm::Run &, edm::EventSetup const &) override
edm::InputTag m_endCapTfInputTag
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void beginRun(const edm::Run &, edm::EventSetup const &) override
void addDefault(ParameterSetDescription const &psetDescription)
L1TMuonQualityAdjuster(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag m_overlapTfInputTag
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > m_barrelTfInputToken
virtual 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
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, edm::EventSetup const &) override
~L1TMuonQualityAdjuster()
edm::InputTag m_barrelTfInputTag
virtual void beginJob() override