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

Implementation class for the grid XYZ segmentation. More...

#include <CartesianGridXYZ.h>

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

Public Member Functions

 CartesianGridXYZ ()=default
 Default constructor. More...
 
 CartesianGridXYZ (const CartesianGridXYZ &e)=default
 Copy constructor. More...
 
 CartesianGridXYZ (const Segmentation &e)
 Copy Constructor from segmentation base object. More...
 
 CartesianGridXYZ (const Handle< Object > &e)
 Copy constructor from handle. More...
 
template<typename Q >
 CartesianGridXYZ (const Handle< Q > &e)
 Copy constructor from other polymorph/equivalent handle. More...
 
CartesianGridXYZoperator= (const CartesianGridXYZ &seg)=default
 Assignment operator. More...
 
bool operator== (const CartesianGridXYZ &seg) const
 Equality operator. More...
 
Position position (const CellID &cellID) const
 determine the position based on the cell ID More...
 
CellID cellID (const Position &local, const Position &global, const VolumeID &volID) 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 gridSizeZ () const
 access the grid size in Z More...
 
void setGridSizeX (double cellSize) const
 set the grid size in X More...
 
void setGridSizeY (double cellSize) const
 set the grid size in Y More...
 
void setGridSizeZ (double cellSize) const
 set the grid size in Z More...
 
double offsetX () const
 access the coordinate offset in X More...
 
double offsetY () const
 access the coordinate offset in Y More...
 
double offsetZ () const
 access the coordinate offset in Z More...
 
void setOffsetX (double offset) const
 set the coordinate offset in X More...
 
void setOffsetY (double offset) const
 set the coordinate offset in Y More...
 
void setOffsetZ (double offset) const
 set the coordinate offset in Z 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 & fieldNameZ () const
 access the field name used for Z More...
 
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::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 XYZ 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
M.Frank
Version
1.0

Definition at line 51 of file CartesianGridXYZ.h.

Constructor & Destructor Documentation

◆ CartesianGridXYZ() [1/5]

dd4hep::CartesianGridXYZ::CartesianGridXYZ ( )
default

Default constructor.

◆ CartesianGridXYZ() [2/5]

dd4hep::CartesianGridXYZ::CartesianGridXYZ ( const CartesianGridXYZ e)
default

Copy constructor.

◆ CartesianGridXYZ() [3/5]

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

Copy Constructor from segmentation base object.

Definition at line 58 of file CartesianGridXYZ.h.

◆ CartesianGridXYZ() [4/5]

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

Copy constructor from handle.

Definition at line 60 of file CartesianGridXYZ.h.

◆ CartesianGridXYZ() [5/5]

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

Copy constructor from other polymorph/equivalent handle.

Definition at line 63 of file CartesianGridXYZ.h.

Member Function Documentation

◆ cellDimensions()

std::vector< double > CartesianGridXYZ::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.

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 3:
  1. size in x
  2. size in y
  3. size in z

Definition at line 109 of file CartesianGridXYZ.cpp.

◆ cellID()

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

determine the cell ID based on the position

Definition at line 26 of file CartesianGridXYZ.cpp.

◆ fieldNameX()

const std::string & CartesianGridXYZ::fieldNameX ( ) const

access the field name used for X

Definition at line 94 of file CartesianGridXYZ.cpp.

◆ fieldNameY()

const std::string & CartesianGridXYZ::fieldNameY ( ) const

access the field name used for Y

Definition at line 99 of file CartesianGridXYZ.cpp.

◆ fieldNameZ()

const std::string & CartesianGridXYZ::fieldNameZ ( ) const

access the field name used for Z

Definition at line 104 of file CartesianGridXYZ.cpp.

◆ gridSizeX()

double CartesianGridXYZ::gridSizeX ( ) const

access the grid size in X

Definition at line 34 of file CartesianGridXYZ.cpp.

◆ gridSizeY()

double CartesianGridXYZ::gridSizeY ( ) const

access the grid size in Y

Definition at line 39 of file CartesianGridXYZ.cpp.

◆ gridSizeZ()

double CartesianGridXYZ::gridSizeZ ( ) const

access the grid size in Z

Definition at line 44 of file CartesianGridXYZ.cpp.

◆ offsetX()

double CartesianGridXYZ::offsetX ( ) const

access the coordinate offset in X

Definition at line 64 of file CartesianGridXYZ.cpp.

◆ offsetY()

double CartesianGridXYZ::offsetY ( ) const

access the coordinate offset in Y

Definition at line 69 of file CartesianGridXYZ.cpp.

◆ offsetZ()

double CartesianGridXYZ::offsetZ ( ) const

access the coordinate offset in Z

Definition at line 74 of file CartesianGridXYZ.cpp.

◆ operator=()

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

Assignment operator.

◆ operator==()

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

Equality operator.

Definition at line 67 of file CartesianGridXYZ.h.

◆ position()

Position CartesianGridXYZ::position ( const CellID cellID) const

determine the position based on the cell ID

Definition at line 21 of file CartesianGridXYZ.cpp.

◆ setGridSizeX()

void CartesianGridXYZ::setGridSizeX ( double  cellSize) const

set the grid size in X

Definition at line 49 of file CartesianGridXYZ.cpp.

◆ setGridSizeY()

void CartesianGridXYZ::setGridSizeY ( double  cellSize) const

set the grid size in Y

Definition at line 54 of file CartesianGridXYZ.cpp.

◆ setGridSizeZ()

void CartesianGridXYZ::setGridSizeZ ( double  cellSize) const

set the grid size in Z

Definition at line 59 of file CartesianGridXYZ.cpp.

◆ setOffsetX()

void CartesianGridXYZ::setOffsetX ( double  offset) const

set the coordinate offset in X

Definition at line 79 of file CartesianGridXYZ.cpp.

◆ setOffsetY()

void CartesianGridXYZ::setOffsetY ( double  offset) const

set the coordinate offset in Y

Definition at line 84 of file CartesianGridXYZ.cpp.

◆ setOffsetZ()

void CartesianGridXYZ::setOffsetZ ( double  offset) const

set the coordinate offset in Z

Definition at line 89 of file CartesianGridXYZ.cpp.


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