DD4hep  1.31.0
Detector Description Toolkit for High Energy Physics
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
30 namespace dd4hep {
31 
32  // Forward declarations
33  class Detector;
34  class DetElementObject;
35  class SensitiveDetectorObject;
36 
38 
43  class SensitiveDetector: public Handle<SensitiveDetectorObject> {
44  public:
45 
48 
50  SensitiveDetector(Object* obj_pointer)
51  : Handle<SensitiveDetectorObject>(obj_pointer) { }
52 
56 
60 
63 
65  SensitiveDetector(const SensitiveDetector& sd) = default;
66 
68  template <typename Q> SensitiveDetector(const Handle<Q>& e)
70 
72  SensitiveDetector(const std::string& name, const std::string& type = "sensitive");
73 
76 
79 
81  template <typename T> bool operator ==(const Handle<T>& e) const {
82  return ptr() == e.ptr();
83  }
85  template <typename T> bool operator !=(const Handle<T>& e) const {
86  return ptr() != e.ptr();
87  }
88 
90  std::string type() const;
91 
93  SensitiveDetector& setType(const std::string& typ);
94 
96  SensitiveDetector& setVerbose(bool value);
97 
99  bool verbose() const;
100 
102  SensitiveDetector& setCombineHits(bool value);
103 
105  bool combineHits() const;
106 
108  SensitiveDetector& setHitsCollection(const std::string& spec);
109 
111  const std::string& hitsCollection() const;
112 
115 
117  Readout readout() const;
118 
120  IDDescriptor idSpec() const;
121 
123  SensitiveDetector& setEnergyCutoff(double value);
124 
126  double energyCutoff() const;
127 
130 
132  Region region() const;
133 
136 
138  LimitSet limits() const;
139 
141  void* addExtension(unsigned long long int key, ExtensionEntry* entry) const;
142 
144  void* extension(unsigned long long int key) const;
145 
147  void* extension(unsigned long long int key, bool alert) const;
148 
150  template <typename IFACE, typename CONCRETE> IFACE* addExtension(CONCRETE* c) const {
151  return (IFACE*) this->addExtension(detail::typeHash64<IFACE>(),
153  }
154 
156  template <typename IFACE> IFACE* extension() const {
157  return (IFACE*) this->extension(detail::typeHash64<IFACE>());
158  }
159  };
160 
162 
187  class DetElement: public Handle<DetElementObject> {
188  public:
190 
195  class Processor {
196  public:
198  Processor();
200  virtual ~Processor();
202  virtual int processElement(DetElement detector) = 0;
203  };
204 
205  typedef std::map<std::string, DetElement> Children;
206 
209  COPY_PLACEMENT = 1 << 0,
210  COPY_PARENT = 1 << 1,
211  COPY_ALIGNMENT = 1 << 2,
213  LAST
214  };
215 
216  enum UpdateParam {
224  };
225 
227  void check(bool condition, const std::string& msg) const;
228 
229  protected:
230 
232 
238  template <typename Q, typename T> class DetElementExtension : public ExtensionEntry {
239  protected:
240  T* ptr = 0;
241  mutable Q* iface = 0;
242  public:
246  DetElementExtension(T* p) : ptr(p) { iface = dynamic_cast<Q*>(p); }
252  virtual ~DetElementExtension() = default;
254  T* copy(DetElement de) const { return new T(*ptr,de); }
256  virtual void destruct() const override { delete ptr; }
258  virtual void* object() const override
259  { return iface ? iface : (iface=dynamic_cast<Q*>(ptr)); }
261  virtual void* copy(void* det) const override
262  { return copy(DetElement((Object*)det)); }
264  virtual ExtensionEntry* clone(void* det) const override
265  { return new DetElementExtension<Q,T>((T*)this->copy(det)); }
267  virtual unsigned long long int hash64() const override
268  { return detail::typeHash64<Q>(); }
269  };
270 
272  void i_addUpdateCall(unsigned int callback_type, const Callback& callback) const;
273 
274  public:
275 
277  DetElement() = default;
278 
280  DetElement(DetElement&& e) = default;
281 
283  DetElement(const DetElement& e) = default;
284 
287 
289  DetElement(Object* obj, const std::string& name, const std::string& type);
290 
292  template <typename Q> DetElement(const Handle<Q>& e) : Handle<DetElementObject>(e) {}
293 
296 
297 #ifdef __MAKECINT__
298  DetElement(const Ref_t& e) : Handle<DetElementObject>(e) { }
300 #endif
301  DetElement(const std::string& name, const std::string& type, int id);
303 
305  DetElement(const std::string& name, int id);
306 
308  DetElement(DetElement parent, const std::string& name, int id);
309 
311  DetElement& operator=(DetElement&& sd) = default;
313  DetElement& operator=(const DetElement& e) = default;
314 
316  Object& _data() const {
317  return object<Object>();
318  }
319 
321  bool operator <(const DetElement e) const {
322  return ptr() < e.ptr();
323  }
325  template <typename T> bool operator ==(const Handle<T>& e) const {
326  return ptr() == e.ptr();
327  }
329  template <typename T> bool operator !=(const Handle<T>& e) const {
330  return ptr() != e.ptr();
331  }
332 
334  DetElement clone(int flag) const;
335 
337  DetElement clone(const std::string& new_name) const;
338 
340  DetElement clone(const std::string& new_name, int new_id) const;
341 
343  std::pair<DetElement,Volume> reflect(const std::string& new_name) const;
344 
346  std::pair<DetElement,Volume> reflect(const std::string& new_name, int new_id) const;
348  std::pair<DetElement,Volume> reflect(const std::string& new_name, int new_id, SensitiveDetector sd) const;
349 
351  void* addExtension(ExtensionEntry* entry) const;
352 
354  void* extension(unsigned long long int key, bool alert) const;
355 
357  template <typename IFACE, typename CONCRETE> IFACE* addExtension(CONCRETE* c) const {
358  CallbackSequence::checkTypes(typeid(IFACE), typeid(CONCRETE), dynamic_cast<IFACE*>(c));
359  return (IFACE*) this->addExtension(new DetElementExtension<IFACE,CONCRETE>(c));
360  }
362  template <typename IFACE> IFACE* extension() const {
363  return (IFACE*) this->extension(detail::typeHash64<IFACE>(),true);
364  }
366  template <typename IFACE> IFACE* extension(bool alert) const {
367  return (IFACE*) this->extension(detail::typeHash64<IFACE>(),alert);
368  }
370  template <typename Q, typename T>
371  void callAtUpdate(unsigned int typ, Q* pointer,
372  void (T::*pmf)(unsigned long typ, DetElement& det, void* opt_par)) const
373  {
374  CallbackSequence::checkTypes(typeid(T), typeid(Q), dynamic_cast<T*>(pointer));
375  i_addUpdateCall(typ, Callback(pointer).make(pmf));
376  }
378  void removeAtUpdate(unsigned int type, void* pointer) const;
379 
381  int id() const;
383  DetElement& setCombineHits(bool value, SensitiveDetector& sens);
385  bool combineHits() const;
386 
390  std::string type() const;
392  DetElement& setType(const std::string& typ);
393 
394  // Return flag word encoding detector types ( ideally use dd4hep::DetType for decoding )
395  unsigned int typeFlag() const;
396 
398  DetElement& setTypeFlag(unsigned int types);
399 
401  unsigned int key() const;
403  int level() const;
405  const std::string& path() const;
407  const std::string& placementPath() const;
408 
410  DetElement& setAttributes(const Detector& description,
411  const Volume& volume,
412  const std::string& region,
413  const std::string& limits,
414  const std::string& vis);
415 
417  DetElement& setVisAttributes(const Detector& description, const std::string& name, const Volume& volume);
419  DetElement& setRegion(const Detector& description, const std::string& name, const Volume& volume);
421  DetElement& setLimitSet(const Detector& description, const std::string& name, const Volume& volume);
422 
424  Volume volume() const;
426  Solid solid() const;
427 
429 
433  PlacedVolume placement() const;
435 
443  VolumeID volumeID() const;
444 
446  DetElement& add(DetElement sub_element);
448  const Children& children() const;
450  DetElement child(const std::string& name) const;
452  DetElement child(const std::string& child_name, bool throw_if_not_found) const;
454  DetElement parent() const;
456  DetElement world() const;
457 
459  Alignment nominal() const;
461  Alignment survey() const;
462  };
463 } /* End namespace dd4hep */
464 
465 #include <DD4hep/AlignmentData.h>
466 
467 #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:37
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:371
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:295
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:209
dd4hep::SensitiveDetector::SensitiveDetector
SensitiveDetector(Object *obj_pointer)
Constructor to copy handled object.
Definition: DetElement.h:50
dd4hep::DetElement::DetElementExtension::~DetElementExtension
virtual ~DetElementExtension()=default
Default destructor.
dd4hep::SensitiveDetector
Handle class to hold the information of a sensitive detector.
Definition: DetElement.h:43
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:86
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:164
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:246
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:210
dd4hep::SensitiveDetector::SensitiveDetector
SensitiveDetector(const Handle< Q > &e)
Templated constructor for handle conversions.
Definition: DetElement.h:68
dd4hep::IDDescriptor
Class implementing the ID encoding of the detector response.
Definition: IDDescriptor.h:36
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:292
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:82
dd4hep::DetElement::PLACEMENT_ELEMENT
@ PLACEMENT_ELEMENT
Definition: DetElement.h:220
dd4hep::DetElement::DetElementExtension::DetElementExtension
DetElementExtension()=delete
Inhibit default constructor.
dd4hep::DetElement::CONDITIONS_CHANGED
@ CONDITIONS_CHANGED
Definition: DetElement.h:217
dd4hep::DetElement::DetElementExtension::destruct
virtual void destruct() const override
Wrapper for the object destruction.
Definition: DetElement.h:256
dd4hep::Solid_type
Base class for Solid (shape) objects.
Definition: Shapes.h:136
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:321
dd4hep::DetElement::PLACEMENT_HIGHEST
@ PLACEMENT_HIGHEST
Definition: DetElement.h:221
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:286
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:81
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:54
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:187
dd4hep::DetElement::operator!=
bool operator!=(const Handle< T > &e) const
Non-Equality operator.
Definition: DetElement.h:329
dd4hep::Volume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:371
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:362
dd4hep::DetElement::DetElementExtension::hash64
virtual unsigned long long int hash64() const override
Hash value.
Definition: DetElement.h:267
dd4hep::detail::DeleteExtension
Implementation class for the object extension mechanism.
Definition: ExtensionEntry.h:120
dd4hep::LimitSet
Handle class describing a set of limits as they are used for simulation.
Definition: Objects.h:424
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:366
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:37
dd4hep::DetElement::_data
Object & _data() const
Additional data accessor.
Definition: DetElement.h:316
dd4hep::DetElement::PLACEMENT_NONE
@ PLACEMENT_NONE
Definition: DetElement.h:223
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:85
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:461
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:258
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:195
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:357
dd4hep::DetElement::CopyParameters
CopyParameters
Definition: DetElement.h:207
dd4hep::DetElement::combineHits
bool combineHits() const
Getter: Combine hits attribute.
Definition: DetElement.cpp:173
dd4hep::SensitiveDetector::SensitiveDetector
SensitiveDetector()
Default constructor.
Definition: DetElement.h:47
dd4hep::DetElement::PROPAGATE_PARENT_ID
@ PROPAGATE_PARENT_ID
Definition: DetElement.h:212
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:58
dd4hep::SensitiveDetector::addExtension
IFACE * addExtension(CONCRETE *c) const
Extend the sensitive detector element with an arbitrary structure accessible by the type.
Definition: DetElement.h:150
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:216
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:50
key
unsigned char key
Definition: AlignmentsCalculator.cpp:69
dd4hep::DetElement::Children
std::map< std::string, DetElement > Children
Definition: DetElement.h:205
dd4hep::DetElement::DetElementExtension::iface
Q * iface
Definition: DetElement.h:241
dd4hep::DetElement::DetElementExtension
Wrapper class for detector element extension objects.
Definition: DetElement.h:238
dd4hep::Handle< SensitiveDetectorObject >::ptr
SensitiveDetectorObject * ptr() const
Access to the held object.
Definition: Handle.h:151
dd4hep::DetElement::DetElementExtension::clone
virtual ExtensionEntry * clone(void *det) const override
Copy/clone the object.
Definition: DetElement.h:264
dd4hep::DetElement::SOMETHING_CHANGED
@ SOMETHING_CHANGED
Definition: DetElement.h:219
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:213
dd4hep::DetElement::DetElementExtension::ptr
T * ptr
Definition: DetElement.h:240
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:208
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:325
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:211
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:156
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:261
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:218
dd4hep::DetElement::PLACEMENT_DETECTOR
@ PLACEMENT_DETECTOR
Definition: DetElement.h:222
dd4hep::DetElement::DetElementExtension::copy
T * copy(DetElement de) const
This one ensures we have the correct signatures.
Definition: DetElement.h:254