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

Segmentation base class describing cartesian grid segmentation in along U,V rotated some angle from local X,Y axes. More...

#include <CartesianGridUV.h>

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

Public Member Functions

 CartesianGridUV (const std::string &cellEncoding="")
 Default constructor passing the encoding string. More...
 
 CartesianGridUV (const BitFieldCoder *decoder)
 Default constructor used by derived classes passing an existing decoder. More...
 
virtual ~CartesianGridUV ()
 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 gridSizeU () const
 access the grid size in U More...
 
double gridSizeV () const
 access the grid size in V More...
 
double offsetU () const
 access the coordinate offset in U More...
 
double offsetV () const
 access the coordinate offset in V More...
 
double gridAngle () const
 access the rotation angle More...
 
const std::string & fieldNameU () const
 access the field name used for U More...
 
const std::string & fieldNameV () const
 access the field name used for V More...
 
void setGridSizeU (double cellSize)
 set the grid size in U More...
 
void setGridSizeV (double cellSize)
 set the grid size in V More...
 
void setOffsetU (double offset)
 set the coordinate offset in U More...
 
void setOffsetV (double offset)
 set the coordinate offset in V More...
 
void setGridAngle (double angle)
 set the rotation angle More...
 
void setFieldNameU (const std::string &fieldName)
 set the field name used for U More...
 
void setFieldNameV (const std::string &fieldName)
 set the field name used for V 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 _gridSizeU
 the grid size in U More...
 
double _offsetU
 the coordinate offset in U More...
 
double _gridSizeV
 the grid size in V More...
 
double _offsetV
 the coordinate offset in V More...
 
std::string _uId
 the field name used for U More...
 
std::string _vId
 the field name used for V More...
 
double _gridAngle
 the U grid angle 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

Segmentation base class describing cartesian grid segmentation in along U,V rotated some angle from local X,Y axes.

Definition at line 27 of file CartesianGridUV.h.

Constructor & Destructor Documentation

◆ CartesianGridUV() [1/2]

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

Default constructor passing the encoding string.

default constructor using an encoding string

Definition at line 25 of file CartesianGridUV.cpp.

◆ CartesianGridUV() [2/2]

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

Default constructor used by derived classes passing an existing decoder.

Definition at line 42 of file CartesianGridUV.cpp.

◆ ~CartesianGridUV()

dd4hep::DDSegmentation::CartesianGridUV::~CartesianGridUV ( )
virtual

destructor

Definition at line 60 of file CartesianGridUV.cpp.

Member Function Documentation

◆ cellDimensions()

std::vector< double > dd4hep::DDSegmentation::CartesianGridUV::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 U
  2. size in V

Reimplemented from dd4hep::DDSegmentation::Segmentation.

Definition at line 84 of file CartesianGridUV.cpp.

◆ cellID()

CellID dd4hep::DDSegmentation::CartesianGridUV::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 74 of file CartesianGridUV.cpp.

◆ fieldNameU()

const std::string& dd4hep::DDSegmentation::CartesianGridUV::fieldNameU ( ) const
inline

access the field name used for U

Definition at line 61 of file CartesianGridUV.h.

◆ fieldNameV()

const std::string& dd4hep::DDSegmentation::CartesianGridUV::fieldNameV ( ) const
inline

access the field name used for V

Definition at line 65 of file CartesianGridUV.h.

◆ gridAngle()

double dd4hep::DDSegmentation::CartesianGridUV::gridAngle ( ) const
inline

access the rotation angle

Definition at line 57 of file CartesianGridUV.h.

◆ gridSizeU()

double dd4hep::DDSegmentation::CartesianGridUV::gridSizeU ( ) const
inline

access the grid size in U

Definition at line 41 of file CartesianGridUV.h.

◆ gridSizeV()

double dd4hep::DDSegmentation::CartesianGridUV::gridSizeV ( ) const
inline

access the grid size in V

Definition at line 45 of file CartesianGridUV.h.

◆ offsetU()

double dd4hep::DDSegmentation::CartesianGridUV::offsetU ( ) const
inline

access the coordinate offset in U

Definition at line 49 of file CartesianGridUV.h.

◆ offsetV()

double dd4hep::DDSegmentation::CartesianGridUV::offsetV ( ) const
inline

access the coordinate offset in V

Definition at line 53 of file CartesianGridUV.h.

◆ position()

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

determine the position based on the cell ID

Implements dd4hep::DDSegmentation::Segmentation.

Definition at line 65 of file CartesianGridUV.cpp.

◆ setFieldNameU()

void dd4hep::DDSegmentation::CartesianGridUV::setFieldNameU ( const std::string &  fieldName)
inline

set the field name used for U

Definition at line 89 of file CartesianGridUV.h.

◆ setFieldNameV()

void dd4hep::DDSegmentation::CartesianGridUV::setFieldNameV ( const std::string &  fieldName)
inline

set the field name used for V

Definition at line 93 of file CartesianGridUV.h.

◆ setGridAngle()

void dd4hep::DDSegmentation::CartesianGridUV::setGridAngle ( double  angle)
inline

set the rotation angle

Definition at line 85 of file CartesianGridUV.h.

◆ setGridSizeU()

void dd4hep::DDSegmentation::CartesianGridUV::setGridSizeU ( double  cellSize)
inline

set the grid size in U

Definition at line 69 of file CartesianGridUV.h.

◆ setGridSizeV()

void dd4hep::DDSegmentation::CartesianGridUV::setGridSizeV ( double  cellSize)
inline

set the grid size in V

Definition at line 73 of file CartesianGridUV.h.

◆ setOffsetU()

void dd4hep::DDSegmentation::CartesianGridUV::setOffsetU ( double  offset)
inline

set the coordinate offset in U

Definition at line 77 of file CartesianGridUV.h.

◆ setOffsetV()

void dd4hep::DDSegmentation::CartesianGridUV::setOffsetV ( double  offset)
inline

set the coordinate offset in V

Definition at line 81 of file CartesianGridUV.h.

Member Data Documentation

◆ _gridAngle

double dd4hep::DDSegmentation::CartesianGridUV::_gridAngle
protected

the U grid angle

Definition at line 121 of file CartesianGridUV.h.

◆ _gridSizeU

double dd4hep::DDSegmentation::CartesianGridUV::_gridSizeU
protected

the grid size in U

Definition at line 109 of file CartesianGridUV.h.

◆ _gridSizeV

double dd4hep::DDSegmentation::CartesianGridUV::_gridSizeV
protected

the grid size in V

Definition at line 113 of file CartesianGridUV.h.

◆ _offsetU

double dd4hep::DDSegmentation::CartesianGridUV::_offsetU
protected

the coordinate offset in U

Definition at line 111 of file CartesianGridUV.h.

◆ _offsetV

double dd4hep::DDSegmentation::CartesianGridUV::_offsetV
protected

the coordinate offset in V

Definition at line 115 of file CartesianGridUV.h.

◆ _uId

std::string dd4hep::DDSegmentation::CartesianGridUV::_uId
protected

the field name used for U

Definition at line 117 of file CartesianGridUV.h.

◆ _vId

std::string dd4hep::DDSegmentation::CartesianGridUV::_vId
protected

the field name used for V

Definition at line 119 of file CartesianGridUV.h.


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