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::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TBMTFConverter (const edm::ParameterSet &)
 
 ~L1TBMTFConverter ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

virtual void beginJob () override
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, edm::EventSetup const &) override
 
virtual void beginRun (const edm::Run &, edm::EventSetup const &) override
 
virtual void endJob () override
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, edm::EventSetup const &) override
 
virtual void endRun (const edm::Run &, edm::EventSetup const &) override
 
virtual 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::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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 79 of file L1TBMTFConverter.cc.

References edm::ParameterSet::getParameter().

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

Definition at line 120 of file L1TBMTFConverter.cc.

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

Member Function Documentation

void L1TBMTFConverter::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 160 of file L1TBMTFConverter.cc.

161 {
162 }
void L1TBMTFConverter::beginLuminosityBlock ( const edm::LuminosityBlock ,
edm::EventSetup const &   
)
overrideprivatevirtual

Definition at line 183 of file L1TBMTFConverter.cc.

184 {
185 }
void L1TBMTFConverter::beginRun ( const edm::Run ,
edm::EventSetup const &   
)
overrideprivatevirtual

Definition at line 171 of file L1TBMTFConverter.cc.

172 {
173 }
void L1TBMTFConverter::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 166 of file L1TBMTFConverter.cc.

166  {
167 }
void L1TBMTFConverter::endLuminosityBlock ( const edm::LuminosityBlock ,
edm::EventSetup const &   
)
overrideprivatevirtual

Definition at line 189 of file L1TBMTFConverter.cc.

190 {
191 }
void L1TBMTFConverter::endRun ( const edm::Run ,
edm::EventSetup const &   
)
overrideprivatevirtual

Definition at line 177 of file L1TBMTFConverter.cc.

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

Definition at line 195 of file L1TBMTFConverter.cc.

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

195  {
196  //The following says we do not know what parameters are allowed so do no validation
197  // Please change this to state exactly what you do use, even if it is no parameters
199  desc.setUnknown();
200  descriptions.addDefault(desc);
201 }
void addDefault(ParameterSetDescription const &psetDescription)
void L1TBMTFConverter::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Definition at line 134 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().

135 {
136  using namespace edm;
137 
138  std::unique_ptr<RegionalMuonCandBxCollection> convMuons (new RegionalMuonCandBxCollection());
139 
141  iEvent.getByToken(m_barrelTfInputToken, bmtfMuons);
142  for (auto mu = bmtfMuons->begin(0); mu != bmtfMuons->end(0); ++mu) {
143  RegionalMuonCand convMu((*mu));
144  // int convPt = ptMap_.at(mu->hwPt());
145  // int convPhi = (mu->hwPhi() * 4) - (mu->processor() * 48);
146  // int convEta = getSigned(mu->hwEta())*3.54;
147  int convEta = (mu->hwEta() - 32)*3.54;
148  // convMu.setHwPt(convPt);
149  // convMu.setHwPhi(convPhi);
150  convMu.setHwEta(convEta);
151  // convMu.setTFIdentifiers(mu->processor()+1, mu->trackFinderType());
152  convMuons->push_back(0, convMu);
153  }
154 
155  iEvent.put(std::move(convMuons), "ConvBMTFMuons");
156 }
const_iterator end(int bx) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
BXVector< RegionalMuonCand > RegionalMuonCandBxCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
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 63 of file L1TBMTFConverter.cc.

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

Definition at line 62 of file L1TBMTFConverter.cc.

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

Definition at line 64 of file L1TBMTFConverter.cc.