#include <OMTFProcessor.h>
Public Types | |
typedef std::map< Key, OMTFResult > | resultsMap |
Public Member Functions | |
void | averagePatterns (int charge) |
bool | configure (XMLConfigReader *aReader) |
Fill GP map with patterns from XML file. More... | |
bool | configure (std::shared_ptr< L1TMuonOverlapParams > omtfParams) |
Fill GP map with patterns from CondFormats object. More... | |
void | fillCounts (unsigned int iProcessor, const OMTFinput &aInput, const SimTrack *aSimMuon) |
const std::map< Key, GoldenPattern * > & | getPatterns () const |
Return map of GoldenPatterns. More... | |
OMTFProcessor (const edm::ParameterSet &cfg) | |
const std::vector < OMTFProcessor::resultsMap > & | processInput (unsigned int iProcessor, const OMTFinput &aInput) |
OMTFinput | shiftInput (unsigned int iProcessor, const OMTFinput &aInput) |
~OMTFProcessor () | |
Private Member Functions | |
bool | addGP (GoldenPattern *aGP) |
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) |
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 < OMTFProcessor::resultsMap > | myResults |
std::map< Key, GoldenPattern * > | theGPs |
Map holding Golden Patterns. More... | |
Definition at line 20 of file OMTFProcessor.h.
typedef std::map<Key,OMTFResult> OMTFProcessor::resultsMap |
Definition at line 24 of file OMTFProcessor.h.
OMTFProcessor::OMTFProcessor | ( | const edm::ParameterSet & | cfg | ) |
Definition at line 25 of file OMTFProcessor.cc.
References configure(), edm::ParameterSet::exists(), LaserDQM_cfg::fileNames, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), resetConfiguration(), and XMLConfigReader::setPatternsFile().
OMTFProcessor::~OMTFProcessor | ( | ) |
Definition at line 44 of file OMTFProcessor.cc.
References theGPs.
|
private |
Add GoldenPattern to pattern map. If GP key already exists in map, a new entry is ignored
Definition at line 130 of file OMTFProcessor.cc.
References Exception, GoldenPattern::key(), myResults, and theGPs.
Referenced by configure().
void OMTFProcessor::averagePatterns | ( | int | charge | ) |
Average patterns. Use same meanDistPhi for two patterns neighboring in pt code. Averaging is made saparately fo each charge
Definition at line 146 of file OMTFProcessor.cc.
References GoldenPattern::getMeanDistPhi(), OMTFConfiguration::nLayers, OMTFConfiguration::nRefLayers, GoldenPattern::setMeanDistPhi(), shiftGP(), theGPs, and Key::thePtCode.
Referenced by L1TMuonOverlapTrackProducer::endJob().
bool OMTFProcessor::configure | ( | XMLConfigReader * | aReader | ) |
Fill GP map with patterns from XML file.
Definition at line 58 of file OMTFProcessor.cc.
References addGP(), myResults, OMTFConfiguration::nTestRefHits, XMLConfigReader::readPatterns(), and resetConfiguration().
Referenced by L1TMuonOverlapTrackProducer::beginRun(), and OMTFProcessor().
bool OMTFProcessor::configure | ( | std::shared_ptr< L1TMuonOverlapParams > | omtfParams | ) |
Fill GP map with patterns from CondFormats object.
Mean dist phi data
Pdf data
Definition at line 73 of file OMTFProcessor.cc.
References addGP(), l1t::LUT::data(), myResults, OMTFConfiguration::nGoldenPatterns, OMTFConfiguration::nLayers, OMTFConfiguration::nPdfAddrBits, l1t::LUT::nrBitsData(), OMTFConfiguration::nRefLayers, OMTFConfiguration::nTestRefHits, resetConfiguration(), GoldenPattern::setMeanDistPhi(), and GoldenPattern::setPdf().
void OMTFProcessor::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.
Number of reference hits to be checked. Value read from XML configuration
Definition at line 346 of file OMTFProcessor.cc.
References funct::abs(), OMTFConfiguration::bendingLayers, KineDebug3::count(), OMTFinput::getLayerData(), OMTFinput::getRefHits(), RefHitDef::iInput, RPCConst::iptFromPt(), RefHitDef::iRefLayer, RefHitDef::iRegion, CoreSimTrack::momentum(), OMTFConfiguration::nLayers, OMTFConfiguration::nRefHits, OMTFConfiguration::refHitsDefs, OMTFConfiguration::refToLogicNumber, restrictInput(), theGPs, and CoreSimTrack::type().
|
private |
Fill map of used inputs. FIXME: using hack from OMTFConfiguration
|
private |
const std::map< Key, GoldenPattern * > & OMTFProcessor::getPatterns | ( | ) | const |
Return map of GoldenPatterns.
Definition at line 245 of file OMTFProcessor.cc.
References theGPs.
Referenced by L1TMuonOverlapTrackProducer::endJob(), and L1TMuonOverlapTrackProducer::writeMergedGPs().
const std::vector< OMTFProcessor::resultsMap > & OMTFProcessor::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. Value read from XML configuration
Definition at line 248 of file OMTFProcessor.cc.
References OMTFConfiguration::bendingLayers, KineDebug3::count(), OMTFinput::getLayerData(), OMTFinput::getRefHits(), RefHitDef::iInput, RefHitDef::iRefLayer, RefHitDef::iRegion, myResults, OMTFConfiguration::nLayers, OMTFConfiguration::nRefHits, OMTFConfiguration::nTestRefHits, OMTFConfiguration::refHitsDefs, OMTFConfiguration::refToLogicNumber, restrictInput(), and theGPs.
Referenced by L1TMuonOverlapTrackProducer::produce().
|
private |
Reset all configuration parameters.
Definition at line 51 of file OMTFProcessor.cc.
References myResults, and theGPs.
Referenced by configure(), and OMTFProcessor().
|
private |
Remove hits whis are outside input range for given processor and cone
Definition at line 328 of file OMTFProcessor.cc.
References OMTFConfiguration::connections, and OMTFConfiguration::nPhiBins.
Referenced by fillCounts(), and processInput().
|
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 220 of file OMTFProcessor.cc.
References GoldenPattern::getPdf(), OMTFConfiguration::nLayers, OMTFConfiguration::nPdfAddrBits, OMTFConfiguration::nRefLayers, GoldenPattern::pdfValue(), and GoldenPattern::setPdf().
Referenced by averagePatterns().
Shift phi values in input to fit the 11 bits range. For each processor the global phi beggining-511 is added, so it starts at -551
OMTFConfiguration::nPhiBins/2 to shift the minPhi to 0-nBins scale,
Definition at line 313 of file OMTFProcessor.cc.
References OMTFConfiguration::globalPhiStart(), OMTFConfiguration::nPhiBins, and OMTFinput::shiftMyPhi().
Referenced by L1TMuonOverlapTrackProducer::produce().
|
private |
Map holding results on current event data for each GP. Reference hit number is isued as a vector index.
Definition at line 103 of file OMTFProcessor.h.
Referenced by addGP(), configure(), processInput(), and resetConfiguration().
|
private |
Map holding Golden Patterns.
Definition at line 98 of file OMTFProcessor.h.
Referenced by addGP(), averagePatterns(), fillCounts(), getPatterns(), processInput(), resetConfiguration(), and ~OMTFProcessor().