File indexing completed on 2025-01-18 09:55:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #ifndef DDSEGMENTATION_POLARGRIDRPHI_H
0020 #define DDSEGMENTATION_POLARGRIDRPHI_H
0021
0022 #include <DDSegmentation/PolarGrid.h>
0023 #include <math.h>
0024
0025 namespace dd4hep {
0026 namespace DDSegmentation {
0027
0028
0029 class PolarGridRPhi: public PolarGrid {
0030 public:
0031
0032 PolarGridRPhi(const std::string& cellEncoding = "");
0033
0034 PolarGridRPhi(const BitFieldCoder* decoder);
0035
0036 virtual ~PolarGridRPhi();
0037
0038
0039 virtual Vector3D position(const CellID& cellID) const;
0040
0041 virtual CellID cellID(const Vector3D& localPosition, const Vector3D& globalPosition, const VolumeID& volumeID) const;
0042
0043 double gridSizeR() const {
0044 return _gridSizeR;
0045 }
0046
0047 double gridSizePhi() const {
0048 return _gridSizePhi;
0049 }
0050
0051 double offsetR() const {
0052 return _offsetR;
0053 }
0054
0055 double offsetPhi() const {
0056 return _offsetPhi;
0057 }
0058
0059 const std::string& fieldNameR() const {
0060 return _rId;
0061 }
0062
0063 const std::string& fieldNamePhi() const {
0064 return _phiId;
0065 }
0066
0067 void setGridSizeR(double cellSize) {
0068 _gridSizeR = cellSize;
0069 }
0070
0071 void setGridSizePhi(double cellSize) {
0072 _gridSizePhi = cellSize;
0073 }
0074
0075 void setOffsetR(double offset) {
0076 _offsetR = offset;
0077 }
0078
0079 void setOffsetPhi(double offset) {
0080 _offsetPhi = offset;
0081 }
0082
0083 void setFieldNameR(const std::string& fieldName) {
0084 _rId = fieldName;
0085 }
0086
0087 void setFieldNamePhi(const std::string& fieldName) {
0088 _phiId = fieldName;
0089 }
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099 virtual std::vector<double> cellDimensions(const CellID& cID) const;
0100
0101 protected:
0102
0103 double _gridSizeR;
0104
0105 double _offsetR;
0106
0107 double _gridSizePhi;
0108
0109 double _offsetPhi;
0110
0111 std::string _rId;
0112
0113 std::string _phiId;
0114 };
0115
0116 }
0117 }
0118 #endif