|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
21 #define _USE_MATH_DEFINES
25 namespace DDSegmentation {
34 _type =
"ProjectiveCylinder";
35 _description =
"Projective segmentation in the global coordinates";
50 _type =
"ProjectiveCylinder";
51 _description =
"Projective segmentation in the global coordinates";
90 return 2. *
M_PI * ((double) phiIndex + 0.5) / (double)
_phiBins;
double _offsetPhi
the coordinate offset in phi
Vector3D positionFromRThetaPhi(double r, double theta, double phi)
Conversions from spherical to Cartesian coordinates ///.
std::string _thetaID
the field name used for theta
virtual CellID cellID(const Vector3D &localPosition, const Vector3D &globalPosition, const VolumeID &volumeID) const
determine the cell ID based on the position
const BitFieldCoder * _decoder
The cell ID encoder and decoder.
Simple container for a physics vector.
Segmentation base class describing a cylindrical grid segmentation.
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
FieldID get(CellID bitfield, size_t idx) const
virtual ~ProjectiveCylinder()
destructor
ProjectiveCylinder(const std::string &cellEncoding)
default constructor using an arbitrary type
double thetaFromXYZ(const Vector3D &position)
calculates the polar angle theta from Cartesian coordinates
void registerParameter(const std::string &nam, const std::string &desc, TYPE ¶m, const TYPE &defaultVal, UnitType unitTyp=SegmentationParameter::NoUnit, bool isOpt=false)
Add a parameter to this segmentation. Used by derived classes to define their parameters.
double phiFromXYZ(const Vector3D &position)
calculates the azimuthal angle phi from Cartesian coordinates
void set(CellID &bitfield, size_t idx, FieldID value) const
void registerIdentifier(const std::string &nam, const std::string &desc, std::string &ident, const std::string &defaultVal)
Add a cell identifier to this segmentation. Used by derived classes to define their required identifi...
double _offsetTheta
the coordinate offset in theta
std::string _description
The description of the segmentation.
static int positionToBin(double position, double cellSize, double offset=0.)
Helper method to convert a 1D position to a cell ID.
int _thetaBins
the number of bins in theta
double phi(const CellID &cellID) const
determine the azimuthal angle phi based on the cell ID
Namespace for the AIDA detector description toolkit.
double theta(const CellID &cellID) const
determine the polar angle theta based on the cell ID
std::string _type
The segmentation type.
int _phiBins
the number of bins in phi
virtual Vector3D position(const CellID &cellID) const
determine the position based on the cell ID
std::string _phiID
the field name used for phi