File indexing completed on 2024-04-06 12:15:09
0001 #ifndef GeometryHGCalGeometry_HGCalMouseBite_h
0002 #define GeometryHGCalGeometry_HGCalMouseBite_h
0003
0004 #include "DataFormats/ForwardDetId/interface/HFNoseDetId.h"
0005 #include "DataFormats/ForwardDetId/interface/HGCSiliconDetId.h"
0006 #include "Geometry/HGCalCommonData/interface/HGCalDDDConstants.h"
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008
0009 #include <vector>
0010
0011
0012
0013 class HGCalMouseBite {
0014 public:
0015 HGCalMouseBite(const HGCalDDDConstants& hgc, bool waferRotate = false);
0016 template <class T>
0017 bool exclude(const T& id) {
0018 int iuv = (100 * id.cellU() + id.cellV());
0019 bool check = ((id.type() == 0) ? (std::binary_search(rejectFine_.begin(), rejectFine_.end(), iuv))
0020 : (std::binary_search(rejectCoarse_.begin(), rejectCoarse_.end(), iuv)));
0021 #ifdef EDM_ML_DEBUG
0022 edm::LogVerbatim("HGCalGeom") << "HGCalMouseBite:: DetId " << id
0023 << " is checked to be in the list of masked ID's with flag " << check;
0024 #endif
0025 return check;
0026 }
0027
0028 private:
0029 std::vector<int> rejectFine_, rejectCoarse_;
0030 };
0031
0032 #endif