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

Implementation class for the grid phi-eta segmentation. More...

#include <GridRPhiEta.h>

Inheritance diagram for dd4hep::GridRPhiEta:
dd4hep::Handle< T >

Public Member Functions

 GridRPhiEta ()=default
 Default constructor. More...
 
 GridRPhiEta (const GridRPhiEta &e)=default
 Copy constructor. More...
 
 GridRPhiEta (const Segmentation &e)
 Copy Constructor from segmentation base object. More...
 
 GridRPhiEta (const Handle< Object > &e)
 Copy constructor from handle. More...
 
template<typename Q >
 GridRPhiEta (const Handle< Q > &e)
 Copy constructor from other polymorph/equivalent handle. More...
 
GridRPhiEtaoperator= (const GridRPhiEta &seg)=default
 Assignment operator. More...
 
bool operator== (const GridRPhiEta &seg) const
 Equality operator. More...
 
Position position (const CellID &id) const
 determine the position based on the cell ID More...
 
dd4hep::CellID cellID (const Position &local, const Position &global, const VolumeID &volID) const
 determine the cell ID based on the position More...
 
double gridSizeEta () const
 access the grid size in Eta More...
 
int phiBins () const
 access the grid size in Phi More...
 
double gridSizeR () const
 access the grid size in Phi More...
 
double offsetR () const
 access the coordinate offset in R More...
 
double offsetEta () const
 access the coordinate offset in Eta More...
 
double offsetPhi () const
 access the coordinate offset in Phi More...
 
void setOffsetEta (double offset) const
 set the coordinate offset in R More...
 
void setOffsetR (double offset) const
 set the coordinate offset in Phi More...
 
void setOffsetPhi (double offset) const
 set the coordinate offset in Phi More...
 
void setGridSizeEta (double cellSize) const
 set the grid size in Eta More...
 
void setGridSizeR (double cellSize) const
 set the grid size in R More...
 
void setPhiBins (int cellSize) const
 set the grid size in Phi More...
 
const std::string & fieldNameR () const
 access the field name used for R More...
 
const std::string & fieldNameEta () const
 access the field name used for Eta More...
 
const std::string & fieldNamePhi () const
 access the field name used for Phi More...
 
std::vector< double > cellDimensions (const CellID &) const
 Returns a std::vector<double> of the cellDimensions of the given cell ID in natural order of dimensions (dR, dPhi, dEta) More...
 
- Public Member Functions inherited from dd4hep::Handle< T >
 Handle ()=default
 Default constructor. More...
 
 Handle (Handle< T > &&element)=default
 Copy constructor. More...
 
 Handle (const Handle< T > &element)=default
 Copy constructor. More...
 
 Handle (T *element)
 Initializing constructor from pointer. More...
 
template<typename Q >
 Handle (Q *element)
 Initializing constructor from unrelated pointer with type checking. More...
 
template<typename Q >
 Handle (const Handle< Q > &element)
 Initializing constructor from unrelated handle with type checking. More...
 
Handle< T > & operator= (Handle< T > &&element)=default
 Assignment move operator. More...
 
Handle< T > & operator= (const Handle< T > &element)=default
 Assignment copy operator. More...
 
bool operator== (const Handle< T > &element) const
 Boolean operator == used for RB tree insertions. More...
 
bool operator< (const Handle< T > &element) const
 Boolean operator < used for RB tree insertions. More...
 
bool operator> (const Handle< T > &element) const
 Boolean operator > used for RB tree insertions. More...
 
bool isValid () const
 Check the validity of the object held by the handle. More...
 
bool operator! () const
 Check the validity of the object held by the handle. More...
 
Handle< T > & clear ()
 Release the object held by the handle. More...
 
T * operator-> () const
 Access the held object using the -> operator. More...
 
 operator T& () const
 Automatic type conversion to an object references. More...
 
T & operator* () const
 Access the held object using the * operator. More...
 
T * ptr () const
 Access to the held object. More...
 
template<typename Q >
Q * _ptr () const
 Access to an unrelated object type. More...
 
template<typename Q >
Q * data () const
 Access to an unrelated object type. More...
 
template<typename Q >
Q & object () const
 Access to an unrelated object type. More...
 
T * access () const
 Checked object access. Throws invalid handle runtime exception if invalid handle. More...
 
const char * name () const
 Access the object name (or "" if not supported by the object) More...
 
void assign (Object *n, const std::string &nam, const std::string &title)
 Assign a new named object. Note: object references must be managed by the user. More...
 
void destroy ()
 Destroy the underlying object (be careful here: things are not reference counted)! More...
 
void assign (_Segmentation *s, const std::string &n, const std::string &)
 
const char * name () const
 
const char * name () const
 
void assign (NamedObject *p, const std::string &n, const std::string &t)
 

Additional Inherited Members

- Public Types inherited from dd4hep::Handle< T >
typedef T Object
 Extern accessible definition of the contained element type. More...
 
typedef Handle< T > Base
 Self type: used by sub-classes. More...
 
- Static Public Member Functions inherited from dd4hep::Handle< T >
static void bad_assignment (const std::type_info &from, const std::type_info &to)
 Helper routine called when unrelated types are assigned. More...
 
- Public Attributes inherited from dd4hep::Handle< T >
T * m_element {nullptr}
 Single and only data member: Reference to the actual element. More...
 

Detailed Description

Implementation class for the grid phi-eta segmentation.

Concrete user handle to serve specific needs of client code which requires access to the base functionality not served by the super-class Segmentation.

Note: We only check the validity of the underlying handle. If for whatever reason the implementation object is not valid This is not checked. In principle this CANNOT happen unless some brain-dead has fiddled with the handled object directly.....

