![]() |
|
|||
File indexing completed on 2025-02-21 09:57:59
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 // \author Markus Frank, David Blyth 0011 // \date 2018-02-20 0012 // \version 1.0 0013 // 0014 //========================================================================== 0015 #ifndef DD4HEP_CARTESIANSTRIPZ_H 0016 #define DD4HEP_CARTESIANSTRIPZ_H 1 0017 0018 // Framework include files 0019 #include <DD4hep/Segmentations.h> 0020 0021 /// Namespace for the AIDA detector description toolkit 0022 namespace dd4hep { 0023 0024 /// Namespace for base segmentations 0025 namespace DDSegmentation { 0026 class CartesianStripZ; 0027 } 0028 0029 /// We need some abbreviation to make the code more readable. 0030 typedef Handle<SegmentationWrapper<DDSegmentation::CartesianStripZ> > CartesianStripZHandle; 0031 0032 /// Implementation class for the strip Z segmentation. 0033 /** 0034 * Concrete user handle to serve specific needs of client code 0035 * which requires access to the base functionality not served 0036 * by the super-class Segmentation. 0037 * 0038 * Note: 0039 * We only check the validity of the underlying handle. 0040 * If for whatever reason the implementation object is not valid 0041 * This is not checked. 0042 * In principle this CANNOT happen unless some brain-dead has 0043 * fiddled with the handled object directly..... 0044 * 0045 * Note: 0046 * The handle base corresponding to this object in for 0047 * conveniance reasons instantiated in dd4hep/src/Segmentations.cpp. 0048 * 0049 * \author M.Frank 0050 * \version 1.0 0051 * \ingroup DD4HEP_CORE 0052 */ 0053 class CartesianStripZ : public CartesianStripZHandle { 0054 public: 0055 /// Default constructor 0056 CartesianStripZ() = default; 0057 /// Copy constructor 0058 CartesianStripZ(const CartesianStripZ& e) = default; 0059 /// Copy Constructor from segmentation base object 0060 CartesianStripZ(const Segmentation& e) : Handle<Object>(e) {} 0061 /// Copy constructor from handle 0062 CartesianStripZ(const Handle<Object>& e) : Handle<Object>(e) {} 0063 /// Copy constructor from other equivalent handle 0064 template <typename Q> 0065 CartesianStripZ(const Handle<Q>& e) : Handle<Object>(e) {} 0066 /// Assignment operator 0067 CartesianStripZ& operator=(const CartesianStripZ& seg) = default; 0068 /// Equality operator 0069 bool operator==(const CartesianStripZ& seg) const { return m_element == seg.m_element; } 0070 0071 /// determine the position based on the cell ID 0072 Position position(const CellID& cellID) const; 0073 /// determine the cell ID based on the position 0074 CellID cellID(const Position& local, const Position& global, const VolumeID& volID) const; 0075 /// access the strip size in Z 0076 double stripSizeZ() const; 0077 /// set the strip size in Z 0078 void setStripSizeZ(double cellSize) const; 0079 /// access the coordinate offset in Z 0080 double offsetZ() const; 0081 /// set the coordinate offset in Z 0082 void setOffsetZ(double offset) const; 0083 /// access the field name used for Z 0084 const std::string& fieldNameZ() const; 0085 /** \brief Returns a vector<double> of the cellDimensions of the given cell ID 0086 in natural order of dimensions, e.g., dx/dy/dz, or dr/r*dPhi 0087 0088 Returns a vector of the cellDimensions of the given cell ID 0089 \param cellID is ignored as all cells have the same dimension 0090 \return std::vector<double> size 1: 0091 -# size in z 0092 */ 0093 std::vector<double> cellDimensions(const CellID& cellID) const; 0094 }; 0095 } /* End namespace dd4hep */ 0096 #endif // DD4HEP_CARTESIANSTRIPZ_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |