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 hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () 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::L1TBMTFConverter ( const edm::ParameterSet iConfig)
explicit

Definition at line 75 of file L1TBMTFConverter.cc.

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 }

References edm::ParameterSet::getParameter().

◆ ~L1TBMTFConverter()

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

◆ beginLuminosityBlock()

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

Definition at line 154 of file L1TBMTFConverter.cc.

154 {}

◆ beginRun()

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

Definition at line 148 of file L1TBMTFConverter.cc.

148 {}

◆ endLuminosityBlock()

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

Definition at line 157 of file L1TBMTFConverter.cc.

157 {}

◆ endRun()

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

Definition at line 151 of file L1TBMTFConverter.cc.

151 {}

◆ fillDescriptions()

void L1TBMTFConverter::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 160 of file L1TBMTFConverter.cc.

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 }

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

◆ produce()

void L1TBMTFConverter::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 124 of file L1TBMTFConverter.cc.

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 }

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

Member Data Documentation

◆ m_barrelTfInputTag

edm::InputTag L1TBMTFConverter::m_barrelTfInputTag
private

Definition at line 60 of file L1TBMTFConverter.cc.

◆ m_barrelTfInputToken

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

Definition at line 59 of file L1TBMTFConverter.cc.

◆ ptMap_

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

Definition at line 61 of file L1TBMTFConverter.cc.

amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle
Definition: AssociativeIterator.h:50
L1TBMTFConverter::m_barrelTfInputTag
edm::InputTag m_barrelTfInputTag
Definition: L1TBMTFConverter.cc:60
BXVector::begin
const_iterator begin(int bx) const
BXVector::end
const_iterator end(int bx) const
L1TBMTFConverter::m_barrelTfInputToken
edm::EDGetTokenT< RegionalMuonCandBxCollection > m_barrelTfInputToken
Definition: L1TBMTFConverter.cc:59
iEvent
int iEvent
Definition: GenABIO.cc:224
l1t::RegionalMuonCandBxCollection
BXVector< RegionalMuonCand > RegionalMuonCandBxCollection
Definition: RegionalMuonCandFwd.h:9
L1TBMTFConverter::ptMap_
std::map< int, int > ptMap_
Definition: L1TBMTFConverter.cc:61
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
edm::InputTag
Definition: InputTag.h:15
l1t::RegionalMuonCand
Definition: RegionalMuonCand.h:8