DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
WaferGridXY.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // \author Markus Frank
11 // \date 2016-10-18
12 // \version 1.0
13 //
14 //==========================================================================
15 #ifndef DD4HEP_WAFERGRIDXY_H
16 #define DD4HEP_WAFERGRIDXY_H 1
17 
18 // Framework include files
19 #include <DD4hep/Segmentations.h>
20 
22 namespace dd4hep {
23 
25  namespace DDSegmentation { class WaferGridXY; }
26 
29 
31 
51  class WaferGridXY : public WaferGridXYHandle {
52  public:
54  WaferGridXY() = default;
56  WaferGridXY(const WaferGridXY& e) = default;
62  template <typename Q> WaferGridXY(const Handle<Q>& e) : Handle<Object>(e) {}
64  WaferGridXY& operator=(const WaferGridXY& seg) = default;
66  bool operator==(const WaferGridXY& seg) const
67  { return m_element == seg.m_element; }
69  Position position(const CellID& cellID) const;
71  CellID cellID(const Position& local, const Position& global, const VolumeID& volID) const;
73  double gridSizeX() const;
75  double gridSizeY() const;
77  double offsetX() const;
79  double offsetY() const;
81  double waferOffsetX(int inGroup, int inWafer) const;
83  double waferOffsetY(int inGroup, int inWafer) const;
85  const std::string& fieldNameX() const;
87  const std::string& fieldNameY() const;
97  std::vector<double> cellDimensions(const CellID& cellID) const;
98  };
99 } /* End namespace dd4hep */
100 #endif // DD4HEP_WAFERGRIDXY_H
dd4hep::WaferGridXY::fieldNameY
const std::string & fieldNameY() const
access the field name used for Y
Definition: WaferGridXY.cpp:68
Segmentations.h
dd4hep::Handle::Object
T Object
Extern accessible definition of the contained element type.
Definition: Handle.h:88
dd4hep::WaferGridXY::waferOffsetX
double waferOffsetX(int inGroup, int inWafer) const
access the coordinate waferOffset for inGroup in X
Definition: WaferGridXY.cpp:53
dd4hep::WaferGridXY::cellID
CellID cellID(const Position &local, const Position &global, const VolumeID &volID) const
determine the cell ID based on the position
Definition: WaferGridXY.cpp:26
dd4hep::WaferGridXY::offsetY
double offsetY() const
access the coordinate offset in Y
Definition: WaferGridXY.cpp:49
dd4hep::WaferGridXY::WaferGridXY
WaferGridXY(const Handle< Q > &e)
Copy constructor from other polymorph/equivalent handle.
Definition: WaferGridXY.h:62
dd4hep::Handle
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:84
dd4hep::WaferGridXY::fieldNameX
const std::string & fieldNameX() const
access the field name used for X
Definition: WaferGridXY.cpp:63
dd4hep::WaferGridXY::operator=
WaferGridXY & operator=(const WaferGridXY &seg)=default
Assignment operator.
dd4hep::WaferGridXY::waferOffsetY
double waferOffsetY(int inGroup, int inWafer) const
access the coordinate waferOffset for inGroup in Y
Definition: WaferGridXY.cpp:58
dd4hep::WaferGridXY::operator==
bool operator==(const WaferGridXY &seg) const
Equality operator.
Definition: WaferGridXY.h:66
dd4hep::Handle::m_element
T * m_element
Single and only data member: Reference to the actual element.
Definition: Handle.h:93
dd4hep::WaferGridXY::WaferGridXY
WaferGridXY(const Handle< Object > &e)
Copy constructor from handle.
Definition: WaferGridXY.h:60
dd4hep::WaferGridXY::gridSizeY
double gridSizeY() const
access the grid size in Y
Definition: WaferGridXY.cpp:39
dd4hep::WaferGridXY
Implementation class for the grid XZ segmentation.
Definition: WaferGridXY.h:51
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:81
dd4hep::WaferGridXY::WaferGridXY
WaferGridXY()=default
Default constructor.
VolumeID
dd4hep::DDSegmentation::VolumeID VolumeID
Definition: SegmentationDictionary.h:50
dd4hep::WaferGridXY::WaferGridXY
WaferGridXY(const WaferGridXY &e)=default
Copy constructor.
dd4hep::WaferGridXY::position
Position position(const CellID &cellID) const
determine the position based on the cell ID
Definition: WaferGridXY.cpp:21
dd4hep::WaferGridXY::offsetX
double offsetX() const
access the coordinate offset in X
Definition: WaferGridXY.cpp:44
dd4hep::WaferGridXY::cellDimensions
std::vector< double > cellDimensions(const CellID &cellID) const
Returns a vector<double> of the cellDimensions of the given cell ID in natural order of dimensions,...
Definition: WaferGridXY.cpp:81
dd4hep::WaferGridXYHandle
Handle< SegmentationWrapper< DDSegmentation::WaferGridXY > > WaferGridXYHandle
We need some abbreviation to make the code more readable.
Definition: WaferGridXY.h:28
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::Segmentation
Handle class supporting generic Segmentations of sensitive detectors.
Definition: Segmentations.h:41
dd4hep::WaferGridXY::WaferGridXY
WaferGridXY(const Segmentation &e)
Copy Constructor from segmentation base object.
Definition: WaferGridXY.h:58
dd4hep::WaferGridXY::gridSizeX
double gridSizeX() const
access the grid size in X
Definition: WaferGridXY.cpp:34
CellID
dd4hep::DDSegmentation::CellID CellID
Definition: SegmentationDictionary.h:51