File indexing completed on 2024-09-07 04:34:55
0001 #ifndef CalibFormats_SiStripObjects_SiStripDetInfo_h
0002 #define CalibFormats_SiStripObjects_SiStripDetInfo_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include <map>
0025 #include <vector>
0026 #include <cstdint>
0027
0028
0029 class SiStripDetInfo {
0030 public:
0031 struct DetInfo {
0032 DetInfo() {}
0033 DetInfo(unsigned short _nApvs, double _stripLength, float _thickness)
0034 : nApvs(_nApvs), stripLength(_stripLength), thickness(_thickness) {}
0035
0036 unsigned short nApvs;
0037 double stripLength;
0038 float thickness;
0039 };
0040
0041 SiStripDetInfo(std::map<uint32_t, DetInfo> iDetData, std::vector<uint32_t> iIDs) noexcept
0042 : detData_{std::move(iDetData)}, detIds_{std::move(iIDs)} {}
0043
0044 SiStripDetInfo() = default;
0045 ~SiStripDetInfo() = default;
0046
0047 SiStripDetInfo(const SiStripDetInfo&) = default;
0048 SiStripDetInfo& operator=(const SiStripDetInfo&) = default;
0049 SiStripDetInfo(SiStripDetInfo&&) = default;
0050 SiStripDetInfo& operator=(SiStripDetInfo&&) = default;
0051
0052
0053 const std::vector<uint32_t>& getAllDetIds() const noexcept { return detIds_; }
0054
0055 const std::pair<unsigned short, double> getNumberOfApvsAndStripLength(uint32_t detId) const;
0056
0057 const float& getThickness(uint32_t detId) const;
0058
0059 const std::map<uint32_t, DetInfo>& getAllData() const noexcept { return detData_; }
0060
0061
0062
0063
0064
0065 private:
0066
0067 std::map<uint32_t, DetInfo> detData_;
0068 std::vector<uint32_t> detIds_;
0069 };
0070
0071 #endif