27 throw cms::Exception(
"TotemT2Segmentation") <<
"Failed to retrieve list of bins for TotemT2DetId " <<
detid <<
".";
28 if (static_cast<size_t>(
hist->GetXaxis()->GetNbins()) !=
nbinsx_ ||
29 static_cast<size_t>(
hist->GetYaxis()->GetNbins()) !=
nbinsy_)
31 <<
"Trying to fill a summary plot with invalid number of bins. " 32 <<
"Should be of dimension (" <<
nbinsx_ <<
", " <<
nbinsy_ <<
"), but has dimension (" 33 <<
hist->GetXaxis()->GetNbins() <<
", " <<
hist->GetYaxis()->GetNbins() <<
").";
39 std::vector<std::pair<short, short> >
bins;
45 const float max_half_angle_rad = 0.3;
52 const float tile_angle_rad = (180 - 45. / 2 - (
detid.plane() % 2 ? 45 : 0) - (
detid.channel() * 90)) *
M_PI / 180.;
58 if (ell_rad_norm < 1. && ell_rad_norm >= 0.1 &&
59 fabs(std::atan2(
iy - oy,
ix - ox) - tile_angle_rad) < max_half_angle_rad)
constexpr int32_t ceil(float num)
TotemT2Segmentation(size_t, size_t)
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
void fill(TH2D *, const TotemT2DetId &, double value=1.)
static constexpr uint32_t maxChannel
static constexpr uint32_t maxPlane
static const uint32_t maxArm
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
std::unordered_map< TotemT2DetId, std::vector< std::pair< short, short > > > bins_map_
std::vector< std::pair< short, short > > computeBins(const TotemT2DetId &detid) const
Power< A, B >::type pow(const A &a, const B &b)