DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
PolarGridRPhi.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_POLARGRIDRPHI_H
16 #define DD4HEP_POLARGRIDRPHI_H 1
17 
18 // Framework include files
19 #include <DD4hep/Segmentations.h>
20 
22 namespace dd4hep {
23 
25  namespace DDSegmentation { class PolarGridRPhi; }
26 
29 
31 
52  public:
54  PolarGridRPhi() = default;
56  PolarGridRPhi(const PolarGridRPhi& e) = default;
62  template <typename Q> PolarGridRPhi(const Handle<Q>& e) : Handle<Object>(e) {}
64  PolarGridRPhi& operator=(const PolarGridRPhi& seg) = default;
66  bool operator==(const PolarGridRPhi& 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 gridSizeR() const;
75  double gridSizePhi() const;
77  void setGridSizeR(double cellSize) const;
79  void setGridSizePhi(double cellSize) const;
81  double offsetR() const;
83  double offsetPhi() const;
85  void setOffsetR(double offset) const;
87  void setOffsetPhi(double offset) const;
89  const std::string& fieldNameR() const;
91  const std::string& fieldNamePhi() const;
101  std::vector<double> cellDimensions(const CellID& cellID) const;
102  };
103 } /* End namespace dd4hep */
104 #endif // DD4HEP_POLARGRIDRPHI_H
dd4hep::PolarGridRPhi::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: PolarGridRPhi.cpp:94
Segmentations.h
dd4hep::PolarGridRPhiHandle
Handle< SegmentationWrapper< DDSegmentation::PolarGridRPhi > > PolarGridRPhiHandle
We need some abbreviation to make the code more readable.
Definition: PolarGridRPhi.h:28
dd4hep::Handle::Object
T Object
Extern accessible definition of the contained element type.
Definition: Handle.h:88
dd4hep::PolarGridRPhi::operator=
PolarGridRPhi & operator=(const PolarGridRPhi &seg)=default
Assignment operator.
dd4hep::Handle
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:84
dd4hep::PolarGridRPhi::PolarGridRPhi
PolarGridRPhi()=default
Default constructor.
dd4hep::PolarGridRPhi::operator==
bool operator==(const PolarGridRPhi &seg) const
Equality operator.
Definition: PolarGridRPhi.h:66
dd4hep::PolarGridRPhi::setOffsetPhi
void setOffsetPhi(double offset) const
set the coordinate offset in Phi
Definition: PolarGridRPhi.cpp:61
dd4hep::PolarGridRPhi::setGridSizeR
void setGridSizeR(double cellSize) const
set the grid size in R
Definition: PolarGridRPhi.cpp:66
dd4hep::Handle::m_element
T * m_element
Single and only data member: Reference to the actual element.
Definition: Handle.h:93
dd4hep::PolarGridRPhi::PolarGridRPhi
PolarGridRPhi(const PolarGridRPhi &e)=default
Copy constructor.
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:81
VolumeID
dd4hep::DDSegmentation::VolumeID VolumeID
Definition: SegmentationDictionary.h:49
dd4hep::PolarGridRPhi::PolarGridRPhi
PolarGridRPhi(const Segmentation &e)
Copy Constructor from segmentation base object.
Definition: PolarGridRPhi.h:58
dd4hep::PolarGridRPhi::offsetR
double offsetR() const
access the coordinate offset in R
Definition: PolarGridRPhi.cpp:46
dd4hep::PolarGridRPhi::cellID
CellID cellID(const Position &local, const Position &global, const VolumeID &volID) const
determine the cell ID based on the position
Definition: PolarGridRPhi.cpp:28
dd4hep::PolarGridRPhi
Implementation class for the grid XZ segmentation.
Definition: PolarGridRPhi.h:51
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::PolarGridRPhi::position
Position position(const CellID &cellID) const
determine the position based on the cell ID
Definition: PolarGridRPhi.cpp:23
dd4hep::PolarGridRPhi::gridSizePhi
double gridSizePhi() const
access the grid size in Phi
Definition: PolarGridRPhi.cpp:41
dd4hep::Segmentation
Handle class supporting generic Segmentations of sensitive detectors.
Definition: Segmentations.h:41
dd4hep::PolarGridRPhi::gridSizeR
double gridSizeR() const
access the grid size in R
Definition: PolarGridRPhi.cpp:36
dd4hep::PolarGridRPhi::setGridSizePhi
void setGridSizePhi(double cellSize) const
set the grid size in Phi
Definition: PolarGridRPhi.cpp:71
dd4hep::PolarGridRPhi::PolarGridRPhi
PolarGridRPhi(const Handle< Object > &e)
Copy constructor from handle.
Definition: PolarGridRPhi.h:60
dd4hep::PolarGridRPhi::fieldNameR
const std::string & fieldNameR() const
access the field name used for R
Definition: PolarGridRPhi.cpp:76
dd4hep::PolarGridRPhi::PolarGridRPhi
PolarGridRPhi(const Handle< Q > &e)
Copy constructor from other polymorph/equivalent handle.
Definition: PolarGridRPhi.h:62
dd4hep::PolarGridRPhi::fieldNamePhi
const std::string & fieldNamePhi() const
access the field name used for Phi
Definition: PolarGridRPhi.cpp:81
dd4hep::PolarGridRPhi::offsetPhi
double offsetPhi() const
access the coordinate offset in Phi
Definition: PolarGridRPhi.cpp:51
dd4hep::PolarGridRPhi::setOffsetR
void setOffsetR(double offset) const
set the coordinate offset in R
Definition: PolarGridRPhi.cpp:56
CellID
dd4hep::DDSegmentation::CellID CellID
Definition: SegmentationDictionary.h:50