CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Friends
GoldenPatternWithStat Class Reference

#include <GoldenPatternWithStat.h>

Inheritance diagram for GoldenPatternWithStat:
GoldenPatternWithThresh GoldenPattern GoldenPatternBase

Public Types

typedef boost::multi_array
< float, 4 > 
StatArrayType
 
- Public Types inherited from GoldenPattern
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< vector1Dvector2D
 
typedef std::vector< vector2Dvector3D
 
- Public Types inherited from GoldenPatternBase
typedef boost::multi_array
< GoldenPatternResult, 2 > 
resultsArrayType
 
typedef std::vector< int > vector1D
 

Public Member Functions

const StatArrayTypegetStatistics () const
 
 GoldenPatternWithStat (const Key &aKey, unsigned int nLayers, unsigned int nRefLayers, unsigned int nPdfAddrBits)
 
 GoldenPatternWithStat (const Key &aKey, const OMTFConfiguration *omtfConfig)
 
void iniStatisitics (unsigned int pdfBinsCnt, unsigned int statBins)
 
void setKeyNumber (unsigned int number)
 
void setKeyPt (unsigned int pt)
 
virtual void updateStat (unsigned int iLayer, unsigned int iRefLayer, unsigned int iBin, unsigned int what, double value)
 
 ~GoldenPatternWithStat () override
 
- Public Member Functions inherited from GoldenPatternWithThresh
PdfValueType getThreshold (unsigned int iRefLayer) const
 
 GoldenPatternWithThresh (const Key &aKey, unsigned int nLayers, unsigned int nRefLayers, unsigned int nPdfAddrBits)
 
 GoldenPatternWithThresh (const Key &aKey, const OMTFConfiguration *omtfConfig)
 
void setThreshold (unsigned int iRefLayer, PdfValueType treshold)
 
void setThresholds (std::vector< PdfValueType > &tresholds)
 
 ~GoldenPatternWithThresh () override
 
- Public Member Functions inherited from GoldenPattern
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 vector2DgetMeanDistPhi () const
 
virtual const pdfArrayTypegetPdf () const
 
const vector3DgetPdf () 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 OMTFConfigurationgetConfig () const
 
resultsArrayTypegetResults ()
 
 GoldenPatternBase (const Key &aKey)
 
 GoldenPatternBase (const Key &aKey, const OMTFConfiguration *omtfConfig)
 
virtual Keykey ()
 
virtual StubResult process1Layer1RefLayer (unsigned int iRefLayer, unsigned int iLayer, MuonStubPtrs1D layerStubs, const MuonStubPtr refStub)
 
virtual void setConfig (const OMTFConfiguration *omtfConfig)
 
virtual ~GoldenPatternBase ()
 

Static Public Attributes

static const unsigned int STAT_BINS = 1
 

Private Attributes

StatArrayType statistics
 

Friends

std::ostream & operator<< (std::ostream &out, const GoldenPatternWithStat &aPattern)
 
class PatternGenerator
 
class PatternOptimizerBase
 

Additional Inherited Members

- Protected Attributes inherited from GoldenPattern
boost::multi_array< short, 2 > distPhiBitShift
 
meanDistPhiArrayType meanDistPhi
 
pdfArrayType pdfAllRef
 
- Protected Attributes inherited from GoldenPatternBase
const OMTFConfigurationmyOmtfConfig
 
resultsArrayType results
 
Key theKey
 Pattern kinematic identification (iEta,iPt,iCharge) More...
 

Detailed Description

Definition at line 14 of file GoldenPatternWithStat.h.

Member Typedef Documentation

typedef boost::multi_array<float, 4> GoldenPatternWithStat::StatArrayType

Definition at line 17 of file GoldenPatternWithStat.h.

Constructor & Destructor Documentation

GoldenPatternWithStat::GoldenPatternWithStat ( const Key aKey,
unsigned int  nLayers,
unsigned int  nRefLayers,
unsigned int  nPdfAddrBits 
)

Definition at line 14 of file GoldenPatternWithStat.cc.

