TotemT2Segmentation

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
/****************************************************************************
 *
 * This is a part of TOTEM offline software.
 * Author:
 *   Laurent Forthomme
 *
 ****************************************************************************/

#ifndef DQM_CTPPS_TotemT2Segmentation_h
#define DQM_CTPPS_TotemT2Segmentation_h

#include "DataFormats/CTPPSDetId/interface/TotemT2DetId.h"

#include <unordered_map>
#include <vector>

class TH2D;

class TotemT2Segmentation {
public:
  explicit TotemT2Segmentation(size_t, size_t);

  void fill(TH2D*, const TotemT2DetId&, double value = 1.);

private:
  std::vector<std::pair<short, short> > computeBins(const TotemT2DetId& detid) const;

  const size_t nbinsx_;
  const size_t nbinsy_;

  std::unordered_map<TotemT2DetId, std::vector<std::pair<short, short> > > bins_map_;
};

#endif