Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 /****************************************************************************
0002  *
0003  * This is a part of TOTEM offline software.
0004  * Author:
0005  *   Laurent Forthomme
0006  *
0007  ****************************************************************************/
0008 
0009 #ifndef DQM_CTPPS_TotemT2Segmentation_h
0010 #define DQM_CTPPS_TotemT2Segmentation_h
0011 
0012 #include "DataFormats/CTPPSDetId/interface/TotemT2DetId.h"
0013 
0014 #include <unordered_map>
0015 #include <vector>
0016 
0017 class TH2D;
0018 
0019 class TotemT2Segmentation {
0020 public:
0021   explicit TotemT2Segmentation(size_t, size_t);
0022 
0023   void fill(TH2D*, const TotemT2DetId&, double value = 1.);
0024 
0025 private:
0026   std::vector<std::pair<short, short> > computeBins(const TotemT2DetId& detid) const;
0027 
0028   const size_t nbinsx_;
0029   const size_t nbinsy_;
0030 
0031   std::unordered_map<TotemT2DetId, std::vector<std::pair<short, short> > > bins_map_;
0032 };
0033 
0034 #endif