Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:06

0001 #ifndef L1T_OmtfP1_GoldenPatternWithStat_H
0002 #define L1T_OmtfP1_GoldenPatternWithStat_H
0003 
0004 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPattern.h"
0005 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/OMTFinput.h"
0006 #include <vector>
0007 
0008 class OMTFConfiguration;
0009 
0010 //////////////////////////////////
0011 // Golden Pattern
0012 //////////////////////////////////
0013 
0014 class GoldenPatternWithStat : public GoldenPatternWithThresh {
0015 public:
0016   static const unsigned int STAT_BINS = 1;  //TODO change value if needed
0017   typedef boost::multi_array<int, 4> StatArrayType;
0018 
0019   GoldenPatternWithStat(const Key& aKey, unsigned int nLayers, unsigned int nRefLayers, unsigned int nPdfAddrBits);
0020 
0021   GoldenPatternWithStat(const Key& aKey, const OMTFConfiguration* omtfConfig);
0022 
0023   ~GoldenPatternWithStat() override{};
0024 
0025   virtual void updateStat(
0026       unsigned int iLayer, unsigned int iRefLayer, unsigned int iBin, unsigned int what, double value);
0027 
0028   friend std::ostream& operator<<(std::ostream& out, const GoldenPatternWithStat& aPattern);
0029 
0030   friend class PatternOptimizerBase;
0031   friend class PatternGenerator;
0032 
0033   void iniStatisitics(unsigned int pdfBinsCnt, unsigned int statBins) {
0034     statistics.resize(boost::extents[pdfAllRef.size()][pdfAllRef[0].size()][pdfBinsCnt][statBins]);
0035   }
0036 
0037   const StatArrayType& getStatistics() const { return statistics; }
0038 
0039   void setKeyPt(unsigned int pt) { theKey.thePt = pt; }
0040 
0041   void setKeyNumber(unsigned int number) { theKey.theNumber = number; }
0042 
0043 private:
0044   StatArrayType statistics;
0045 };
0046 //////////////////////////////////
0047 //////////////////////////////////
0048 #endif