Warning, file /DD4hep/DDCore/include/DDSegmentation/CartesianGridXZ.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef DDSEGMENTATION_CARTESIANGRIDXZ_H
0019 #define DDSEGMENTATION_CARTESIANGRIDXZ_H
0020
0021 #include <DDSegmentation/CartesianGrid.h>
0022
0023 namespace dd4hep {
0024 namespace DDSegmentation {
0025
0026
0027 class CartesianGridXZ: public CartesianGrid {
0028 public:
0029
0030 CartesianGridXZ(const std::string& cellEncoding);
0031
0032 CartesianGridXZ(const BitFieldCoder* decoder);
0033
0034 virtual ~CartesianGridXZ();
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 gridSizeX() const {
0042 return _gridSizeX;
0043 }
0044
0045 double gridSizeZ() const {
0046 return _gridSizeZ;
0047 }
0048
0049 double offsetX() const {
0050 return _offsetX;
0051 }
0052
0053 double offsetZ() const {
0054 return _offsetZ;
0055 }
0056
0057 const std::string& fieldNameX() const {
0058 return _xId;
0059 }
0060
0061 const std::string& fieldNameZ() const {
0062 return _zId;
0063 }
0064
0065 void setGridSizeX(double cellSize) {
0066 _gridSizeX = cellSize;
0067 }
0068
0069 void setGridSizeZ(double cellSize) {
0070 _gridSizeZ = cellSize;
0071 }
0072
0073 void setOffsetX(double offset) {
0074 _offsetX = offset;
0075 }
0076
0077 void setOffsetZ(double offset) {
0078 _offsetZ = offset;
0079 }
0080
0081 void setFieldNameX(const std::string& fieldName) {
0082 _xId = fieldName;
0083 }
0084
0085 void setFieldNameZ(const std::string& fieldName) {
0086 _zId = fieldName;
0087 }
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097 virtual std::vector<double> cellDimensions(const CellID& cellID) const;
0098
0099 protected:
0100
0101 double _gridSizeX;
0102
0103 double _offsetX;
0104
0105 double _gridSizeZ;
0106
0107 double _offsetZ;
0108
0109 std::string _xId;
0110
0111 std::string _zId;
0112 };
0113
0114 }
0115 }
0116 #endif