DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
DetElement.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DD4HEP_DETELEMENT_H
14 #define DD4HEP_DETELEMENT_H
15 
16 // Framework include files
17 #include <DD4hep/Handle.h>
18 #include <DD4hep/Callback.h>
19 #include <DD4hep/Objects.h>
20 #include <DD4hep/Volumes.h>
21 #include <DD4hep/Readout.h>
22 #include <DD4hep/Alignments.h>
23 #include <DD4hep/Segmentations.h>
25 
26 // C/C++ include files
27 #include <map>
28 #include <typeinfo>
29 
31 namespace dd4hep {
32 
33  // Forward declarations
34  class Detector;
35  class DetElementObject;
36  class SensitiveDetectorObject;
37 
39 
44  class SensitiveDetector: public Handle<SensitiveDetectorObject> {
45  public:
46 
49 
51  SensitiveDetector(Object* obj_pointer)
52  : Handle<SensitiveDetectorObject>(obj_pointer) { }
53 
57 
61 
64 
66  SensitiveDetector(const SensitiveDetector& sd) = default;
67 
69  template <typename Q> SensitiveDetector(const Handle<Q>& e)
71 
73  SensitiveDetector(const std::string& name, const std::string& type = "sensitive");
74 
77 
80 
82  template <typename T> bool operator ==(const Handle<T>& e) const {
83  return ptr() == e.ptr();
84  }
86  template <typename T> bool operator !=(const Handle<T>& e) const {
87  return ptr() != e.ptr();
88  }
89 
91  std::string type() const;
92 
94  SensitiveDetector& setType(const std::string& typ);
95 
97  SensitiveDetector& setVerbose(bool value);
98 
100  bool verbose() const;
101 
103  SensitiveDetector& setCombineHits(bool value);
104 
106  bool combineHits() const;
107 
109  SensitiveDetector& setHitsCollection(const std::string& spec);
110 
112  const std::string& hitsCollection() const;
113 
116 
118  Readout readout() const;
119 
121  IDDescriptor idSpec() const;
122 
124  SensitiveDetector& setEnergyCutoff(double value);
125 
127  double energyCutoff() const;
128 
131 
133  Region region() const;
134 
137 
139  LimitSet limits() const;
140 
142  void* addExtension(unsigned long long int key, ExtensionEntry* entry) const;
143 
145  void* extension(unsigned long long int key) const;
146 
148  void* extension(unsigned long long int key, bool alert) const;
149 
151  template <typename IFACE, typename CONCRETE> IFACE* addExtension(CONCRETE* c) const {
152  return (IFACE*) this->addExtension(detail::typeHash64<IFACE>(),
154  }
155 
157  template <typename IFACE> IFACE* extension() const {
158  return (IFACE*) this->extension(detail::typeHash64<IFACE>());
159  }
160  };
161 
163 
188  class DetElement: public Handle<DetElementObject> {
189  public:
191 
196  class Processor {
197  public:
199  Processor();
201  virtual ~Processor();
203  virtual int processElement(DetElement detector) = 0;
204  };
205 
206  typedef std::map<std::string, DetElement> Children;
207 
210  COPY_PLACEMENT = 1 << 0,
211  COPY_PARENT = 1 << 1,
212  COPY_ALIGNMENT = 1 << 2,
214  LAST
215  };
216 
217  enum UpdateParam {
225  };
226 
228  void check(bool condition, const std::string& msg) const;
229 
230  protected:
231 
233 
239  template <typename Q, typename T> class DetElementExtension : public ExtensionEntry {
240  protected:
241  T* ptr = 0;
242  mutable Q* iface = 0;
243  public:
247  DetElementExtension(T* p) : ptr(p) { iface = dynamic_cast<Q*>(p); }
253  virtual ~DetElementExtension() = default;
255  T* copy(DetElement de) const { return new T(*ptr,de); }
257  virtual void destruct() const override { delete ptr; }
259  virtual void* object() const override
260  { return iface ? iface : (iface=dynamic_cast<Q*>(ptr)); }
262  virtual void* copy(void* det) const override
263  { return copy(DetElement((Object*)det)); }
265  virtual ExtensionEntry* clone(void* det) const override
266  { return new DetElementExtension<Q,T>((T*)this->copy(det)); }
268  virtual unsigned long long int hash64() const override
269  { return detail::typeHash64<Q>(); }
270  };
271 
273  void i_addUpdateCall(unsigned int callback_type, const Callback& callback) const;
274 
275  public:
276 
278  DetElement() = default;
279 
281  DetElement(DetElement&& e) = default;
282 
284  DetElement(const DetElement& e) = default;
285 
288 
290  DetElement(Object* obj, const std::string& name, const std::string& type);
291 
293  template <typename Q> DetElement(const Handle<Q>& e) : Handle<DetElementObject>(e) {}
294 
297 
298 #ifdef __MAKECINT__
299  DetElement(const Ref_t& e) : Handle<DetElementObject>(e) { }
301 #endif
302  DetElement(const std::string& name, const std::string& type, int id);
304 
306  DetElement(const std::string& name, int id);
307 
309  DetElement(DetElement parent, const std::string& name, int id);
310 
312  DetElement& operator=(DetElement&& sd) = default;
314  DetElement& operator=(const DetElement& e) = default;
315 
317  Object& _data() const {
318  return object<Object>();
319  }
320 
322  bool operator <(const DetElement e) const {
323  return ptr() < e.ptr();
324  }
326  template <typename T> bool operator ==(const Handle<T>& e) const {
327  return ptr() == e.ptr();
328  }
330  template <typename T> bool operator !=(const Handle<T>& e) const {
331  return ptr() != e.ptr();
332  }
333 
335  DetElement clone(int flag) const;
336 
338  DetElement clone(const std::string& new_name) const;
339 
341  DetElement clone(const std::string& new_name, int new_id) const;
342 
344  std::pair<DetElement,Volume> reflect(const std::string& new_name) const;
345 
347  std::pair<DetElement,Volume> reflect(const std::string& new_name, int new_id) const;
349  std::pair<DetElement,Volume> reflect(const std::string& new_name, int new_id, SensitiveDetector sd) const;
350 
352  void* addExtension(ExtensionEntry* entry) const;
353 
355  void* extension(unsigned long long int key, bool alert) const;
356 
358  template <typename IFACE, typename CONCRETE> IFACE* addExtension(CONCRETE* c) const {
359  CallbackSequence::checkTypes(typeid(IFACE), typeid(CONCRETE), dynamic_cast<IFACE*>(c));
360  return (IFACE*) this->addExtension(new DetElementExtension<IFACE,CONCRETE>(c));
361  }
363  template <typename IFACE> IFACE* extension() const {
364  return (IFACE*) this->extension(detail::typeHash64<IFACE>(),true);
365  }
367  template <typename IFACE> IFACE* extension(bool alert) const {
368  return (IFACE*) this->extension(detail::typeHash64<IFACE>(),alert);
369  }
371  template <typename Q, typename T>
372  void callAtUpdate(unsigned int typ, Q* pointer,
373  void (T::*pmf)(unsigned long typ, DetElement& det, void* opt_par)) const
374  {
375  CallbackSequence::checkTypes(typeid(T), typeid(Q), dynamic_cast<T*>(pointer));
376  i_addUpdateCall(typ, Callback(pointer).make(pmf));
377  }
379  void removeAtUpdate(unsigned int type, void* pointer) const;
380 
382  int id() const;
384  DetElement& setCombineHits(bool value, SensitiveDetector& sens);
386  bool combineHits() const;
387 
391  std::string type() const;
393  DetElement& setType(const std::string& typ);
394 
395  // Return flag word encoding detector types ( ideally use dd4hep::DetType for decoding )
396  unsigned int typeFlag() const;
397 
399  DetElement& setTypeFlag(unsigned int types);
400 
402  unsigned int key() const;
404  int level() const;
406  const std::string& path() const;
408  const std::string& placementPath() const;
409 
411  DetElement& setAttributes(const Detector& description,
412  const Volume& volume,
413  const std::string& region,
414  const std::string& limits,
415  const std::string& vis);
416 
418  DetElement& setVisAttributes(const Detector& description, const std::string& name, const Volume& volume);
420  DetElement& setRegion(const Detector& description, const std::string& name, const Volume& volume);
422  DetElement& setLimitSet(const Detector& description, const std::string& name, const Volume& volume);
423 
425  Volume volume() const;
427  Solid solid() const;
428 
430 
434  PlacedVolume placement() const;
436 
444  VolumeID volumeID() const;
445 
447  DetElement& add(DetElement sub_element);
449  const Children& children() const;
451  DetElement child(const std::string& name) const;
453  DetElement child(const std::string& child_name, bool throw_if_not_found) const;
455  DetElement parent() const;
457  DetElement world() const;
458 
460  Alignment nominal() const;
462  Alignment survey() const;
463  };
464 } /* End namespace dd4hep */
465 
466 #include <DD4hep/AlignmentData.h>
467 
468 #endif // DD4HEP_DETELEMENT_H
dd4hep::DetElement::children
const Children & children() const
Access to the list of children.
Definition: DetElement.cpp:207
dd4hep::DetElement::path
const std::string & path() const
Path of the detector element (not necessarily identical to placement path!)
Definition: DetElement.cpp:158
dd4hep::SensitiveDetector::idSpec
IDDescriptor idSpec() const
Access IDDescription structure.
Definition: DetElement.cpp:425
dd4hep::ExtensionEntry
Definition of the extension entry interface class.
Definition: ExtensionEntry.h:40
Objects.h
dd4hep::DetElement::callAtUpdate
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.
Definition: DetElement.h:372
dd4hep::SensitiveDetector::setEnergyCutoff
SensitiveDetector & setEnergyCutoff(double value)
Set energy cut off.
Definition: DetElement.cpp:430
Segmentations.h
Volumes.h
dd4hep::DetElement::DetElement
DetElement(NamedObject *obj)
Constructor to hold handled object.
Definition: DetElement.h:296
dd4hep::DetElement::setRegion
DetElement & setRegion(const Detector &description, const std::string &name, const Volume &volume)
Set the regional attributes to the detector element.
Definition: DetElement.cpp:366
dd4hep::DetElement::key
unsigned int key() const
Access hash key of this detector element (Only valid once geometry is closed!)
Definition: DetElement.cpp:134
dd4hep::DetElement::COPY_PLACEMENT
@ COPY_PLACEMENT
Definition: DetElement.h:210
dd4hep::SensitiveDetector::SensitiveDetector
SensitiveDetector(Object *obj_pointer)
Constructor to copy handled object.
Definition: DetElement.h:51
dd4hep::DetElement::DetElementExtension::~DetElementExtension
virtual ~DetElementExtension()=default
Default destructor.
dd4hep::SensitiveDetector
Handle class to hold the information of a sensitive detector.
Definition: DetElement.h:44
dd4hep::DetElement::setLimitSet
DetElement & setLimitSet(const Detector &description, const std::string &name, const Volume &volume)
Set the limits to the detector element.
Definition: DetElement.cpp:373
dd4hep::DetElement::parent
DetElement parent() const
Access to the detector elements's parent.
Definition: DetElement.cpp:239
dd4hep::Handle< DetElementObject >::Object
DetElementObject Object
Extern accessible definition of the contained element type.
Definition: Handle.h:88
ObjectExtensions.h
dd4hep::DetElement::operator=
DetElement & operator=(const DetElement &e)=default
Assignment copy operator.
dd4hep::DetElement::type
std::string type() const
Access detector type (structure, tracker, calorimeter, etc.).
Definition: DetElement.cpp:97
dd4hep::PlacedVolume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:173
dd4hep::DetElement::clone
DetElement clone(int flag) const
Clone (Deep copy) the DetElement structure.
Definition: DetElement.cpp:274
dd4hep::DetElement::DetElementExtension::DetElementExtension
DetElementExtension(T *p)
Typed objects constructor.
Definition: DetElement.h:247
dd4hep::SensitiveDetector::setHitsCollection
SensitiveDetector & setHitsCollection(const std::string &spec)
Assign the name of the hits collection.
Definition: DetElement.cpp:441
dd4hep::DetElement::placement
PlacedVolume placement() const
Access to the physical volume of this detector element.
Definition: DetElement.cpp:321
dd4hep::SensitiveDetector::setVerbose
SensitiveDetector & setVerbose(bool value)
Set flag to handle hits collection.
Definition: DetElement.cpp:452
dd4hep::DetElement::Processor::~Processor
virtual ~Processor()
Default destructor.
Definition: DetElement.cpp:35
Alignments.h
dd4hep::DetElement::COPY_PARENT
@ COPY_PARENT
Definition: DetElement.h:211
dd4hep::SensitiveDetector::SensitiveDetector
SensitiveDetector(const Handle< Q > &e)
Templated constructor for handle conversions.
Definition: DetElement.h:69
dd4hep::IDDescriptor
Class implementing the ID encoding of the detector response.
Definition: IDDescriptor.h:37
Handle.h
dd4hep::CallbackSequence::checkTypes
static void checkTypes(const std::type_info &typ1, const std::type_info &typ2, void *test)
Check the compatibility of two typed objects. The test is the result of a dynamic_cast.
Definition: Callback.cpp:19
dd4hep::DetElement::DetElement
DetElement(const Handle< Q > &e)
Templated constructor for handle conversions.
Definition: DetElement.h:293
dd4hep::SensitiveDetector::SensitiveDetector
SensitiveDetector(SensitiveDetector &&sd)=default
Move from handle.
dd4hep::Handle
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:84
dd4hep::DetElement::PLACEMENT_ELEMENT
@ PLACEMENT_ELEMENT
Definition: DetElement.h:221
dd4hep::DetElement::DetElementExtension::DetElementExtension
DetElementExtension()=delete
Inhibit default constructor.
dd4hep::DetElement::CONDITIONS_CHANGED
@ CONDITIONS_CHANGED
Definition: DetElement.h:218
dd4hep::DetElement::DetElementExtension::destruct
virtual void destruct() const override
Wrapper for the object destruction.
Definition: DetElement.h:257
dd4hep::Solid_type
Base class for Solid (shape) objects.
Definition: Shapes.h:135
dd4hep::DetElement::add
DetElement & add(DetElement sub_element)
Add new child to the detector structure.
Definition: DetElement.cpp:258
dd4hep::DetElement::setCombineHits
DetElement & setCombineHits(bool value, SensitiveDetector &sens)
Setter: Combine hits attribute.
Definition: DetElement.cpp:177
dd4hep::DetElement::DetElement
DetElement()=default
Default constructor.
dd4hep::DetElement::volumeID
VolumeID volumeID() const
The cached VolumeID of this subdetector element.
Definition: DetElement.cpp:344
dd4hep::DetElement::setType
DetElement & setType(const std::string &typ)
Set detector type (structure, tracker, calorimeter, etc.).
Definition: DetElement.cpp:102
dd4hep::Handle< SensitiveDetectorObject >::name
const char * name() const
Access the object name (or "" if not supported by the object)
dd4hep::DetElement::operator<
bool operator<(const DetElement e) const
Operator less to insert into a map.
Definition: DetElement.h:322
dd4hep::DetElement::PLACEMENT_HIGHEST
@ PLACEMENT_HIGHEST
Definition: DetElement.h:222
dd4hep::SensitiveDetector::SensitiveDetector
SensitiveDetector(const SensitiveDetector &sd)=default
Copy from handle.
dd4hep::DetElement::DetElement
DetElement(Object *obj)
Constructor to hold handled object.
Definition: DetElement.h:287
dd4hep::DetElementObject
Data class with properties of a detector element.
Definition: DetectorInterna.h:81
dd4hep::DetElement::reflect
std::pair< DetElement, Volume > reflect(const std::string &new_name) const
Reflect (Deep copy) the DetElement structure with a new name.
Definition: DetElement.cpp:294
dd4hep::DetElement::check
void check(bool condition, const std::string &msg) const
Internal assert function to check conditions.
Definition: DetElement.cpp:251
dd4hep::SensitiveDetector::operator==
bool operator==(const Handle< T > &e) const
Equality operator.
Definition: DetElement.h:82
dd4hep::DetElement::operator=
DetElement & operator=(DetElement &&sd)=default
Assignment move operator.
dd4hep::SensitiveDetector::SensitiveDetector
SensitiveDetector(Handle< SensitiveDetectorObject > &&sd)
Move from named handle.
Definition: DetElement.h:55
Callback.h
dd4hep::DetElement::setTypeFlag
DetElement & setTypeFlag(unsigned int types)
Set the flag word encoding detector types ( ideally use dd4hep::DetType for encoding )
Definition: DetElement.cpp:113
dd4hep::DetElement::typeFlag
unsigned int typeFlag() const
Access the type of the sensitive detector.
Definition: DetElement.cpp:108
dd4hep::DetElement
Handle class describing a detector element.
Definition: DetElement.h:188
dd4hep::DetElement::operator!=
bool operator!=(const Handle< T > &e) const
Non-Equality operator.
Definition: DetElement.h:330
dd4hep::Volume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:378
dd4hep::DetElement::DetElement
DetElement(const DetElement &e)=default
Constructor to copy handle.
dd4hep::DetElement::volume
Volume volume() const
Access to the logical volume of the detector element's placement.
Definition: DetElement.cpp:352
Readout.h
dd4hep::DetElement::extension
IFACE * extension() const
Access extension element by the type.
Definition: DetElement.h:363
dd4hep::DetElement::DetElementExtension::hash64
virtual unsigned long long int hash64() const override
Hash value.
Definition: DetElement.h:268
dd4hep::detail::DeleteExtension
Implementation class for the object extension mechanism.
Definition: ExtensionEntry.h:123
dd4hep::LimitSet
Handle class describing a set of limits as they are used for simulation.
Definition: Objects.h:425
dd4hep::SensitiveDetector::hitsCollection
const std::string & hitsCollection() const
Access the hits collection name.
Definition: DetElement.cpp:447
dd4hep::DetElement::extension
IFACE * extension(bool alert) const
Access extension element by the type.
Definition: DetElement.h:367
dd4hep::DetElement::setAttributes
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: DetElement.cpp:380
dd4hep::Callback
Definition of the generic callback structure for member functions.
Definition: Callback.h:38
dd4hep::DetElement::_data
Object & _data() const
Additional data accessor.
Definition: DetElement.h:317
dd4hep::DetElement::PLACEMENT_NONE
@ PLACEMENT_NONE
Definition: DetElement.h:224
dd4hep::DetElement::Processor::processElement
virtual int processElement(DetElement detector)=0
Container callback for object processing.
dd4hep::DetElement::i_addUpdateCall
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.
Definition: DetElement.cpp:75
dd4hep::SensitiveDetector::operator!=
bool operator!=(const Handle< T > &e) const
Non-Equality operator.
Definition: DetElement.h:86
dd4hep::SensitiveDetector::combineHits
bool combineHits() const
Access flag to combine hist.
Definition: DetElement.cpp:471
dd4hep::DetElement::DetElementExtension::DetElementExtension
DetElementExtension(const DetElementExtension &copy)=default
Copy constructor.
dd4hep::DetElement::placementPath
const std::string & placementPath() const
Access to the full path to the placed object.
Definition: DetElement.cpp:85
dd4hep::DetElement::removeAtUpdate
void removeAtUpdate(unsigned int type, void *pointer) const
Remove callback from object.
Definition: DetElement.cpp:80
dd4hep::Region
Handle class describing a region as used in simulation.
Definition: Objects.h:462
dd4hep::Alignment
Main handle class to hold an alignment object.
Definition: Alignments.h:115
dd4hep::DetElement::nominal
Alignment nominal() const
Access to the constant ideal (nominal) alignment information.
Definition: DetElement.cpp:185
dd4hep::DetElement::DetElementExtension::object
virtual void * object() const override
Wrapper to access the desired interface.
Definition: DetElement.h:259
dd4hep::DetElement::DetElement
DetElement(DetElement &&e)=default
Constructor to move handle.
dd4hep::SensitiveDetector::setReadout
SensitiveDetector & setReadout(Readout readout)
Assign the IDDescriptor reference.
Definition: DetElement.cpp:414
dd4hep::DetElement::DetElementExtension::operator=
DetElementExtension & operator=(const DetElementExtension &copy)=default
Assignment operator.
dd4hep::DetElement::Processor
Abstract base for processing callbacks to DetElement objects.
Definition: DetElement.h:196
dd4hep::DetElement::level
int level() const
Access the hierarchical level of the detector element (Only valid once geometry is closed!...
Definition: DetElement.cpp:146
dd4hep::DetElement::addExtension
IFACE * addExtension(CONCRETE *c) const
Extend the detector element with an arbitrary structure accessible by the type.
Definition: DetElement.h:358
dd4hep::DetElement::CopyParameters
CopyParameters
Definition: DetElement.h:208
dd4hep::DetElement::combineHits
bool combineHits() const
Getter: Combine hits attribute.
Definition: DetElement.cpp:173
dd4hep::SensitiveDetector::SensitiveDetector
SensitiveDetector()
Default constructor.
Definition: DetElement.h:48
dd4hep::DetElement::PROPAGATE_PARENT_ID
@ PROPAGATE_PARENT_ID
Definition: DetElement.h:213
dd4hep::DetElement::setPlacement
DetElement & setPlacement(const PlacedVolume &volume)
Set the physical volumes of the detector element.
Definition: DetElement.cpp:330
dd4hep::SensitiveDetector::SensitiveDetector
SensitiveDetector(const Handle< SensitiveDetectorObject > &sd)
Copy from named handle.
Definition: DetElement.h:59
dd4hep::SensitiveDetector::addExtension
IFACE * addExtension(CONCRETE *c) const
Extend the sensitive detector element with an arbitrary structure accessible by the type.
Definition: DetElement.h:151
dd4hep::SensitiveDetector::limits
LimitSet limits() const
Access to the limit set of the sensitive detector (not mandatory).
Definition: DetElement.cpp:493
dd4hep::SensitiveDetector::addExtension
void * addExtension(unsigned long long int key, ExtensionEntry *entry) const
Add an extension object to the detector element.
Definition: DetElement.cpp:498
dd4hep::SensitiveDetector::type
std::string type() const
Access the type of the sensitive detector.
Definition: DetElement.cpp:409
dd4hep::SensitiveDetector::region
Region region() const
Access to the region setting of the sensitive detector (not mandatory)
Definition: DetElement.cpp:482
dd4hep::SensitiveDetector::verbose
bool verbose() const
Access flag to combine hist.
Definition: DetElement.cpp:459
dd4hep::DetElement::UpdateParam
UpdateParam
Definition: DetElement.h:217
dd4hep::DetElement::solid
Solid solid() const
Access to the shape of the detector element's placement.
Definition: DetElement.cpp:357
VolumeID
dd4hep::DDSegmentation::VolumeID VolumeID
Definition: SegmentationDictionary.h:49
key
unsigned char key
Definition: AlignmentsCalculator.cpp:69
dd4hep::DetElement::Children
std::map< std::string, DetElement > Children
Definition: DetElement.h:206
dd4hep::DetElement::DetElementExtension::iface
Q * iface
Definition: DetElement.h:242
dd4hep::DetElement::DetElementExtension
Wrapper class for detector element extension objects.
Definition: DetElement.h:239
dd4hep::Handle< SensitiveDetectorObject >::ptr
SensitiveDetectorObject * ptr() const
Access to the held object.
Definition: Handle.h:153
dd4hep::DetElement::DetElementExtension::clone
virtual ExtensionEntry * clone(void *det) const override
Copy/clone the object.
Definition: DetElement.h:265
dd4hep::DetElement::SOMETHING_CHANGED
@ SOMETHING_CHANGED
Definition: DetElement.h:220
dd4hep::DetElement::idealPlacement
PlacedVolume idealPlacement() const
Access to the ideal physical volume of this detector element.
Definition: DetElement.cpp:312
dd4hep::DetElement::addExtension
void * addExtension(ExtensionEntry *entry) const
Add an extension object to the detector element.
Definition: DetElement.cpp:65
dd4hep::DetElement::setVisAttributes
DetElement & setVisAttributes(const Detector &description, const std::string &name, const Volume &volume)
Set Visualization attributes to the detector element.
Definition: DetElement.cpp:361
dd4hep::SensitiveDetectorObject
Data class with properties of sensitive detectors.
Definition: DetectorInterna.h:54
dd4hep::SensitiveDetector::energyCutoff
double energyCutoff() const
Access energy cut off.
Definition: DetElement.cpp:436
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::NamedObject
Implementation of a named object.
Definition: NamedObject.h:30
dd4hep::SensitiveDetector::operator=
SensitiveDetector & operator=(const SensitiveDetector &sd)=default
Assignment copy operator.
dd4hep::DetElement::LAST
@ LAST
Definition: DetElement.h:214
dd4hep::DetElement::DetElementExtension::ptr
T * ptr
Definition: DetElement.h:241
dd4hep::DetElement::child
DetElement child(const std::string &name) const
Access to individual children by name.
Definition: DetElement.cpp:212
det
DetElement::Object * det
Definition: AlignmentsCalculator.cpp:66
dd4hep::SensitiveDetector::readout
Readout readout() const
Access readout structure of the sensitive detector.
Definition: DetElement.cpp:420
dd4hep::SensitiveDetector::operator=
SensitiveDetector & operator=(SensitiveDetector &&sd)=default
Assignment move operator.
dd4hep::Detector
The main interface to the dd4hep detector description package.
Definition: Detector.h:90
dd4hep::DetElement::COPY_NONE
@ COPY_NONE
Definition: DetElement.h:209
dd4hep::Readout
Handle to the implementation of the readout structure of a subdetector.
Definition: Readout.h:38
dd4hep::DetElement::operator==
bool operator==(const Handle< T > &e) const
Equality operator.
Definition: DetElement.h:326
dd4hep::DetElement::id
int id() const
Get the detector identifier.
Definition: DetElement.cpp:169
dd4hep::SensitiveDetector::setRegion
SensitiveDetector & setRegion(Region reg)
Set the regional attributes to the sensitive detector.
Definition: DetElement.cpp:476
dd4hep::SensitiveDetector::setCombineHits
SensitiveDetector & setCombineHits(bool value)
Set flag to handle hits collection.
Definition: DetElement.cpp:464
dd4hep::DetElement::COPY_ALIGNMENT
@ COPY_ALIGNMENT
Definition: DetElement.h:212
dd4hep::SensitiveDetector::setLimitSet
SensitiveDetector & setLimitSet(LimitSet limits)
Set the limits to the sensitive detector.
Definition: DetElement.cpp:487
dd4hep::DetElement::world
DetElement world() const
Access to the world object. Only possible once the geometry is closed.
Definition: DetElement.cpp:245
dd4hep::DetElement::survey
Alignment survey() const
Access to the constant survey alignment information.
Definition: DetElement.cpp:198
dd4hep::SensitiveDetector::extension
IFACE * extension() const
Access extension element by the type.
Definition: DetElement.h:157
dd4hep::DetElement::Processor::Processor
Processor()
Default constructor.
Definition: DetElement.cpp:31
AlignmentData.h
dd4hep::DetElement::DetElementExtension::copy
virtual void * copy(void *det) const override
Copy/clone the object.
Definition: DetElement.h:262
dd4hep::SensitiveDetector::setType
SensitiveDetector & setType(const std::string &typ)
Set detector type (structure, tracker, calorimeter, etc.).
Definition: DetElement.cpp:403
dd4hep::DetElement::PLACEMENT_CHANGED
@ PLACEMENT_CHANGED
Definition: DetElement.h:219
dd4hep::DetElement::PLACEMENT_DETECTOR
@ PLACEMENT_DETECTOR
Definition: DetElement.h:223
dd4hep::DetElement::DetElementExtension::copy
T * copy(DetElement de) const
This one ensures we have the correct signatures.
Definition: DetElement.h:255