CMS 3D CMS Logo

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

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

Inheritance diagram for L1TMicroGMTLUTDumper:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
 L1TMicroGMTLUTDumper (const edm::ParameterSet &)
 
 ~L1TMicroGMTLUTDumper ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 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)
 

Private Member Functions

virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
void dumpLut (MicroGMTLUT *, const std::string &)
 

Private Attributes

std::shared_ptr< MicroGMTAbsoluteIsolationCheckLUTm_absIsoCheckMemLUT
 
std::shared_ptr< MicroGMTExtrapolationLUTm_bEtaExtrapolationLUT
 
std::shared_ptr< MicroGMTMatchQualLUTm_boNegMatchQualLUT
 
std::shared_ptr< MicroGMTMatchQualLUTm_boPosMatchQualLUT
 
std::shared_ptr< MicroGMTExtrapolationLUTm_bPhiExtrapolationLUT
 
std::shared_ptr< MicroGMTExtrapolationLUTm_fEtaExtrapolationLUT
 
std::string m_foldername
 
std::shared_ptr< MicroGMTMatchQualLUTm_foNegMatchQualLUT
 
std::shared_ptr< MicroGMTMatchQualLUTm_foPosMatchQualLUT
 
std::shared_ptr< MicroGMTExtrapolationLUTm_fPhiExtrapolationLUT
 
std::shared_ptr< MicroGMTMatchQualLUTm_fwdNegSingleMatchQualLUT
 
std::shared_ptr< MicroGMTMatchQualLUTm_fwdPosSingleMatchQualLUT
 
std::shared_ptr< MicroGMTCaloIndexSelectionLUTm_idxSelMemEtaLUT
 
std::shared_ptr< MicroGMTCaloIndexSelectionLUTm_idxSelMemPhiLUT
 
std::shared_ptr< MicroGMTExtrapolationLUTm_oEtaExtrapolationLUT
 
std::shared_ptr< MicroGMTExtrapolationLUTm_oPhiExtrapolationLUT
 
std::shared_ptr< MicroGMTMatchQualLUTm_ovlNegSingleMatchQualLUT
 
std::shared_ptr< MicroGMTMatchQualLUTm_ovlPosSingleMatchQualLUT
 
std::shared_ptr< MicroGMTRankPtQualLUTm_rankLUT
 
std::shared_ptr< MicroGMTRelativeIsolationCheckLUTm_relIsoCheckMemLUT
 
std::unique_ptr< L1TMuonGlobalParamsHelpermicroGMTParamsHelper
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 56 of file L1TMicroGMTLUTDumper.cc.

Constructor & Destructor Documentation

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

Definition at line 109 of file L1TMicroGMTLUTDumper.cc.

References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

110 {
111  //now do what ever other initialization is needed
112  m_foldername = iConfig.getParameter<std::string> ("out_directory");
113 
114  microGMTParamsHelper = std::unique_ptr<L1TMuonGlobalParamsHelper>(new L1TMuonGlobalParamsHelper());
115 }
T getParameter(std::string const &) const
std::unique_ptr< L1TMuonGlobalParamsHelper > microGMTParamsHelper
L1TMicroGMTLUTDumper::~L1TMicroGMTLUTDumper ( )

Definition at line 118 of file L1TMicroGMTLUTDumper.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 L1TMicroGMTLUTDumper::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Definition at line 139 of file L1TMicroGMTLUTDumper.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

