#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... | |
int | extrapolateDtPhiB (const MuonStubPtr &refStub, const MuonStubPtr &targetStub, unsigned int targetLayer, const OMTFConfiguration *omtfConfig) |
int | extrapolateDtPhiBFixedPoint (const int &refLogicLayer, const int &refPhi, const int &refPhiB, unsigned int targetLayer, const int &targetStubPhi, const int &targetStubQuality, const int &targetStubEta, const int &targetStubR, const OMTFConfiguration *omtfConfig) |
int | extrapolateDtPhiBFloatPoint (const int &refLogicLayer, const int &refPhi, const int &refPhiB, unsigned int targetLayer, const int &targetStubPhi, const int &targetStubQuality, const int &targetStubEta, const int &targetStubR, const OMTFConfiguration *omtfConfig) |
Fill GP vec 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 |
void | loadExtrapolFactors (const std::string &filename) |
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, std::vector< std::unique_ptr< IOMTFEmulationObserver > > &observers) override |
std::vector< l1t::RegionalMuonCand > | run (unsigned int iProcessor, l1t::tftype mtfType, int bx, OMTFinputMaker *inputMaker, std::vector< std::unique_ptr< IOMTFEmulationObserver > > &observers) override |
void | saveExtrapolFactors () |
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::vector< std::vector< std::map< int, double > > > | extrapolFactors |
std::vector< std::vector< std::map< int, int > > > | extrapolFactorsNorm |
int | extrapolMultiplier = 128 |
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... | |
bool | useEndcapStubsRInExtr = false |
bool | useFloatingPointExtrapolation = false |
bool | useStubQualInExtr = false |
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 21 of file OMTFProcessor.cc.
References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and OMTFProcessor< GoldenPatternType >::theGPs.
OMTFProcessor< GoldenPatternType >::OMTFProcessor | ( | OMTFConfiguration * | omtfConfig, |
const edm::ParameterSet & | edmCfg, | ||
edm::EventSetup const & | evSetup, | ||
const L1TMuonOverlapParams * | omtfPatterns | ||
) |
Definition at line 35 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 44 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 95 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 113 of file OMTFProcessor.cc.
References ALCARECOTkAlJpsiMuMu_cff::charge, GoldenPattern::getMeanDistPhi(), ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::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 310 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 35 of file OMTFProcessor.cc.
References OMTFProcessor< GoldenPatternType >::addGP(), L1TMuonOverlapParams::chargeLUT(), l1t::LUT::data(), Phase2L1GMT::etaLUT, L1TMuonOverlapParams::etaLUT(), l1tPhase2CaloJetEmulator_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().
int OMTFProcessor< GoldenPatternType >::extrapolateDtPhiB | ( | const MuonStubPtr & | refStub, |
const MuonStubPtr & | targetStub, | ||
unsigned int | targetLayer, | ||
const OMTFConfiguration * | omtfConfig | ||
) |
Definition at line 564 of file OMTFProcessor.cc.
References OMTFProcessor< GoldenPatternType >::extrapolateDtPhiBFixedPoint(), OMTFProcessor< GoldenPatternType >::extrapolateDtPhiBFloatPoint(), and simOmtfPhase2Digis_cfi::useFloatingPointExtrapolation.
int OMTFProcessor< GoldenPatternType >::extrapolateDtPhiBFixedPoint | ( | const int & | refLogicLayer, |
const int & | refPhi, | ||
const int & | refPhiB, | ||
unsigned int | targetLayer, | ||
const int & | targetStubPhi, | ||
const int & | targetStubQuality, | ||
const int & | targetStubEta, | ||
const int & | targetStubR, | ||
const OMTFConfiguration * | omtfConfig | ||
) |
Definition at line 505 of file OMTFProcessor.cc.
References funct::abs(), SiPixelRawToDigiRegional_cfi::deltaPhi, LogTrace, scaleFactor, simOmtfPhase2Digis_cfi::useEndcapStubsRInExtr, and simOmtfPhase2Digis_cfi::useStubQualInExtr.
Referenced by OMTFProcessor< GoldenPatternType >::extrapolateDtPhiB().
int OMTFProcessor< GoldenPatternType >::extrapolateDtPhiBFloatPoint | ( | const int & | refLogicLayer, |
const int & | refPhi, | ||
const int & | refPhiB, | ||
unsigned int | targetLayer, | ||
const int & | targetStubPhi, | ||
const int & | targetStubQuality, | ||
const int & | targetStubEta, | ||
const int & | targetStubR, | ||
const OMTFConfiguration * | omtfConfig | ||
) |
Fill GP vec with patterns from CondFormats object.
Definition at line 349 of file OMTFProcessor.cc.
References funct::abs(), ztail::d, SiPixelRawToDigiRegional_cfi::deltaPhi, ProcConfigurationBase::dtPhiBUnitsRad(), nano_mu_digi_cff::float, LogTrace, OMTFConfiguration::omtfPhiUnit(), funct::tan(), simOmtfPhase2Digis_cfi::useEndcapStubsRInExtr, and simOmtfPhase2Digis_cfi::useStubQualInExtr.
Referenced by OMTFProcessor< GoldenPatternType >::extrapolateDtPhiB().
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 286 of file OMTFProcessor.cc.
References funct::abs(), OMTFConfiguration::getBendingLayers(), OMTFinput::getLayerData(), OMTFinput::getRefHits(), OMTFConfiguration::getRefHitsDefs(), OMTFConfiguration::getRefToLogicNumber(), ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::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 101 of file OMTFProcessor.cc.
References funct::abs(), l1t::RegionalMuonCand::hwPt(), l1t::RegionalMuonCand::hwPtUnconstrained(), l1t::omtf_pos, quality, mps_fire::result, l1t::RegionalMuonCand::setHwEta(), l1t::RegionalMuonCand::setHwPhi(), l1t::RegionalMuonCand::setHwPt(), l1t::RegionalMuonCand::setHwPtUnconstrained(), 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 206 of file OMTFProcessor.cc.
References OMTFProcessor< GoldenPatternType >::theGPs.
Referenced by OMTFPatternMaker::beginRun(), OMTFPatternMaker::endJob(), and OMTFPatternMaker::writeMergedGPs().
|
inlineoverridevirtual |
Implements IProcessorEmulator.
Definition at line 96 of file OMTFProcessor.h.
References ALCARECOTkAlJpsiMuMu_cff::charge, and OMTFProcessor< GoldenPatternType >::ghostBuster.
|
privatevirtual |
Definition at line 59 of file OMTFProcessor.cc.
References edm::ParameterSet::exists(), simOmtfDigis_cfi::extrapolFactorsFilename, contentValuesFiles::fullPath, edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, simOmtfPhase2Digis_cfi::useEndcapStubsRInExtr, simOmtfPhase2Digis_cfi::useFloatingPointExtrapolation, simOmtfPhase2Digis_cfi::useStubQualInExtr, and trackerHitRTTI::vector.
Referenced by OMTFProcessor< GoldenPatternType >::OMTFProcessor().
void OMTFProcessor< GoldenPatternType >::loadExtrapolFactors | ( | const std::string & | filename | ) |
Definition at line 893 of file OMTFProcessor.cc.
References corrVsCorr::filename, submitPVResolutionJobs::key, LogTrace, AlCaHLTBitMon_QueryRunRegistry::string, compare::tree, and relativeConstraints::value.
|
overridevirtual |
Implements IProcessorEmulator.
Definition at line 834 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 209 of file OMTFProcessor.cc.
References OMTFConfiguration::getBendingLayers(), OMTFinput::getLayerData(), OMTFinput::getRefHits(), OMTFConfiguration::getRefHitsDefs(), OMTFConfiguration::getRefToLogicNumber(), ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::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 |
Process input data from a single event Input data is represented by hits in logic layers expressed in local coordinates
Implements IProcessorEmulator.
Definition at line 592 of file OMTFProcessor.cc.
References OMTFinput::getMuonStub(), OMTFinput::getRefHits(), RefHitDef::iInput, RefHitDef::iRefLayer, RefHitDef::iRegion, LogTrace, mps_fire::result, and simOmtfPhase2Digis_cfi::useFloatingPointExtrapolation.
|
privatevirtual |
Reset all configuration parameters.
Reimplemented from ProcessorBase< GoldenPatternType >.
Definition at line 27 of file OMTFProcessor.cc.
References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, 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 269 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 762 of file OMTFProcessor.cc.
References OMTFinputMaker::buildInputForProcessor(), nano_mu_digi_cff::bx, submitPVResolutionJobs::count, input, LogTrace, and RPCpg::pts.
void OMTFProcessor< GoldenPatternType >::saveExtrapolFactors | ( | ) |
Definition at line 841 of file OMTFProcessor.cc.
References relativeConstraints::empty, to_string(), compare::tree, simOmtfPhase2Digis_cfi::useEndcapStubsRInExtr, simOmtfPhase2Digis_cfi::useStubQualInExtr, and MCScenario_CRAFT1_22X::write_xml().
|
inlineoverridevirtual |
allows to use other IGhostBuster implementation than the default one
Implements IProcessorEmulator.
Definition at line 109 of file OMTFProcessor.h.
References OMTFProcessor< GoldenPatternType >::ghostBuster.
|
inlinevirtual |
Definition at line 111 of file OMTFProcessor.h.
References OMTFProcessor< GoldenPatternType >::ptAssignment.
Referenced by OmtfEmulation::addObservers().
|
inlinevirtual |
allows to use other sorter implementation than the default one
Definition at line 106 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 182 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 343 of file OMTFProcessor.cc.
References ALCARECOTkAlJpsiMuMu_cff::charge.
|
private |
Definition at line 151 of file OMTFProcessor.h.
|
private |
Definition at line 152 of file OMTFProcessor.h.
|
private |
Definition at line 149 of file OMTFProcessor.h.
|
private |
Definition at line 137 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 140 of file OMTFProcessor.h.
Referenced by OMTFProcessor< GoldenPatternType >::setPtAssignment().
|
private |
Definition at line 135 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().
|
private |
Definition at line 143 of file OMTFProcessor.h.
|
private |
Definition at line 147 of file OMTFProcessor.h.
|
private |
Definition at line 142 of file OMTFProcessor.h.