|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
21 namespace DDSegmentation {
30 _type =
"CylindricalGridPhiZ";
31 _description =
"Cylindrical segmentation in the local PhiZ-cylinder";
47 _type =
"CylindricalGridPhiZ";
48 _description =
"Cylindrical segmentation in the local PhiZ-cylinder";
67 vector<double> localPosition(3);
74 cellPosition.
X = R*cos(phi); cellPosition.
Y = R*sin(phi);
81 double phi = atan2(localPosition.
Y,localPosition.
X);
82 double Z = localPosition.
Z;
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.
std::string _zId
the field name used for Z
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
FieldID get(CellID bitfield, size_t idx) const
double _offsetPhi
the coordinate offset in phi
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,...
virtual ~CylindricalGridPhiZ()
destructor
double _gridSizePhi
the grid size in phi
double _offsetZ
the coordinate offset in Z
virtual Vector3D position(const CellID &cellID) const
determine the local based on the cell ID
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 _gridSizeZ
the grid size in Z
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...
std::string _phiId
the field name used for phi
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.
static double binToPosition(FieldID bin, double cellSize, double offset=0.)
Helper method to convert a bin number to a 1D position.
Namespace for the AIDA detector description toolkit.
std::string _type
The segmentation type.
CylindricalGridPhiZ(const std::string &cellEncoding)
default constructor using an arbitrary type