DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Handle class supporting generic Segmentations of sensitive detectors. More...
#include <Segmentations.h>
Public Member Functions | |
Segmentation (const std::string &type, const std::string &name, const BitFieldCoder *decoder) | |
Initializing constructor creating a new object of the given DDSegmentation type. More... | |
Segmentation ()=default | |
Default constructor. More... | |
Segmentation (Segmentation &&e)=default | |
Move Constructor. More... | |
Segmentation (const Segmentation &e)=default | |
Copy Constructor. More... | |
Segmentation (Handle< Object > &&e) | |
Move Constructor from handle. More... | |
Segmentation (const Handle< Object > &e) | |
Copy Constructor from handle. More... | |
template<typename Q > | |
Segmentation (const Handle< Q > &e) | |
Constructor to be used when reading the already parsed object. More... | |
Segmentation & | operator= (Segmentation &&seg)=default |
Move Assignment operator. More... | |
Segmentation & | operator= (const Segmentation &seg)=default |
Copy Assignment operator. More... | |
bool | useForHitPosition () const |
Access flag for hit positioning. More... | |
const char * | name () const |
Accessor: Segmentation type. More... | |
std::string | type () const |
Accessor: Segmentation type. More... | |
DDSegmentation::Parameters | parameters () const |
Access to the parameters. More... | |
DDSegmentation::Parameter | parameter (const std::string ¶meterName) const |
Access to parameter by name. More... | |
Handle< DetElementObject > | detector () const |
Access the main detector element using this segmentation object. More... | |
Handle< SensitiveDetectorObject > | sensitive () const |
Access the sensitive detector using this segmentation object. More... | |
const BitFieldCoder * | decoder () const |
Access the underlying decoder. More... | |
void | setDecoder (const BitFieldCoder *decoder) const |
Set the underlying decoder. More... | |
Position | position (const CellID &cellID) const |
determine the local position based on the cell ID More... | |
CellID | cellID (const Position &localPosition, const Position &globalPosition, const VolumeID &volumeID) const |
determine the cell ID based on the local position More... | |
VolumeID | volumeID (const CellID &cellID) const |
Determine the volume ID from the full cell ID by removing all local fields. More... | |
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... | |
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... | |
DDSegmentation::Segmentation * | segmentation () const |
Access to the base DDSegmentation object. WARNING: Deprecated call! More... | |
Public Member Functions inherited from dd4hep::Handle< SegmentationObject > | |
Handle ()=default | |
Default constructor. More... | |
Handle (Handle< SegmentationObject > &&element)=default | |
Copy constructor. More... | |
Handle (const Handle< SegmentationObject > &element)=default | |
Copy constructor. More... | |
Handle (SegmentationObject *element) | |
Initializing constructor from pointer. More... | |
Handle (Q *element) | |
Initializing constructor from unrelated pointer with type checking. More... | |
Handle (const Handle< Q > &element) | |
Initializing constructor from unrelated handle with type checking. More... | |
Handle< SegmentationObject > & | operator= (Handle< SegmentationObject > &&element)=default |
Assignment move operator. More... | |
Handle< SegmentationObject > & | operator= (const Handle< SegmentationObject > &element)=default |
Assignment copy operator. More... | |
bool | operator== (const Handle< SegmentationObject > &element) const |
Boolean operator == used for RB tree insertions. More... | |
bool | operator< (const Handle< SegmentationObject > &element) const |
Boolean operator < used for RB tree insertions. More... | |
bool | operator> (const Handle< SegmentationObject > &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< SegmentationObject > & | clear () |
Release the object held by the handle. More... | |
SegmentationObject * | operator-> () const |
Access the held object using the -> operator. More... | |
operator SegmentationObject & () const | |
Automatic type conversion to an object references. More... | |
SegmentationObject & | operator* () const |
Access the held object using the * operator. More... | |
SegmentationObject * | ptr () const |
Access to the held object. More... | |
Q * | _ptr () const |
Access to an unrelated object type. More... | |
Q * | data () const |
Access to an unrelated object type. More... | |
Q & | object () const |
Access to an unrelated object type. More... | |
SegmentationObject * | 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... | |
const char * | name () const |
const char * | name () const |
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 | assign (_Segmentation *s, const std::string &n, const std::string &) |
void | assign (NamedObject *p, const std::string &n, const std::string &t) |
void | destroy () |
Destroy the underlying object (be careful here: things are not reference counted)! More... | |
Additional Inherited Members | |
Public Types inherited from dd4hep::Handle< SegmentationObject > | |
typedef SegmentationObject | Object |
Extern accessible definition of the contained element type. More... | |
typedef Handle< SegmentationObject > | Base |
Self type: used by sub-classes. More... | |
Static Public Member Functions inherited from dd4hep::Handle< SegmentationObject > | |
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< SegmentationObject > | |
SegmentationObject * | m_element |
Single and only data member: Reference to the actual element. More... | |
Handle class supporting generic Segmentations of sensitive detectors.
This basic segmentation implementation supports "generic" access to specific segmentations exporting the common abstract interface. Mostly used in simulation.
Definition at line 41 of file Segmentations.h.
Segmentation::Segmentation | ( | const std::string & | type, |
const std::string & | name, | ||
const BitFieldCoder * | decoder | ||
) |
Initializing constructor creating a new object of the given DDSegmentation type.
Constructor to used when creating a new object.
Definition at line 31 of file Segmentations.cpp.
|
default |
Default constructor.
|
default |
Move Constructor.
|
default |
Copy Constructor.
Move Constructor from handle.
Definition at line 53 of file Segmentations.h.
Copy Constructor from handle.
Definition at line 55 of file Segmentations.h.
|
inline |
Constructor to be used when reading the already parsed object.
Definition at line 58 of file Segmentations.h.
std::vector< double > Segmentation::cellDimensions | ( | const CellID & | cell | ) | 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.
cellID | cellID of the cell for which parameters are returned |
Definition at line 94 of file Segmentations.cpp.
CellID Segmentation::cellID | ( | const Position & | localPosition, |
const Position & | globalPosition, | ||
const VolumeID & | volumeID | ||
) | const |
determine the cell ID based on the local position
Definition at line 74 of file Segmentations.cpp.
const BitFieldCoder * Segmentation::decoder | ( | ) | const |
Access the underlying decoder.
Definition at line 104 of file Segmentations.cpp.
Handle< DetElementObject > Segmentation::detector | ( | ) | const |
Access the main detector element using this segmentation object.
Definition at line 114 of file Segmentations.cpp.
const char * Segmentation::name | ( | ) | const |
Accessor: Segmentation type.
Definition at line 45 of file Segmentations.cpp.
Calculates the neighbours of the given cell ID and adds them to the list of neighbours.
Definition at line 84 of file Segmentations.cpp.
|
default |
Copy Assignment operator.
|
default |
Move Assignment operator.
DDSegmentation::Parameter Segmentation::parameter | ( | const std::string & | parameterName | ) | const |
Access to parameter by name.
Definition at line 64 of file Segmentations.cpp.
DDSegmentation::Parameters Segmentation::parameters | ( | ) | const |
Access to the parameters.
Definition at line 59 of file Segmentations.cpp.
determine the local position based on the cell ID
Definition at line 69 of file Segmentations.cpp.
DDSegmentation::Segmentation * Segmentation::segmentation | ( | ) | const |
Access to the base DDSegmentation object. WARNING: Deprecated call!
Definition at line 99 of file Segmentations.cpp.
Handle< SensitiveDetectorObject > Segmentation::sensitive | ( | ) | const |
Access the sensitive detector using this segmentation object.
Definition at line 119 of file Segmentations.cpp.
void Segmentation::setDecoder | ( | const BitFieldCoder * | decoder | ) | const |
Set the underlying decoder.
Definition at line 109 of file Segmentations.cpp.
std::string Segmentation::type | ( | ) | const |
Accessor: Segmentation type.
Definition at line 50 of file Segmentations.cpp.
bool Segmentation::useForHitPosition | ( | ) | const |
Access flag for hit positioning.
Definition at line 54 of file Segmentations.cpp.
Determine the volume ID from the full cell ID by removing all local fields.
Definition at line 79 of file Segmentations.cpp.