#include <OMTFProcessor.h>
Public Types | |
typedef std::map< Key, OMTFResult > | resultsMap |
Public Member Functions | |
void | averagePatterns (int charge) |
bool | configure (const OMTFConfiguration *omtfParams, const L1TMuonOverlapParams *omtfPatterns) |
Fill GP map with patterns from CondFormats object. More... | |
void | fillCounts (unsigned int iProcessor, const OMTFinput &aInput, const SimTrack *aSimMuon) |
std::vector< l1t::RegionalMuonCand > | getFinalcandidates (unsigned int iProcessor, l1t::tftype mtfType, const AlgoMuons &algoCands) override |
const std::map< Key, GoldenPattern * > & | getPatterns () const |
Return map of GoldenPatterns. More... | |
AlgoMuons | ghostBust (AlgoMuons refHitCands, int charge=0) override |
OMTFProcessor () | |
OMTFProcessor (OMTFConfiguration *omtfConfig, const edm::ParameterSet &edmCfg, edm::EventSetup const &evSetup, const L1TMuonOverlapParams *omtfPatterns) | |
OMTFProcessor (OMTFConfiguration *omtfConfig, const edm::ParameterSet &edmCfg, edm::EventSetup const &evSetup, GoldenPatternVec< GoldenPatternType > &&gps) | |
void | printInfo () const override |
const std::vector< OMTFProcessor::resultsMap > & | processInput (unsigned int iProcessor, const OMTFinput &aInput) |
void | processInput (unsigned int iProcessor, l1t::tftype mtfType, const OMTFinput &aInput) override |
Fill GP vec with patterns from CondFormats object. More... | |
std::vector< l1t::RegionalMuonCand > | run (unsigned int iProcessor, l1t::tftype mtfType, int bx, OMTFinputMaker *inputMaker, std::vector< std::unique_ptr< IOMTFEmulationObserver > > &observers) override |
void | setGhostBuster (IGhostBuster *ghostBuster) override |
allows to use other IGhostBuster implementation than the default one More... | |
virtual void | setPtAssignment (PtAssignmentBase *ptAssignment) |
virtual void | setSorter (SorterBase< GoldenPatternType > *sorter) |
allows to use other sorter implementation than the default one More... | |
AlgoMuons | sortResults (unsigned int iProcessor, l1t::tftype mtfType, int charge=0) override |
~OMTFProcessor () | |
~OMTFProcessor () override | |
Public Member Functions inherited from ProcessorBase< GoldenPatternType > | |
virtual void | addGP (GoldenPatternType *aGP) |
Add GoldenPattern to pattern vec. More... | |
virtual bool | configure (OMTFConfiguration *omtfParams, const L1TMuonOverlapParams *omtfPatterns) |
Fill GP vec with patterns from CondFormats object. More... | |
const std::vector< OMTFConfiguration::PatternPt > & | getPatternPtRange () const |
virtual GoldenPatternVec< GoldenPatternType > & | getPatterns () |
Return vector of GoldenPatterns. More... | |
virtual void | initPatternPtRange (bool firstPatFrom0) |
ProcessorBase (OMTFConfiguration *omtfConfig, const L1TMuonOverlapParams *omtfPatterns) | |
ProcessorBase (OMTFConfiguration *omtfConfig, GoldenPatternVec< GoldenPatternType > &&gps) | |
virtual | ~ProcessorBase () |
Public Member Functions inherited from IProcessorEmulator | |
virtual | ~IProcessorEmulator () |
Private Member Functions | |
bool | addGP (GoldenPattern *aGP) |
bool | checkHitPatternValidity (unsigned int hits) override |
void | fillInputRange (unsigned int iProcessor, unsigned int iCone, const OMTFinput &aInput) |
void | fillInputRange (unsigned int iProcessor, unsigned int iCone, unsigned int iRefLayer, unsigned int iHit) |
virtual void | init (const edm::ParameterSet &edmCfg, edm::EventSetup const &evSetup) |
void | resetConfiguration () |
Reset all configuration parameters. More... | |
OMTFinput::vector1D | restrictInput (unsigned int iProcessor, unsigned int iCone, unsigned int iLayer, const OMTFinput::vector1D &layerHits) |
void | shiftGP (GoldenPattern *aGP, const GoldenPattern::vector2D &meanDistPhiNew, const GoldenPattern::vector2D &meanDistPhiOld) |
Private Attributes | |
std::unique_ptr< IGhostBuster > | ghostBuster |
const OMTFConfiguration * | myOmtfConfig |
std::vector< OMTFProcessor::resultsMap > | myResults |
PtAssignmentBase * | ptAssignment = nullptr |
std::unique_ptr< SorterBase< GoldenPatternType > > | sorter |
std::map< Key, GoldenPattern * > | theGPs |
Map holding Golden Patterns. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ProcessorBase< GoldenPatternType > | |
virtual MuonStubPtrs1D | restrictInput (unsigned int iProcessor, unsigned int iCone, unsigned int iLayer, const OMTFinput &input) |
Protected Attributes inherited from ProcessorBase< GoldenPatternType > | |
const OMTFConfiguration * | myOmtfConfig |
std::vector< OMTFConfiguration::PatternPt > | patternPts |
GoldenPatternVec< GoldenPatternType > | theGPs |
vector holding Golden Patterns More... | |
Definition at line 19 of file OMTFProcessor.h.
typedef std::map<Key, OMTFResult> OMTFProcessor< GoldenPatternType >::resultsMap |
Definition at line 21 of file OMTFProcessor.h.
|
inline |
Definition at line 23 of file OMTFProcessor.h.
OMTFProcessor< GoldenPatternType >::~OMTFProcessor | ( | ) |
Definition at line 22 of file OMTFProcessor.cc.
References OMTFProcessor< GoldenPatternType >::theGPs.
OMTFProcessor< GoldenPatternType >::OMTFProcessor | ( | OMTFConfiguration * | omtfConfig, |
const edm::ParameterSet & | edmCfg, | ||
edm::EventSetup const & | evSetup, | ||
const L1TMuonOverlapParams * | omtfPatterns | ||
) |
Definition at line 31 of file OMTFProcessor.cc.
References OMTFProcessor< GoldenPatternType >::init().
OMTFProcessor< GoldenPatternType >::OMTFProcessor | ( | OMTFConfiguration * | omtfConfig, |
const edm::ParameterSet & | edmCfg, | ||
edm::EventSetup const & | evSetup, | ||
GoldenPatternVec< GoldenPatternType > && | gps | ||
) |
Definition at line 40 of file OMTFProcessor.cc.
References OMTFProcessor< GoldenPatternType >::init().
|
override |
|
private |
Add GoldenPattern to pattern map. If GP key already exists in map, a new entry is ignored
Definition at line 96 of file OMTFProcessor.cc.
References OMTFResult::configure(), Exception, GoldenPattern::key(), OMTFProcessor< GoldenPatternType >::myOmtfConfig, OMTFProcessor< GoldenPatternType >::myResults, and OMTFProcessor< GoldenPatternType >::theGPs.
Referenced by OMTFProcessor< GoldenPatternType >::configure().
void OMTFProcessor< GoldenPatternType >::averagePatterns | ( | int | charge | ) |
Average patterns. Use same meanDistPhi for two patterns neighboring in pt code. Averaging is made saparately fo each charge
Previously pt codes were going by steps of 1, now this is not the case
Definition at line 114 of file OMTFProcessor.cc.
References ALCARECOTkAlJpsiMuMu_cff::charge, GoldenPattern::getMeanDistPhi(), caHitNtupletGeneratorKernels::if(), OMTFProcessor< GoldenPatternType >::myOmtfConfig, OMTFConfiguration::nLayers(), OMTFConfiguration::nRefLayers(), GoldenPattern::setMeanDistPhi(), OMTFProcessor< GoldenPatternType >::shiftGP(), OMTFProcessor< GoldenPatternType >::theGPs, and Key::thePtCode.
Referenced by OMTFPatternMaker::endJob().
|
overrideprivatevirtual |
Check if the hit pattern of given OMTF candite is not on the list of invalid hit patterns. Invalid hit patterns provode very little to efficiency, but gives high contribution to rate. Candidate with invalid hit patterns is assigned quality=0. Currently the list of invalid patterns is hardcoded. This has to be read from configuration.
FIXME: read the list from configuration so this can be controlled at runtime.
Implements IProcessorEmulator.
Definition at line 252 of file OMTFProcessor.cc.
References hfClusterShapes_cfi::hits.
bool OMTFProcessor< GoldenPatternType >::configure | ( | const OMTFConfiguration * | omtfParams, |
const L1TMuonOverlapParams * | omtfPatterns | ||
) |
Fill GP map with patterns from CondFormats object.
Mean dist phi data
Pdf data
Definition at line 36 of file OMTFProcessor.cc.
References OMTFProcessor< GoldenPatternType >::addGP(), L1TMuonOverlapParams::chargeLUT(), l1t::LUT::data(), Phase2L1GMT::etaLUT, L1TMuonOverlapParams::etaLUT(), l1tTowerCalibrationProducer_cfi::iEta, createfilelist::int, L1TMuonOverlapParams::meanDistPhiLUT(), OMTFProcessor< GoldenPatternType >::myOmtfConfig, OMTFProcessor< GoldenPatternType >::myResults, OMTFConfiguration::nGoldenPatterns(), OMTFConfiguration::nLayers(), OMTFConfiguration::nPdfAddrBits(), l1t::LUT::nrBitsData(), OMTFConfiguration::nRefLayers(), OMTFConfiguration::nTestRefHits(), L1TMuonOverlapParams::pdfLUT(), Phase2L1GMT::ptLUT, L1TMuonOverlapParams::ptLUT(), OMTFProcessor< GoldenPatternType >::resetConfiguration(), GoldenPattern::setMeanDistPhi(), and GoldenPattern::setPdf().
Referenced by OMTFPatternMaker::beginRun(), and OMTFReconstruction::beginRun().
void OMTFProcessor< GoldenPatternType >::fillCounts | ( | unsigned int | iProcessor, |
const OMTFinput & | aInput, | ||
const SimTrack * | aSimMuon | ||
) |
Fill counts for a GoldenPattern of this processor unit. Pattern key is selcted according to the SimTrack parameters.
Stupid conersion. Have to go through PAC pt scale, as we later shift resulting pt code by +1
Number of reference hits to be checked.
Definition at line 287 of file OMTFProcessor.cc.
References funct::abs(), OMTFConfiguration::getBendingLayers(), OMTFinput::getLayerData(), OMTFinput::getRefHits(), OMTFConfiguration::getRefHitsDefs(), OMTFConfiguration::getRefToLogicNumber(), caHitNtupletGeneratorKernels::if(), RefHitDef::iInput, RPCConst::iptFromPt(), RefHitDef::iRefLayer, RefHitDef::iRegion, CoreSimTrack::momentum(), OMTFProcessor< GoldenPatternType >::myOmtfConfig, OMTFConfiguration::nLayers(), OMTFConfiguration::nRefHits(), RPCConst::ptFromIpt(), OMTFProcessor< GoldenPatternType >::restrictInput(), AlignmentTrackSelector_cfi::theCharge, OMTFProcessor< GoldenPatternType >::theGPs, and CoreSimTrack::type().
Referenced by OMTFPatternMaker::analyze().
|
private |
Fill map of used inputs. FIXME: using hack from OMTFConfiguration
|
private |
|
overridevirtual |
Implements IProcessorEmulator.
Definition at line 69 of file OMTFProcessor.cc.
References funct::abs(), l1t::RegionalMuonCand::hwPt(), mps_fire::i, RPCpg::pts, quality, mps_fire::result, l1t::RegionalMuonCand::setHwEta(), l1t::RegionalMuonCand::setHwPhi(), l1t::RegionalMuonCand::setHwPt(), l1t::RegionalMuonCand::setHwQual(), l1t::RegionalMuonCand::setHwSign(), l1t::RegionalMuonCand::setHwSignValid(), l1t::RegionalMuonCand::setTFIdentifiers(), and l1t::RegionalMuonCand::setTrackAddress().
const std::map< Key, GoldenPattern * > & OMTFProcessor< GoldenPatternType >::getPatterns | ( | ) | const |
Return map of GoldenPatterns.
Definition at line 207 of file OMTFProcessor.cc.
References OMTFProcessor< GoldenPatternType >::theGPs.
Referenced by OMTFPatternMaker::beginRun(), OMTFPatternMaker::endJob(), and OMTFPatternMaker::writeMergedGPs().
|
inlineoverridevirtual |
Implements IProcessorEmulator.
Definition at line 63 of file OMTFProcessor.h.
References ALCARECOTkAlJpsiMuMu_cff::charge, and OMTFProcessor< GoldenPatternType >::ghostBuster.
|
privatevirtual |
Definition at line 52 of file OMTFProcessor.cc.
Referenced by OMTFProcessor< GoldenPatternType >::OMTFProcessor().
|
overridevirtual |
Implements IProcessorEmulator.
Definition at line 421 of file OMTFProcessor.cc.
References ProcessorBase< GoldenPatternType >::printInfo().
const std::vector< OMTFProcessor::resultsMap > & OMTFProcessor< GoldenPatternType >::processInput | ( | unsigned int | iProcessor, |
const OMTFinput & | aInput | ||
) |
Process input data from a single event Input data is represented by hits in logic layers expressed in local coordinates Vector index: logic region number Map key: GoldenPattern key
Number of reference hits to be checked.
Definition at line 210 of file OMTFProcessor.cc.
References OMTFConfiguration::getBendingLayers(), OMTFinput::getLayerData(), OMTFinput::getRefHits(), OMTFConfiguration::getRefHitsDefs(), OMTFConfiguration::getRefToLogicNumber(), caHitNtupletGeneratorKernels::if(), RefHitDef::iInput, RefHitDef::iRefLayer, RefHitDef::iRegion, OMTFProcessor< GoldenPatternType >::myOmtfConfig, OMTFProcessor< GoldenPatternType >::myResults, OMTFConfiguration::nLayers(), OMTFConfiguration::nRefHits(), OMTFConfiguration::nTestRefHits(), OMTFProcessor< GoldenPatternType >::restrictInput(), and OMTFProcessor< GoldenPatternType >::theGPs.
Referenced by OMTFReconstruction::getProcessorCandidates().
|
overridevirtual |
Fill GP vec with patterns from CondFormats object.
Process input data from a single event Input data is represented by hits in logic layers expressed in local coordinates
Number of reference hits to be checked.
Implements IProcessorEmulator.
Definition at line 293 of file OMTFProcessor.cc.
References OMTFinput::getMuonStub(), OMTFinput::getRefHits(), RefHitDef::iInput, RefHitDef::iRefLayer, RefHitDef::iRegion, and mps_fire::result.
|
privatevirtual |
Reset all configuration parameters.
Reimplemented from ProcessorBase< GoldenPatternType >.
Definition at line 28 of file OMTFProcessor.cc.
References OMTFProcessor< GoldenPatternType >::myResults, and OMTFProcessor< GoldenPatternType >::theGPs.
Referenced by OMTFProcessor< GoldenPatternType >::configure().
|
private |
Remove hits whis are outside input range for given processor and cone
Definition at line 270 of file OMTFProcessor.cc.
References OMTFConfiguration::getConnections(), OMTFProcessor< GoldenPatternType >::myOmtfConfig, and OMTFConfiguration::nPhiBins().
Referenced by OMTFProcessor< GoldenPatternType >::fillCounts(), and OMTFProcessor< GoldenPatternType >::processInput().
|
overridevirtual |
Implements IProcessorEmulator.
Definition at line 380 of file OMTFProcessor.cc.
References OMTFinputMaker::buildInputForProcessor(), l1GtPatternGenerator_cfi::bx, and input.
|
inlineoverridevirtual |
allows to use other IGhostBuster implementation than the default one
Implements IProcessorEmulator.
Definition at line 76 of file OMTFProcessor.h.
References OMTFProcessor< GoldenPatternType >::ghostBuster.
|
inlinevirtual |
Definition at line 78 of file OMTFProcessor.h.
References OMTFProcessor< GoldenPatternType >::ptAssignment.
|
inlinevirtual |
allows to use other sorter implementation than the default one
Definition at line 73 of file OMTFProcessor.h.
|
private |
Shift pdf indexes by differecne between averaged and original meanDistPhi
Shift pdfs by differecne between original menaDistPhi, and the averaged value
Definition at line 183 of file OMTFProcessor.cc.
References GoldenPattern::getPdf(), OMTFProcessor< GoldenPatternType >::myOmtfConfig, OMTFConfiguration::nLayers(), OMTFConfiguration::nPdfAddrBits(), OMTFConfiguration::nRefLayers(), GoldenPattern::pdfValue(), and GoldenPattern::setPdf().
Referenced by OMTFProcessor< GoldenPatternType >::averagePatterns().
|
overridevirtual |
Implements IProcessorEmulator.
Definition at line 285 of file OMTFProcessor.cc.
References ALCARECOTkAlJpsiMuMu_cff::charge.
|
private |
Definition at line 101 of file OMTFProcessor.h.
Referenced by OMTFProcessor< GoldenPatternType >::ghostBust(), and OMTFProcessor< GoldenPatternType >::setGhostBuster().
|
private |
Configuration of the algorithm. This object does not contain the patterns data.
Definition at line 86 of file OMTFProcessor.h.
Referenced by OMTFProcessor< GoldenPatternType >::addGP(), OMTFProcessor< GoldenPatternType >::averagePatterns(), OMTFProcessor< GoldenPatternType >::configure(), OMTFProcessor< GoldenPatternType >::fillCounts(), OMTFProcessor< GoldenPatternType >::processInput(), OMTFProcessor< GoldenPatternType >::restrictInput(), and OMTFProcessor< GoldenPatternType >::shiftGP().
|
private |
Map holding results on current event data for each GP. Reference hit number is isued as a vector index.
Definition at line 82 of file OMTFProcessor.h.
Referenced by OMTFProcessor< GoldenPatternType >::addGP(), OMTFProcessor< GoldenPatternType >::configure(), OMTFProcessor< GoldenPatternType >::processInput(), and OMTFProcessor< GoldenPatternType >::resetConfiguration().
|
private |
Definition at line 104 of file OMTFProcessor.h.
Referenced by OMTFProcessor< GoldenPatternType >::setPtAssignment().
|
private |
Definition at line 99 of file OMTFProcessor.h.
|
private |
Map holding Golden Patterns.
Definition at line 77 of file OMTFProcessor.h.
Referenced by OMTFProcessor< GoldenPatternType >::addGP(), OMTFProcessor< GoldenPatternType >::averagePatterns(), OMTFProcessor< GoldenPatternType >::fillCounts(), OMTFProcessor< GoldenPatternType >::getPatterns(), OMTFProcessor< GoldenPatternType >::processInput(), OMTFProcessor< GoldenPatternType >::resetConfiguration(), and OMTFProcessor< GoldenPatternType >::~OMTFProcessor().