Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-06 02:54:09

0001 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPatternWithStat.h"
0002 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPatternBase.h"
0003 
0004 #include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/OMTFConfiguration.h"
0005 #include "TH1.h"
0006 #include <string>
0007 
0008 #include "boost/multi_array/base.hpp"
0009 #include "boost/multi_array/subarray.hpp"
0010 
0011 ////////////////////////////////////////////////////
0012 ////////////////////////////////////////////////////
0013 
0014 GoldenPatternWithStat::GoldenPatternWithStat(const Key& aKey,
0015                                              unsigned int nLayers,
0016                                              unsigned int nRefLayers,
0017                                              unsigned int nPdfAddrBits)
0018     : GoldenPatternWithThresh(aKey, nLayers, nRefLayers, nPdfAddrBits),
0019       //*8 is to have the 1024 bins for the phiDist, which allows to count the largest values for the low pT muons
0020       statistics(boost::extents[nLayers][nRefLayers][(1 << nPdfAddrBits) * 8][STAT_BINS]){
0021 
0022       };
0023 
0024 ////////////////////////////////////////////////////
0025 ////////////////////////////////////////////////////
0026 GoldenPatternWithStat::GoldenPatternWithStat(const Key& aKey, const OMTFConfiguration* omtfConfig)
0027     : GoldenPatternWithThresh(aKey, omtfConfig),
0028       statistics(boost::extents[omtfConfig->nLayers()][omtfConfig->nRefLayers()][omtfConfig->nPdfBins()][STAT_BINS]){
0029 
0030       };
0031 
0032 ////////////////////////////////////////////////////
0033 ////////////////////////////////////////////////////
0034 void GoldenPatternWithStat::updateStat(
0035     unsigned int iLayer, unsigned int iRefLayer, unsigned int iBin, unsigned int what, double value) {
0036   statistics[iLayer][iRefLayer][iBin][what] += value;
0037   //LogTrace("l1tOmtfEventPrint")<<__FUNCTION__<<":"<<__LINE__<<" iLayer "<<iLayer<<" iRefLayer "<<iRefLayer<<" iBin "<<iBin<<" what "<<what<<" value "<<value<<std::endl;
0038 }