DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
CylindricalGridPhiZ.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 //==========================================================================
11 /*
12  * CylindricalGridPhiZ.h
13  *
14  * Created on: Jun 28, 2024
15  * Author: Yann Bedfer, ePIC/Saclay
16  */
17 
18 #ifndef DDSEGMENTATION_CYLINDRICALGRIDPHIZ_H
19 #define DDSEGMENTATION_CYLINDRICALGRIDPHIZ_H
20 
22 
23 namespace dd4hep {
24  namespace DDSegmentation {
25 
28  public:
30  CylindricalGridPhiZ(const std::string& cellEncoding);
34  virtual ~CylindricalGridPhiZ();
35 
37  virtual Vector3D position(const CellID& cellID) const;
39  virtual CellID cellID(const Vector3D& localPosition, const Vector3D& globalPosition, const VolumeID& volumeID) const;
41  double gridSizePhi() const {
42  return _gridSizePhi;
43  }
45  double gridSizeZ() const {
46  return _gridSizeZ;
47  }
49  double offsetPhi() const {
50  return _offsetPhi;
51  }
53  double offsetZ() const {
54  return _offsetZ;
55  }
57  double radius() const {
58  return _radius;
59  }
61  const std::string& fieldNamePhi() const {
62  return _phiId;
63  }
65  const std::string& fieldNameZ() const {
66  return _zId;
67  }
69  void setGridSizePhi(double cellSize) {
70  _gridSizePhi = cellSize;
71  }
73  void setGridSizeZ(double cellSize) {
74  _gridSizeZ = cellSize;
75  }
77  void setOffsetPhi(double offset) {
78  _offsetPhi = offset;
79  }
81  void setOffsetZ(double offset) {
82  _offsetZ = offset;
83  }
85  void setRadius(double radius) {
86  _radius = radius;
87  }
89  void setFieldNamePhi(const std::string& fieldName) {
90  _phiId = fieldName;
91  }
93  void setFieldNameZ(const std::string& fieldName) {
94  _zId = fieldName;
95  }
105  virtual std::vector<double> cellDimensions(const CellID& cellID) const;
106 
108  virtual void setDecoder(const BitFieldCoder* decoder);
109 
110  protected:
112  double _gridSizePhi;
114  double _offsetPhi;
116  double _gridSizeZ;
118  double _offsetZ;
120  double _radius;
122  std::string _phiId;
124  std::string _zId;
127  };
128 
129  } /* namespace DDSegmentation */
130 } /* namespace dd4hep */
131 #endif // DDSEGMENTATION_CYLINDRICALGRIDPHIZ_H
dd4hep::DDSegmentation::CylindricalGridPhiZ::cellID
virtual CellID cellID(const Vector3D &localPosition, const Vector3D &globalPosition, const VolumeID &volumeID) const
determine the cell ID based on the position
Definition: CylindricalGridPhiZ.cpp:87
dd4hep::DDSegmentation::VolumeID
uint64_t VolumeID
Definition: BitFieldCoder.h:27
dd4hep::DDSegmentation::Vector3D
Simple container for a physics vector.
Definition: Segmentation.h:48
dd4hep::DDSegmentation::CylindricalSegmentation
Segmentation base class describing a cylindrical grid segmentation.
Definition: CylindricalSegmentation.h:30
dd4hep::DDSegmentation::CylindricalGridPhiZ::_zId
std::string _zId
the field name used for Z
Definition: CylindricalGridPhiZ.h:124
dd4hep::DDSegmentation::BitFieldCoder
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
Definition: BitFieldCoder.h:114
dd4hep::DDSegmentation::CylindricalGridPhiZ::_offsetPhi
double _offsetPhi
the coordinate offset in phi
Definition: CylindricalGridPhiZ.h:114
dd4hep::DDSegmentation::CylindricalGridPhiZ::cellDimensions
virtual std::vector< double > cellDimensions(const CellID &cellID) const
Returns a vector<double> of the cellDimensions of the given cell ID in the following order: R*dPhi,...
Definition: CylindricalGridPhiZ.cpp:100
dd4hep::DDSegmentation::CylindricalGridPhiZ::setFieldNameZ
void setFieldNameZ(const std::string &fieldName)
set the field name used for Z
Definition: CylindricalGridPhiZ.h:93
dd4hep::DDSegmentation::CylindricalGridPhiZ::~CylindricalGridPhiZ
virtual ~CylindricalGridPhiZ()
destructor
Definition: CylindricalGridPhiZ.cpp:61
dd4hep::DDSegmentation::CylindricalGridPhiZ::_phiIsSigned
bool _phiIsSigned
the isSigned attribute of the bitfield used for phi
Definition: CylindricalGridPhiZ.h:126
dd4hep::DDSegmentation::CylindricalGridPhiZ::gridSizeZ
double gridSizeZ() const
access the grid size in Z
Definition: CylindricalGridPhiZ.h:45
CylindricalSegmentation.h
dd4hep::DDSegmentation::CylindricalGridPhiZ::setFieldNamePhi
void setFieldNamePhi(const std::string &fieldName)
set the field name used for phi
Definition: CylindricalGridPhiZ.h:89
dd4hep::DDSegmentation::CylindricalGridPhiZ::fieldNameZ
const std::string & fieldNameZ() const
access the field name used for Z
Definition: CylindricalGridPhiZ.h:65
dd4hep::DDSegmentation::CylindricalGridPhiZ::offsetPhi
double offsetPhi() const
access the coordinate offset in phi
Definition: CylindricalGridPhiZ.h:49
dd4hep::DDSegmentation::CylindricalGridPhiZ::offsetZ
double offsetZ() const
access the coordinate offset in Z
Definition: CylindricalGridPhiZ.h:53
dd4hep::DDSegmentation::CylindricalGridPhiZ::_gridSizePhi
double _gridSizePhi
the grid size in phi
Definition: CylindricalGridPhiZ.h:112
dd4hep::DDSegmentation::CylindricalGridPhiZ::_offsetZ
double _offsetZ
the coordinate offset in Z
Definition: CylindricalGridPhiZ.h:118
dd4hep::DDSegmentation::CylindricalGridPhiZ::position
virtual Vector3D position(const CellID &cellID) const
determine the local based on the cell ID
Definition: CylindricalGridPhiZ.cpp:73
dd4hep::DDSegmentation::CylindricalGridPhiZ::_gridSizeZ
double _gridSizeZ
the grid size in Z
Definition: CylindricalGridPhiZ.h:116
dd4hep::DDSegmentation::CylindricalGridPhiZ::setOffsetPhi
void setOffsetPhi(double offset)
set the coordinate offset in phi
Definition: CylindricalGridPhiZ.h:77
dd4hep::DDSegmentation::Segmentation::decoder
virtual const BitFieldCoder * decoder() const
Access the underlying decoder.
Definition: Segmentation.h:112
dd4hep::DDSegmentation::CylindricalGridPhiZ
Segmentation base class describing cylindrical grid segmentation in the Phi-Z cylinder.
Definition: CylindricalGridPhiZ.h:27
dd4hep::DDSegmentation::CylindricalGridPhiZ::gridSizePhi
double gridSizePhi() const
access the grid size in phi
Definition: CylindricalGridPhiZ.h:41
dd4hep::DDSegmentation::CylindricalGridPhiZ::setDecoder
virtual void setDecoder(const BitFieldCoder *decoder)
Set the underlying decoder (setting, inter alia, whether phi isSigned)
Definition: CylindricalGridPhiZ.cpp:66
dd4hep::DDSegmentation::CellID
uint64_t CellID
Definition: BitFieldCoder.h:26
dd4hep::DDSegmentation::CylindricalGridPhiZ::setOffsetZ
void setOffsetZ(double offset)
set the coordinate offset in Z
Definition: CylindricalGridPhiZ.h:81
dd4hep::DDSegmentation::CylindricalGridPhiZ::setGridSizeZ
void setGridSizeZ(double cellSize)
set the grid size in Z
Definition: CylindricalGridPhiZ.h:73
dd4hep::DDSegmentation::CylindricalGridPhiZ::_phiId
std::string _phiId
the field name used for phi
Definition: CylindricalGridPhiZ.h:122
dd4hep::DDSegmentation::CylindricalGridPhiZ::fieldNamePhi
const std::string & fieldNamePhi() const
access the field name used for phi
Definition: CylindricalGridPhiZ.h:61
dd4hep::DDSegmentation::Segmentation::volumeID
virtual VolumeID volumeID(const CellID &cellID) const
Determine the volume ID from the full cell ID by removing all local fields.
Definition: Segmentation.cpp:66
dd4hep::DDSegmentation::CylindricalGridPhiZ::setRadius
void setRadius(double radius)
set the radius
Definition: CylindricalGridPhiZ.h:85
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::DDSegmentation::CylindricalGridPhiZ::CylindricalGridPhiZ
CylindricalGridPhiZ(const std::string &cellEncoding)
default constructor using an arbitrary type
Definition: CylindricalGridPhiZ.cpp:27
dd4hep::DDSegmentation::CylindricalGridPhiZ::radius
double radius() const
access the radius
Definition: CylindricalGridPhiZ.h:57
dd4hep::DDSegmentation::CylindricalGridPhiZ::_radius
double _radius
the radius
Definition: CylindricalGridPhiZ.h:120
dd4hep::DDSegmentation::CylindricalGridPhiZ::setGridSizePhi
void setGridSizePhi(double cellSize)
set the grid size in phi
Definition: CylindricalGridPhiZ.h:69