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 hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () 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 44 of file L1TBMTFConverter.cc.

Constructor & Destructor Documentation

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

Definition at line 75 of file L1TBMTFConverter.cc.

References edm::ParameterSet::getParameter().

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

114  {
115  // do anything here that needs to be done at desctruction time
116  // (e.g. close files, deallocate resources etc.)
117 }

Member Function Documentation

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

Definition at line 154 of file L1TBMTFConverter.cc.

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

Definition at line 148 of file L1TBMTFConverter.cc.

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

Definition at line 157 of file L1TBMTFConverter.cc.

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

Definition at line 151 of file L1TBMTFConverter.cc.

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

Definition at line 160 of file L1TBMTFConverter.cc.

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

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

Definition at line 124 of file L1TBMTFConverter.cc.

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

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

Member Data Documentation

edm::InputTag L1TBMTFConverter::m_barrelTfInputTag
private

Definition at line 60 of file L1TBMTFConverter.cc.

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

Definition at line 59 of file L1TBMTFConverter.cc.

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

Definition at line 61 of file L1TBMTFConverter.cc.