Note: The handle base corresponding to this object in for conveniance reasons instantiated in dd4hep/src/Segmentations.cpp.

Author
A. Zaborowska
Version
1.0

Definition at line 48 of file GridRPhiEta.h.

Constructor & Destructor Documentation

◆ GridRPhiEta() [1/5]

dd4hep::GridRPhiEta::GridRPhiEta ( )
default

Default constructor.

◆ GridRPhiEta() [2/5]

dd4hep::GridRPhiEta::GridRPhiEta ( const GridRPhiEta e)
default

Copy constructor.

◆ GridRPhiEta() [3/5]

dd4hep::GridRPhiEta::GridRPhiEta ( const Segmentation e)
inline

Copy Constructor from segmentation base object.

Definition at line 55 of file GridRPhiEta.h.

◆ GridRPhiEta() [4/5]

dd4hep::GridRPhiEta::GridRPhiEta ( const Handle< Object > &  e)
inline

Copy constructor from handle.

Definition at line 57 of file GridRPhiEta.h.

◆ GridRPhiEta() [5/5]

template<typename Q >
dd4hep::GridRPhiEta::GridRPhiEta ( const Handle< Q > &  e)
inline

Copy constructor from other polymorph/equivalent handle.

Definition at line 60 of file GridRPhiEta.h.

Member Function Documentation

◆ cellDimensions()

std::vector<double> dd4hep::GridRPhiEta::cellDimensions ( const CellID ) const
inline

Returns a std::vector<double> of the cellDimensions of the given cell ID in natural order of dimensions (dR, dPhi, dEta)

Returns a std::vector of the cellDimensions of the given cell ID

Parameters
cellIDis ignored as all cells have the same dimension
Returns
std::vector<double> size 3:
  1. size in r
  2. size in phi
  3. size in eta

Definition at line 128 of file GridRPhiEta.h.

◆ cellID()

dd4hep::CellID dd4hep::GridRPhiEta::cellID ( const Position local,
const Position global,
const VolumeID volID 
) const
inline

determine the cell ID based on the position

Definition at line 69 of file GridRPhiEta.h.

◆ fieldNameEta()

const std::string& dd4hep::GridRPhiEta::fieldNameEta ( ) const
inline

access the field name used for Eta

Definition at line 113 of file GridRPhiEta.h.

◆ fieldNamePhi()

const std::string& dd4hep::GridRPhiEta::fieldNamePhi ( ) const
inline

access the field name used for Phi

Definition at line 116 of file GridRPhiEta.h.

◆ fieldNameR()

const std::string& dd4hep::GridRPhiEta::fieldNameR ( ) const
inline

access the field name used for R

Definition at line 110 of file GridRPhiEta.h.

◆ gridSizeEta()

double dd4hep::GridRPhiEta::gridSizeEta ( ) const
inline

access the grid size in Eta

Definition at line 74 of file GridRPhiEta.h.

◆ gridSizeR()

double dd4hep::GridRPhiEta::gridSizeR ( ) const
inline

access the grid size in Phi

Definition at line 80 of file GridRPhiEta.h.

◆ offsetEta()

double dd4hep::GridRPhiEta::offsetEta ( ) const
inline

access the coordinate offset in Eta

Definition at line 86 of file GridRPhiEta.h.

◆ offsetPhi()

double dd4hep::GridRPhiEta::offsetPhi ( ) const
inline

access the coordinate offset in Phi

Definition at line 89 of file GridRPhiEta.h.

◆ offsetR()

double dd4hep::GridRPhiEta::offsetR ( ) const
inline

access the coordinate offset in R

Definition at line 83 of file GridRPhiEta.h.

◆ operator=()

GridRPhiEta& dd4hep::GridRPhiEta::operator= ( const GridRPhiEta seg)
default

Assignment operator.

◆ operator==()

bool dd4hep::GridRPhiEta::operator== ( const GridRPhiEta seg) const
inline

Equality operator.

Definition at line 64 of file GridRPhiEta.h.

◆ phiBins()

int dd4hep::GridRPhiEta::phiBins ( ) const
inline

access the grid size in Phi

Definition at line 77 of file GridRPhiEta.h.

◆ position()

Position dd4hep::GridRPhiEta::position ( const CellID id) const
inline

determine the position based on the cell ID

Definition at line 66 of file GridRPhiEta.h.

◆ setGridSizeEta()

void dd4hep::GridRPhiEta::setGridSizeEta ( double  cellSize) const
inline

set the grid size in Eta

Definition at line 101 of file GridRPhiEta.h.

◆ setGridSizeR()

void dd4hep::GridRPhiEta::setGridSizeR ( double  cellSize) const
inline

set the grid size in R

Definition at line 104 of file GridRPhiEta.h.

◆ setOffsetEta()

void dd4hep::GridRPhiEta::setOffsetEta ( double  offset) const
inline

set the coordinate offset in R

Definition at line 92 of file GridRPhiEta.h.

◆ setOffsetPhi()

void dd4hep::GridRPhiEta::setOffsetPhi ( double  offset) const
inline

set the coordinate offset in Phi

Definition at line 98 of file GridRPhiEta.h.

◆ setOffsetR()

void dd4hep::GridRPhiEta::setOffsetR ( double  offset) const
inline

set the coordinate offset in Phi

Definition at line 95 of file GridRPhiEta.h.

◆ setPhiBins()

void dd4hep::GridRPhiEta::setPhiBins ( int  cellSize) const
inline

set the grid size in Phi

Definition at line 107 of file GridRPhiEta.h.


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