![]() |
DD4hep
1.33.0
Detector Description Toolkit for High Energy Physics
|
Handle class describing a detector element. More...
#include <DetElement.h>
Classes | |
| class | DetElementExtension |
| Wrapper class for detector element extension objects. More... | |
| class | Processor |
| Abstract base for processing callbacks to DetElement objects. More... | |
Public Types | |
| enum | CopyParameters { COPY_NONE = 0, COPY_PLACEMENT = 1 << 0, COPY_PARENT = 1 << 1, COPY_ALIGNMENT = 1 << 2, PROPAGATE_PARENT_ID = 1 << 3, LAST } |
| enum | UpdateParam { CONDITIONS_CHANGED = 1<<0, PLACEMENT_CHANGED = 1<<1, SOMETHING_CHANGED = 1<<2, PLACEMENT_ELEMENT = 1<<20, PLACEMENT_HIGHEST = 1<<21, PLACEMENT_DETECTOR = 1<<22, PLACEMENT_NONE } |
| typedef std::map< std::string, DetElement > | Children |
Public Types inherited from dd4hep::Handle< DetElementObject > | |
| typedef DetElementObject | Object |
| Extern accessible definition of the contained element type. More... | |
| typedef Handle< DetElementObject > | Base |
| Self type: used by sub-classes. More... | |
Public Member Functions | |
| void | check (bool condition, const std::string &msg) const |
| Internal assert function to check conditions. More... | |
| DetElement ()=default | |
| Default constructor. More... | |
| DetElement (DetElement &&e)=default | |
| Constructor to move handle. More... | |
| DetElement (const DetElement &e)=default | |
| Constructor to copy handle. More... | |
| DetElement (Object *obj) | |
| Constructor to hold handled object. More... | |
| DetElement (Object *obj, const std::string &name, const std::string &type) | |
| Clone constructor. More... | |
| template<typename Q > | |
| DetElement (const Handle< Q > &e) | |
| Templated constructor for handle conversions. More... | |
| DetElement (NamedObject *obj) | |
| Constructor to hold handled object. More... | |
| DetElement (const std::string &name, const std::string &type, int id) | |
| Constructor for a new subdetector element. More... | |
| DetElement (const std::string &name, int id) | |
| Constructor for a new subdetector element. More... | |
| DetElement (DetElement parent, const std::string &name, int id) | |
| Constructor for a new subdetector element. More... | |
| DetElement & | operator= (DetElement &&sd)=default |
| Assignment move operator. More... | |
| DetElement & | operator= (const DetElement &e)=default |
| Assignment copy operator. More... | |
| Object & | _data () const |
| Additional data accessor. More... | |
| bool | operator< (const DetElement e) const |
| Operator less to insert into a map. More... | |
| template<typename T > | |
| bool | operator== (const Handle< T > &e) const |
| Equality operator. More... | |
| template<typename T > | |
| bool | operator!= (const Handle< T > &e) const |
| Non-Equality operator. More... | |
| DetElement | clone (int flag) const |
| Clone (Deep copy) the DetElement structure. More... | |
| DetElement | clone (const std::string &new_name) const |
| Clone (Deep copy) the DetElement structure with a new name. More... | |
| DetElement | clone (const std::string &new_name, int new_id) const |
| Clone (Deep copy) the DetElement structure with a new name and new identifier. More... | |
| std::pair< DetElement, Volume > | reflect (const std::string &new_name) const |
| Reflect (Deep copy) the DetElement structure with a new name. More... | |
| std::pair< DetElement, Volume > | reflect (const std::string &new_name, int new_id) const |
| Reflect (Deep copy) the DetElement structure with a new name and new identifier. More... | |
| std::pair< DetElement, Volume > | reflect (const std::string &new_name, int new_id, SensitiveDetector sd) const |
| Reflect (Deep copy) the DetElement structure with a new name and new identifier and new sensitive detector. More... | |
| void * | addExtension (ExtensionEntry *entry) const |
| Add an extension object to the detector element. More... | |
| void * | extension (unsigned long long int key, bool alert) const |
| Access an existing extension object from the detector element. More... | |
| template<typename IFACE , typename CONCRETE > | |
| IFACE * | addExtension (CONCRETE *c) const |
| Extend the detector element with an arbitrary structure accessible by the type. More... | |
| template<typename IFACE > | |
| IFACE * | extension () const |
| Access extension element by the type. More... | |
| template<typename IFACE > | |
| IFACE * | extension (bool alert) const |
| Access extension element by the type. More... | |
| template<typename Q , typename T > | |
| void | callAtUpdate (unsigned int typ, Q *pointer, void(T::*pmf)(unsigned long typ, DetElement &det, void *opt_par)) const |
| Extend the detector element with an arbitrary callback. More... | |
| void | removeAtUpdate (unsigned int type, void *pointer) const |
| Remove callback from object. More... | |
| int | id () const |
| Get the detector identifier. More... | |
| DetElement & | setCombineHits (bool value, SensitiveDetector &sens) |
| Setter: Combine hits attribute. More... | |
| bool | combineHits () const |
| Getter: Combine hits attribute. More... | |
| std::string | type () const |
| Access detector type (structure, tracker, calorimeter, etc.). More... | |
| DetElement & | setType (const std::string &typ) |
| Set detector type (structure, tracker, calorimeter, etc.). More... | |
| unsigned int | typeFlag () const |
| Access the type of the sensitive detector. More... | |
| DetElement & | setTypeFlag (unsigned int types) |
| Set the flag word encoding detector types ( ideally use dd4hep::DetType for encoding ) More... | |
| unsigned int | key () const |
| Access hash key of this detector element (Only valid once geometry is closed!) More... | |
| int | level () const |
| Access the hierarchical level of the detector element (Only valid once geometry is closed!) More... | |
| const std::string & | path () const |
| Path of the detector element (not necessarily identical to placement path!) More... | |
| const std::string & | placementPath () const |
| Access to the full path to the placed object. More... | |
| DetElement & | setAttributes (const Detector &description, const Volume &volume, const std::string ®ion, const std::string &limits, const std::string &vis) |
| Set all attributes in one go. More... | |
| DetElement & | setVisAttributes (const Detector &description, const std::string &name, const Volume &volume) |
| Set Visualization attributes to the detector element. More... | |
| DetElement & | setRegion (const Detector &description, const std::string &name, const Volume &volume) |
| Set the regional attributes to the detector element. More... | |
| DetElement & | setLimitSet (const Detector &description, const std::string &name, const Volume &volume) |
| Set the limits to the detector element. More... | |
| Volume | volume () const |
| Access to the logical volume of the detector element's placement. More... | |
| Solid | solid () const |
| Access to the shape of the detector element's placement. More... | |
| PlacedVolume | placement () const |
| Access to the physical volume of this detector element. More... | |
| PlacedVolume | idealPlacement () const |
| Access to the ideal physical volume of this detector element. More... | |
| DetElement & | setPlacement (const PlacedVolume &volume) |
| Set the physical volumes of the detector element. More... | |
| VolumeID | volumeID () const |
| The cached VolumeID of this subdetector element. More... | |
| DetElement & | add (DetElement sub_element) |
| Add new child to the detector structure. More... | |
| const Children & | children () const |
| Access to the list of children. More... | |
| DetElement | child (const std::string &name) const |
| Access to individual children by name. More... | |
| DetElement | child (const std::string &child_name, bool throw_if_not_found) const |
| Access to individual children by name. Have option to not throw an exception. More... | |
| DetElement | parent () const |
| Access to the detector elements's parent. More... | |
| DetElement | world () const |
| Access to the world object. Only possible once the geometry is closed. More... | |
| Alignment | nominal () const |
| Access to the constant ideal (nominal) alignment information. More... | |
| Alignment | survey () const |
| Access to the constant survey alignment information. More... | |
Public Member Functions inherited from dd4hep::Handle< DetElementObject > | |
| Handle ()=default | |
| Default constructor. More... | |
| Handle (Handle< DetElementObject > &&element)=default | |
| Copy constructor. More... | |
| Handle (const Handle< DetElementObject > &element)=default | |
| Copy constructor. More... | |
| Handle (DetElementObject *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< DetElementObject > & | operator= (Handle< DetElementObject > &&element)=default |
| Assignment move operator. More... | |
| Handle< DetElementObject > & | operator= (const Handle< DetElementObject > &element)=default |
| Assignment copy operator. More... | |
| bool | operator== (const Handle< DetElementObject > &element) const |
| Boolean operator == used for RB tree insertions. More... | |
| bool | operator< (const Handle< DetElementObject > &element) const |
| Boolean operator < used for RB tree insertions. More... | |
| bool | operator> (const Handle< DetElementObject > &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< DetElementObject > & | clear () |
| Release the object held by the handle. More... | |
| DetElementObject * | operator-> () const |
| Access the held object using the -> operator. More... | |
| operator DetElementObject & () const | |
| Automatic type conversion to an object references. More... | |
| DetElementObject & | operator* () const |
| Access the held object using the * operator. More... | |
| DetElementObject * | 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... | |
| DetElementObject * | 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... | |
Protected Member Functions | |
| void | i_addUpdateCall (unsigned int callback_type, const Callback &callback) const |
| Internal call to extend the detector element with an arbitrary structure accessible by the type. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from dd4hep::Handle< DetElementObject > | |
| 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< DetElementObject > | |
| DetElementObject * | m_element |
| Single and only data member: Reference to the actual element. More... | |
Handle class describing a detector element.
Detector elements (class DetElement) are entities which represent subdetectors or sizable parts of a subdetector. A DetElement instance has the means to provide to clients information about
Reflection Note:
Definition at line 187 of file DetElement.h.
| typedef std::map<std::string, DetElement> dd4hep::DetElement::Children |
Definition at line 205 of file DetElement.h.
| Enumerator | |
|---|---|
| COPY_NONE | |
| COPY_PLACEMENT | |
| COPY_PARENT | |
| COPY_ALIGNMENT | |
| PROPAGATE_PARENT_ID | |
| LAST | |
Definition at line 207 of file DetElement.h.
| Enumerator | |
|---|---|
| CONDITIONS_CHANGED | |
| PLACEMENT_CHANGED | |
| SOMETHING_CHANGED | |
| PLACEMENT_ELEMENT | |
| PLACEMENT_HIGHEST | |
| PLACEMENT_DETECTOR | |
| PLACEMENT_NONE | |
Definition at line 216 of file DetElement.h.
|
default |
Default constructor.
|
default |
Constructor to move handle.
|
default |
Constructor to copy handle.
|
inline |
Constructor to hold handled object.
Definition at line 286 of file DetElement.h.
| DetElement::DetElement | ( | Object * | obj, |
| const std::string & | name, | ||
| const std::string & | type | ||
| ) |
Clone constructor.
Definition at line 39 of file DetElement.cpp.
|
inline |
Templated constructor for handle conversions.
Definition at line 292 of file DetElement.h.
|
inline |
Constructor to hold handled object.
Definition at line 295 of file DetElement.h.
| DetElement::DetElement | ( | const std::string & | name, |
| const std::string & | type, | ||
| int | id | ||
| ) |
Constructor for a new subdetector element.
Definition at line 46 of file DetElement.cpp.
| DetElement::DetElement | ( | const std::string & | name, |
| int | id | ||
| ) |
Constructor for a new subdetector element.
Definition at line 52 of file DetElement.cpp.
| DetElement::DetElement | ( | DetElement | parent, |
| const std::string & | name, | ||
| int | id | ||
| ) |
Constructor for a new subdetector element.
Definition at line 58 of file DetElement.cpp.
|
inline |
Additional data accessor.
Definition at line 316 of file DetElement.h.
| DetElement & DetElement::add | ( | DetElement | sub_element | ) |
Add new child to the detector structure.
Add a new child subdetector element.
Definition at line 258 of file DetElement.cpp.
|
inline |
Extend the detector element with an arbitrary structure accessible by the type.
Definition at line 357 of file DetElement.h.
| void * DetElement::addExtension | ( | ExtensionEntry * | entry | ) | const |
Add an extension object to the detector element.
Definition at line 65 of file DetElement.cpp.
|
inline |
Extend the detector element with an arbitrary callback.
Definition at line 371 of file DetElement.h.
| void DetElement::check | ( | bool | condition, |
| const std::string & | msg | ||
| ) | const |
Internal assert function to check conditions.
Simple checking routine.
Definition at line 251 of file DetElement.cpp.
| DetElement DetElement::child | ( | const std::string & | child_name, |
| bool | throw_if_not_found | ||
| ) | const |
Access to individual children by name. Have option to not throw an exception.
Definition at line 223 of file DetElement.cpp.
| DetElement DetElement::child | ( | const std::string & | name | ) | const |
Access to individual children by name.
Definition at line 212 of file DetElement.cpp.
| const DetElement::Children & DetElement::children | ( | ) | const |
Access to the list of children.
Definition at line 207 of file DetElement.cpp.
| DetElement DetElement::clone | ( | const std::string & | new_name | ) | const |
Clone (Deep copy) the DetElement structure with a new name.
Definition at line 282 of file DetElement.cpp.
| DetElement DetElement::clone | ( | const std::string & | new_name, |
| int | new_id | ||
| ) | const |
Clone (Deep copy) the DetElement structure with a new name and new identifier.
Definition at line 286 of file DetElement.cpp.
| DetElement DetElement::clone | ( | int | flag | ) | const |
Clone (Deep copy) the DetElement structure.
Definition at line 274 of file DetElement.cpp.
| bool DetElement::combineHits | ( | ) | const |
Getter: Combine hits attribute.
Definition at line 173 of file DetElement.cpp.
|
inline |
Access extension element by the type.
Definition at line 362 of file DetElement.h.
|
inline |
Access extension element by the type.
Definition at line 366 of file DetElement.h.
| void * DetElement::extension | ( | unsigned long long int | key, |
| bool | alert | ||
| ) | const |
Access an existing extension object from the detector element.
Definition at line 70 of file DetElement.cpp.
|
protected |
Internal call to extend the detector element with an arbitrary structure accessible by the type.
Definition at line 75 of file DetElement.cpp.
| int DetElement::id | ( | ) | const |
Get the detector identifier.
Definition at line 169 of file DetElement.cpp.
| PlacedVolume DetElement::idealPlacement | ( | ) | const |
Access to the ideal physical volume of this detector element.
This is the original placement set in the detector constructor. A possible global re-alignment make this value different from the regular placement() call.
Definition at line 312 of file DetElement.cpp.
| unsigned int DetElement::key | ( | ) | const |
Access hash key of this detector element (Only valid once geometry is closed!)
Definition at line 134 of file DetElement.cpp.
| int DetElement::level | ( | ) | const |
Access the hierarchical level of the detector element (Only valid once geometry is closed!)
Access the hierarchical level of the detector element.
Definition at line 146 of file DetElement.cpp.
| Alignment DetElement::nominal | ( | ) | const |
Access to the constant ideal (nominal) alignment information.
Access to the alignment information.
Definition at line 185 of file DetElement.cpp.
|
inline |
Non-Equality operator.
Definition at line 329 of file DetElement.h.
|
inline |
Operator less to insert into a map.
Definition at line 321 of file DetElement.h.
|
default |
Assignment copy operator.
|
default |
Assignment move operator.
|
inline |
Equality operator.
Definition at line 325 of file DetElement.h.
| DetElement DetElement::parent | ( | ) | const |
Access to the detector elements's parent.
Definition at line 239 of file DetElement.cpp.
| const std::string & DetElement::path | ( | ) | const |
Path of the detector element (not necessarily identical to placement path!)
Access the full path of the detector element.
Definition at line 158 of file DetElement.cpp.
| PlacedVolume DetElement::placement | ( | ) | const |
Access to the physical volume of this detector element.
This is the current placement value of the detector eleemnt. A possible global re-alignment may alter the value. Hence, it should hence not be cached.
Definition at line 321 of file DetElement.cpp.
| const std::string & DetElement::placementPath | ( | ) | const |
Access to the full path to the placed object.
Definition at line 85 of file DetElement.cpp.
| std::pair< DetElement, Volume > DetElement::reflect | ( | const std::string & | new_name | ) | const |
Reflect (Deep copy) the DetElement structure with a new name.
Definition at line 294 of file DetElement.cpp.
| std::pair< DetElement, Volume > DetElement::reflect | ( | const std::string & | new_name, |
| int | new_id | ||
| ) | const |
Reflect (Deep copy) the DetElement structure with a new name and new identifier.
Definition at line 298 of file DetElement.cpp.
| std::pair< DetElement, Volume > DetElement::reflect | ( | const std::string & | new_name, |
| int | new_id, | ||
| SensitiveDetector | sd | ||
| ) | const |
Reflect (Deep copy) the DetElement structure with a new name and new identifier and new sensitive detector.
Definition at line 302 of file DetElement.cpp.
| void DetElement::removeAtUpdate | ( | unsigned int | type, |
| void * | pointer | ||
| ) | const |
Remove callback from object.
Definition at line 80 of file DetElement.cpp.
| DetElement & DetElement::setAttributes | ( | const Detector & | description, |
| const Volume & | volume, | ||
| const std::string & | region, | ||
| const std::string & | limits, | ||
| const std::string & | vis | ||
| ) |
Set all attributes in one go.
Definition at line 380 of file DetElement.cpp.
| DetElement & DetElement::setCombineHits | ( | bool | value, |
| SensitiveDetector & | sens | ||
| ) |
Setter: Combine hits attribute.
Definition at line 177 of file DetElement.cpp.
| DetElement & DetElement::setLimitSet | ( | const Detector & | description, |
| const std::string & | name, | ||
| const Volume & | volume | ||
| ) |
Set the limits to the detector element.
Definition at line 373 of file DetElement.cpp.
| DetElement & DetElement::setPlacement | ( | const PlacedVolume & | volume | ) |
Set the physical volumes of the detector element.
Definition at line 330 of file DetElement.cpp.
| DetElement & DetElement::setRegion | ( | const Detector & | description, |
| const std::string & | name, | ||
| const Volume & | volume | ||
| ) |
Set the regional attributes to the detector element.
Definition at line 366 of file DetElement.cpp.
| DetElement & DetElement::setType | ( | const std::string & | typ | ) |
Set detector type (structure, tracker, calorimeter, etc.).
Set the type of the sensitive detector.
Definition at line 102 of file DetElement.cpp.
| DetElement & DetElement::setTypeFlag | ( | unsigned int | types | ) |
Set the flag word encoding detector types ( ideally use dd4hep::DetType for encoding )
Set the type of the sensitive detector.
Definition at line 113 of file DetElement.cpp.
| DetElement & DetElement::setVisAttributes | ( | const Detector & | description, |
| const std::string & | name, | ||
| const Volume & | volume | ||
| ) |
Set Visualization attributes to the detector element.
Definition at line 361 of file DetElement.cpp.
| Solid DetElement::solid | ( | ) | const |
Access to the shape of the detector element's placement.
Definition at line 357 of file DetElement.cpp.
| Alignment DetElement::survey | ( | ) | const |
Access to the constant survey alignment information.
Access to the survey alignment information.
Definition at line 198 of file DetElement.cpp.
| std::string DetElement::type | ( | ) | const |
Access detector type (structure, tracker, calorimeter, etc.).
Access detector type (structure, tracker, calorimeter, etc.). Required for determination of G4 sensitive detector.
Definition at line 97 of file DetElement.cpp.
| unsigned int DetElement::typeFlag | ( | ) | const |
Access the type of the sensitive detector.
Definition at line 108 of file DetElement.cpp.
| Volume DetElement::volume | ( | ) | const |
Access to the logical volume of the detector element's placement.
Access to the logical volume of the placements (all daughters have the same!)
Definition at line 352 of file DetElement.cpp.
| dd4hep::VolumeID DetElement::volumeID | ( | ) | const |
The cached VolumeID of this subdetector element.
Definition at line 344 of file DetElement.cpp.
| DetElement DetElement::world | ( | ) | const |
Access to the world object. Only possible once the geometry is closed.
Definition at line 245 of file DetElement.cpp.
1.8.18