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::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 L1TMicroGMTLUTDumper (const edm::ParameterSet &)
 
 ~L1TMicroGMTLUTDumper () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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

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::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 55 of file L1TMicroGMTLUTDumper.cc.

Constructor & Destructor Documentation

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

Definition at line 108 of file L1TMicroGMTLUTDumper.cc.

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

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

Definition at line 115 of file L1TMicroGMTLUTDumper.cc.

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

Member Function Documentation

void L1TMicroGMTLUTDumper::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 130 of file L1TMicroGMTLUTDumper.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

130  {
131  using namespace edm;
132  dumpLut(m_rankLUT.get(), std::string("/SortRank.txt"));
133  dumpLut(m_absIsoCheckMemLUT.get(), std::string("/AbsIsoCheckMem.txt"));
134  dumpLut(m_relIsoCheckMemLUT.get(), std::string("/RelIsoCheckMem.txt"));
135  dumpLut(m_idxSelMemPhiLUT.get(), std::string("/IdxSelMemPhi.txt"));
136  dumpLut(m_idxSelMemEtaLUT.get(), std::string("/IdxSelMemEta.txt"));
137  dumpLut(m_bPhiExtrapolationLUT.get(), std::string("/BPhiExtrapolation.txt"));
138  dumpLut(m_oPhiExtrapolationLUT.get(), std::string("/OPhiExtrapolation.txt"));
139  dumpLut(m_fPhiExtrapolationLUT.get(), std::string("/EPhiExtrapolation.txt"));
140  dumpLut(m_bEtaExtrapolationLUT.get(), std::string("/BEtaExtrapolation.txt"));
141  dumpLut(m_oEtaExtrapolationLUT.get(), std::string("/OEtaExtrapolation.txt"));
142  dumpLut(m_fEtaExtrapolationLUT.get(), std::string("/EEtaExtrapolation.txt"));
143  dumpLut(m_boPosMatchQualLUT.get(), std::string("/BOPosMatchQual.txt"));
144  dumpLut(m_boNegMatchQualLUT.get(), std::string("/BONegMatchQual.txt"));
145  dumpLut(m_foPosMatchQualLUT.get(), std::string("/EOPosMatchQual.txt"));
146  dumpLut(m_foNegMatchQualLUT.get(), std::string("/EONegMatchQual.txt"));
147  //dumpLut(m_brlSingleMatchQualLUT.get(), std::string("/BmtfSingleMatchQual.txt"));
148  dumpLut(m_ovlPosSingleMatchQualLUT.get(), std::string("/OmtfPosSingleMatchQual.txt"));
149  dumpLut(m_ovlNegSingleMatchQualLUT.get(), std::string("/OmtfNegSingleMatchQual.txt"));
150  dumpLut(m_fwdPosSingleMatchQualLUT.get(), std::string("/EmtfPosSingleMatchQual.txt"));
151  dumpLut(m_fwdNegSingleMatchQualLUT.get(), std::string("/EmtfNegSingleMatchQual.txt"));
152 }
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 
)
overrideprivate

Definition at line 155 of file L1TMicroGMTLUTDumper.cc.

References l1t::MicroGMTRankPtQualLUTFactory::create(), l1t::MicroGMTMatchQualLUTFactory::create(), l1t::MicroGMTExtrapolationLUTFactory::create(), l1t::MicroGMTCaloIndexSelectionLUTFactory::create(), l1t::MicroGMTAbsoluteIsolationCheckLUTFactory::create(), l1t::MicroGMTRelativeIsolationCheckLUTFactory::create(), l1t::emtf_emtf_neg, l1t::emtf_emtf_pos, l1t::MicroGMTConfiguration::ETA, l1t::MicroGMTConfiguration::ETA_OUT, amcDumpToRaw_cfi::fwVersion, edm::EventSetup::get(), edm::eventsetup::EventSetupRecordImplementation< T >::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.

155  {
156  const L1TMuonGlobalParamsRcd& microGMTParamsRcd = iSetup.get<L1TMuonGlobalParamsRcd>();
157  edm::ESHandle<L1TMuonGlobalParams> microGMTParamsHandle;
158  microGMTParamsRcd.get(microGMTParamsHandle);
159 
160  microGMTParamsHelper = std::make_unique<L1TMuonGlobalParamsHelper>(*microGMTParamsHandle.product());
161  if (!microGMTParamsHelper) {
162  edm::LogError("L1TMicroGMTLUTDumper") << "Could not retrieve parameters from Event Setup" << std::endl;
163  }
164 
165  int fwVersion = microGMTParamsHelper->fwVersion();
167 
176 
189 
198  //m_brlSingleMatchQualLUT = l1t::MicroGMTMatchQualLUTFactory::create(microGMTParamsHelper->brlSingleMatchQualLUT(), cancel_t::bmtf_bmtf, fwVersion);
200  microGMTParamsHelper->ovlPosSingleMatchQualLUT(), cancel_t::omtf_omtf_pos, fwVersion);
202  microGMTParamsHelper->ovlNegSingleMatchQualLUT(), cancel_t::omtf_omtf_neg, fwVersion);
204  microGMTParamsHelper->fwdPosSingleMatchQualLUT(), cancel_t::emtf_emtf_pos, fwVersion);
206  microGMTParamsHelper->fwdNegSingleMatchQualLUT(), cancel_t::emtf_emtf_neg, fwVersion);
207 }
def create(alignables, pedeDump, additionalData, outputFile, config)
std::shared_ptr< MicroGMTExtrapolationLUT > m_oEtaExtrapolationLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_fwdPosSingleMatchQualLUT
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
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
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 123 of file L1TMicroGMTLUTDumper.cc.

References l1t::MicroGMTLUT::save().

123  {
124  std::ofstream fStream(m_foldername + oName);
125  lut->save(fStream);
126  fStream.close();
127 }
void save(std::ofstream &output)
Definition: MicroGMTLUT.cc:13
void L1TMicroGMTLUTDumper::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 210 of file L1TMicroGMTLUTDumper.cc.

References DEFINE_FWK_MODULE.

210 {}

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.