|
||||
File indexing completed on 2025-01-18 09:55:26
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 //========================================================================== 0011 #ifndef DDSEGMENTATION_CARTESIANGRIDYZ_H 0012 #define DDSEGMENTATION_CARTESIANGRIDYZ_H 0013 0014 #include <DDSegmentation/CartesianGrid.h> 0015 0016 namespace dd4hep { 0017 namespace DDSegmentation { 0018 0019 /// Segmentation base class describing cartesian grid segmentation in the Y-Z plane 0020 /** 0021 * CartesianGridYZ.h 0022 * 0023 * @date: Sep 03, 2014 0024 * @author: F.Gaede CERN/Desy 0025 * @version: $Id: $ 0026 * direkt copy of CartesianGridXY 0027 * by Christian Grefe, CERN 0028 */ 0029 class CartesianGridYZ: public CartesianGrid { 0030 public: 0031 /// Default constructor passing the encoding string 0032 CartesianGridYZ(const std::string& cellEncoding = ""); 0033 /// Default constructor used by derived classes passing an existing decoder 0034 CartesianGridYZ(const BitFieldCoder* decoder); 0035 /// destructor 0036 virtual ~CartesianGridYZ(); 0037 0038 /// determine the position based on the cell ID 0039 virtual Vector3D position(const CellID& cellID) const; 0040 /// determine the cell ID based on the position 0041 virtual CellID cellID(const Vector3D& localPosition, const Vector3D& globalPosition, const VolumeID& volumeID) const; 0042 /// access the grid size in Y 0043 double gridSizeY() const { 0044 return _gridSizeY; 0045 } 0046 /// access the grid size in Z 0047 double gridSizeZ() const { 0048 return _gridSizeZ; 0049 } 0050 /// access the coordinate offset in Y 0051 double offsetY() const { 0052 return _offsetY; 0053 } 0054 /// access the coordinate offset in Z 0055 double offsetZ() const { 0056 return _offsetZ; 0057 } 0058 /// access the field name used for Y 0059 const std::string& fieldNameY() const { 0060 return _yId; 0061 } 0062 /// access the field name used for Z 0063 const std::string& fieldNameZ() const { 0064 return _zId; 0065 } 0066 /// set the grid size in Y 0067 void setGridSizeY(double cellSize) { 0068 _gridSizeY = cellSize; 0069 } 0070 /// set the grid size in Z 0071 void setGridSizeZ(double cellSize) { 0072 _gridSizeZ = cellSize; 0073 } 0074 /// set the coordinate offset in Y 0075 void setOffsetY(double offset) { 0076 _offsetY = offset; 0077 } 0078 /// set the coordinate offset in Z 0079 void setOffsetZ(double offset) { 0080 _offsetZ = offset; 0081 } 0082 /// set the field name used for Y 0083 void setFieldNameY(const std::string& fieldName) { 0084 _yId = fieldName; 0085 } 0086 /// set the field name used for Z 0087 void setFieldNameZ(const std::string& fieldName) { 0088 _zId = fieldName; 0089 } 0090 /** \brief Returns a vector<double> of the cellDimensions of the given cell ID 0091 in natural order of dimensions, e.g., dx/dy/dz, or dr/r*dPhi 0092 0093 Returns a vector of the cellDimensions of the given cell ID 0094 \param cellID is ignored as all cells have the same dimension 0095 \return std::vector<double> size 2: 0096 -# size in y 0097 -# size in z 0098 */ 0099 virtual std::vector<double> cellDimensions(const CellID& cellID) const; 0100 0101 protected: 0102 /// the grid size in Y 0103 double _gridSizeY; 0104 /// the coordinate offset in Y 0105 double _offsetY; 0106 /// the grid size in Z 0107 double _gridSizeZ; 0108 /// the coordinate offset in Z 0109 double _offsetZ; 0110 /// the field name used for Y 0111 std::string _yId; 0112 /// the field name used for Z 0113 std::string _zId; 0114 }; 0115 0116 } /* namespace DDSegmentation */ 0117 } /* namespace dd4hep */ 0118 #endif // DDSEGMENTATION_CARTESIANGRIDYZ_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |