File indexing completed on 2025-02-21 09:58:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef DD4HEP_GRIDRPHIETA_H
0016 #define DD4HEP_GRIDRPHIETA_H 1
0017
0018
0019 #include <DD4hep/Segmentations.h>
0020 #include <DDSegmentation/GridRPhiEta.h>
0021
0022
0023 namespace dd4hep {
0024
0025
0026 typedef Handle<SegmentationWrapper<DDSegmentation::GridRPhiEta>> GridRPhiEtaHandle;
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 class GridRPhiEta : public GridRPhiEtaHandle {
0049 public:
0050
0051 GridRPhiEta() = default;
0052
0053 GridRPhiEta(const GridRPhiEta& e) = default;
0054
0055 GridRPhiEta(const Segmentation& e) : Handle<Object>(e) {}
0056
0057 GridRPhiEta(const Handle<Object>& e) : Handle<Object>(e) {}
0058
0059 template <typename Q>
0060 GridRPhiEta(const Handle<Q>& e) : Handle<Object>(e) {}
0061
0062 GridRPhiEta& operator=(const GridRPhiEta& seg) = default;
0063
0064 bool operator==(const GridRPhiEta& seg) const { return m_element == seg.m_element; }
0065
0066 inline Position position(const CellID& id) const { return Position(access()->implementation->position(id)); }
0067
0068
0069 inline dd4hep::CellID cellID(const Position& local, const Position& global, const VolumeID& volID) const {
0070 return access()->implementation->cellID(local, global, volID);
0071 }
0072
0073
0074 inline double gridSizeEta() const { return access()->implementation->gridSizeEta(); }
0075
0076
0077 inline int phiBins() const { return access()->implementation->phiBins(); }
0078
0079
0080 inline double gridSizeR() const { return access()->implementation->gridSizeR(); }
0081
0082
0083 inline double offsetR() const { return access()->implementation->offsetR(); }
0084
0085
0086 inline double offsetEta() const { return access()->implementation->offsetEta(); }
0087
0088
0089 inline double offsetPhi() const { return access()->implementation->offsetPhi(); }
0090
0091
0092 inline void setOffsetEta(double offset) const { access()->implementation->setOffsetEta(offset); }
0093
0094
0095 inline void setOffsetR(double offset) const { access()->implementation->setOffsetR(offset); }
0096
0097
0098 inline void setOffsetPhi(double offset) const { access()->implementation->setOffsetPhi(offset); }
0099
0100
0101 inline void setGridSizeEta(double cellSize) const { access()->implementation->setGridSizeEta(cellSize); }
0102
0103
0104 inline void setGridSizeR(double cellSize) const { access()->implementation->setGridSizeR(cellSize); }
0105
0106
0107 inline void setPhiBins(int cellSize) const { access()->implementation->setPhiBins(cellSize); }
0108
0109
0110 inline const std::string& fieldNameR() const { return access()->implementation->fieldNameR(); }
0111
0112
0113 inline const std::string& fieldNameEta() const { return access()->implementation->fieldNameEta(); }
0114
0115
0116 inline const std::string& fieldNamePhi() const { return access()->implementation->fieldNamePhi(); }
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128 inline std::vector<double> cellDimensions(const CellID& ) const {
0129 return {access()->implementation->gridSizeR(),
0130 access()->implementation->gridSizePhi(),
0131 access()->implementation->gridSizeEta()};
0132 }
0133 };
0134 }
0135 #endif