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

A segmentation class to describe tiled layers. More...

#include <TiledLayerGridXY.h>

Inheritance diagram for dd4hep::DDSegmentation::TiledLayerGridXY:
dd4hep::DDSegmentation::CartesianGrid dd4hep::DDSegmentation::Segmentation

Public Member Functions

 TiledLayerGridXY (const std::string &cellEncoding="")
 Default constructor passing the encoding string. More...
 
 TiledLayerGridXY (const BitFieldCoder *decoder)
 Default constructor used by derived classes passing an existing decoder. More...
 
virtual ~TiledLayerGridXY ()
 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...
 
std::vector< double > layerOffsetX () const
 access the coordinate layerOffset in X More...
 
std::vector< double > layerOffsetY () const
 access the coordinate layerOffset in Y More...
 
std::vector< double > boundaryLayerX () const
 access the boundary dimension in X More...
 
std::vector< double > FractCellSizeXPerLayer () const
 access the fraction cell size in X 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...
 
const std::string & fieldNameLayer () const
 access the field name used for Layer 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 setLayerOffsetX (double offset)
 set the coordinate layerOffset in X More...
 
void setLayerOffsetY (double offset)
 set the coordinate layerOffset 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 setFieldNameLayer (const std::string &fieldName)
 set the field name used for Y More...
 
void setBoundaryLayerX (double halfX)
 set the layer boundary dimension for X More...
 
void setFractCellSizeXPerLayer (double newFractCellSizeX)
 set the layer fraction cell size for X 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 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...
 

Protected Attributes

double _gridSizeX
 the grid size in X More...
 
double _offsetX
 the coordinate offset in X More...
 
double _gridSizeY
 the grid size in Y More...
 
double _offsetY
 the coordinate offset in Y More...
 
std::string _xId
 the field name used for X More...
 
std::string _yId
 the field name used for Y More...
 
std::string _identifierLayer
 encoding field used for the layer More...
 
std::vector< double > _layerOffsetX
 list of layer x offset More...
 
std::vector< double > _layerOffsetY
 list of layer y offset More...
 
std::vector< double > _layerDimX
 list of layer boundary dimension for X More...
 
std::vector< double > _fractCellSizeXPerLayer
 list of the layer fraction cell size for X 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 &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

A segmentation class to describe tiled layers.

Definition at line 32 of file TiledLayerGridXY.h.

Constructor & Destructor Documentation

◆ TiledLayerGridXY() [1/2]

dd4hep::DDSegmentation::TiledLayerGridXY::TiledLayerGridXY ( const std::string &  cellEncoding = "")

Default constructor passing the encoding string.

default constructor using an encoding string

Definition at line 21 of file TiledLayerGridXY.cpp.

◆ TiledLayerGridXY() [2/2]

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

Default constructor used by derived classes passing an existing decoder.

Definition at line 44 of file TiledLayerGridXY.cpp.

◆ ~TiledLayerGridXY()

dd4hep::DDSegmentation::TiledLayerGridXY::~TiledLayerGridXY ( )
virtual

destructor

Definition at line 66 of file TiledLayerGridXY.cpp.

Member Function Documentation

◆ boundaryLayerX()

std::vector<double> dd4hep::DDSegmentation::TiledLayerGridXY::boundaryLayerX ( ) const
inline

access the boundary dimension in X

Definition at line 70 of file TiledLayerGridXY.h.

◆ cellDimensions()

std::vector< double > dd4hep::DDSegmentation::TiledLayerGridXY::cellDimensions ( const CellID cellID) const
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

Parameters
cellIDis ignored as all cells have the same dimension
Returns
std::vector<double> size 2:
  1. size in x
  2. size in y

Reimplemented from dd4hep::DDSegmentation::Segmentation.

Definition at line 114 of file TiledLayerGridXY.cpp.

◆ cellID()

