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

A segmentation class to describe projective cylinders. More...

#include <ProjectiveCylinder.h>

Inheritance diagram for dd4hep::DDSegmentation::ProjectiveCylinder:
dd4hep::DDSegmentation::CylindricalSegmentation dd4hep::DDSegmentation::Segmentation

Public Member Functions

 ProjectiveCylinder (const std::string &cellEncoding)
 default constructor using an arbitrary type More...
 
 ProjectiveCylinder (const BitFieldCoder *decoder)
 Default constructor used by derived classes passing an existing decoder. More...
 
virtual ~ProjectiveCylinder ()
 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 theta (const CellID &cellID) const
 determine the polar angle theta based on the cell ID More...
 
double phi (const CellID &cellID) const
 determine the azimuthal angle phi based on the cell ID More...
 
int thetaBins () const
 access the number of bins in theta More...
 
int phiBins () const
 access the number of bins in theta More...
 
double offsetTheta () const
 access the coordinate offset in theta More...
 
double offsetPhi () const
 access the coordinate offset in phi More...
 
std::string fieldNameTheta () const
 access the field name used for theta More...
 
std::string fieldNamePhi () const
 access the field name used for phi More...
 
void setThetaBins (int bins)
 set the number of bins in theta More...
 
void setPhiBins (int bins)
 set the number of bins in phi More...
 
void setOffsetTheta (double offset)
 set the coordinate offset in theta More...
 
void setOffsetPhi (double offset)
 set the coordinate offset in phi More...
 
void setFieldNameTheta (const std::string &fieldName)
 set the field name used for theta More...
 
void setFieldNamePhi (const std::string &fieldName)
 set the field name used for phi More...
 
- Public Member Functions inherited from dd4hep::DDSegmentation::CylindricalSegmentation
virtual ~CylindricalSegmentation ()
 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...
 
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

int _thetaBins
 the number of bins in theta More...
 
int _phiBins
 the number of bins in phi More...
 
double _offsetTheta
 the coordinate offset in theta More...
 
double _offsetPhi
 the coordinate offset in phi More...
 
std::string _thetaID
 the field name used for theta 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::CylindricalSegmentation
 CylindricalSegmentation (const std::string &cellEncoding)
 default constructor using an arbitrary type More...
 
 CylindricalSegmentation (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 projective cylinders.

Definition at line 28 of file ProjectiveCylinder.h.

Constructor & Destructor Documentation

◆ ProjectiveCylinder() [1/2]

dd4hep::DDSegmentation::ProjectiveCylinder::ProjectiveCylinder ( const std::string &  cellEncoding)

default constructor using an arbitrary type

default constructor using an encoding string

Definition at line 21 of file ProjectiveCylinder.cpp.

◆ ProjectiveCylinder() [2/2]

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

Default constructor used by derived classes passing an existing decoder.

Definition at line 38 of file ProjectiveCylinder.cpp.

◆ ~ProjectiveCylinder()

dd4hep::DDSegmentation::ProjectiveCylinder::~ProjectiveCylinder ( )
virtual

destructor

Definition at line 53 of file ProjectiveCylinder.cpp.

Member Function Documentation

◆ cellID()

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

◆ fieldNamePhi()

std::string dd4hep::DDSegmentation::ProjectiveCylinder::fieldNamePhi ( ) const
inline

access the field name used for phi

Definition at line 66 of file ProjectiveCylinder.h.

◆ fieldNameTheta()

std::string dd4hep::DDSegmentation::ProjectiveCylinder::fieldNameTheta ( ) const
inline

access the field name used for theta

Definition at line 62 of file ProjectiveCylinder.h.

◆ offsetPhi()

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

access the coordinate offset in phi

Definition at line 58 of file ProjectiveCylinder.h.

◆ offsetTheta()

double dd4hep::DDSegmentation::ProjectiveCylinder::offsetTheta ( ) const
inline

access the coordinate offset in theta

Definition at line 54 of file ProjectiveCylinder.h.

◆ phi()

double dd4hep::DDSegmentation::ProjectiveCylinder::phi ( const CellID cellID) const

determine the azimuthal angle phi based on the cell ID

Definition at line 78 of file ProjectiveCylinder.cpp.

◆ phiBins()

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

access the number of bins in theta

Definition at line 50 of file ProjectiveCylinder.h.

◆ position()

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

determine the position based on the cell ID

determine the local based on the cell ID

Implements dd4hep::DDSegmentation::Segmentation.

Definition at line 58 of file ProjectiveCylinder.cpp.

◆ setFieldNamePhi()

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

set the field name used for phi

Definition at line 90 of file ProjectiveCylinder.h.

◆ setFieldNameTheta()

void dd4hep::DDSegmentation::ProjectiveCylinder::setFieldNameTheta ( const std::string &  fieldName)
inline

set the field name used for theta

Definition at line 86 of file ProjectiveCylinder.h.

◆ setOffsetPhi()

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

set the coordinate offset in phi

Definition at line 82 of file ProjectiveCylinder.h.

◆ setOffsetTheta()

void dd4hep::DDSegmentation::ProjectiveCylinder::setOffsetTheta ( double  offset)
inline

set the coordinate offset in theta

Definition at line 78 of file ProjectiveCylinder.h.

◆ setPhiBins()

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

set the number of bins in phi

Definition at line 74 of file ProjectiveCylinder.h.

◆ setThetaBins()

void dd4hep::DDSegmentation::ProjectiveCylinder::setThetaBins ( int  bins)
inline

set the number of bins in theta

Definition at line 70 of file ProjectiveCylinder.h.

◆ theta()

double dd4hep::DDSegmentation::ProjectiveCylinder::theta ( const CellID cellID) const

determine the polar angle theta based on the cell ID

Definition at line 73 of file ProjectiveCylinder.cpp.

◆ thetaBins()

int dd4hep::DDSegmentation::ProjectiveCylinder::thetaBins ( ) const
inline

access the number of bins in theta

Definition at line 46 of file ProjectiveCylinder.h.

Member Data Documentation

◆ _offsetPhi

double dd4hep::DDSegmentation::ProjectiveCylinder::_offsetPhi
protected

the coordinate offset in phi

Definition at line 102 of file ProjectiveCylinder.h.

◆ _offsetTheta

double dd4hep::DDSegmentation::ProjectiveCylinder::_offsetTheta
protected

the coordinate offset in theta

Definition at line 100 of file ProjectiveCylinder.h.

◆ _phiBins

int dd4hep::DDSegmentation::ProjectiveCylinder::_phiBins
protected

the number of bins in phi

Definition at line 98 of file ProjectiveCylinder.h.

◆ _phiID

std::string dd4hep::DDSegmentation::ProjectiveCylinder::_phiID
protected

the field name used for phi

Definition at line 106 of file ProjectiveCylinder.h.

◆ _thetaBins

int dd4hep::DDSegmentation::ProjectiveCylinder::_thetaBins
protected

the number of bins in theta

Definition at line 96 of file ProjectiveCylinder.h.

◆ _thetaID

std::string dd4hep::DDSegmentation::ProjectiveCylinder::_thetaID
protected

the field name used for theta

Definition at line 104 of file ProjectiveCylinder.h.


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