CMS 3D CMS Logo

MTDTopology.h
Go to the documentation of this file.
1 #ifndef MTDTOPOLOGY_H
2 #define MTDTOPOLOGY_H
3 
9 
10 #include <vector>
11 #include <string>
12 
13 class MTDTopology {
14 public:
15  struct ETLfaceLayout {
16  uint32_t idDiscSide_; // disc face identifier
17  uint32_t idDetType1_; // module type id identifier for first row
18 
19  std::array<std::vector<int>, 2> start_copy_; // start copy per row, first of type idDetType1_
20  std::array<std::vector<int>, 2> offset_; // offset per row, first of type idDetType1_
21  };
22 
23  using ETLValues = std::vector<ETLfaceLayout>;
24 
25  MTDTopology(const int& topologyMode, const ETLValues& etl);
26 
27  int getMTDTopologyMode() const { return mtdTopologyMode_; }
28 
29  // ETL topology navigation is based on a predefined order of dets in sector
30 
31  static bool orderETLSector(const GeomDet*& gd1, const GeomDet*& gd2);
32 
33  // navigation methods in ETL topology, provide the index of the det next to DetId for
34  // horizontal and vertical shifts in both directions, assuming the predefined order in a sector
35 
36  size_t hshiftETL(const uint32_t detid, const int horizontalShift) const;
37  size_t vshiftETL(const uint32_t detid, const int verticalShift, size_t& closest) const;
38 
39 private:
40  const int mtdTopologyMode_;
41 
43 
44  static constexpr size_t failIndex_ =
45  std::numeric_limits<unsigned int>::max(); // return out-of-range value for any failure
46 };
47 
48 #endif
MTDTopology::etlVals_
const ETLValues etlVals_
Definition: MTDTopology.h:42
MTDTopology::ETLValues
std::vector< ETLfaceLayout > ETLValues
Definition: MTDTopology.h:23
GeomDet
Definition: GeomDet.h:27
MTDTopology::failIndex_
static constexpr size_t failIndex_
Definition: MTDTopology.h:44
MTDTopology::hshiftETL
size_t hshiftETL(const uint32_t detid, const int horizontalShift) const
Definition: MTDTopology.cc:20
ETLDetId.h
MTDTopology::ETLfaceLayout
Definition: MTDTopology.h:15
MTDTopology::getMTDTopologyMode
int getMTDTopologyMode() const
Definition: MTDTopology.h:27
ForwardSubdetector.h
MTDTopology::ETLfaceLayout::start_copy_
std::array< std::vector< int >, 2 > start_copy_
Definition: MTDTopology.h:19
MTDTopology::ETLfaceLayout::offset_
std::array< std::vector< int >, 2 > offset_
Definition: MTDTopology.h:20
MTDTopology
Definition: MTDTopology.h:13
MTDTopology::vshiftETL
size_t vshiftETL(const uint32_t detid, const int verticalShift, size_t &closest) const
Definition: MTDTopology.cc:56
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
MTDDetId.h
GeomDet.h
DetId.h
MTDTopology::mtdTopologyMode_
const int mtdTopologyMode_
Definition: MTDTopology.h:40
MTDTopology::MTDTopology
MTDTopology(const int &topologyMode, const ETLValues &etl)
Definition: MTDTopology.cc:4
MTDTopology::orderETLSector
static bool orderETLSector(const GeomDet *&gd1, const GeomDet *&gd2)
Definition: MTDTopology.cc:7
MTDTopology::ETLfaceLayout::idDetType1_
uint32_t idDetType1_
Definition: MTDTopology.h:17
MTDTopology::ETLfaceLayout::idDiscSide_
uint32_t idDiscSide_
Definition: MTDTopology.h:16