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