CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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 ()
 
virtual void beginLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run &, edm::EventSetup const &)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &)
 
virtual void endRun (edm::Run &, edm::EventSetup const &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

edm::InputTag m_barrelTfInputTag
 
edm::EDGetTokenT
< RegionalMuonCandBxCollection
m_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 44 of file L1TBMTFConverter.cc.

Constructor & Destructor Documentation

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

Definition at line 78 of file L1TBMTFConverter.cc.

References m_barrelTfInputTag, m_barrelTfInputToken, and ptMap_.

78  : m_barrelTfInputTag("bmtfEmulator", "BM")
79 {
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 }
std::map< int, int > ptMap_
edm::EDGetTokenT< RegionalMuonCandBxCollection > m_barrelTfInputToken
edm::InputTag m_barrelTfInputTag
L1TBMTFConverter::~L1TBMTFConverter ( )

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::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 158 of file L1TBMTFConverter.cc.

159 {
160 }
void L1TBMTFConverter::beginLuminosityBlock ( edm::LuminosityBlock ,
edm::EventSetup const &   
)
privatevirtual

Definition at line 181 of file L1TBMTFConverter.cc.

182 {
183 }
void L1TBMTFConverter::beginRun ( edm::Run ,
edm::EventSetup const &   
)
privatevirtual

Definition at line 169 of file L1TBMTFConverter.cc.

170 {
171 }
void L1TBMTFConverter::endJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 164 of file L1TBMTFConverter.cc.

164  {
165 }
void L1TBMTFConverter::endLuminosityBlock ( edm::LuminosityBlock ,
edm::EventSetup const &   
)
privatevirtual

Definition at line 187 of file L1TBMTFConverter.cc.

188 {
189 }
void L1TBMTFConverter::endRun ( edm::Run ,
edm::EventSetup const &   
)
privatevirtual

Definition at line 175 of file L1TBMTFConverter.cc.

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

Definition at line 193 of file L1TBMTFConverter.cc.

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

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

Implements edm::EDProducer.

Definition at line 132 of file L1TBMTFConverter.cc.

References edm::Event::getByToken(), m_barrelTfInputToken, RPCpg::mu, edm::Event::put(), and l1t::RegionalMuonCand::setHwEta().

133 {
134  using namespace edm;
135 
136  std::auto_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(convMuons, "ConvBMTFMuons");
154 }
BXVector< RegionalMuonCand > RegionalMuonCandBxCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
edm::EDGetTokenT< RegionalMuonCandBxCollection > m_barrelTfInputToken
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
const int mu
Definition: Constants.h:22

Member Data Documentation

edm::InputTag L1TBMTFConverter::m_barrelTfInputTag
private

Definition at line 62 of file L1TBMTFConverter.cc.

Referenced by L1TBMTFConverter().

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

Definition at line 61 of file L1TBMTFConverter.cc.

Referenced by L1TBMTFConverter(), and produce().

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

Definition at line 63 of file L1TBMTFConverter.cc.

Referenced by L1TBMTFConverter().