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_CARTESIANGRIDUV_H
0019 #define DDSEGMENTATION_CARTESIANGRIDUV_H
0020
0021 #include <DDSegmentation/CartesianGrid.h>
0022
0023 namespace dd4hep {
0024 namespace DDSegmentation {
0025
0026
0027 class CartesianGridUV: public CartesianGrid {
0028 public:
0029
0030 CartesianGridUV(const std::string& cellEncoding = "");
0031
0032 CartesianGridUV(const BitFieldCoder* decoder);
0033
0034 virtual ~CartesianGridUV();
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 gridSizeU() const {
0042 return _gridSizeU;
0043 }
0044
0045 double gridSizeV() const {
0046 return _gridSizeV;
0047 }
0048
0049 double offsetU() const {
0050 return _offsetU;
0051 }
0052
0053 double offsetV() const {
0054 return _offsetV;
0055 }
0056
0057 double gridAngle() const {
0058 return _gridAngle;
0059 }
0060
0061 const std::string& fieldNameU() const {
0062 return _uId;
0063 }
0064
0065 const std::string& fieldNameV() const {
0066 return _vId;
0067 }
0068
0069 void setGridSizeU(double cellSize) {
0070 _gridSizeU = cellSize;
0071 }
0072
0073 void setGridSizeV(double cellSize) {
0074 _gridSizeV = cellSize;
0075 }
0076
0077 void setOffsetU(double offset) {
0078 _offsetU = offset;
0079 }
0080
0081 void setOffsetV(double offset) {
0082 _offsetV = offset;
0083 }
0084
0085 void setGridAngle(double angle) {
0086 _gridAngle = angle;
0087 }
0088
0089 void setFieldNameU(const std::string& fieldName) {
0090 _uId = fieldName;
0091 }
0092
0093 void setFieldNameV(const std::string& fieldName) {
0094 _vId = fieldName;
0095 }
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105 virtual std::vector<double> cellDimensions(const CellID& cellID) const;
0106
0107 protected:
0108
0109 double _gridSizeU;
0110
0111 double _offsetU;
0112
0113 double _gridSizeV;
0114
0115 double _offsetV;
0116
0117 std::string _uId;
0118
0119 std::string _vId;
0120
0121 double _gridAngle;
0122 };
0123
0124 }
0125 }
0126 #endif