|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
20 namespace DDSegmentation {
27 _type =
"CartesianGridXYStaggered";
28 _description =
"Cartesian segmentation in the local XY-plane, with options for staggering";
35 registerParameter(
"stagger_x",
"Option to stagger the layers in x (ie, add grid_size_x/2 to offset_x for odd layers)",
37 registerParameter(
"stagger_y",
"Option to stagger the layers in y (ie, add grid_size_y/2 to offset_y for odd layers)",
41 registerParameter(
"stagger_keyword",
"Volume ID identifier used for determining which volumes to stagger",
50 _type =
"CartesianGridXYStaggered";
51 _description =
"Cartesian segmentation in the local XY-plane, with options for staggering";
58 registerParameter(
"stagger_x",
"Option to stagger the layers in x (ie, add grid_size_x/2 to offset_x for odd layers)",
60 registerParameter(
"stagger_y",
"Option to stagger the layers in y (ie, add grid_size_y/2 to offset_y for odd layers)",
64 registerParameter(
"stagger_keyword",
"Volume ID identifier used for determining which volumes to stagger",
double _gridSizeY
the grid size in Y
const BitFieldCoder * _decoder
The cell ID encoder and decoder.
Simple container for a physics vector.
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
std::string _staggerKeyword
the keyword used to determine which volumes to stagger
FieldID get(CellID bitfield, size_t idx) const
virtual CellID cellID(const Vector3D &localPosition, const Vector3D &globalPosition, const VolumeID &volumeID) const
determine the cell ID based on the position
std::string _yId
the field name used for Y
double _gridSizeX
the grid size in X
int _staggerX
staggering option in X. 0 = no staggering. 1 = stagger by _gridSizeX/2.0 in odd layers
std::string _xId
the field name used for X
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.
void set(CellID &bitfield, size_t idx, FieldID value) const
int _staggerY
staggering option in Y. 0 = no staggering. 1 = stagger by _gridSizeY/2.0 in odd layers
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...
virtual 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,...
std::string _description
The description of the segmentation.
virtual Vector3D position(const CellID &cellID) const
determine the position based on the cell ID
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.
virtual ~CartesianGridXYStaggered()
destructor
CartesianGridXYStaggered(const std::string &cellEncoding="")
Default constructor passing the encoding string.
Namespace for the AIDA detector description toolkit.
std::string _type
The segmentation type.
double _offsetY
the coordinate offset in Y
double _offsetX
the coordinate offset in X
Segmentation base class describing cartesian grid segmentation.