CellID dd4hep::DDSegmentation::TiledLayerGridXY::cellID ( const Vector3D localPosition,
const Vector3D globalPosition,
const VolumeID volumeID 
) const
virtual

determine the cell ID based on the position

Implements dd4hep::DDSegmentation::Segmentation.

Definition at line 98 of file TiledLayerGridXY.cpp.

◆ fieldNameLayer()

const std::string& dd4hep::DDSegmentation::TiledLayerGridXY::fieldNameLayer ( ) const
inline

access the field name used for Layer

Definition at line 86 of file TiledLayerGridXY.h.

◆ fieldNameX()

const std::string& dd4hep::DDSegmentation::TiledLayerGridXY::fieldNameX ( ) const
inline

access the field name used for X

Definition at line 78 of file TiledLayerGridXY.h.

◆ fieldNameY()

const std::string& dd4hep::DDSegmentation::TiledLayerGridXY::fieldNameY ( ) const
inline

access the field name used for Y

Definition at line 82 of file TiledLayerGridXY.h.

◆ FractCellSizeXPerLayer()

std::vector<double> dd4hep::DDSegmentation::TiledLayerGridXY::FractCellSizeXPerLayer ( ) const
inline

access the fraction cell size in X

Definition at line 74 of file TiledLayerGridXY.h.

◆ gridSizeX()

double dd4hep::DDSegmentation::TiledLayerGridXY::gridSizeX ( ) const
inline

access the grid size in X

Definition at line 46 of file TiledLayerGridXY.h.

◆ gridSizeY()

double dd4hep::DDSegmentation::TiledLayerGridXY::gridSizeY ( ) const
inline

access the grid size in Y

Definition at line 50 of file TiledLayerGridXY.h.

◆ layerOffsetX()

std::vector<double> dd4hep::DDSegmentation::TiledLayerGridXY::layerOffsetX ( ) const
inline

access the coordinate layerOffset in X

Definition at line 62 of file TiledLayerGridXY.h.

◆ layerOffsetY()

std::vector<double> dd4hep::DDSegmentation::TiledLayerGridXY::layerOffsetY ( ) const
inline

access the coordinate layerOffset in Y

Definition at line 66 of file TiledLayerGridXY.h.

◆ offsetX()

double dd4hep::DDSegmentation::TiledLayerGridXY::offsetX ( ) const
inline

access the coordinate offset in X

Definition at line 54 of file TiledLayerGridXY.h.

◆ offsetY()

double dd4hep::DDSegmentation::TiledLayerGridXY::offsetY ( ) const
inline

access the coordinate offset in Y

Definition at line 58 of file TiledLayerGridXY.h.

◆ position()

Vector3D dd4hep::DDSegmentation::TiledLayerGridXY::position ( const CellID cellID) const
virtual

determine the position based on the cell ID

Implements dd4hep::DDSegmentation::Segmentation.

Definition at line 71 of file TiledLayerGridXY.cpp.

◆ setBoundaryLayerX()

void dd4hep::DDSegmentation::TiledLayerGridXY::setBoundaryLayerX ( double  halfX)
inline

set the layer boundary dimension for X

Definition at line 126 of file TiledLayerGridXY.h.

◆ setFieldNameLayer()

void dd4hep::DDSegmentation::TiledLayerGridXY::setFieldNameLayer ( const std::string &  fieldName)
inline

set the field name used for Y

Definition at line 122 of file TiledLayerGridXY.h.

◆ setFieldNameX()

void dd4hep::DDSegmentation::TiledLayerGridXY::setFieldNameX ( const std::string &  fieldName)
inline

set the field name used for X

Definition at line 114 of file TiledLayerGridXY.h.

◆ setFieldNameY()

void dd4hep::DDSegmentation::TiledLayerGridXY::setFieldNameY ( const std::string &  fieldName)
inline

set the field name used for Y

Definition at line 118 of file TiledLayerGridXY.h.

◆ setFractCellSizeXPerLayer()