18  : GoldenPatternWithThresh(aKey, nLayers, nRefLayers, nPdfAddrBits),
19  //*8 is to have the 1024 bins for the phiDist, which allows to count the largest values for the low pT muons
20  statistics(boost::extents[nLayers][nRefLayers][(1 << nPdfAddrBits) * 8][STAT_BINS]){
21 
22  };
constexpr int nLayers
Definition: Config.h:73
static const unsigned int STAT_BINS
GoldenPatternWithThresh(const Key &aKey, unsigned int nLayers, unsigned int nRefLayers, unsigned int nPdfAddrBits)
GoldenPatternWithStat::GoldenPatternWithStat ( const Key aKey,
const OMTFConfiguration omtfConfig 
)

Definition at line 26 of file GoldenPatternWithStat.cc.

27  : GoldenPatternWithThresh(aKey, omtfConfig),
28  statistics(boost::extents[omtfConfig->nLayers()][omtfConfig->nRefLayers()][omtfConfig->nPdfBins()][STAT_BINS]){
29 
30  };
unsigned int nRefLayers() const
unsigned int nLayers() const
unsigned int nPdfBins() const
static const unsigned int STAT_BINS
GoldenPatternWithThresh(const Key &aKey, unsigned int nLayers, unsigned int nRefLayers, unsigned int nPdfAddrBits)
GoldenPatternWithStat::~GoldenPatternWithStat ( )
inlineoverride

Definition at line 23 of file GoldenPatternWithStat.h.

23 {};

Member Function Documentation

const StatArrayType& GoldenPatternWithStat::getStatistics ( ) const
inline

Definition at line 37 of file GoldenPatternWithStat.h.

References statistics.

Referenced by PatternGenerator::updateStat().

37 { return statistics; }
void GoldenPatternWithStat::iniStatisitics ( unsigned int  pdfBinsCnt,
unsigned int  statBins 
)
inline

Definition at line 33 of file GoldenPatternWithStat.h.

References GoldenPattern::pdfAllRef, and statistics.

33  {
34  statistics.resize(boost::extents[pdfAllRef.size()][pdfAllRef[0].size()][pdfBinsCnt][statBins]);
35  }
vector3D pdfAllRef
void GoldenPatternWithStat::setKeyNumber ( unsigned int  number)
inline

Definition at line 41 of file GoldenPatternWithStat.h.

References contentValuesFiles::number, GoldenPattern::theKey, and Key::theNumber.

41 { theKey.theNumber = number; }
unsigned int theNumber
Definition: GoldenPattern.h:37
Key theKey
Pattern kinematical identification (iEta,iPt,iCharge)
void GoldenPatternWithStat::setKeyPt ( unsigned int  pt)
inline

Definition at line 39 of file GoldenPatternWithStat.h.

References DiDispStaMuonMonitor_cfi::pt, GoldenPattern::theKey, and Key::thePt.

39 { theKey.thePt = pt; }
Key theKey
Pattern kinematical identification (iEta,iPt,iCharge)
unsigned int thePt
void GoldenPatternWithStat::updateStat ( unsigned int  iLayer,
unsigned int  iRefLayer,
unsigned int  iBin,
unsigned int  what,
double  value 
)
virtual

Definition at line 34 of file GoldenPatternWithStat.cc.

References statistics, and relativeConstraints::value.

Referenced by PatternGenerator::updateStat().

35  {
36  statistics[iLayer][iRefLayer][iBin][what] += value;
37  //LogTrace("l1tOmtfEventPrint")<<__FUNCTION__<<":"<<__LINE__<<" iLayer "<<iLayer<<" iRefLayer "<<iRefLayer<<" iBin "<<iBin<<" what "<<what<<" value "<<value<<std::endl;
38 }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const GoldenPatternWithStat aPattern 
)
friend
friend class PatternGenerator
friend

Definition at line 31 of file GoldenPatternWithStat.h.

friend class PatternOptimizerBase
friend

Definition at line 30 of file GoldenPatternWithStat.h.

Member Data Documentation

const unsigned int GoldenPatternWithStat::STAT_BINS = 1
static

Definition at line 16 of file GoldenPatternWithStat.h.

StatArrayType GoldenPatternWithStat::statistics
private

Definition at line 44 of file GoldenPatternWithStat.h.

Referenced by getStatistics(), iniStatisitics(), and updateStat().