#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 (const 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, OMTFConfiguration *omtf_config) | |
const std::vector < OMTFProcessor::resultsMap > & | processInput (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 | |
OMTFConfiguration * | m_omtf_config |
std::vector < OMTFProcessor::resultsMap > | myResults |
std::map< Key, GoldenPattern * > | theGPs |
Map holding Golden Patterns. More... | |
Definition at line 21 of file OMTFProcessor.h.
typedef std::map<Key,OMTFResult> OMTFProcessor::resultsMap |
Definition at line 25 of file OMTFProcessor.h.
OMTFProcessor::OMTFProcessor | ( | const edm::ParameterSet & | cfg, |
OMTFConfiguration * | omtf_config | ||
) |
Definition at line 23 of file OMTFProcessor.cc.
References configure(), edm::ParameterSet::exists(), LaserDQM_cfg::fileNames, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), m_omtf_config, resetConfiguration(), and XMLConfigReader::setPatternsFile().
OMTFProcessor::~OMTFProcessor | ( | ) |
Definition at line 41 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 126 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
Previously pt codes were going by steps of 1, now this is not the case
Definition at line 142 of file OMTFProcessor.cc.
References GoldenPattern::getMeanDistPhi(), OMTFConfiguration::instance(), OMTFConfiguration::nLayers, OMTFConfiguration::nRefLayers, GoldenPattern::setMeanDistPhi(), shiftGP(), theGPs, and Key::thePtCode.
Referenced by OMTFPatternMaker::endJob().
bool OMTFProcessor::configure | ( | XMLConfigReader * | aReader | ) |
Fill GP map with patterns from XML file.
Definition at line 55 of file OMTFProcessor.cc.
References addGP(), OMTFConfiguration::instance(), myResults, XMLConfigReader::readPatterns(), and resetConfiguration().
Referenced by OMTFPatternMaker::beginRun(), OMTFReconstruction::beginRun(), and OMTFProcessor().
bool OMTFProcessor::configure | ( | const L1TMuonOverlapParams * | omtfParams | ) |
Fill GP map with patterns from CondFormats object.
Mean dist phi data
Pdf data
Definition at line 70 of file OMTFProcessor.cc.
References addGP(), L1TMuonOverlapParams::chargeLUT(), l1t::LUT::data(), L1TMuonOverlapParams::etaLUT(), OMTFConfiguration::instance(), L1TMuonOverlapParams::meanDistPhiLUT(), myResults, OMTFConfiguration::nGoldenPatterns, OMTFConfiguration::nLayers, OMTFConfiguration::nPdfAddrBits, l1t::LUT::nrBitsData(), OMTFConfiguration::nRefLayers, L1TMuonOverlapParams::pdfLUT(), L1TMuonOverlapParams::ptLUT(), 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.
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. Value read from XML configuration
Definition at line 313 of file OMTFProcessor.cc.
References funct::abs(), OMTFinput::getLayerData(), OMTFinput::getRefHits(), RefHitDef::iInput, OMTFConfiguration::instance(), RPCConst::iptFromPt(), RefHitDef::iRefLayer, RefHitDef::iRegion, CoreSimTrack::momentum(), OMTFConfiguration::nLayers, OMTFConfiguration::nRefHits, RPCConst::ptFromIpt(), OMTFConfiguration::refHitsDefs, restrictInput(), theGPs, and CoreSimTrack::type().
Referenced by OMTFPatternMaker::analyze().
|
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 235 of file OMTFProcessor.cc.
References theGPs.
Referenced by OMTFPatternMaker::beginRun(), OMTFPatternMaker::endJob(), and OMTFPatternMaker::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 238 of file OMTFProcessor.cc.
References OMTFinput::getLayerData(), OMTFinput::getRefHits(), RefHitDef::iInput, OMTFConfiguration::instance(), RefHitDef::iRefLayer, RefHitDef::iRegion, myResults, OMTFConfiguration::nLayers, OMTFConfiguration::nRefHits, OMTFConfiguration::nTestRefHits, OMTFConfiguration::refHitsDefs, restrictInput(), and theGPs.
Referenced by OMTFReconstruction::getProcessorCandidates().
|
private |
Reset all configuration parameters.
Definition at line 48 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 295 of file OMTFProcessor.cc.
References OMTFConfiguration::connections, OMTFConfiguration::instance(), 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 210 of file OMTFProcessor.cc.
References GoldenPattern::getPdf(), OMTFConfiguration::instance(), OMTFConfiguration::nLayers, OMTFConfiguration::nRefLayers, GoldenPattern::pdfValue(), and GoldenPattern::setPdf().
Referenced by averagePatterns().
|
private |
Definition at line 100 of file OMTFProcessor.h.
Referenced by OMTFProcessor().
|
private |
Map holding results on current event data for each GP. Reference hit number is isued as a vector index.
Definition at line 98 of file OMTFProcessor.h.
Referenced by addGP(), configure(), processInput(), and resetConfiguration().
|
private |
Map holding Golden Patterns.
Definition at line 93 of file OMTFProcessor.h.
Referenced by addGP(), averagePatterns(), fillCounts(), getPatterns(), processInput(), resetConfiguration(), and ~OMTFProcessor().