140 {
141  using namespace edm;
142  dumpLut(m_rankLUT.get(), std::string("/SortRank.txt"));
143  dumpLut(m_absIsoCheckMemLUT.get(), std::string("/AbsIsoCheckMem.txt"));
144  dumpLut(m_relIsoCheckMemLUT.get(), std::string("/RelIsoCheckMem.txt"));
145  dumpLut(m_idxSelMemPhiLUT.get(), std::string("/IdxSelMemPhi.txt"));
146  dumpLut(m_idxSelMemEtaLUT.get(), std::string("/IdxSelMemEta.txt"));
147  dumpLut(m_bPhiExtrapolationLUT.get(), std::string("/BPhiExtrapolation.txt"));
148  dumpLut(m_oPhiExtrapolationLUT.get(), std::string("/OPhiExtrapolation.txt"));
149  dumpLut(m_fPhiExtrapolationLUT.get(), std::string("/EPhiExtrapolation.txt"));
150  dumpLut(m_bEtaExtrapolationLUT.get(), std::string("/BEtaExtrapolation.txt"));
151  dumpLut(m_oEtaExtrapolationLUT.get(), std::string("/OEtaExtrapolation.txt"));
152  dumpLut(m_fEtaExtrapolationLUT.get(), std::string("/EEtaExtrapolation.txt"));
153  dumpLut(m_boPosMatchQualLUT.get(), std::string("/BOPosMatchQual.txt"));
154  dumpLut(m_boNegMatchQualLUT.get(), std::string("/BONegMatchQual.txt"));
155  dumpLut(m_foPosMatchQualLUT.get(), std::string("/EOPosMatchQual.txt"));
156  dumpLut(m_foNegMatchQualLUT.get(), std::string("/EONegMatchQual.txt"));
157  //dumpLut(m_brlSingleMatchQualLUT.get(), std::string("/BmtfSingleMatchQual.txt"));
158  dumpLut(m_ovlPosSingleMatchQualLUT.get(), std::string("/OmtfPosSingleMatchQual.txt"));
159  dumpLut(m_ovlNegSingleMatchQualLUT.get(), std::string("/OmtfNegSingleMatchQual.txt"));
160  dumpLut(m_fwdPosSingleMatchQualLUT.get(), std::string("/EmtfPosSingleMatchQual.txt"));
161  dumpLut(m_fwdNegSingleMatchQualLUT.get(), std::string("/EmtfNegSingleMatchQual.txt"));
162 
163 }
std::shared_ptr< MicroGMTExtrapolationLUT > m_oEtaExtrapolationLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_fwdPosSingleMatchQualLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_boNegMatchQualLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_foPosMatchQualLUT
std::shared_ptr< MicroGMTExtrapolationLUT > m_bPhiExtrapolationLUT
std::shared_ptr< MicroGMTCaloIndexSelectionLUT > m_idxSelMemPhiLUT
std::shared_ptr< MicroGMTRankPtQualLUT > m_rankLUT
void dumpLut(MicroGMTLUT *, const std::string &)
std::shared_ptr< MicroGMTMatchQualLUT > m_foNegMatchQualLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_ovlNegSingleMatchQualLUT
std::shared_ptr< MicroGMTAbsoluteIsolationCheckLUT > m_absIsoCheckMemLUT
std::shared_ptr< MicroGMTRelativeIsolationCheckLUT > m_relIsoCheckMemLUT
std::shared_ptr< MicroGMTExtrapolationLUT > m_bEtaExtrapolationLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_ovlPosSingleMatchQualLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_boPosMatchQualLUT
HLT enums.
std::shared_ptr< MicroGMTCaloIndexSelectionLUT > m_idxSelMemEtaLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_fwdNegSingleMatchQualLUT
std::shared_ptr< MicroGMTExtrapolationLUT > m_fPhiExtrapolationLUT
std::shared_ptr< MicroGMTExtrapolationLUT > m_fEtaExtrapolationLUT
std::shared_ptr< MicroGMTExtrapolationLUT > m_oPhiExtrapolationLUT
void L1TMicroGMTLUTDumper::beginRun ( edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 167 of file L1TMicroGMTLUTDumper.cc.

References l1t::MicroGMTRankPtQualLUTFactory::create(), l1t::MicroGMTMatchQualLUTFactory::create(), l1t::MicroGMTExtrapolationLUTFactory::create(), l1t::MicroGMTCaloIndexSelectionLUTFactory::create(), l1t::MicroGMTAbsoluteIsolationCheckLUTFactory::create(), l1t::MicroGMTRelativeIsolationCheckLUTFactory::create(), DEFINE_FWK_MODULE, l1t::emtf_emtf_neg, l1t::emtf_emtf_pos, l1t::MicroGMTConfiguration::ETA, l1t::MicroGMTConfiguration::ETA_OUT, hgcalDigitizer_cfi::fwVersion, edm::EventSetup::get(), edm::eventsetup::EventSetupRecord::get(), l1t::omtf_bmtf_neg, l1t::omtf_bmtf_pos, l1t::omtf_emtf_neg, l1t::omtf_emtf_pos, l1t::omtf_omtf_neg, l1t::omtf_omtf_pos, l1t::MicroGMTConfiguration::PHI, and l1t::MicroGMTConfiguration::PHI_OUT.

168 {
169  const L1TMuonGlobalParamsRcd& microGMTParamsRcd = iSetup.get<L1TMuonGlobalParamsRcd>();
170  edm::ESHandle<L1TMuonGlobalParams> microGMTParamsHandle;
171  microGMTParamsRcd.get(microGMTParamsHandle);
172 
173  microGMTParamsHelper = std::unique_ptr<L1TMuonGlobalParamsHelper>(new L1TMuonGlobalParamsHelper(*microGMTParamsHandle.product()));
174  if (!microGMTParamsHelper) {
175  edm::LogError("L1TMicroGMTLUTDumper") << "Could not retrieve parameters from Event Setup" << std::endl;
176  }
177 
178  int fwVersion = microGMTParamsHelper->fwVersion();
180 
185 
192 
197  //m_brlSingleMatchQualLUT = l1t::MicroGMTMatchQualLUTFactory::create(microGMTParamsHelper->brlSingleMatchQualLUT(), cancel_t::bmtf_bmtf, fwVersion);
202 }
def create(alignables, pedeDump, additionalData, outputFile, config)
std::shared_ptr< MicroGMTExtrapolationLUT > m_oEtaExtrapolationLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_fwdPosSingleMatchQualLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_boNegMatchQualLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_foPosMatchQualLUT
std::shared_ptr< MicroGMTExtrapolationLUT > m_bPhiExtrapolationLUT
std::shared_ptr< MicroGMTCaloIndexSelectionLUT > m_idxSelMemPhiLUT
std::shared_ptr< MicroGMTRankPtQualLUT > m_rankLUT
void get(HolderT &iHolder) const
std::unique_ptr< L1TMuonGlobalParamsHelper > microGMTParamsHelper
std::shared_ptr< MicroGMTMatchQualLUT > m_foNegMatchQualLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_ovlNegSingleMatchQualLUT
std::shared_ptr< MicroGMTAbsoluteIsolationCheckLUT > m_absIsoCheckMemLUT
std::shared_ptr< MicroGMTRelativeIsolationCheckLUT > m_relIsoCheckMemLUT
std::shared_ptr< MicroGMTExtrapolationLUT > m_bEtaExtrapolationLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_ovlPosSingleMatchQualLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_boPosMatchQualLUT
static ReturnType create(const std::string &filename, const double maxDR, const double fEta, const double fEtaCoarse, const double fPhi, cancel_t cancelType, const int fwVersion)
std::shared_ptr< MicroGMTCaloIndexSelectionLUT > m_idxSelMemEtaLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_fwdNegSingleMatchQualLUT
std::shared_ptr< MicroGMTExtrapolationLUT > m_fPhiExtrapolationLUT
std::shared_ptr< MicroGMTExtrapolationLUT > m_fEtaExtrapolationLUT
std::shared_ptr< MicroGMTExtrapolationLUT > m_oPhiExtrapolationLUT
void L1TMicroGMTLUTDumper::dumpLut ( MicroGMTLUT lut,
const std::string &  oName 
)
private

Definition at line 129 of file L1TMicroGMTLUTDumper.cc.

References l1t::MicroGMTLUT::save().

129  {
130  std::ofstream fStream(m_foldername+oName);
131  lut->save(fStream);
132  fStream.close();
133 }
void save(std::ofstream &output)
Definition: MicroGMTLUT.cc:15

Member Data Documentation

std::shared_ptr<MicroGMTAbsoluteIsolationCheckLUT> L1TMicroGMTLUTDumper::m_absIsoCheckMemLUT
private

Definition at line 73 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTExtrapolationLUT> L1TMicroGMTLUTDumper::m_bEtaExtrapolationLUT
private

Definition at line 82 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTMatchQualLUT> L1TMicroGMTLUTDumper::m_boNegMatchQualLUT
private

Definition at line 87 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTMatchQualLUT> L1TMicroGMTLUTDumper::m_boPosMatchQualLUT
private

Definition at line 86 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTExtrapolationLUT> L1TMicroGMTLUTDumper::m_bPhiExtrapolationLUT
private

Definition at line 79 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTExtrapolationLUT> L1TMicroGMTLUTDumper::m_fEtaExtrapolationLUT
private

Definition at line 84 of file L1TMicroGMTLUTDumper.cc.

std::string L1TMicroGMTLUTDumper::m_foldername
private

Definition at line 69 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTMatchQualLUT> L1TMicroGMTLUTDumper::m_foNegMatchQualLUT
private

Definition at line 89 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTMatchQualLUT> L1TMicroGMTLUTDumper::m_foPosMatchQualLUT
private

Definition at line 88 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTExtrapolationLUT> L1TMicroGMTLUTDumper::m_fPhiExtrapolationLUT
private

Definition at line 81 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTMatchQualLUT> L1TMicroGMTLUTDumper::m_fwdNegSingleMatchQualLUT
private

Definition at line 94 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTMatchQualLUT> L1TMicroGMTLUTDumper::m_fwdPosSingleMatchQualLUT
private

Definition at line 93 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTCaloIndexSelectionLUT> L1TMicroGMTLUTDumper::m_idxSelMemEtaLUT
private

Definition at line 77 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTCaloIndexSelectionLUT> L1TMicroGMTLUTDumper::m_idxSelMemPhiLUT
private

Definition at line 76 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTExtrapolationLUT> L1TMicroGMTLUTDumper::m_oEtaExtrapolationLUT
private

Definition at line 83 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTExtrapolationLUT> L1TMicroGMTLUTDumper::m_oPhiExtrapolationLUT
private

Definition at line 80 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTMatchQualLUT> L1TMicroGMTLUTDumper::m_ovlNegSingleMatchQualLUT
private

Definition at line 92 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTMatchQualLUT> L1TMicroGMTLUTDumper::m_ovlPosSingleMatchQualLUT
private

Definition at line 91 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTRankPtQualLUT> L1TMicroGMTLUTDumper::m_rankLUT
private

Definition at line 71 of file L1TMicroGMTLUTDumper.cc.

std::shared_ptr<MicroGMTRelativeIsolationCheckLUT> L1TMicroGMTLUTDumper::m_relIsoCheckMemLUT
private

Definition at line 74 of file L1TMicroGMTLUTDumper.cc.

std::unique_ptr<L1TMuonGlobalParamsHelper> L1TMicroGMTLUTDumper::microGMTParamsHelper
private

Definition at line 68 of file L1TMicroGMTLUTDumper.cc.