DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Attributes | List of all members
dd4hep::DDSegmentation::GridPhiEta Class Reference

Segmentation class describing segmentation in Phi-Eta. More...

#include <GridPhiEta.h>

Inheritance diagram for dd4hep::DDSegmentation::GridPhiEta:
dd4hep::DDSegmentation::Segmentation dd4hep::DDSegmentation::GridRPhiEta

Public Member Functions

 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...
 
virtual Vector3D position (const CellID &aCellID) const
 
virtual CellID cellID (const Vector3D &aLocalPosition, const Vector3D &aGlobalPosition, const VolumeID &aVolumeID) const
 
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 BitFieldCoderdecoder () const
 Access the underlying decoder. More...
 
virtual void setDecoder (const BitFieldCoder *decoder)
 Set the underlying decoder. More...
 
virtual Parameter parameter (const std::string &parameterName) const
 Access to parameter by name. More...
 
virtual Parameters parameters () const
 Access to all parameters. More...
 
virtual void setParameters (const Parameters &parameters)
 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...
 

Protected Attributes

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...
 

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 &param, 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...
 

Detailed Description

Segmentation class describing segmentation in Phi-Eta.

Definition at line 30 of file GridPhiEta.h.

Constructor & Destructor Documentation

◆ GridPhiEta() [1/2]

dd4hep::DDSegmentation::GridPhiEta::GridPhiEta ( const std::string &  aCellEncoding)

default constructor using an arbitrary type

Definition at line 17 of file GridPhiEta.cpp.

◆ GridPhiEta() [2/2]

dd4hep::DDSegmentation::GridPhiEta::GridPhiEta ( const BitFieldCoder decoder)

Default constructor used by derived classes passing an existing decoder.

Definition at line 32 of file GridPhiEta.cpp.

◆ ~GridPhiEta()

virtual dd4hep::DDSegmentation::GridPhiEta::~GridPhiEta ( )
virtualdefault

destructor

Member Function Documentation

◆ cellID()

CellID dd4hep::DDSegmentation::GridPhiEta::cellID ( const Vector3D aLocalPosition,
const Vector3D aGlobalPosition,
const VolumeID aVolumeID 
) const
virtual

Determine the cell ID based on the position.

Parameters
[in]aLocalPosition(not used).
[in]aGlobalPositionposition in the global coordinates.
[in]aVolumeIdID of a volume. return Cell ID.

Implements dd4hep::DDSegmentation::Segmentation.

Reimplemented in dd4hep::DDSegmentation::GridRPhiEta.

Definition at line 51 of file GridPhiEta.cpp.

◆ eta()

double dd4hep::DDSegmentation::GridPhiEta::eta ( const CellID aCellID) const

Determine the pseudorapidity based on the cell ID.

Parameters
[in]aCellIdID of a cell. return Pseudorapidity.

Definition at line 60 of file GridPhiEta.cpp.

◆ fieldNameEta()

const std::string& dd4hep::DDSegmentation::GridPhiEta::fieldNameEta ( ) const
inline

Get the field name used for pseudorapidity return The field name for eta.

Definition at line 96 of file GridPhiEta.h.

◆ fieldNamePhi()

const std::string& dd4hep::DDSegmentation::GridPhiEta::fieldNamePhi ( ) const
inline

Get the field name for azimuthal angle. return The field name for phi.

Definition at line 102 of file GridPhiEta.h.

◆ gridSizeEta()

double dd4hep::DDSegmentation::GridPhiEta::gridSizeEta ( ) const
inline

Get the grid size in pseudorapidity. return Grid size in eta.

Definition at line 66 of file GridPhiEta.h.

◆ gridSizePhi()

double dd4hep::DDSegmentation::GridPhiEta::gridSizePhi ( ) const
inline

Get the grid size in phi. return Grid size in phi.

Definition at line 72 of file GridPhiEta.h.

◆ offsetEta()

double dd4hep::DDSegmentation::GridPhiEta::offsetEta ( ) const
inline

Get the coordinate offset in pseudorapidity. return The offset in eta.

Definition at line 84 of file GridPhiEta.h.

◆ offsetPhi()

double dd4hep::DDSegmentation::GridPhiEta::offsetPhi ( ) const
inline

