DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
CartesianGridXYZ.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_CARTESIANGRIDXYZ_H
16 #define DD4HEP_CARTESIANGRIDXYZ_H 1
17 
18 // Framework include files
19 #include <DD4hep/Segmentations.h>
20 
22 namespace dd4hep {
23 
25  namespace DDSegmentation { class CartesianGridXYZ; }
26 
29 
31 
52  public:
54  CartesianGridXYZ() = default;
56  CartesianGridXYZ(const CartesianGridXYZ& e) = default;
62  template <typename Q>
67  bool operator==(const CartesianGridXYZ& seg) const
68  { return m_element == seg.m_element; }
70  Position position(const CellID& cellID) const;
72  CellID cellID(const Position& local, const Position& global, const VolumeID& volID) const;
74  double gridSizeX() const;
76  double gridSizeY() const;
78  double gridSizeZ() const;
80  void setGridSizeX(double cellSize) const;
82  void setGridSizeY(double cellSize) const;
84  void setGridSizeZ(double cellSize) const;
86  double offsetX() const;
88  double offsetY() const;
90  double offsetZ() const;
92  void setOffsetX(double offset) const;
94  void setOffsetY(double offset) const;
96  void setOffsetZ(double offset) const;
98  const std::string& fieldNameX() const;
100  const std::string& fieldNameY() const;
102  const std::string& fieldNameZ() const;
113  std::vector<double> cellDimensions(const CellID& cellID) const;
114  };
115 } /* End namespace dd4hep */
116 #endif // DD4HEP_CARTESIANGRIDXYZ_H
dd4hep::CartesianGridXYZ
Implementation class for the grid XYZ segmentation.
Definition: CartesianGridXYZ.h:51
dd4hep::CartesianGridXYZ::setGridSizeZ
void setGridSizeZ(double cellSize) const
set the grid size in Z
Definition: CartesianGridXYZ.cpp:59
Segmentations.h
dd4hep::CartesianGridXYZ::offsetX
double offsetX() const
access the coordinate offset in X
Definition: CartesianGridXYZ.cpp:64
dd4hep::Handle::Object
T Object
Extern accessible definition of the contained element type.
Definition: Handle.h:88
dd4hep::CartesianGridXYZ::offsetZ
double offsetZ() const
access the coordinate offset in Z
Definition: CartesianGridXYZ.cpp:74
dd4hep::Handle
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:84
dd4hep::CartesianGridXYZ::CartesianGridXYZ
CartesianGridXYZ()=default
Default constructor.
dd4hep::CartesianGridXYZ::CartesianGridXYZ
CartesianGridXYZ(const Segmentation &e)
Copy Constructor from segmentation base object.
Definition: CartesianGridXYZ.h:58
dd4hep::CartesianGridXYZ::position
Position position(const CellID &cellID) const
determine the position based on the cell ID
Definition: CartesianGridXYZ.cpp:21
dd4hep::CartesianGridXYZ::setOffsetZ
void setOffsetZ(double offset) const
set the coordinate offset in Z
Definition: CartesianGridXYZ.cpp:89
dd4hep::CartesianGridXYZ::CartesianGridXYZ
CartesianGridXYZ(const CartesianGridXYZ &e)=default
Copy constructor.
dd4hep::CartesianGridXYZ::fieldNameZ
const std::string & fieldNameZ() const
access the field name used for Z
Definition: CartesianGridXYZ.cpp:104
dd4hep::CartesianGridXYZ::fieldNameY
const std::string & fieldNameY() const
access the field name used for Y
Definition: CartesianGridXYZ.cpp:99
dd4hep::CartesianGridXYZ::gridSizeZ
double gridSizeZ() const
access the grid size in Z
Definition: CartesianGridXYZ.cpp:44
dd4hep::CartesianGridXYZ::setOffsetX
void setOffsetX(double offset) const
set the coordinate offset in X
Definition: CartesianGridXYZ.cpp:79
dd4hep::Handle::m_element
T * m_element
Single and only data member: Reference to the actual element.
Definition: Handle.h:93
dd4hep::CartesianGridXYZ::setGridSizeX
void setGridSizeX(double cellSize) const
set the grid size in X
Definition: CartesianGridXYZ.cpp:49
dd4hep::CartesianGridXYZ::operator=
CartesianGridXYZ & operator=(const CartesianGridXYZ &seg)=default
Assignment operator.
dd4hep::CartesianGridXYZ::gridSizeY
double gridSizeY() const
access the grid size in Y
Definition: CartesianGridXYZ.cpp:39
dd4hep::CartesianGridXYZHandle
Handle< SegmentationWrapper< DDSegmentation::CartesianGridXYZ > > CartesianGridXYZHandle
We need some abbreviation to make the code more readable.
Definition: CartesianGridXYZ.h:28
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:81
dd4hep::CartesianGridXYZ::setOffsetY
void setOffsetY(double offset) const
set the coordinate offset in Y
Definition: CartesianGridXYZ.cpp:84
dd4hep::CartesianGridXYZ::operator==
bool operator==(const CartesianGridXYZ &seg) const
Equality operator.
Definition: CartesianGridXYZ.h:67
dd4hep::CartesianGridXYZ::CartesianGridXYZ
CartesianGridXYZ(const Handle< Q > &e)
Copy constructor from other polymorph/equivalent handle.
Definition: CartesianGridXYZ.h:63
VolumeID
dd4hep::DDSegmentation::VolumeID VolumeID
Definition: SegmentationDictionary.h:49
dd4hep::CartesianGridXYZ::offsetY
double offsetY() const
access the coordinate offset in Y
Definition: CartesianGridXYZ.cpp:69
dd4hep::CartesianGridXYZ::fieldNameX
const std::string & fieldNameX() const
access the field name used for X
Definition: CartesianGridXYZ.cpp:94
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::CartesianGridXYZ::gridSizeX
double gridSizeX() const
access the grid size in X
Definition: CartesianGridXYZ.cpp:34
dd4hep::CartesianGridXYZ::CartesianGridXYZ
CartesianGridXYZ(const Handle< Object > &e)
Copy constructor from handle.
Definition: CartesianGridXYZ.h:60
dd4hep::Segmentation
Handle class supporting generic Segmentations of sensitive detectors.
Definition: Segmentations.h:41
dd4hep::CartesianGridXYZ::setGridSizeY
void setGridSizeY(double cellSize) const
set the grid size in Y
Definition: CartesianGridXYZ.cpp:54
dd4hep::CartesianGridXYZ::cellID
CellID cellID(const Position &local, const Position &global, const VolumeID &volID) const
determine the cell ID based on the position
Definition: CartesianGridXYZ.cpp:26
dd4hep::CartesianGridXYZ::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: CartesianGridXYZ.cpp:109
CellID
dd4hep::DDSegmentation::CellID CellID
Definition: SegmentationDictionary.h:50