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