CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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 ()
 

Private Member Functions

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

Private Attributes

std::shared_ptr
< MicroGMTAbsoluteIsolationCheckLUT
m_absIsoCheckMemLUT
 
std::shared_ptr
< MicroGMTExtrapolationLUT
m_bEtaExtrapolationLUT
 
std::shared_ptr
< MicroGMTMatchQualLUT
m_boNegMatchQualLUT
 
std::shared_ptr
< MicroGMTMatchQualLUT
m_boPosMatchQualLUT
 
std::shared_ptr
< MicroGMTExtrapolationLUT
m_bPhiExtrapolationLUT
 
std::shared_ptr
< MicroGMTExtrapolationLUT
m_fEtaExtrapolationLUT
 
std::string m_foldername
 
std::shared_ptr
< MicroGMTMatchQualLUT
m_foNegMatchQualLUT
 
std::shared_ptr
< MicroGMTMatchQualLUT
m_foPosMatchQualLUT
 
std::shared_ptr
< MicroGMTExtrapolationLUT
m_fPhiExtrapolationLUT
 
std::shared_ptr
< MicroGMTMatchQualLUT
m_fwdNegSingleMatchQualLUT
 
std::shared_ptr
< MicroGMTMatchQualLUT
m_fwdPosSingleMatchQualLUT
 
std::shared_ptr
< MicroGMTCaloIndexSelectionLUT
m_idxSelMemEtaLUT
 
std::shared_ptr
< MicroGMTCaloIndexSelectionLUT
m_idxSelMemPhiLUT
 
std::shared_ptr
< MicroGMTExtrapolationLUT
m_oEtaExtrapolationLUT
 
std::shared_ptr
< MicroGMTExtrapolationLUT
m_oPhiExtrapolationLUT
 
std::shared_ptr
< MicroGMTMatchQualLUT
m_ovlNegSingleMatchQualLUT
 
std::shared_ptr
< MicroGMTMatchQualLUT
m_ovlPosSingleMatchQualLUT
 
std::shared_ptr
< MicroGMTRankPtQualLUT
m_rankLUT
 
std::shared_ptr
< MicroGMTRelativeIsolationCheckLUT
m_relIsoCheckMemLUT
 
std::unique_ptr
< L1TMuonGlobalParams
microGMTParams
 

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 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.

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

Definition at line 117 of file L1TMicroGMTLUTDumper.cc.

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

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 138 of file L1TMicroGMTLUTDumper.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

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

167 {
168  const L1TMuonGlobalParamsRcd& microGMTParamsRcd = iSetup.get<L1TMuonGlobalParamsRcd>();
169  edm::ESHandle<L1TMuonGlobalParams> microGMTParamsHandle;
170  microGMTParamsRcd.get(microGMTParamsHandle);
171 
172  microGMTParams = std::unique_ptr<L1TMuonGlobalParams>(new L1TMuonGlobalParams(*microGMTParamsHandle.product()));
173  if (!microGMTParams) {
174  edm::LogError("L1TMicroGMTLUTDumper") << "Could not retrieve parameters from Event Setup" << std::endl;
175  }
176 
177  int fwVersion = microGMTParams->fwVersion();
178  m_rankLUT = MicroGMTRankPtQualLUTFactory::create(microGMTParams->sortRankLUTPath(), fwVersion, microGMTParams->sortRankLUTPtFactor(), microGMTParams->sortRankLUTQualFactor());
179 
184 
191 
196  //m_brlSingleMatchQualLUT = l1t::MicroGMTMatchQualLUTFactory::create(microGMTParams->brlSingleMatchQualLUTPath(), microGMTParams->brlSingleMatchQualLUTMaxDR(), cancel_t::bmtf_bmtf, fwVersion);
197  m_ovlPosSingleMatchQualLUT = l1t::MicroGMTMatchQualLUTFactory::create(microGMTParams->ovlPosSingleMatchQualLUTPath(), microGMTParams->ovlPosSingleMatchQualLUTMaxDR(), cancel_t::omtf_omtf_pos, fwVersion);
198  m_ovlNegSingleMatchQualLUT = l1t::MicroGMTMatchQualLUTFactory::create(microGMTParams->ovlNegSingleMatchQualLUTPath(), microGMTParams->ovlNegSingleMatchQualLUTMaxDR(), cancel_t::omtf_omtf_neg, fwVersion);
199  m_fwdPosSingleMatchQualLUT = l1t::MicroGMTMatchQualLUTFactory::create(microGMTParams->fwdPosSingleMatchQualLUTPath(), microGMTParams->fwdPosSingleMatchQualLUTMaxDR(), cancel_t::emtf_emtf_pos, fwVersion);
200  m_fwdNegSingleMatchQualLUT = l1t::MicroGMTMatchQualLUTFactory::create(microGMTParams->fwdNegSingleMatchQualLUTPath(), microGMTParams->fwdNegSingleMatchQualLUTMaxDR(), cancel_t::emtf_emtf_neg, fwVersion);
201 }
std::shared_ptr< MicroGMTExtrapolationLUT > m_oEtaExtrapolationLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_fwdPosSingleMatchQualLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_boNegMatchQualLUT
std::shared_ptr< MicroGMTMatchQualLUT > m_foPosMatchQualLUT
static ReturnType create(const std::string &filename, const double maxDR, cancel_t cancelType, const int fwVersion)
std::shared_ptr< MicroGMTExtrapolationLUT > m_bPhiExtrapolationLUT
std::shared_ptr< MicroGMTCaloIndexSelectionLUT > m_idxSelMemPhiLUT
std::shared_ptr< MicroGMTRankPtQualLUT > m_rankLUT
void get(HolderT &iHolder) const
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::unique_ptr< L1TMuonGlobalParams > microGMTParams
std::shared_ptr< MicroGMTMatchQualLUT > m_boPosMatchQualLUT
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
SurfaceDeformation * create(int type, const std::vector< double > &params)
void L1TMicroGMTLUTDumper::dumpLut ( MicroGMTLUT lut,
const std::string &  oName 
)
private

Definition at line 128 of file L1TMicroGMTLUTDumper.cc.

References l1t::MicroGMTLUT::save().

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

Member Data Documentation

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

Definition at line 72 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 81 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 86 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 85 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 78 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 83 of file L1TMicroGMTLUTDumper.cc.

std::string L1TMicroGMTLUTDumper::m_foldername
private

Definition at line 68 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 88 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 87 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 80 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 93 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 92 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 76 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 75 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 82 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 79 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 91 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 90 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 70 of file L1TMicroGMTLUTDumper.cc.

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

Definition at line 73 of file L1TMicroGMTLUTDumper.cc.

std::unique_ptr<L1TMuonGlobalParams> L1TMicroGMTLUTDumper::microGMTParams
private

Definition at line 67 of file L1TMicroGMTLUTDumper.cc.