File indexing completed on 2025-01-18 09:13:36
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef DDSEGMENTATION_CYLINDRICALGRIDPHIZ_H
0019 #define DDSEGMENTATION_CYLINDRICALGRIDPHIZ_H
0020
0021 #include <DDSegmentation/CylindricalSegmentation.h>
0022
0023 namespace dd4hep {
0024 namespace DDSegmentation {
0025
0026
0027 class CylindricalGridPhiZ: public CylindricalSegmentation {
0028 public:
0029
0030 CylindricalGridPhiZ(const std::string& cellEncoding);
0031
0032 CylindricalGridPhiZ(const BitFieldCoder* decoder);
0033
0034 virtual ~CylindricalGridPhiZ();
0035
0036
0037 virtual Vector3D position(const CellID& cellID) const;
0038
0039 virtual CellID cellID(const Vector3D& localPosition, const Vector3D& globalPosition, const VolumeID& volumeID) const;
0040
0041 double gridSizePhi() const {
0042 return _gridSizePhi;
0043 }
0044
0045 double gridSizeZ() const {
0046 return _gridSizeZ;
0047 }
0048
0049 double offsetPhi() const {
0050 return _offsetPhi;
0051 }
0052
0053 double offsetZ() const {
0054 return _offsetZ;
0055 }
0056
0057 double radius() const {
0058 return _radius;
0059 }
0060
0061 const std::string& fieldNamePhi() const {
0062 return _phiId;
0063 }
0064
0065 const std::string& fieldNameZ() const {
0066 return _zId;
0067 }
0068
0069 void setGridSizePhi(double cellSize) {
0070 _gridSizePhi = cellSize;
0071 }
0072
0073 void setGridSizeZ(double cellSize) {
0074 _gridSizeZ = cellSize;
0075 }
0076
0077 void setOffsetPhi(double offset) {
0078 _offsetPhi = offset;
0079 }
0080
0081 void setOffsetZ(double offset) {
0082 _offsetZ = offset;
0083 }
0084
0085 void setRadius(double radius) {
0086 _radius = radius;
0087 }
0088
0089 void setFieldNamePhi(const std::string& fieldName) {
0090 _phiId = fieldName;
0091 }
0092
0093 void setFieldNameZ(const std::string& fieldName) {
0094 _zId = fieldName;
0095 }
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105 virtual std::vector<double> cellDimensions(const CellID& cellID) const;
0106
0107
0108 virtual void setDecoder(const BitFieldCoder* decoder);
0109
0110 protected:
0111
0112 double _gridSizePhi;
0113
0114 double _offsetPhi;
0115
0116 double _gridSizeZ;
0117
0118 double _offsetZ;
0119
0120 double _radius;
0121
0122 std::string _phiId;
0123
0124 std::string _zId;
0125
0126 bool _phiIsSigned;
0127 };
0128
0129 }
0130 }
0131 #endif