![]() |
DD4hep
1.33.0
Detector Description Toolkit for High Energy Physics
|
Segmentation class describing segmentation in R-Phi-Eta. More...
#include <GridRPhiEta.h>
Public Member Functions | |
| GridRPhiEta (const std::string &aCellEncoding) | |
| default constructor using an arbitrary type More... | |
| GridRPhiEta (const BitFieldCoder *decoder) | |
| Default constructor used by derived classes passing an existing decoder. More... | |
| virtual | ~GridRPhiEta ()=default |
| destructor More... | |
| virtual Vector3D | position (const CellID &aCellID) const |
| virtual CellID | cellID (const Vector3D &aLocalPosition, const Vector3D &aGlobalPosition, const VolumeID &aVolumeID) const |
| double | r (const CellID &aCellID) const |
| double | gridSizeR () const |
| double | offsetR () const |
| const std::string & | fieldNameR () const |
| void | setGridSizeR (double aCellSize) |
| void | setOffsetR (double offset) |
| void | setFieldNameR (const std::string &fieldName) |
Public Member Functions inherited from dd4hep::DDSegmentation::GridPhiEta | |
| GridPhiEta (const std::string &aCellEncoding) | |
| default constructor using an arbitrary type More... | |
| GridPhiEta (const BitFieldCoder *decoder) | |
| Default constructor used by derived classes passing an existing decoder. More... | |
| virtual | ~GridPhiEta ()=default |
| destructor More... | |
| double | eta (const CellID &aCellID) const |
| double | phi (const CellID &aCellID) const |
| double | gridSizeEta () const |
| double | gridSizePhi () const |
| int | phiBins () const |
| double | offsetEta () const |
| double | offsetPhi () const |
| const std::string & | fieldNameEta () const |
| const std::string & | fieldNamePhi () const |
| void | setGridSizeEta (double aCellSize) |
| void | setPhiBins (int bins) |
| void | setOffsetEta (double offset) |
| void | setOffsetPhi (double offset) |
| void | setFieldNameEta (const std::string &fieldName) |
| void | setFieldNamePhi (const std::string &fieldName) |
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 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... | |
| virtual bool | cellsSpanVolumes () const |
Private Attributes | |
| double | m_gridSizeR |
| the grid size in r More... | |
| double | m_offsetR |
| the coordinate offset in r More... | |
| std::string | m_rID |
| the field name used for r More... | |
Additional Inherited Members | |
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... | |
Protected Attributes inherited from dd4hep::DDSegmentation::GridPhiEta | |
| double | m_gridSizeEta |
| the grid size in eta More... | |
| int | m_phiBins |
| the number of bins in phi More... | |
| double | m_offsetEta |
| the coordinate offset in eta More... | |
| double | m_offsetPhi |
| the coordinate offset in phi More... | |
| std::string | m_etaID |
| the field name used for eta More... | |
| std::string | m_phiID |
| the field name used for phi 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... | |
Segmentation class describing segmentation in R-Phi-Eta.
Definition at line 31 of file GridRPhiEta.h.
| dd4hep::DDSegmentation::GridRPhiEta::GridRPhiEta | ( | const std::string & | aCellEncoding | ) |
default constructor using an arbitrary type
Definition at line 17 of file GridRPhiEta.cpp.
| dd4hep::DDSegmentation::GridRPhiEta::GridRPhiEta | ( | const BitFieldCoder * | decoder | ) |
Default constructor used by derived classes passing an existing decoder.
Definition at line 29 of file GridRPhiEta.cpp.
|
virtualdefault |
destructor
|
virtual |
Determine the cell ID based on the position.
| [in] | aLocalPosition | (not used). |
| [in] | aGlobalPosition | position in the global coordinates. |
| [in] | aVolumeId | ID of a volume. return Cell ID. |
Reimplemented from dd4hep::DDSegmentation::GridPhiEta.
Definition at line 45 of file GridRPhiEta.cpp.
|
inline |
Get the field name for radial distance. return The field name for radial distance.
Definition at line 74 of file GridRPhiEta.h.
|
inline |
Get the grid size in radial distance from the detector centre. return Grid size in radial distance.
Definition at line 62 of file GridRPhiEta.h.
|
inline |
Get the coordinate offset in radial distance. return The offset in R.
Definition at line 68 of file GridRPhiEta.h.
Determine the global position based on the cell ID.
| [in] | aCellId | ID of a cell. return Position. |
Reimplemented from dd4hep::DDSegmentation::GridPhiEta.
Definition at line 41 of file GridRPhiEta.cpp.
| double dd4hep::DDSegmentation::GridRPhiEta::r | ( | const CellID & | aCellID | ) | const |
Determine the radius based on the cell ID.
| [in] | aCellId | ID of a cell. return Radius. |
Definition at line 56 of file GridRPhiEta.cpp.
|
inline |
Set the field name used for radial distance.
| [in] | aFieldName | Field name for R. |
Definition at line 92 of file GridRPhiEta.h.
|
inline |
Set the grid size in radial distance.
| [in] | aCellSize | Cell size in radial distance. |
Definition at line 80 of file GridRPhiEta.h.
|
inline |
Set the coordinate offset in radial distance.
| [in] | aOffset | Offset in radial distance. |
Definition at line 86 of file GridRPhiEta.h.
|
private |
the grid size in r
Definition at line 99 of file GridRPhiEta.h.
|
private |
the coordinate offset in r
Definition at line 101 of file GridRPhiEta.h.
|
private |
the field name used for r
Definition at line 103 of file GridRPhiEta.h.
1.8.18