File indexing completed on 2024-04-06 12:15:16
0001 #ifndef MTDTOPOLOGY_H
0002 #define MTDTOPOLOGY_H
0003
0004 #include "DataFormats/DetId/interface/DetId.h"
0005 #include "DataFormats/ForwardDetId/interface/ForwardSubdetector.h"
0006 #include "DataFormats/ForwardDetId/interface/MTDDetId.h"
0007 #include "DataFormats/ForwardDetId/interface/ETLDetId.h"
0008 #include <Geometry/CommonDetUnit/interface/GeomDet.h>
0009
0010 #include <vector>
0011 #include <string>
0012
0013 class MTDTopology {
0014 public:
0015 struct ETLfaceLayout {
0016 uint32_t idDiscSide_;
0017 uint32_t idDetType1_;
0018
0019 std::array<std::vector<int>, 2> start_copy_;
0020 std::array<std::vector<int>, 2> offset_;
0021 };
0022
0023 using ETLValues = std::vector<ETLfaceLayout>;
0024
0025 MTDTopology(const int& topologyMode, const ETLValues& etl);
0026
0027 int getMTDTopologyMode() const { return mtdTopologyMode_; }
0028
0029
0030
0031 static bool orderETLSector(const GeomDet*& gd1, const GeomDet*& gd2);
0032
0033
0034
0035
0036 size_t hshiftETL(const uint32_t detid, const int horizontalShift) const;
0037 size_t vshiftETL(const uint32_t detid, const int verticalShift, size_t& closest) const;
0038
0039 private:
0040 const int mtdTopologyMode_;
0041
0042 const ETLValues etlVals_;
0043
0044 static constexpr size_t failIndex_ =
0045 std::numeric_limits<unsigned int>::max();
0046 };
0047
0048 #endif