#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, 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) const |
void | normalise (unsigned int nPdfAddrBits) |
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 |
const OMTFConfiguration * | myOmtfConfig |
vector3D | pdfAllRef |
Key | theKey |
Pattern kinematical identification (iEta,iPt,iCharge) More... | |
Friends | |
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 51 of file GoldenPattern.h.
typedef std::vector<int> GoldenPattern::vector1D |
Definition at line 48 of file GoldenPattern.h.
typedef std::vector<vector1D> GoldenPattern::vector2D |
Definition at line 49 of file GoldenPattern.h.
typedef std::vector<vector2D> GoldenPattern::vector3D |
Definition at line 50 of file GoldenPattern.h.
|
inline |
Definition at line 56 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.
|
inline |
|
inline |
bool GoldenPattern::hasCounts | ( | ) |
Check if the GP has any counts in any of referecne layers;.
Definition at line 213 of file GoldenPattern.cc.
References meanDistPhi, and meanDistPhiCounts.
|
inline |
Definition at line 58 of file GoldenPattern.h.
Referenced by OMTFProcessor::addGP(), XMLConfigWriter::writeGPData(), and OMTFPatternMaker::writeMergedGPs().
|
inline |
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 149 of file GoldenPattern.cc.
References OMTFConfiguration::getRefToLogicNumber(), createfilelist::int, cmsBatch::log, meanDistPhi, meanDistPhiCounts, OMTFConfiguration::minPdfVal(), myOmtfConfig, OMTFConfiguration::nPdfAddrBits(), OMTFConfiguration::nPdfValBits(), pdfAllRef, and funct::pow().
|
inline |
Definition at line 70 of file GoldenPattern.h.
References Key::operator<<, MillePedeFileConverter_cfg::out, and reset().
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
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.
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 41 of file GoldenPattern.cc.
References meanDistPhi.
void GoldenPattern::reset | ( | void | ) |
Reset contents of all data vectors, keeping the vectors size.
Definition at line 132 of file GoldenPattern.cc.
References meanDistPhi, meanDistPhiCounts, myOmtfConfig, OMTFConfiguration::nLayers(), OMTFConfiguration::nPdfAddrBits(), OMTFConfiguration::nRefLayers(), and pdfAllRef.
Referenced by OMTFPatternMaker::endJob(), and OMTFPatternMaker::writeMergedGPs().
|
inline |
Definition at line 60 of file GoldenPattern.h.
Referenced by OMTFProcessor::averagePatterns(), and OMTFProcessor::configure().
|
inline |
Definition at line 66 of file GoldenPattern.h.
Referenced by OMTFProcessor::configure(), and OMTFProcessor::shiftGP().
|
friend |
Definition at line 85 of file GoldenPattern.cc.
|
private |
Mean positions in each layer First index: measurement layer number Second index: refLayer number
Definition at line 118 of file GoldenPattern.h.
Referenced by hasCounts(), normalise(), operator<<(), process1Layer1RefLayer(), propagateRefPhi(), and reset().
|
private |
Vector holding number of counts. Used for making the patterns
Definition at line 122 of file GoldenPattern.h.
Referenced by addCount(), hasCounts(), normalise(), operator<<(), and reset().
|
private |
Definition at line 124 of file GoldenPattern.h.
Referenced by addCount(), normalise(), process1Layer1RefLayer(), 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 113 of file GoldenPattern.h.
Referenced by addCount(), normalise(), operator<<(), process1Layer1RefLayer(), and reset().
|
private |
Pattern kinematical identification (iEta,iPt,iCharge)
Definition at line 107 of file GoldenPattern.h.
Referenced by operator<<().