#include <GoldenPattern.h>
Public Types | |
typedef std::pair< int, bool > | layerResult |
typedef std::vector< int > | vector1D |
typedef std::vector< vector1D > | vector2D |
typedef std::vector< vector2D > | vector3D |
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... | |
const vector2D & | getMeanDistPhi () const |
const vector3D & | getPdf () const |
GoldenPattern (const Key &aKey) | |
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) const |
void | normalise () |
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) |
void | reset () |
Reset contents of all data vectors, keeping the vectors size. More... | |
void | setMeanDistPhi (const vector2D &aMeanDistPhi) |
void | setPdf (const vector3D &aPdf) |
Private Attributes | |
vector2D | meanDistPhi |
vector2D | meanDistPhiCounts |
vector3D | pdfAllRef |
Key | theKey |
Pattern kinematical identification (iEta,iPt,iCharge) More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const GoldenPattern &aPattern) |
Definition at line 45 of file GoldenPattern.h.
typedef std::pair<int,bool> GoldenPattern::layerResult |
Definition at line 52 of file GoldenPattern.h.
typedef std::vector<int> GoldenPattern::vector1D |
Definition at line 49 of file GoldenPattern.h.
typedef std::vector<vector1D> GoldenPattern::vector2D |
Definition at line 50 of file GoldenPattern.h.
typedef std::vector<vector2D> GoldenPattern::vector3D |
Definition at line 51 of file GoldenPattern.h.
|
inline |
Definition at line 57 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 54 of file GoldenPattern.cc.
References funct::abs(), OMTFConfiguration::instance(), meanDistPhiCounts, ecaldqm::binning::nPhiBins, OMTFConfiguration::nPhiBins, and pdfAllRef.
|
inline |
Definition at line 63 of file GoldenPattern.h.
References meanDistPhi.
Referenced by OMTFProcessor::averagePatterns().
|
inline |
Definition at line 65 of file GoldenPattern.h.
References pdfAllRef.
Referenced by OMTFProcessor::shiftGP().
bool GoldenPattern::hasCounts | ( | ) |
Check if the GP has any counts in any of referecne layers;.
Definition at line 222 of file GoldenPattern.cc.
References meanDistPhi, and meanDistPhiCounts.
|
inline |
Definition at line 59 of file GoldenPattern.h.
References theKey.
Referenced by OMTFProcessor::addGP(), XMLConfigWriter::writeGPData(), and OMTFPatternMaker::writeMergedGPs().
|
inline |
Definition at line 69 of file GoldenPattern.h.
References meanDistPhi.
Referenced by XMLConfigWriter::writeGPData().
void GoldenPattern::normalise | ( | ) |
Normalise event counts in mean dist phi, and pdf vectors to get the real values of meand dist phi and probability
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 154 of file GoldenPattern.cc.
References cmsHarvester::index, OMTFConfiguration::instance(), dqm-mbProfile::log, meanDistPhi, meanDistPhiCounts, OMTFConfiguration::nPdfValBits, pdfAllRef, funct::pow(), and OMTFConfiguration::refToLogicNumber.
|
inline |
Definition at line 71 of file GoldenPattern.h.
References pdfAllRef.
Referenced by OMTFProcessor::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
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 13 of file GoldenPattern.cc.
References funct::abs(), OMTFConfiguration::instance(), meanDistPhi, ecaldqm::binning::nPhiBins, and pdfAllRef.
int GoldenPattern::propagateRefPhi | ( | int | phiRef, |
int | etaRef, | ||
unsigned int | iRefLayer | ||
) |
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
Definition at line 45 of file GoldenPattern.cc.
References meanDistPhi.
void GoldenPattern::reset | ( | void | ) |
Reset contents of all data vectors, keeping the vectors size.
Definition at line 136 of file GoldenPattern.cc.
References OMTFConfiguration::instance(), meanDistPhi, meanDistPhiCounts, and pdfAllRef.
Referenced by OMTFPatternMaker::endJob(), and OMTFPatternMaker::writeMergedGPs().
|
inline |
Definition at line 61 of file GoldenPattern.h.
References meanDistPhi.
Referenced by OMTFProcessor::averagePatterns(), XMLConfigReader::buildGP(), and OMTFProcessor::configure().
|
inline |
Definition at line 67 of file GoldenPattern.h.
References pdfAllRef.
Referenced by XMLConfigReader::buildGP(), OMTFProcessor::configure(), and OMTFProcessor::shiftGP().
|
friend |
Definition at line 90 of file GoldenPattern.cc.
|
private |
Mean positions in each layer First index: measurement layer number Second index: refLayer number
Definition at line 117 of file GoldenPattern.h.
Referenced by getMeanDistPhi(), hasCounts(), meanDistPhiValue(), normalise(), operator<<(), process1Layer1RefLayer(), propagateRefPhi(), reset(), and setMeanDistPhi().
|
private |
Vector holding number of counts. Used for making the patterns
Definition at line 121 of file GoldenPattern.h.
Referenced by addCount(), hasCounts(), normalise(), operator<<(), and reset().
|
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 112 of file GoldenPattern.h.
Referenced by addCount(), getPdf(), normalise(), operator<<(), pdfValue(), process1Layer1RefLayer(), reset(), and setPdf().
|
private |
Pattern kinematical identification (iEta,iPt,iCharge)
Definition at line 106 of file GoldenPattern.h.
Referenced by key(), and operator<<().