Get the coordinate offset in azimuthal angle. return The offset in phi.

Definition at line 90 of file GridPhiEta.h.

◆ phi()

double dd4hep::DDSegmentation::GridPhiEta::phi ( const CellID aCellID) const

Determine the azimuthal angle based on the cell ID.

Parameters
[in]aCellIdID of a cell. return Phi.

Definition at line 64 of file GridPhiEta.cpp.

◆ phiBins()

int dd4hep::DDSegmentation::GridPhiEta::phiBins ( ) const
inline

Get the number of bins in azimuthal angle. return Number of bins in phi.

Definition at line 78 of file GridPhiEta.h.

◆ position()

Vector3D dd4hep::DDSegmentation::GridPhiEta::position ( const CellID aCellID) const
virtual

Determine the global position based on the cell ID.

Warning
This segmentation has no knowledge of radius, so radius = 1 is taken into calculations.
Parameters
[in]aCellIdID of a cell. return Position (radius = 1).

Implements dd4hep::DDSegmentation::Segmentation.

Reimplemented in dd4hep::DDSegmentation::GridRPhiEta.

Definition at line 47 of file GridPhiEta.cpp.

◆ setFieldNameEta()

void dd4hep::DDSegmentation::GridPhiEta::setFieldNameEta ( const std::string &  fieldName)
inline

Set the field name used for pseudorapidity.

Parameters
[in]aFieldNameField name for eta.

Definition at line 132 of file GridPhiEta.h.

◆ setFieldNamePhi()

void dd4hep::DDSegmentation::GridPhiEta::setFieldNamePhi ( const std::string &  fieldName)
inline

Set the field name used for azimuthal angle.

Parameters
[in]aFieldNameField name for phi.

Definition at line 138 of file GridPhiEta.h.

◆ setGridSizeEta()

void dd4hep::DDSegmentation::GridPhiEta::setGridSizeEta ( double  aCellSize)
inline

Set the grid size in pseudorapidity.

Parameters
[in]aCellSizeCell size in eta.

Definition at line 108 of file GridPhiEta.h.

◆ setOffsetEta()

void dd4hep::DDSegmentation::GridPhiEta::setOffsetEta ( double  offset)
inline

Set the coordinate offset in pseudorapidity.

Parameters
[in]aOffsetOffset in eta.

Definition at line 120 of file GridPhiEta.h.

◆ setOffsetPhi()

void dd4hep::DDSegmentation::GridPhiEta::setOffsetPhi ( double  offset)
inline

Set the coordinate offset in azimuthal angle.

Parameters
[in]aOffsetOffset in phi.

Definition at line 126 of file GridPhiEta.h.

◆ setPhiBins()

void dd4hep::DDSegmentation::GridPhiEta::setPhiBins ( int  bins)
inline

Set the number of bins in azimuthal angle.

Parameters
[in]aNumberBinsNumber of bins in phi.

Definition at line 114 of file GridPhiEta.h.

Member Data Documentation

◆ m_etaID

std::string dd4hep::DDSegmentation::GridPhiEta::m_etaID
protected

the field name used for eta

Definition at line 153 of file GridPhiEta.h.

◆ m_gridSizeEta

double dd4hep::DDSegmentation::GridPhiEta::m_gridSizeEta
protected

the grid size in eta

Definition at line 145 of file GridPhiEta.h.

◆ m_offsetEta

double dd4hep::DDSegmentation::GridPhiEta::m_offsetEta
protected

the coordinate offset in eta

Definition at line 149 of file GridPhiEta.h.

◆ m_offsetPhi

double dd4hep::DDSegmentation::GridPhiEta::m_offsetPhi
protected

the coordinate offset in phi

Definition at line 151 of file GridPhiEta.h.

◆ m_phiBins

int dd4hep::DDSegmentation::GridPhiEta::m_phiBins
protected

the number of bins in phi

Definition at line 147 of file GridPhiEta.h.

◆ m_phiID

std::string dd4hep::DDSegmentation::GridPhiEta::m_phiID
protected

the field name used for phi

Definition at line 155 of file GridPhiEta.h.


The documentation for this class was generated from the following files: