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