DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
CartesianGridUV.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_CARTESIANGRIDUV_H
16 #define DD4HEP_CARTESIANGRIDUV_H 1
17 
18 // Framework include files
19 #include <DD4hep/Segmentations.h>
20 
22 namespace dd4hep {
23 
25  namespace DDSegmentation { class CartesianGridUV; }
26 
29 
31 
52  public:
54  CartesianGridUV() = default;
56  CartesianGridUV(const CartesianGridUV& e) = default;
62  template <typename Q> CartesianGridUV(const Handle<Q>& e) : Handle<Object>(e) { }
64  CartesianGridUV& operator=(const CartesianGridUV& seg) = default;
66  bool operator==(const CartesianGridUV& seg) const {
67  return m_element == seg.m_element;
68  }
69 
71  Position position(const CellID& cellID) const;
73  CellID cellID(const Position& local, const Position& global, const VolumeID& volID) const;
75  double gridSizeU() const;
77  double gridSizeV() const;
79  void setGridSizeU(double cellSize) const;
81  void setGridSizeV(double cellSize) const;
83  double offsetU() const;
85  double offsetV() const;
87  double gridAngle() const;
89  void setOffsetU(double offset) const;
91  void setOffsetV(double offset) const;
93  void setGridAngle(double angle) const;
95  const std::string& fieldNameU() const;
97  const std::string& fieldNameV() const;
107  std::vector<double> cellDimensions(const CellID& cellID) const;
108  };
109 
110 } /* End namespace dd4hep */
111 #endif // DD4HEP_CARTESIANGRIDUV_H
dd4hep::CartesianGridUV::fieldNameU
const std::string & fieldNameU() const
access the field name used for U
Definition: CartesianGridUV.cpp:79
dd4hep::CartesianGridUV::gridSizeU
double gridSizeU() const
access the grid size in U
Definition: CartesianGridUV.cpp:34
dd4hep::CartesianGridUV::gridSizeV
double gridSizeV() const
access the grid size in V
Definition: CartesianGridUV.cpp:39
Segmentations.h
dd4hep::CartesianGridUV::setOffsetV
void setOffsetV(double offset) const
set the coordinate offset in V
Definition: CartesianGridUV.cpp:74
dd4hep::CartesianGridUV::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: CartesianGridUV.cpp:89
dd4hep::Handle::Object
T Object
Extern accessible definition of the contained element type.
Definition: Handle.h:88
dd4hep::CartesianGridUV::position
Position position(const CellID &cellID) const
determine the position based on the cell ID
Definition: CartesianGridUV.cpp:21
dd4hep::CartesianGridUVHandle
Handle< SegmentationWrapper< DDSegmentation::CartesianGridUV > > CartesianGridUVHandle
We need some abbreviation to make the code more readable.
Definition: CartesianGridUV.h:28
dd4hep::Handle
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:84
dd4hep::CartesianGridUV::fieldNameV
const std::string & fieldNameV() const
access the field name used for V
Definition: CartesianGridUV.cpp:84
dd4hep::CartesianGridUV::CartesianGridUV
CartesianGridUV(const CartesianGridUV &e)=default
Copy constructor.
dd4hep::CartesianGridUV::setGridSizeU
void setGridSizeU(double cellSize) const
set the grid size in U
Definition: CartesianGridUV.cpp:44
dd4hep::CartesianGridUV::offsetV
double offsetV() const
access the coordinate offset in V
Definition: CartesianGridUV.cpp:59
dd4hep::CartesianGridUV::CartesianGridUV
CartesianGridUV(const Segmentation &e)
Copy Constructor from segmentation base object.
Definition: CartesianGridUV.h:58
dd4hep::CartesianGridUV::operator==
bool operator==(const CartesianGridUV &seg) const
Equality operator.
Definition: CartesianGridUV.h:66
dd4hep::CartesianGridUV::setGridSizeV
void setGridSizeV(double cellSize) const
set the grid size in V
Definition: CartesianGridUV.cpp:49
dd4hep::CartesianGridUV::CartesianGridUV
CartesianGridUV(const Handle< Object > &e)
Copy constructor from handle.
Definition: CartesianGridUV.h:60
dd4hep::Handle::m_element
T * m_element
Single and only data member: Reference to the actual element.
Definition: Handle.h:93
dd4hep::CartesianGridUV::CartesianGridUV
CartesianGridUV()=default
Default constructor.
dd4hep::CartesianGridUV::cellID
CellID cellID(const Position &local, const Position &global, const VolumeID &volID) const
determine the cell ID based on the position
Definition: CartesianGridUV.cpp:26
dd4hep::CartesianGridUV::offsetU
double offsetU() const
access the coordinate offset in U
Definition: CartesianGridUV.cpp:54
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:81
dd4hep::DDSegmentation::CartesianGridUV
Segmentation base class describing cartesian grid segmentation in along U,V rotated some angle from l...
Definition: CartesianGridUV.h:27
VolumeID
dd4hep::DDSegmentation::VolumeID VolumeID
Definition: SegmentationDictionary.h:50
dd4hep::CartesianGridUV::CartesianGridUV
CartesianGridUV(const Handle< Q > &e)
Copy constructor from other equivalent handle.
Definition: CartesianGridUV.h:62
dd4hep::CartesianGridUV::operator=
CartesianGridUV & operator=(const CartesianGridUV &seg)=default
Assignment operator.
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::CartesianGridUV::setOffsetU
void setOffsetU(double offset) const
set the coordinate offset in U
Definition: CartesianGridUV.cpp:69
dd4hep::CartesianGridUV::gridAngle
double gridAngle() const
access the rotation angle
Definition: CartesianGridUV.cpp:64
dd4hep::Segmentation
Handle class supporting generic Segmentations of sensitive detectors.
Definition: Segmentations.h:41
dd4hep::CartesianGridUV::setGridAngle
void setGridAngle(double angle) const
set the rotation angle
dd4hep::CartesianGridUV
Implementation class for the grid UV segmentation.
Definition: CartesianGridUV.h:51
CellID
dd4hep::DDSegmentation::CellID CellID
Definition: SegmentationDictionary.h:51