CMS 3D CMS Logo

HGCalTileIndex.cc
Go to the documentation of this file.
4 
5 //#define EDM_ML_DEBUG
6 
7 int32_t HGCalTileIndex::tileIndex(int32_t layer, int32_t ring, int32_t phi) {
8  int32_t id(0);
12  return id;
13 }
14 
15 int32_t HGCalTileIndex::tileLayer(int32_t id) {
17 }
18 
19 int32_t HGCalTileIndex::tileRing(int32_t id) {
21 }
22 
23 int32_t HGCalTileIndex::tilePhi(int32_t id) {
25 }
26 
27 int32_t HGCalTileIndex::tileCassette(int32_t iphi, int32_t phiOffset, int32_t nphiCassette, int32_t cassettes) {
28  int32_t cassette(0);
29  if (nphiCassette > 1) {
30  cassette = (iphi - phiOffset) / nphiCassette;
31  if (cassette < 0)
32  cassette += cassettes;
33  else if (cassette >= cassettes)
34  cassette = cassettes - 1;
35  }
36  return (cassette + 1);
37 }
38 
39 int32_t HGCalTileIndex::tileProperty(int32_t type, int32_t sipm) {
42 }
43 
44 int32_t HGCalTileIndex::tileType(int32_t property) {
46 }
47 
48 int32_t HGCalTileIndex::tileSiPM(int32_t property) {
50 }
51 
52 int32_t HGCalTileIndex::tilePack(int32_t ly, int32_t k1, int32_t k2) {
53  return (
57 }
58 
59 std::tuple<int32_t, int32_t, int32_t> HGCalTileIndex::tileUnpack(int32_t index) {
60  int32_t ly =
63  int32_t k2 = (index % HGCalProperty::kHGCalTilePack);
64  return std::make_tuple(ly, k1, k2);
65 }
66 
67 bool HGCalTileIndex::tileExist(const int32_t* hex, int32_t zside, int32_t iphi) {
68  int32_t phi(iphi - 1);
69  if (zside > 0) {
73  }
77  bool ok = (hex[iw] & (1 << ibit));
78 #ifdef EDM_ML_DEBUG
79  edm::LogVerbatim("HGCalGeom") << "tileExist::Phi " << iphi << " " << phi << " zside " << zside << " jj|iw|ibit " << jj
80  << "|" << iw << "|" << ibit << " hex " << std::hex << hex[iw] << std::dec << " OK "
81  << ok;
82 #endif
83  return ok;
84 }
85 
86 bool HGCalTileIndex::tileFineExist(const int32_t* hex, int32_t zside, int32_t iphi) {
87  int32_t phi(iphi - 1);
88  if (zside > 0) {
92  }
96  bool ok = (hex[iw] & (1 << ibit));
97 #ifdef EDM_ML_DEBUG
98  edm::LogVerbatim("HGCalGeom") << "tileFineexist::Phi " << iphi << " " << phi << " zside " << zside << " jj|iw|ibit "
99  << jj << "|" << iw << "|" << ibit << " hex " << std::hex << hex[iw] << std::dec
100  << " OK " << ok;
101 #endif
102  return ok;
103 }
phiOffset
Definition: gmt_cfi.py:37
Log< level::Info, true > LogVerbatim
constexpr int32_t kHGCalTilePhisBy3
Definition: HGCalProperty.h:52
int32_t tileRing(int32_t index)
int32_t tileType(int32_t)
int zside(DetId const &)
bool tileFineExist(const int32_t *hex, int32_t zside, int32_t phi)
constexpr int32_t kHGCalFineTilePhis
Definition: HGCalProperty.h:49
int32_t tileIndex(int32_t layer, int32_t ring, int32_t phi)
constexpr int32_t kHGCalRingMask
Definition: HGCalProperty.h:35
constexpr int32_t kHGCalFineTilePhisBy3
Definition: HGCalProperty.h:54
int32_t tilePhi(int32_t index)
int32_t tileCassette(int32_t, int32_t, int32_t, int32_t)
std::tuple< int32_t, int32_t, int32_t > tileUnpack(int32_t index)
constexpr int32_t kHGCalTilePhis
Definition: HGCalProperty.h:48
constexpr int32_t kHGCalPhiOffset
Definition: HGCalProperty.h:32
constexpr int32_t kHGCalLayerOffset
Definition: HGCalProperty.h:29
constexpr int32_t kHGCalFineTilePhisBy2
Definition: HGCalProperty.h:53
int32_t tilePack(int32_t ly, int32_t k1, int32_t k2)
constexpr int32_t kHGCalTilePhisWord
Definition: HGCalProperty.h:50
int32_t tileProperty(int32_t, int32_t)
bool tileExist(const int32_t *hex, int32_t zside, int32_t phi)
constexpr int32_t kHGCalOffsetSiPM
Definition: HGCalProperty.h:45
constexpr int32_t kHGCalTilePhisBy2
Definition: HGCalProperty.h:51
constexpr int32_t kHGCalLayerMask
Definition: HGCalProperty.h:30
constexpr int32_t kHGCalPhiMask
Definition: HGCalProperty.h:33
constexpr int32_t kHGCalRingOffset
Definition: HGCalProperty.h:34
int32_t tileSiPM(int32_t)
constexpr int32_t kHGCalTilePack
Definition: HGCalProperty.h:46
constexpr int32_t kHGCalFactor
Definition: HGCalProperty.h:37
int32_t tileLayer(int32_t index)
constexpr int32_t kHGCalOffsetType
Definition: HGCalProperty.h:44