#include <GoldenPattern.h>
Public Types | |
typedef std::pair< int, bool > | layerResult |
typedef boost::multi_array< short, 3 > | meanDistPhiArrayType |
typedef boost::multi_array< PdfValueType, 3 > | pdfArrayType |
typedef std::vector< int > | vector1D |
typedef std::vector< vector1D > | vector2D |
typedef std::vector< vector2D > | vector3D |
Public Types inherited from GoldenPatternBase | |
typedef boost::multi_array< GoldenPatternResult, 2 > | resultsArrayType |
typedef std::vector< int > | vector1D |
Public Member Functions | |
void | addCount (unsigned int iRefLayer, unsigned int iLayer, const int refPhi, const OMTFinput::vector1D &layerHits) |
Add a single count to the relevant pdf bin in three dimensions. More... | |
int | getDistPhiBitShift (unsigned int iLayer, unsigned int iRefLayer) const override |
virtual const meanDistPhiArrayType & | getMeanDistPhi () const |
const vector2D & | getMeanDistPhi () const |
virtual const pdfArrayType & | getPdf () const |
const vector3D & | getPdf () const |
GoldenPattern (const Key &aKey, unsigned int nLayers, unsigned int nRefLayers, unsigned int nPdfAddrBits) | |
GoldenPattern (const Key &aKey, const OMTFConfiguration *omtfConfig) | |
GoldenPattern (const Key &aKey, const OMTFConfiguration *omtfConfig) | |
bool | hasCounts () |
Check if the GP has any counts in any of referecne layers;. More... | |
Key | key () const |
int | meanDistPhiValue (unsigned int iLayer, unsigned int iRefLayer, int refLayerPhiB=0) const override |
int | meanDistPhiValue (unsigned int iLayer, unsigned int iRefLayer) const |
void | normalise (unsigned int nPdfAddrBits) |
PdfValueType | pdfValue (unsigned int iLayer, unsigned int iRefLayer, unsigned int iBin, int refLayerPhiB=0) const override |
int | pdfValue (unsigned int iLayer, unsigned int iRefLayer, unsigned int iBin) const |
GoldenPattern::layerResult | process1Layer1RefLayer (unsigned int iRefLayer, unsigned int iLayer, const int refPhi, const OMTFinput::vector1D &layerHits) |
int | propagateRefPhi (int phiRef, int etaRef, unsigned int iRefLayer) override |
int | propagateRefPhi (int phiRef, int etaRef, unsigned int iRefLayer) |
virtual void | reset () |
Reset contents of all data vectors, keeping the vectors size. More... | |
void | reset () |
Reset contents of all data vectors, keeping the vectors size. More... | |
void | setDistPhiBitShift (int value, unsigned int iLayer, unsigned int iRefLayer) override |
virtual void | setMeanDistPhi (const meanDistPhiArrayType &aMeanDistPhi) |
void | setMeanDistPhi (const vector2D &aMeanDistPhi) |
void | setMeanDistPhiValue (int value, unsigned int iLayer, unsigned int iRefLayer, unsigned int paramIndex=0) override |
virtual void | setPdf (pdfArrayType &aPdf) |
void | setPdf (const vector3D &aPdf) |
void | setPdfValue (PdfValueType value, unsigned int iLayer, unsigned int iRefLayer, unsigned int iBin, int refLayerPhiB=0) override |
~GoldenPattern () override | |
Public Member Functions inherited from GoldenPatternBase | |
virtual void | finalise (unsigned int procIndx) |
last step of the event processing, before sorting and ghost busting More... | |
const OMTFConfiguration * | getConfig () const |
resultsArrayType & | getResults () |
GoldenPatternBase (const Key &aKey) | |
GoldenPatternBase (const Key &aKey, const OMTFConfiguration *omtfConfig) | |
virtual Key & | key () |
virtual StubResult | process1Layer1RefLayer (unsigned int iRefLayer, unsigned int iLayer, MuonStubPtrs1D layerStubs, const MuonStubPtr refStub) |
virtual void | setConfig (const OMTFConfiguration *omtfConfig) |
virtual | ~GoldenPatternBase () |
Protected Attributes | |
boost::multi_array< short, 2 > | distPhiBitShift |
meanDistPhiArrayType | meanDistPhi |
pdfArrayType | pdfAllRef |
Protected Attributes inherited from GoldenPatternBase | |
const OMTFConfiguration * | myOmtfConfig |
resultsArrayType | results |
Key | theKey |
Pattern kinematic identification (iEta,iPt,iCharge) More... | |
Private Attributes | |
vector2D | meanDistPhi |
vector2D | meanDistPhiCounts |
const OMTFConfiguration * | myOmtfConfig |
vector3D | pdfAllRef |
Key | theKey |
Pattern kinematical identification (iEta,iPt,iCharge) More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const GoldenPattern &aPattern) |
std::ostream & | operator<< (std::ostream &out, const GoldenPattern &aPattern) |
Definition at line 44 of file GoldenPattern.h.
typedef std::pair<int, bool> GoldenPattern::layerResult |
Definition at line 49 of file GoldenPattern.h.
typedef boost::multi_array<short, 3> GoldenPattern::meanDistPhiArrayType |
Definition at line 18 of file GoldenPattern.h.
typedef boost::multi_array<PdfValueType, 3> GoldenPattern::pdfArrayType |
Definition at line 17 of file GoldenPattern.h.
typedef std::vector<int> GoldenPattern::vector1D |
Definition at line 46 of file GoldenPattern.h.
typedef std::vector<vector1D> GoldenPattern::vector2D |
Definition at line 47 of file GoldenPattern.h.
typedef std::vector<vector2D> GoldenPattern::vector3D |
Definition at line 48 of file GoldenPattern.h.
|
inline |
Definition at line 54 of file GoldenPattern.h.
|
inline |
Definition at line 22 of file GoldenPattern.h.
References reset().
|
inline |
Definition at line 30 of file GoldenPattern.h.
References reset().
|
inlineoverride |
Definition at line 38 of file GoldenPattern.h.
void GoldenPattern::addCount | ( | unsigned int | iRefLayer, |
unsigned int | iLayer, | ||
const int | refPhi, | ||
const OMTFinput::vector1D & | layerHits | ||
) |
Add a single count to the relevant pdf bin in three dimensions.
For making the patterns take events with a single hit in each layer
Shift phiDist so it is in +-Pi range
Shift phidist, so 0 is at the middle of the range
Check if phiDist is within pdf range in -64 +63 U2 code Find more elegant way to check this.
Definition at line 50 of file GoldenPattern.cc.
References funct::abs(), OMTFConfiguration::getRefToLogicNumber(), meanDistPhiCounts, myOmtfConfig, OMTFConfiguration::nPdfAddrBits(), OMTFConfiguration::nPhiBins(), and pdfAllRef.
|
inlineoverridevirtual |
Implements GoldenPatternBase.
Definition at line 72 of file GoldenPattern.h.
References distPhiBitShift.
Referenced by XMLConfigWriter::writeGPData().
|
inlinevirtual |
|
inline |
Definition at line 60 of file GoldenPattern.h.
References meanDistPhi.
Referenced by OMTFProcessor< GoldenPatternType >::averagePatterns(), and XMLConfigWriter::writeGPData().
|
inlinevirtual |
|
inline |
Definition at line 62 of file GoldenPattern.h.
References pdfAllRef.
Referenced by OMTFProcessor< GoldenPatternType >::shiftGP().
bool GoldenPattern::hasCounts | ( | ) |
Check if the GP has any counts in any of referecne layers;.
Definition at line 226 of file GoldenPattern.cc.
References meanDistPhi, and meanDistPhiCounts.
|
inline |
Definition at line 56 of file GoldenPattern.h.
References theKey.
Referenced by OMTFProcessor< GoldenPatternType >::addGP(), PatternOptimizerBase::observeEventEnd(), XMLConfigWriter::writeGPData(), and OMTFPatternMaker::writeMergedGPs().
|
overridevirtual |
Implements GoldenPatternBase.
Definition at line 6 of file GoldenPattern.cc.
References meanDistPhi, myOmtfConfig, and OMTFConfiguration::nPdfAddrBits().
|
inline |
Definition at line 66 of file GoldenPattern.h.
References meanDistPhi.
Referenced by PatternGenerator::updateStat(), and XMLConfigWriter::writeGPData().
void GoldenPattern::normalise | ( | unsigned int | nPdfAddrBits | ) |
Normalise event counts in mean dist phi, and pdf vectors to get the real values of meand dist phi and probability. The pdf width is passed to this method, since the width stored in configuration is extended during the pattern making phase.
Mean dist phi
Probabilities. Normalise and change from float to integer values
If there are only a few counts in given measurement layer, set pdf value to 0
Digitisation Values remapped 0->std::pow(2,nPdfValBits) minPlog->0
Make sure digitised value is saved using nBitsVal bits
Shift pdf index by meanDistPhi
Definition at line 152 of file GoldenPattern.cc.
References OMTFConfiguration::getRefToLogicNumber(), createfilelist::int, dqm-mbProfile::log, meanDistPhi, meanDistPhiCounts, OMTFConfiguration::minPdfVal(), myOmtfConfig, OMTFConfiguration::nPdfAddrBits(), OMTFConfiguration::nPdfValBits(), pdfAllRef, and funct::pow().
|
inlineoverridevirtual |
|
inline |
Definition at line 68 of file GoldenPattern.h.
References pdfAllRef.
Referenced by OMTFProcessor< GoldenPatternType >::shiftGP(), and XMLConfigWriter::writeGPData().
GoldenPattern::layerResult GoldenPattern::process1Layer1RefLayer | ( | unsigned int | iRefLayer, |
unsigned int | iLayer, | ||
const int | refPhi, | ||
const OMTFinput::vector1D & | layerHits | ||
) |
Process single measurement layer with a single ref layer Method should be thread safe
Select hit closest to the mean of probability distribution in given layer
Check if phiDist is within pdf range -63 +63
Shift phidist, so 0 is at the middle of the range
Definition at line 13 of file GoldenPattern.cc.
References funct::abs(), meanDistPhi, myOmtfConfig, OMTFConfiguration::nPdfAddrBits(), OMTFConfiguration::nPhiBins(), and pdfAllRef.
|
overridevirtual |
Propagate phi from given reference layer to MB2 or ME2 expressed in integer MicroGMT scale: 1.1/2.61*240 = 101
Implements GoldenPatternBase.
|
virtual |
Propagate phi from given reference layer to MB2 or ME2 ME2 is used if eta of reference hit is larger than 1.1 expressed in ingerer MicroGMT scale: 1.1/2.61*240 = 101
Implements GoldenPatternBase.
Definition at line 43 of file GoldenPattern.cc.
References meanDistPhi.
|
virtual |
Reset contents of all data vectors, keeping the vectors size.
void GoldenPattern::reset | ( | void | ) |
Reset contents of all data vectors, keeping the vectors size.
Definition at line 136 of file GoldenPattern.cc.
References meanDistPhi, meanDistPhiCounts, myOmtfConfig, OMTFConfiguration::nLayers(), OMTFConfiguration::nPdfAddrBits(), OMTFConfiguration::nRefLayers(), and pdfAllRef.
Referenced by OMTFPatternMaker::endJob(), and GoldenPattern().
|
inlineoverridevirtual |
Implements GoldenPatternBase.
Definition at line 76 of file GoldenPattern.h.
References distPhiBitShift, and relativeConstraints::value.
|
inlinevirtual |
|
inline |
Definition at line 58 of file GoldenPattern.h.
References meanDistPhi.
Referenced by OMTFProcessor< GoldenPatternType >::averagePatterns(), and OMTFProcessor< GoldenPatternType >::configure().
|
inlineoverridevirtual |
Implements GoldenPatternBase.
Definition at line 57 of file GoldenPattern.h.
References meanDistPhi, and relativeConstraints::value.
|
inlinevirtual |
|
inline |
Definition at line 64 of file GoldenPattern.h.
References pdfAllRef.
Referenced by OMTFProcessor< GoldenPatternType >::configure(), and OMTFProcessor< GoldenPatternType >::shiftGP().
|
inlineoverridevirtual |
Implements GoldenPatternBase.
Definition at line 64 of file GoldenPattern.h.
References pdfAllRef, and relativeConstraints::value.
|
friend |
Definition at line 89 of file GoldenPattern.cc.
|
friend |
Definition at line 89 of file GoldenPattern.cc.
|
protected |
distPhi resolution can be reduced to reduce the number of bit on the LUT input distPhi = distPhi<<distPhiBitShift[layer]refLayer First index: measurement layer number Second index: refLayer number
Definition at line 106 of file GoldenPattern.h.
Referenced by getDistPhiBitShift(), and setDistPhiBitShift().
|
protected |
Mean positions in each layer First index: measurement layer number Second index: refLayer number Third index: index = 0 - a0, index = 1 - a1 for the linear fit meanDistPhi = a0 + a1 * phi_b
Definition at line 100 of file GoldenPattern.h.
|
private |
Mean positions in each layer First index: measurement layer number Second index: refLayer number
Definition at line 114 of file GoldenPattern.h.
Referenced by getMeanDistPhi(), hasCounts(), meanDistPhiValue(), normalise(), operator<<(), process1Layer1RefLayer(), propagateRefPhi(), reset(), setMeanDistPhi(), and setMeanDistPhiValue().
|
private |
Vector holding number of counts. Used for making the patterns
Definition at line 118 of file GoldenPattern.h.
Referenced by addCount(), hasCounts(), normalise(), operator<<(), and reset().
|
private |
Definition at line 120 of file GoldenPattern.h.
Referenced by addCount(), meanDistPhiValue(), normalise(), process1Layer1RefLayer(), and reset().
|
protected |
Distributions for all reference layers First index: measurement layer number Second index: refLayer number Third index: pdf bin number within layer
Definition at line 94 of file GoldenPattern.h.
|
private |
Distributions for all reference layers First index: measurement layer number Second index: refLayer number Third index: pdf bin number within layer
Definition at line 109 of file GoldenPattern.h.
Referenced by addCount(), getPdf(), GoldenPatternWithStat::iniStatisitics(), normalise(), operator<<(), pdfValue(), process1Layer1RefLayer(), reset(), setPdf(), and setPdfValue().
|
private |
Pattern kinematical identification (iEta,iPt,iCharge)
Definition at line 103 of file GoldenPattern.h.
Referenced by key(), operator<<(), GoldenPatternWithStat::setKeyNumber(), and GoldenPatternWithStat::setKeyPt().