DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
ProjectiveCylinder.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 /*
13  * ProjectiveCylinder.h
14  *
15  * Created on: Oct 31, 2013
16  * Author: Christian Grefe, CERN
17  */
18 
19 #ifndef DDSEGMENTATION_PROJECTIVECYLINDER_H
20 #define DDSEGMENTATION_PROJECTIVECYLINDER_H
21 
23 
24 namespace dd4hep {
25  namespace DDSegmentation {
26 
29  public:
31  ProjectiveCylinder(const std::string& cellEncoding);
35  virtual ~ProjectiveCylinder();
36 
38  virtual Vector3D position(const CellID& cellID) const;
40  virtual CellID cellID(const Vector3D& localPosition, const Vector3D& globalPosition, const VolumeID& volumeID) const;
42  double theta(const CellID& cellID) const;
44  double phi(const CellID& cellID) const;
46  int thetaBins() const {
47  return _thetaBins;
48  }
50  int phiBins() const {
51  return _phiBins;
52  }
54  double offsetTheta() const {
55  return _offsetTheta;
56  }
58  double offsetPhi() const {
59  return _offsetPhi;
60  }
62  std::string fieldNameTheta() const {
63  return _thetaID;
64  }
66  std::string fieldNamePhi() const {
67  return _phiID;
68  }
70  void setThetaBins(int bins) {
71  _thetaBins = bins;
72  }
74  void setPhiBins(int bins) {
75  _phiBins = bins;
76  }
78  void setOffsetTheta(double offset) {
79  _offsetTheta = offset;
80  }
82  void setOffsetPhi(double offset) {
83  _offsetPhi = offset;
84  }
86  void setFieldNameTheta(const std::string& fieldName) {
87  _thetaID = fieldName;
88  }
90  void setFieldNamePhi(const std::string& fieldName) {
91  _phiID = fieldName;
92  }
93 
94  protected:
98  int _phiBins;
100  double _offsetTheta;
102  double _offsetPhi;
104  std::string _thetaID;
106  std::string _phiID;
107 
108  };
109 
110  } /* namespace DDSegmentation */
111 } /* namespace dd4hep */
112 #endif // DDSEGMENTATION_PROJECTIVECYLINDER_H
dd4hep::DDSegmentation::VolumeID
uint64_t VolumeID
Definition: BitFieldCoder.h:27
dd4hep::DDSegmentation::ProjectiveCylinder::_offsetPhi
double _offsetPhi
the coordinate offset in phi
Definition: ProjectiveCylinder.h:102
dd4hep::DDSegmentation::ProjectiveCylinder::_thetaID
std::string _thetaID
the field name used for theta
Definition: ProjectiveCylinder.h:104
dd4hep::DDSegmentation::ProjectiveCylinder::cellID
virtual CellID cellID(const Vector3D &localPosition, const Vector3D &globalPosition, const VolumeID &volumeID) const
determine the cell ID based on the position
Definition: ProjectiveCylinder.cpp:73
dd4hep::DDSegmentation::Vector3D
Simple container for a physics vector.
Definition: Segmentation.h:48
dd4hep::DDSegmentation::ProjectiveCylinder::setFieldNamePhi
void setFieldNamePhi(const std::string &fieldName)
set the field name used for phi
Definition: ProjectiveCylinder.h:90
dd4hep::DDSegmentation::CylindricalSegmentation
Segmentation base class describing a cylindrical grid segmentation.
Definition: CylindricalSegmentation.h:30
dd4hep::DDSegmentation::BitFieldCoder
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
Definition: BitFieldCoder.h:114
dd4hep::DDSegmentation::ProjectiveCylinder::setPhiBins
void setPhiBins(int bins)
set the number of bins in phi
Definition: ProjectiveCylinder.h:74
dd4hep::DDSegmentation::ProjectiveCylinder::~ProjectiveCylinder
virtual ~ProjectiveCylinder()
destructor
Definition: ProjectiveCylinder.cpp:63
dd4hep::DDSegmentation::ProjectiveCylinder::offsetTheta
double offsetTheta() const
access the coordinate offset in theta
Definition: ProjectiveCylinder.h:54
dd4hep::DDSegmentation::ProjectiveCylinder::ProjectiveCylinder
ProjectiveCylinder(const std::string &cellEncoding)
default constructor using an arbitrary type
Definition: ProjectiveCylinder.cpp:31
CylindricalSegmentation.h
dd4hep::DDSegmentation::ProjectiveCylinder::setOffsetPhi
void setOffsetPhi(double offset)
set the coordinate offset in phi
Definition: ProjectiveCylinder.h:82
dd4hep::DDSegmentation::ProjectiveCylinder::thetaBins
int thetaBins() const
access the number of bins in theta
Definition: ProjectiveCylinder.h:46
dd4hep::DDSegmentation::ProjectiveCylinder::fieldNameTheta
std::string fieldNameTheta() const
access the field name used for theta
Definition: ProjectiveCylinder.h:62
dd4hep::DDSegmentation::ProjectiveCylinder::setFieldNameTheta
void setFieldNameTheta(const std::string &fieldName)
set the field name used for theta
Definition: ProjectiveCylinder.h:86
dd4hep::DDSegmentation::Segmentation::decoder
virtual const BitFieldCoder * decoder() const
Access the underlying decoder.
Definition: Segmentation.h:112
dd4hep::DDSegmentation::ProjectiveCylinder
A segmentation class to describe projective cylinders.
Definition: ProjectiveCylinder.h:28
dd4hep::DDSegmentation::CellID
uint64_t CellID
Definition: BitFieldCoder.h:26
dd4hep::DDSegmentation::ProjectiveCylinder::_offsetTheta
double _offsetTheta
the coordinate offset in theta
Definition: ProjectiveCylinder.h:100
dd4hep::DDSegmentation::ProjectiveCylinder::phiBins
int phiBins() const
access the number of bins in theta
Definition: ProjectiveCylinder.h:50
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::ProjectiveCylinder::_thetaBins
int _thetaBins
the number of bins in theta
Definition: ProjectiveCylinder.h:96
dd4hep::DDSegmentation::ProjectiveCylinder::phi
double phi(const CellID &cellID) const
determine the azimuthal angle phi based on the cell ID
Definition: ProjectiveCylinder.cpp:88
dd4hep::DDSegmentation::ProjectiveCylinder::offsetPhi
double offsetPhi() const
access the coordinate offset in phi
Definition: ProjectiveCylinder.h:58
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::DDSegmentation::ProjectiveCylinder::theta
double theta(const CellID &cellID) const
determine the polar angle theta based on the cell ID
Definition: ProjectiveCylinder.cpp:83
dd4hep::DDSegmentation::ProjectiveCylinder::_phiBins
int _phiBins
the number of bins in phi
Definition: ProjectiveCylinder.h:98
dd4hep::DDSegmentation::ProjectiveCylinder::setThetaBins
void setThetaBins(int bins)
set the number of bins in theta
Definition: ProjectiveCylinder.h:70
dd4hep::DDSegmentation::ProjectiveCylinder::position
virtual Vector3D position(const CellID &cellID) const
determine the position based on the cell ID
Definition: ProjectiveCylinder.cpp:68
dd4hep::DDSegmentation::ProjectiveCylinder::setOffsetTheta
void setOffsetTheta(double offset)
set the coordinate offset in theta
Definition: ProjectiveCylinder.h:78
dd4hep::DDSegmentation::ProjectiveCylinder::_phiID
std::string _phiID
the field name used for phi
Definition: ProjectiveCylinder.h:106
dd4hep::DDSegmentation::ProjectiveCylinder::fieldNamePhi
std::string fieldNamePhi() const
access the field name used for phi
Definition: ProjectiveCylinder.h:66