void dd4hep::DDSegmentation::TiledLayerGridXY::setFractCellSizeXPerLayer ( double  newFractCellSizeX)
inline

set the layer fraction cell size for X

Definition at line 131 of file TiledLayerGridXY.h.

◆ setGridSizeX()

void dd4hep::DDSegmentation::TiledLayerGridXY::setGridSizeX ( double  cellSize)
inline

set the grid size in X

Definition at line 90 of file TiledLayerGridXY.h.

◆ setGridSizeY()

void dd4hep::DDSegmentation::TiledLayerGridXY::setGridSizeY ( double  cellSize)
inline

set the grid size in Y

Definition at line 94 of file TiledLayerGridXY.h.

◆ setLayerOffsetX()

void dd4hep::DDSegmentation::TiledLayerGridXY::setLayerOffsetX ( double  offset)
inline

set the coordinate layerOffset in X

Definition at line 106 of file TiledLayerGridXY.h.

◆ setLayerOffsetY()

void dd4hep::DDSegmentation::TiledLayerGridXY::setLayerOffsetY ( double  offset)
inline

set the coordinate layerOffset in Y

Definition at line 110 of file TiledLayerGridXY.h.

◆ setOffsetX()

void dd4hep::DDSegmentation::TiledLayerGridXY::setOffsetX ( double  offset)
inline

set the coordinate offset in X

Definition at line 98 of file TiledLayerGridXY.h.

◆ setOffsetY()

void dd4hep::DDSegmentation::TiledLayerGridXY::setOffsetY ( double  offset)
inline

set the coordinate offset in Y

Definition at line 102 of file TiledLayerGridXY.h.

Member Data Documentation

◆ _fractCellSizeXPerLayer

std::vector<double> dd4hep::DDSegmentation::TiledLayerGridXY::_fractCellSizeXPerLayer
protected

list of the layer fraction cell size for X

Definition at line 168 of file TiledLayerGridXY.h.

◆ _gridSizeX

double dd4hep::DDSegmentation::TiledLayerGridXY::_gridSizeX
protected

the grid size in X

Definition at line 148 of file TiledLayerGridXY.h.

◆ _gridSizeY

double dd4hep::DDSegmentation::TiledLayerGridXY::_gridSizeY
protected

the grid size in Y

Definition at line 152 of file TiledLayerGridXY.h.

◆ _identifierLayer

std::string dd4hep::DDSegmentation::TiledLayerGridXY::_identifierLayer
protected

encoding field used for the layer

Definition at line 160 of file TiledLayerGridXY.h.

◆ _layerDimX

std::vector<double> dd4hep::DDSegmentation::TiledLayerGridXY::_layerDimX
protected

list of layer boundary dimension for X

Definition at line 166 of file TiledLayerGridXY.h.

◆ _layerOffsetX

std::vector<double> dd4hep::DDSegmentation::TiledLayerGridXY::_layerOffsetX
protected

list of layer x offset

Definition at line 162 of file TiledLayerGridXY.h.

◆ _layerOffsetY

std::vector<double> dd4hep::DDSegmentation::TiledLayerGridXY::_layerOffsetY
protected

list of layer y offset

Definition at line 164 of file TiledLayerGridXY.h.

◆ _offsetX

double dd4hep::DDSegmentation::TiledLayerGridXY::_offsetX
protected

the coordinate offset in X

Definition at line 150 of file TiledLayerGridXY.h.

◆ _offsetY

double dd4hep::DDSegmentation::TiledLayerGridXY::_offsetY
protected

the coordinate offset in Y

Definition at line 154 of file TiledLayerGridXY.h.

◆ _xId

std::string dd4hep::DDSegmentation::TiledLayerGridXY::_xId
protected

the field name used for X

Definition at line 156 of file TiledLayerGridXY.h.

◆ _yId

std::string dd4hep::DDSegmentation::TiledLayerGridXY::_yId
protected

the field name used for Y

Definition at line 158 of file TiledLayerGridXY.h.


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