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 56 of file L1TMicroGMTLUTDumper.cc.

Constructor & Destructor Documentation

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

Definition at line 110 of file L1TMicroGMTLUTDumper.cc.

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

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

Definition at line 119 of file L1TMicroGMTLUTDumper.cc.

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

Member Function Documentation

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

Definition at line 140 of file L1TMicroGMTLUTDumper.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

141 {
142  using namespace edm;
143  dumpLut(m_rankLUT.get(), std::string("/SortRank.txt"));
144  dumpLut(m_absIsoCheckMemLUT.get(), std::string("/AbsIsoCheckMem.txt"));
145  dumpLut(m_relIsoCheckMemLUT.get(), std::string("/RelIsoCheckMem.txt"));
146  dumpLut(m_idxSelMemPhiLUT.get(), std::string("/IdxSelMemPhi.txt"));
147  dumpLut(m_idxSelMemEtaLUT.get(), std::string("/IdxSelMemEta.txt"));
148  dumpLut(m_bPhiExtrapolationLUT.get(), std::string("/BPhiExtrapolation.txt"));
149  dumpLut(m_oPhiExtrapolationLUT.get(), std::string("/OPhiExtrapolation.txt"));
150  dumpLut(m_fPhiExtrapolationLUT.get(), std::string("/EPhiExtrapolation.txt"));
151  dumpLut(m_bEtaExtrapolationLUT.get(), std::string("/BEtaExtrapolation.txt"));
152  dumpLut(m_oEtaExtrapolationLUT.get(), std::string("/OEtaExtrapolation.txt"));
153  dumpLut(m_fEtaExtrapolationLUT.get(), std::string("/EEtaExtrapolation.txt"));
154  dumpLut(m_boPosMatchQualLUT.get(), std::string("/BOPosMatchQual.txt"));
155  dumpLut(m_boNegMatchQualLUT.get(), std::string("/BONegMatchQual.txt"));
156  dumpLut(m_foPosMatchQualLUT.get(), std::string("/EOPosMatchQual.txt"));
157  dumpLut(m_foNegMatchQualLUT.get(), std::string("/EONegMatchQual.txt"));
158  //dumpLut(m_brlSingleMatchQualLUT.get(), std::string("/BmtfSingleMatchQual.txt"));
159  dumpLut(m_ovlPosSingleMatchQualLUT.get(), std::string("/OmtfPosSingleMatchQual.txt"));
160  dumpLut(m_ovlNegSingleMatchQualLUT.get(), std::string("/OmtfNegSingleMatchQual.txt"));
161  dumpLut(m_fwdPosSingleMatchQualLUT.get(), std::string("/EmtfPosSingleMatchQual.txt"));
162  dumpLut(m_fwdNegSingleMatchQualLUT.get(), std::string("/EmtfNegSingleMatchQual.txt"));
163 
164 }
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 168 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, hgcalDigitizer_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.

169 {
170  const L1TMuonGlobalParamsRcd& microGMTParamsRcd = iSetup.get<L1TMuonGlobalParamsRcd>();
171  edm::ESHandle<L1TMuonGlobalParams> microGMTParamsHandle;
172  microGMTParamsRcd.get(microGMTParamsHandle);
173 
174  microGMTParamsHelper = std::make_unique<L1TMuonGlobalParamsHelper>(*microGMTParamsHandle.product());
175  if (!microGMTParamsHelper) {
176  edm::LogError("L1TMicroGMTLUTDumper") << "Could not retrieve parameters from Event Setup" << std::endl;
177  }
178 
179  int fwVersion = microGMTParamsHelper->fwVersion();
181 
186 
193 
198  //m_brlSingleMatchQualLUT = l1t::MicroGMTMatchQualLUTFactory::create(microGMTParamsHelper->brlSingleMatchQualLUT(), cancel_t::bmtf_bmtf, fwVersion);
203 }
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 130 of file L1TMicroGMTLUTDumper.cc.

References l1t::MicroGMTLUT::save().

130  {
131  std::ofstream fStream(m_foldername+oName);
132  lut->save(fStream);
133  fStream.close();
134 }
void save(std::ofstream &output)
Definition: MicroGMTLUT.cc:15
void L1TMicroGMTLUTDumper::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 207 of file L1TMicroGMTLUTDumper.cc.

References DEFINE_FWK_MODULE.

208 {
209 }

Member Data Documentation

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

Definition at line 74 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 83 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 88 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 87 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 80 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 85 of file L1TMicroGMTLUTDumper.cc.

std::string L1TMicroGMTLUTDumper::m_foldername
private

Definition at line 70 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 90 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 89 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 82 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 95 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 94 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 78 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 77 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 84 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 81 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 93 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 92 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 72 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 75 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 69 of file L1TMicroGMTLUTDumper.cc.