CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
L1TBMTFConverter Class Reference

#include <L1Trigger/L1TGlobalMuon/plugins/L1TBMTFConverter.cc>

Inheritance diagram for L1TBMTFConverter:
edm::stream::EDProducer<>

Public Member Functions

 L1TBMTFConverter (const edm::ParameterSet &)
 
 ~L1TBMTFConverter () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void beginLuminosityBlock (const edm::LuminosityBlock &, edm::EventSetup const &) override
 
void beginRun (const edm::Run &, edm::EventSetup const &) override
 
void endLuminosityBlock (const edm::LuminosityBlock &, edm::EventSetup const &) override
 
void endRun (const edm::Run &, edm::EventSetup const &) override
 
void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

edm::InputTag m_barrelTfInputTag
 
edm::EDGetTokenT< RegionalMuonCandBxCollectionm_barrelTfInputToken
 
std::map< int, int > ptMap_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Description: Takes txt-file input and produces barrel- / overlap- / forward TF muons

Implementation: [Notes on implementation]

Definition at line 45 of file L1TBMTFConverter.cc.

Constructor & Destructor Documentation

L1TBMTFConverter::L1TBMTFConverter ( const edm::ParameterSet iConfig)
explicit

Definition at line 77 of file L1TBMTFConverter.cc.

References edm::ParameterSet::getParameter().

78 {
79  m_barrelTfInputTag = iConfig.getParameter<edm::InputTag>("barrelTFInput");
80  m_barrelTfInputToken = consumes<RegionalMuonCandBxCollection>(m_barrelTfInputTag);
81  //register your products
82  produces<RegionalMuonCandBxCollection>("ConvBMTFMuons");
83  ptMap_[0] = 0;
84  ptMap_[1] = 0;
85  ptMap_[2] = 3;
86  ptMap_[3] = 4;
87  ptMap_[4] = 5;
88  ptMap_[5] = 6;
89  ptMap_[6] = 7;
90  ptMap_[7] = 8;
91  ptMap_[8] = 9;
92  ptMap_[9] = 10;
93  ptMap_[10] = 12;
94  ptMap_[11] = 14;
95  ptMap_[12] = 16;
96  ptMap_[13] = 20;
97  ptMap_[14] = 24;
98  ptMap_[15] = 28;
99  ptMap_[16] = 32;
100  ptMap_[17] = 36;
101  ptMap_[18] = 40;
102  ptMap_[19] = 50;
103  ptMap_[20] = 60;
104  ptMap_[21] = 70;
105  ptMap_[22] = 80;
106  ptMap_[23] = 90;
107  ptMap_[24] = 100;
108  ptMap_[25] = 120;
109  ptMap_[26] = 140;
110  ptMap_[27] = 160;
111  ptMap_[28] = 180;
112  ptMap_[29] = 200;
113  ptMap_[30] = 240;
114  ptMap_[31] = 280;
115 }
T getParameter(std::string const &) const
std::map< int, int > ptMap_
edm::EDGetTokenT< RegionalMuonCandBxCollection > m_barrelTfInputToken
edm::InputTag m_barrelTfInputTag
L1TBMTFConverter::~L1TBMTFConverter ( )
override

Definition at line 118 of file L1TBMTFConverter.cc.

119 {
120  // do anything here that needs to be done at desctruction time
121  // (e.g. close files, deallocate resources etc.)
122 }

Member Function Documentation

void L1TBMTFConverter::beginLuminosityBlock ( const edm::LuminosityBlock ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 170 of file L1TBMTFConverter.cc.

171 {
172 }
void L1TBMTFConverter::beginRun ( const edm::Run ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 158 of file L1TBMTFConverter.cc.

159 {
160 }
void L1TBMTFConverter::endLuminosityBlock ( const edm::LuminosityBlock ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 176 of file L1TBMTFConverter.cc.

177 {
178 }
void L1TBMTFConverter::endRun ( const edm::Run ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 164 of file L1TBMTFConverter.cc.

165 {
166 }
void L1TBMTFConverter::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 182 of file L1TBMTFConverter.cc.

References edm::ConfigurationDescriptions::addDefault(), DEFINE_FWK_MODULE, and edm::ParameterSetDescription::setUnknown().

182  {
183  //The following says we do not know what parameters are allowed so do no validation
184  // Please change this to state exactly what you do use, even if it is no parameters
186  desc.setUnknown();
187  descriptions.addDefault(desc);
188 }
void addDefault(ParameterSetDescription const &psetDescription)
void L1TBMTFConverter::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 132 of file L1TBMTFConverter.cc.

References BXVector< T >::begin(), BXVector< T >::end(), edm::Event::getByToken(), eostools::move(), RPCpg::mu, edm::Event::put(), and l1t::RegionalMuonCand::setHwEta().

133 {
134  using namespace edm;
135 
136  std::unique_ptr<RegionalMuonCandBxCollection> convMuons (new RegionalMuonCandBxCollection());
137 
139  iEvent.getByToken(m_barrelTfInputToken, bmtfMuons);
140  for (auto mu = bmtfMuons->begin(0); mu != bmtfMuons->end(0); ++mu) {
141  RegionalMuonCand convMu((*mu));
142  // int convPt = ptMap_.at(mu->hwPt());
143  // int convPhi = (mu->hwPhi() * 4) - (mu->processor() * 48);
144  // int convEta = getSigned(mu->hwEta())*3.54;
145  int convEta = (mu->hwEta() - 32)*3.54;
146  // convMu.setHwPt(convPt);
147  // convMu.setHwPhi(convPhi);
148  convMu.setHwEta(convEta);
149  // convMu.setTFIdentifiers(mu->processor()+1, mu->trackFinderType());
150  convMuons->push_back(0, convMu);
151  }
152 
153  iEvent.put(std::move(convMuons), "ConvBMTFMuons");
154 }
const_iterator end(int bx) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
BXVector< RegionalMuonCand > RegionalMuonCandBxCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
edm::EDGetTokenT< RegionalMuonCandBxCollection > m_barrelTfInputToken
const int mu
Definition: Constants.h:22
HLT enums.
const_iterator begin(int bx) const
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

edm::InputTag L1TBMTFConverter::m_barrelTfInputTag
private

Definition at line 61 of file L1TBMTFConverter.cc.

edm::EDGetTokenT<RegionalMuonCandBxCollection> L1TBMTFConverter::m_barrelTfInputToken
private

Definition at line 60 of file L1TBMTFConverter.cc.

std::map<int, int> L1TBMTFConverter::ptMap_
private

Definition at line 62 of file L1TBMTFConverter.cc.