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