DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
A segmentation for arbitrary sizes in R and R-dependent sizes in Phi. More...
#include <PolarGridRPhi.h>
Public Member Functions | |
PolarGridRPhi (const std::string &cellEncoding="") | |
Default constructor passing the encoding string. More... | |
PolarGridRPhi (const BitFieldCoder *decoder) | |
Default constructor used by derived classes passing an existing decoder. More... | |
virtual | ~PolarGridRPhi () |
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 | gridSizeR () const |
access the grid size in R More... | |
double | gridSizePhi () const |
access the grid size in Phi More... | |
double | offsetR () const |
access the coordinate offset in R More... | |
double | offsetPhi () const |
access the coordinate offset in Phi More... | |
const std::string & | fieldNameR () const |
access the field name used for R More... | |
const std::string & | fieldNamePhi () const |
access the field name used for Phi More... | |
void | setGridSizeR (double cellSize) |
set the grid size in R More... | |
void | setGridSizePhi (double cellSize) |
set the grid size in Phi More... | |
void | setOffsetR (double offset) |
set the coordinate offset in R More... | |
void | setOffsetPhi (double offset) |
set the coordinate offset in Phi More... | |
void | setFieldNameR (const std::string &fieldName) |
set the field name used for X More... | |
void | setFieldNamePhi (const std::string &fieldName) |
set the field name used for Y More... | |
virtual std::vector< double > | cellDimensions (const CellID &cID) const |
Returns a vector<double> of the cellDimensions of the given cell ID in natural order of dimensions: dr, r*dPhi. More... | |
Public Member Functions inherited from dd4hep::DDSegmentation::PolarGrid | |
virtual | ~PolarGrid () |
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... | |
Protected Attributes | |
double | _gridSizeR |
the grid size in R More... | |
double | _offsetR |
the coordinate offset in R More... | |
double | _gridSizePhi |
the grid size in Phi More... | |
double | _offsetPhi |
the coordinate offset in Phi More... | |
std::string | _rId |
the field name used for R More... | |
std::string | _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... | |
Additional Inherited Members | |
Protected Member Functions inherited from dd4hep::DDSegmentation::PolarGrid | |
PolarGrid (const std::string &cellEncoding="") | |
Default constructor used by derived classes passing the encoding string. More... | |
PolarGrid (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... | |
A segmentation for arbitrary sizes in R and R-dependent sizes in Phi.
Definition at line 29 of file PolarGridRPhi.h.
dd4hep::DDSegmentation::PolarGridRPhi::PolarGridRPhi | ( | const std::string & | cellEncoding = "" | ) |
Default constructor passing the encoding string.
default constructor using an encoding string
Definition at line 24 of file PolarGridRPhi.cpp.
dd4hep::DDSegmentation::PolarGridRPhi::PolarGridRPhi | ( | const BitFieldCoder * | decoder | ) |
Default constructor used by derived classes passing an existing decoder.
Definition at line 41 of file PolarGridRPhi.cpp.
|
virtual |
destructor
Definition at line 56 of file PolarGridRPhi.cpp.
|
virtual |
Returns a vector<double> of the cellDimensions of the given cell ID in natural order of dimensions: dr, r*dPhi.
Returns a vector of the cellDimensions of the given cell ID
cID | cellID |
Reimplemented from dd4hep::DDSegmentation::Segmentation.
Definition at line 82 of file PolarGridRPhi.cpp.
|
virtual |
determine the cell ID based on the position
Implements dd4hep::DDSegmentation::Segmentation.
Definition at line 73 of file PolarGridRPhi.cpp.
|
inline |
access the field name used for Phi
Definition at line 63 of file PolarGridRPhi.h.
|
inline |
access the field name used for R
Definition at line 59 of file PolarGridRPhi.h.
|
inline |
access the grid size in Phi
Definition at line 47 of file PolarGridRPhi.h.
|
inline |
access the grid size in R
Definition at line 43 of file PolarGridRPhi.h.
|
inline |
access the coordinate offset in Phi
Definition at line 55 of file PolarGridRPhi.h.
|
inline |
access the coordinate offset in R
Definition at line 51 of file PolarGridRPhi.h.
determine the position based on the cell ID
Implements dd4hep::DDSegmentation::Segmentation.
Definition at line 61 of file PolarGridRPhi.cpp.
|
inline |
set the field name used for Y
Definition at line 87 of file PolarGridRPhi.h.
|
inline |
set the field name used for X
Definition at line 83 of file PolarGridRPhi.h.
|
inline |
set the grid size in Phi
Definition at line 71 of file PolarGridRPhi.h.
|
inline |
set the grid size in R
Definition at line 67 of file PolarGridRPhi.h.
|
inline |
set the coordinate offset in Phi
Definition at line 79 of file PolarGridRPhi.h.
|
inline |
set the coordinate offset in R
Definition at line 75 of file PolarGridRPhi.h.
|
protected |
the grid size in Phi
Definition at line 107 of file PolarGridRPhi.h.
|
protected |
the grid size in R
Definition at line 103 of file PolarGridRPhi.h.
|
protected |
the coordinate offset in Phi
Definition at line 109 of file PolarGridRPhi.h.
|
protected |
the coordinate offset in R
Definition at line 105 of file PolarGridRPhi.h.
|
protected |
the field name used for Phi
Definition at line 113 of file PolarGridRPhi.h.
|
protected |
the field name used for R
Definition at line 111 of file PolarGridRPhi.h.