![]() |
DD4hep
1.33.0
Detector Description Toolkit for High Energy Physics
|
Segmentation base class describing cartesian grid segmentation in the X-Y plane. More...
#include <CartesianGridXYStaggered.h>
Public Member Functions | |
| CartesianGridXYStaggered (const std::string &cellEncoding="") | |
| Default constructor passing the encoding string. More... | |
| CartesianGridXYStaggered (const BitFieldCoder *decoder) | |
| Default constructor used by derived classes passing an existing decoder. More... | |
| virtual | ~CartesianGridXYStaggered () |
| destructor More... | |
| virtual Vector3D | position (const CellID &cellID) const |
| determine the position based on the cell ID More... | |
| virtual CellID | cellID (const Vector3D &localPosition, const Vector3D &globalPosition, const VolumeID &volumeID) const |
| determine the cell ID based on the position More... | |
| double | gridSizeX () const |
| access the grid size in X More... | |
| double | gridSizeY () const |
| access the grid size in Y More... | |
| double | offsetX () const |
| access the coordinate offset in X More... | |
| double | offsetY () const |
| access the coordinate offset in Y More... | |
| const std::string & | fieldNameX () const |
| access the field name used for X More... | |
| const std::string & | fieldNameY () const |
| access the field name used for Y More... | |
| int | staggerX () const |
| access the staggering option in X More... | |
| int | staggerY () const |
| access the staggering option in Y More... | |
| const std::string & | staggerKeyword () const |
| access the keyword used to determine which volumes to stagger More... | |
| void | setGridSizeX (double cellSize) |
| set the grid size in X More... | |
| void | setGridSizeY (double cellSize) |
| set the grid size in Y More... | |
| void | setOffsetX (double offset) |
| set the coordinate offset in X More... | |
| void | setOffsetY (double offset) |
| set the coordinate offset in Y More... | |
| void | setFieldNameX (const std::string &fieldName) |
| set the field name used for X More... | |
| void | setFieldNameY (const std::string &fieldName) |
| set the field name used for Y More... | |
| void | setStaggerX (int staggerX) |
| set the staggering option in X More... | |
| void | setStaggerY (int staggerY) |
| set the staggering option in Y More... | |
| void | setStaggerKeyword (const std::string &staggerKeyword) |
| set the keyword used to determine which volumes to stagger More... | |
| 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, e.g., dx/dy/dz, or dr/r*dPhi. More... | |
Public Member Functions inherited from dd4hep::DDSegmentation::CartesianGrid | |
| virtual | ~CartesianGrid () |
| Destructor. More... | |
Public Member Functions inherited from dd4hep::DDSegmentation::Segmentation | |
| virtual | ~Segmentation () |
| Destructor. More... | |
| virtual void | addSubsegmentation (long key_min, long key_max, Segmentation *entry) |
| Add subsegmentation. Call only valid for Multi-segmentations. Default implementation throws an exception. More... | |
| virtual VolumeID | volumeID (const CellID &cellID) const |
| Determine the volume ID from the full cell ID by removing all local fields. More... | |
| virtual void | neighbours (const CellID &cellID, std::set< CellID > &neighbours) const |
| Calculates the neighbours of the given cell ID and adds them to the list of neighbours. More... | |
| virtual std::string | fieldDescription () const |
| Access the encoding string. More... | |
| virtual const std::string & | name () const |
| Access the segmentation name. More... | |
| virtual void | setName (const std::string &value) |
| Set the segmentation name. More... | |
| virtual const std::string & | type () const |
| Access the segmentation type. More... | |
| virtual const std::string & | description () const |
| Access the description of the segmentation. More... | |
| virtual const BitFieldCoder * | decoder () const |
| Access the underlying decoder. More... | |
| virtual void | setDecoder (const BitFieldCoder *decoder) |
| Set the underlying decoder. More... | |
| virtual Parameter | parameter (const std::string ¶meterName) const |
| Access to parameter by name. More... | |
| virtual Parameters | parameters () const |
| Access to all parameters. More... | |
| virtual void | setParameters (const Parameters ¶meters) |
| Set all parameters from an existing set of parameters. More... | |
| virtual bool | cellsSpanVolumes () const |
Protected Attributes | |
| double | _gridSizeX |
| the grid size in X More... | |
| double | _offsetX |
| the coordinate offset in X More... | |
| int | _staggerX |
| staggering option in X. 0 = no staggering. 1 = stagger by _gridSizeX/2.0 in odd layers More... | |
| double | _gridSizeY |
| the grid size in Y More... | |
| double | _offsetY |
| the coordinate offset in Y More... | |
| int | _staggerY |
| staggering option in Y. 0 = no staggering. 1 = stagger by _gridSizeY/2.0 in odd layers More... | |
| std::string | _xId |
| the field name used for X More... | |
| std::string | _yId |
| the field name used for Y More... | |
| std::string | _staggerKeyword |
| the keyword used to determine which volumes to stagger More... | |
Protected Attributes inherited from dd4hep::DDSegmentation::Segmentation | |
| std::string | _name |
| The segmentation name. More... | |
| std::string | _type |
| The segmentation type. More... | |
| std::string | _description |
| The description of the segmentation. More... | |
| std::map< std::string, Parameter > | _parameters |
| The parameters for this segmentation. More... | |
| std::map< std::string, StringParameter > | _indexIdentifiers |
| The indices used for the encoding. More... | |
| const BitFieldCoder * | _decoder = 0 |
| The cell ID encoder and decoder. More... | |
| bool | _ownsDecoder = false |
| Keeps track of the decoder ownership. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from dd4hep::DDSegmentation::CartesianGrid | |
| CartesianGrid (const std::string &cellEncoding="") | |
| Default constructor used by derived classes passing the encoding string. More... | |
| CartesianGrid (const BitFieldCoder *decoder) | |
| Default constructor used by derived classes passing an existing decoder. More... | |
Protected Member Functions inherited from dd4hep::DDSegmentation::Segmentation | |
| Segmentation (const std::string &cellEncoding="") | |
| Default constructor used by derived classes passing the encoding string. More... | |
| Segmentation (const BitFieldCoder *decoder) | |
| Default constructor used by derived classes passing an existing decoder. More... | |
| template<typename TYPE > | |
| 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. More... | |
| 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 identifiers. More... | |
Static Protected Member Functions inherited from dd4hep::DDSegmentation::Segmentation | |
| static double | binToPosition (FieldID bin, double cellSize, double offset=0.) |
| Helper method to convert a bin number to a 1D position. More... | |
| static int | positionToBin (double position, double cellSize, double offset=0.) |
| Helper method to convert a 1D position to a cell ID. More... | |
| static double | binToPosition (FieldID bin, std::vector< double > const &cellBoundaries, double offset=0.) |
| Helper method to convert a bin number to a 1D position given a vector of binBoundaries. More... | |
| static int | positionToBin (double position, std::vector< double > const &cellBoundaries, double offset=0.) |
| Helper method to convert a 1D position to a cell ID given a vector of binBoundaries. More... | |
Segmentation base class describing cartesian grid segmentation in the X-Y plane.
Definition at line 27 of file CartesianGridXYStaggered.h.
| dd4hep::DDSegmentation::CartesianGridXYStaggered::CartesianGridXYStaggered | ( | const std::string & | cellEncoding = "" | ) |
Default constructor passing the encoding string.
default constructor using an encoding string
Definition at line 23 of file CartesianGridXYStaggered.cpp.
| dd4hep::DDSegmentation::CartesianGridXYStaggered::CartesianGridXYStaggered | ( | const BitFieldCoder * | decoder | ) |
Default constructor used by derived classes passing an existing decoder.
Definition at line 46 of file CartesianGridXYStaggered.cpp.
|
virtual |
destructor
Definition at line 69 of file CartesianGridXYStaggered.cpp.
|
virtual |
Returns a vector<double> of the cellDimensions of the given cell ID in natural order of dimensions, e.g., dx/dy/dz, or dr/r*dPhi.
Returns a vector of the cellDimensions of the given cell ID
| cellID | is ignored as all cells have the same dimension |
Reimplemented from dd4hep::DDSegmentation::Segmentation.
Definition at line 103 of file CartesianGridXYStaggered.cpp.
|
virtual |
determine the cell ID based on the position
Implements dd4hep::DDSegmentation::Segmentation.
Definition at line 88 of file CartesianGridXYStaggered.cpp.
|
inline |
access the field name used for X
Definition at line 57 of file CartesianGridXYStaggered.h.
|
inline |
access the field name used for Y
Definition at line 61 of file CartesianGridXYStaggered.h.
|
inline |
access the grid size in X
Definition at line 41 of file CartesianGridXYStaggered.h.
|
inline |
access the grid size in Y
Definition at line 45 of file CartesianGridXYStaggered.h.
|
inline |
access the coordinate offset in X
Definition at line 49 of file CartesianGridXYStaggered.h.
|
inline |
access the coordinate offset in Y
Definition at line 53 of file CartesianGridXYStaggered.h.
|
virtual |
determine the position based on the cell ID
Implements dd4hep::DDSegmentation::Segmentation.
Definition at line 74 of file CartesianGridXYStaggered.cpp.
|
inline |
set the field name used for X
Definition at line 93 of file CartesianGridXYStaggered.h.
|
inline |
set the field name used for Y
Definition at line 97 of file CartesianGridXYStaggered.h.
|
inline |
set the grid size in X
Definition at line 77 of file CartesianGridXYStaggered.h.
|
inline |
set the grid size in Y
Definition at line 81 of file CartesianGridXYStaggered.h.
|
inline |
set the coordinate offset in X
Definition at line 85 of file CartesianGridXYStaggered.h.
|
inline |
set the coordinate offset in Y
Definition at line 89 of file CartesianGridXYStaggered.h.
|
inline |
set the keyword used to determine which volumes to stagger
Definition at line 109 of file CartesianGridXYStaggered.h.
|
inline |
set the staggering option in X
Definition at line 101 of file CartesianGridXYStaggered.h.
|
inline |
set the staggering option in Y
Definition at line 105 of file CartesianGridXYStaggered.h.
|
inline |
access the keyword used to determine which volumes to stagger
Definition at line 73 of file CartesianGridXYStaggered.h.
|
inline |
access the staggering option in X
Definition at line 65 of file CartesianGridXYStaggered.h.
|
inline |
access the staggering option in Y
Definition at line 69 of file CartesianGridXYStaggered.h.
|
protected |
the grid size in X
Definition at line 125 of file CartesianGridXYStaggered.h.
|
protected |
the grid size in Y
Definition at line 131 of file CartesianGridXYStaggered.h.
|
protected |
the coordinate offset in X
Definition at line 127 of file CartesianGridXYStaggered.h.
|
protected |
the coordinate offset in Y
Definition at line 133 of file CartesianGridXYStaggered.h.
|
protected |
the keyword used to determine which volumes to stagger
Definition at line 141 of file CartesianGridXYStaggered.h.
|
protected |
staggering option in X. 0 = no staggering. 1 = stagger by _gridSizeX/2.0 in odd layers
Definition at line 129 of file CartesianGridXYStaggered.h.
|
protected |
staggering option in Y. 0 = no staggering. 1 = stagger by _gridSizeY/2.0 in odd layers
Definition at line 135 of file CartesianGridXYStaggered.h.
|
protected |
the field name used for X
Definition at line 137 of file CartesianGridXYStaggered.h.
|
protected |
the field name used for Y
Definition at line 139 of file CartesianGridXYStaggered.h.
1.8.18