DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
DetectorImp.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_DETECTORIMP_H
14 #define DD4HEP_DETECTORIMP_H
15 
16 //==========================================================================
17 //
18 // Please note:
19 //
20 // This header file is purely DD4hep internal. It should never be used
21 // independently outside DetectorImp.cpp and certain DD4hep specific plugins.
22 // This header files is only publicly present to satisfy the ROOT interpreter
23 // when loading precompiled dictionary libraries.
24 //
25 //==========================================================================
26 #if !defined(DD4HEP_MUST_USE_DETECTORIMP_H) && !defined(G__ROOT)
27 #error "DetectorImp.h is a dd4hep internal header. Never use it in a depending compilation unit!"
28 #endif
29 
30 // Framework include files
31 #include <DD4hep/DetectorData.h>
32 #include <DD4hep/DetectorLoad.h>
33 #include <TNamed.h>
34 
35 // Forward declarations
36 class TGeoManager;
37 
38 // C/C++ include files
39 #include <map>
40 
42 namespace dd4hep {
43 
45  namespace detail {
46  class OpticalSurfaceManagerObject;
47  }
48 
50 
59  class DetectorImp: public TNamed, public Detector, public DetectorData, public DetectorLoad {
60  protected:
62  typedef std::map<std::string, std::vector<DetElement> > DetectorTypeMap;
63 
66 
69 
72 
75 
76  private:
79 
81  DetectorImp(const DetectorImp& copy) = delete;
82 
85 
87  void mapDetectorTypes();
88 
90  Int_t saveObject(const char *name=0, Int_t option=0, Int_t bufsize=0) const;
91  public:
92 
94  void imp_loadVolumeManager();
95 
97  DetectorImp();
98 
100  DetectorImp(const std::string& name);
101 
103  virtual ~DetectorImp();
104 
106  virtual State state() const override {
107  return m_state;
108  }
109 
111  virtual DetectorBuildType buildType() const override {
112  return m_buildType;
113  }
114 
116  virtual void fromCompact(const std::string& fname, DetectorBuildType type = BUILD_DEFAULT) override {
117  fromXML(fname, type);
118  }
119 
121  virtual void fromXML(const std::string& fname, DetectorBuildType type = BUILD_DEFAULT) override;
122 
124  virtual void fromXML(const std::string& fname,
125  xml::UriReader* entity_resolver,
126  DetectorBuildType type = BUILD_DEFAULT) override;
127 
128  virtual void dump() const override;
129 
131  virtual long apply(const char* factory, int argc, char** argv) const override;
132 
134  virtual void init() override;
135 
137  virtual void endDocument(bool close_geometry) override;
138 
140  virtual void* addUserExtension(unsigned long long int key, ExtensionEntry* entry) override;
141 
143  virtual void* removeUserExtension(unsigned long long int key, bool destroy=true) override;
144 
146  virtual void* userExtension(unsigned long long int key, bool alert=true) const override;
147 
148  virtual Handle<NamedObject> getRefChild(const HandleMap& e, const std::string& name, bool throw_if_not = true) const;
149 
151  virtual void declareParent(const std::string& detector_name, const DetElement& parent) override;
152 
154  virtual Volume pickMotherVolume(const DetElement& sd) const override;
155 
157  virtual TGeoManager& manager() const override {
158  return *m_manager;
159  }
161  Properties& properties() const override {
162  return *(Properties*)&m_properties;
163  }
165  virtual Material air() const override {
166  return m_materialAir;
167  }
169  virtual Material vacuum() const override {
170  return m_materialVacuum;
171  }
173  virtual VisAttr invisible() const override {
174  return m_invisibleVis;
175  }
177  virtual DetElement world() const override {
178  return m_world;
179  }
181  virtual DetElement trackers() const override {
182  return m_trackers;
183  }
185  virtual Volume worldVolume() const override {
186  return m_worldVol;
187  }
189  virtual Volume parallelWorldVolume() const override {
190  return m_parallelWorldVol;
191  }
193  virtual Volume trackingVolume() const override {
194  return m_trackingVol;
195  }
197  virtual void setTrackingVolume(Volume vol) override {
198  m_trackingVol = vol;
199  }
201  virtual VolumeManager volumeManager() const override {
202  return m_volManager;
203  }
205  virtual OpticalSurfaceManager surfaceManager() const override {
207  }
208 
210  virtual OverlayedField field() const override {
211  return m_field;
212  }
213 
215  virtual const STD_Conditions& stdConditions() const override;
217  virtual void setStdConditions(double temp, double pressure) override;
219  virtual void setStdConditions(const std::string& type) override;
220 
222  virtual Header header() const override {
223  return m_header;
224  }
226  virtual void setHeader(Header h) override {
227  m_header = h;
228  }
229 
231  virtual std::string constantAsString(const std::string& name) const override;
232 
234  virtual long constantAsLong(const std::string& name) const override;
235 
237  virtual double constantAsDouble(const std::string& name) const override;
238 
240  virtual Constant constant(const std::string& name) const override;
241 
243  virtual LimitSet limitSet(const std::string& name) const override {
244  return getRefChild(m_limits, name);
245  }
247  virtual VisAttr visAttributes(const std::string& name) const override {
248  return getRefChild(m_display, name, false);
249  }
251  virtual Material material(const std::string& name) const override;
252 
254  virtual Region region(const std::string& name) const override {
255  return getRefChild(m_regions, name);
256  }
258  virtual IDDescriptor idSpecification(const std::string& name) const override {
259  return getRefChild(m_idDict, name);
260  }
262  virtual Readout readout(const std::string& name) const override {
263  return getRefChild(m_readouts, name);
264  }
266  virtual DetElement detector(const std::string& name) const override;
267  //{ return getRefChild(m_detectors, name); }
269  virtual SensitiveDetector sensitiveDetector(const std::string& name) const override {
270  return getRefChild(m_sensitive, name, false);
271  }
273  virtual CartesianField field(const std::string& name) const override {
274  return getRefChild(m_fields, name, false);
275  }
276 
278  virtual const HandleMap& constants() const override {
279  return m_define;
280  }
282  virtual const HandleMap& visAttributes() const override {
283  return m_display;
284  }
286  virtual const HandleMap& limitsets() const override {
287  return m_limits;
288  }
290  virtual const HandleMap& regions() const override {
291  return m_regions;
292  }
294  virtual const HandleMap& readouts() const override {
295  return m_readouts;
296  }
298  virtual const HandleMap& detectors() const override {
299  return m_detectors;
300  }
302  virtual const HandleMap& sensitiveDetectors() const override {
303  return m_sensitive;
304  }
306  virtual const HandleMap& fields() const override {
307  return m_fields;
308  }
310  virtual const HandleMap& idSpecifications() const override {
311  return m_idDict;
312  }
313 
315 
323  virtual const std::vector<DetElement>& detectors(const std::string& type, bool throw_exc) const override;
324 
326  virtual std::vector<DetElement> detectors(const std::string& type1,
327  const std::string& type2,
328  const std::string& type3="",
329  const std::string& type4="",
330  const std::string& type5="" ) override;
331 
333  virtual std::vector<std::string> detectorTypes() const override;
334 
338  virtual std::vector<DetElement> detectors(unsigned int includeFlag,
339  unsigned int excludeFlag=0 ) const override;
340 
341 
342 #define __R return *this
343  virtual Detector& add(Constant x) override {
345  return addConstant(x);
346  }
348  virtual Detector& add(LimitSet x) override {
349  return addLimitSet(x);
350  }
352  virtual Detector& add(Region x) override {
353  return addRegion(x);
354  }
356  virtual Detector& add(VisAttr x) override {
357  return addVisAttribute(x);
358  }
360  virtual Detector& add(IDDescriptor x) override {
361  return addIDSpecification(x);
362  }
364  virtual Detector& add(Readout x) override {
365  return addReadout(x);
366  }
368  virtual Detector& add(SensitiveDetector x) override {
369  return addSensitiveDetector(x);
370  }
372  virtual Detector& add(DetElement x) override {
373  return addDetector(x);
374  }
376  virtual Detector& add(CartesianField x) override {
377  return addField(x);
378  }
379 
381  virtual Detector& addConstant(const Handle<NamedObject>& x) override;
382 
384  virtual Detector& addLimitSet(const Handle<NamedObject>& x) override {
385  m_limits.append(x);
386  __R;
387  }
389  virtual Detector& addRegion(const Handle<NamedObject>& x) override {
390  m_regions.append(x);
391  __R;
392  }
394  virtual Detector& addIDSpecification(const Handle<NamedObject>& x) override {
395  m_idDict.append(x);
396  __R;
397  }
399  virtual Detector& addReadout(const Handle<NamedObject>& x) override {
400  m_readouts.append(x);
401  __R;
402  }
404  virtual Detector& addVisAttribute(const Handle<NamedObject>& x) override {
405  m_display.append(x);
406  __R;
407  }
409  virtual Detector& addSensitiveDetector(const Handle<NamedObject>& x) override {
410  m_sensitive.append(x);
411  __R;
412  }
414  virtual Detector& addDetector(const Handle<NamedObject>& x) override;
416  virtual Detector& addField(const Handle<NamedObject>& x) override;
417 #undef __R
418  virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0) override {
420  return saveObject(name, option, bufsize);
421  }
423  virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0) const override {
424  return saveObject(name, option, bufsize);
425  }
426 
428 
429  };
430 } /* End namespace dd4hep */
431 
432 #if defined(__CINT__) || defined(__MAKECINT__) || defined(__CLING__) || defined(__ROOTCLING__)
433 #pragma link C++ class dd4hep::DetectorImp+;
434 #endif
435 #endif // DD4HEP_DETECTORIMP_H
dd4hep::DetectorImp::setTrackingVolume
virtual void setTrackingVolume(Volume vol) override
Set the tracking volume of the detector.
Definition: DetectorImp.h:197
dd4hep::DetectorImp::detectors
virtual const HandleMap & detectors() const override
Accessor to the map of sub-detectors.
Definition: DetectorImp.h:298
dd4hep::DetectorImp::state
virtual State state() const override
Access the state of the geometry.
Definition: DetectorImp.h:106
dd4hep::Detector::State
State
The detector description states.
Definition: Detector.h:98
dd4hep::DetectorImp::DetectorImp
DetectorImp()
Default constructor used by ROOT I/O.
Definition: DetectorImp.cpp:170
dd4hep::DetectorImp::add
virtual Detector & add(Constant x) override
Add a new constant to the detector description.
Definition: DetectorImp.h:344
dd4hep::detail::OpticalSurfaceManagerObject
This structure describes the internal data of the volume manager object.
Definition: OpticalSurfaceManagerInterna.h:43
dd4hep::DetectorData::m_sensitive
ObjectHandleMap m_sensitive
The map of top level sub-detector sensitive detector objects indexed by the detector name.
Definition: DetectorData.h:110
dd4hep::ExtensionEntry
Definition of the extension entry interface class.
Definition: ExtensionEntry.h:40
dd4hep::DetectorImp::init
virtual void init() override
Open the geometry at startup.
Definition: DetectorImp.cpp:750
dd4hep::DetectorImp::worldVolume
virtual Volume worldVolume() const override
Return handle to the world volume containing everything.
Definition: DetectorImp.h:185
dd4hep::DetectorData::m_display
ObjectHandleMap m_display
The map of display attributes in use.
Definition: DetectorData.h:114
dd4hep::DetectorImp::air
virtual Material air() const override
Return handle to material describing air.
Definition: DetectorImp.h:165
dd4hep::DetectorImp::m_buildType
DetectorBuildType m_buildType
VolumeManager m_volManager;.
Definition: DetectorImp.h:71
dd4hep::DetectorImp::trackers
virtual DetElement trackers() const override
Return reference to detector element with all tracker devices.
Definition: DetectorImp.h:181
dd4hep::SensitiveDetector
Handle class to hold the information of a sensitive detector.
Definition: DetElement.h:44
dd4hep::DetectorData::ObjectHandleMap::append
void append(const Handle< NamedObject > &e, bool throw_on_doubles=true)
Append entry to map.
Definition: DetectorData.h:69
dd4hep::DetectorImp::addReadout
virtual Detector & addReadout(const Handle< NamedObject > &x) override
Add a new detector readout by named reference to the detector description.
Definition: DetectorImp.h:399
dd4hep::DetectorData::m_trackingVol
Volume m_trackingVol
Definition: DetectorData.h:126
dd4hep::Detector::Properties
std::map< std::string, PropertyValues > Properties
Definition: Detector.h:95
dd4hep::DetectorImp::limitsets
virtual const HandleMap & limitsets() const override
Accessor to the map of limit settings.
Definition: DetectorImp.h:286
dd4hep::DetectorImp::operator=
DetectorImp & operator=(const DetectorImp &copy)=delete
Disable assignment operator.
dd4hep::VisAttr
Handle class describing visualization attributes.
Definition: Objects.h:324
dd4hep::DetectorImp::addConstant
virtual Detector & addConstant(const Handle< NamedObject > &x) override
Add a new constant by named reference to the detector description.
Definition: DetectorImp.cpp:465
dd4hep::DetectorImp::addField
virtual Detector & addField(const Handle< NamedObject > &x) override
Add a field component by named reference to the detector description.
Definition: DetectorImp.cpp:511
dd4hep::DetectorData::m_world
DetElement m_world
Definition: DetectorData.h:122
dd4hep::IDDescriptor
Class implementing the ID encoding of the detector response.
Definition: IDDescriptor.h:37
dd4hep::DetectorImp::m_std_conditions
STD_Conditions m_std_conditions
Standard conditions.
Definition: DetectorImp.h:65
dd4hep::Handle< NamedObject >
dd4hep::DetectorImp::regions
virtual const HandleMap & regions() const override
Accessor to the map of region settings.
Definition: DetectorImp.h:290
dd4hep::DetectorLoad::Detector
friend class Detector
Definition: DetectorLoad.h:46
dd4hep::DetectorImp::addDetector
virtual Detector & addDetector(const Handle< NamedObject > &x) override
Add a new subdetector by named reference to the detector description.
Definition: DetectorImp.cpp:409
dd4hep::DetectorImp::sensitiveDetectors
virtual const HandleMap & sensitiveDetectors() const override
Retrieve a sensitive detector by its name from the detector description.
Definition: DetectorImp.h:302
dd4hep::DetectorData::m_header
Header m_header
Definition: DetectorData.h:132
dd4hep::DetectorImp::fromCompact
virtual void fromCompact(const std::string &fname, DetectorBuildType type=BUILD_DEFAULT) override
Read compact geometry description or alignment file.
Definition: DetectorImp.h:116
dd4hep::DetectorImp::detector
virtual DetElement detector(const std::string &name) const override
Retrieve a subdetector element by its name from the detector description.
Definition: DetectorImp.cpp:400
dd4hep::DetectorData::m_field
OverlayedField m_field
Definition: DetectorData.h:131
dd4hep::DetectorImp::add
virtual Detector & add(LimitSet x) override
Add a new limit set to the detector description.
Definition: DetectorImp.h:348
dd4hep::DetectorData::m_idDict
ObjectHandleMap m_idDict
Map of readout IDDescriptors indexed by hit collection name.
Definition: DetectorData.h:102
dd4hep::DetectorImp::add
virtual Detector & add(IDDescriptor x) override
Add a new id descriptor to the detector description.
Definition: DetectorImp.h:360
dd4hep::DetectorImp::world
virtual DetElement world() const override
Return reference to the top-most (world) detector element.
Definition: DetectorImp.h:177
dd4hep::DetectorImp::addLimitSet
virtual Detector & addLimitSet(const Handle< NamedObject > &x) override
Add a new limit set by named reference to the detector description.
Definition: DetectorImp.h:384
dd4hep::DetectorData::m_worldVol
Volume m_worldVol
Definition: DetectorData.h:124
dd4hep::DetectorImp::properties
Properties & properties() const override
Access to properties.
Definition: DetectorImp.h:161
dd4hep::DetectorImp::addIDSpecification
virtual Detector & addIDSpecification(const Handle< NamedObject > &x) override
Add a new id descriptor by named reference to the detector description.
Definition: DetectorImp.h:394
dd4hep::OverlayedField
Class describing a field overlay with several sources.
Definition: Fields.h:138
dd4hep::DetectorData::m_define
ObjectHandleMap m_define
Definition: DetectorData.h:118
dd4hep::DetectorImp::constantAsLong
virtual long constantAsLong(const std::string &name) const override
Typed access to constants: long values.
Definition: DetectorImp.cpp:495
dd4hep::Material
Handle class describing a material.
Definition: Objects.h:272
dd4hep::DetectorImp::declareParent
virtual void declareParent(const std::string &detector_name, const DetElement &parent) override
Register new mother volume using the detector name.
Definition: DetectorImp.cpp:303
dd4hep::DetectorImp::addSensitiveDetector
virtual Detector & addSensitiveDetector(const Handle< NamedObject > &x) override
Add a new sensitive detector by named reference to the detector description.
Definition: DetectorImp.h:409
dd4hep::DetectorImp::visAttributes
virtual VisAttr visAttributes(const std::string &name) const override
Retrieve a visualization attribute by its name from the detector description.
Definition: DetectorImp.h:247
dd4hep::DetectorImp::m_detectorTypes
DetectorTypeMap m_detectorTypes
Inventory of detector types.
Definition: DetectorImp.h:68
dd4hep::DetectorImp::sensitiveDetector
virtual SensitiveDetector sensitiveDetector(const std::string &name) const override
Retrieve a sensitive detector by its name from the detector description.
Definition: DetectorImp.h:269
dd4hep::DetectorData::m_regions
ObjectHandleMap m_regions
Map of regions settings for the simulation.
Definition: DetectorData.h:106
dd4hep::DetectorImp::readouts
virtual const HandleMap & readouts() const override
Accessor to the map of readout structures.
Definition: DetectorImp.h:294
dd4hep::DetectorImp::setHeader
virtual void setHeader(Header h) override
Accessor to the header entry.
Definition: DetectorImp.h:226
dd4hep::DetectorImp::manager
virtual TGeoManager & manager() const override
Access the geometry manager of this instance.
Definition: DetectorImp.h:157
dd4hep::DetectorImp::volumeManager
virtual VolumeManager volumeManager() const override
Return handle to the VolumeManager.
Definition: DetectorImp.h:201
dd4hep::DetectorImp::parallelWorldVolume
virtual Volume parallelWorldVolume() const override
Return handle to the world volume containing the volume with the tracking devices.
Definition: DetectorImp.h:189
dd4hep::STD_Conditions
Helper class to access default temperature and pressure.
Definition: Detector.h:58
dd4hep::DetectorImp::add
virtual Detector & add(Readout x) override
Add a new detector readout to the detector description.
Definition: DetectorImp.h:364
dd4hep::DetElement
Handle class describing a detector element.
Definition: DetElement.h:188
dd4hep::Constant
Handle class describing a constant (define) object in description.
Definition: Objects.h:209
dd4hep::Volume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:378
dd4hep::DetectorImp::fields
virtual const HandleMap & fields() const override
Accessor to the map of field entries, which together form the global field.
Definition: DetectorImp.h:306
dd4hep::DetectorImp::DetectorImp
DetectorImp(DetectorImp &&copy)=delete
not persistent
dd4hep::VolumeManager
Class to support the retrieval of detector elements and volumes given a valid identifier.
Definition: VolumeManager.h:135
dd4hep::DetectorImp::~DetectorImp
virtual ~DetectorImp()
Standard destructor.
Definition: DetectorImp.cpp:236
dd4hep::DetectorData::m_state
Detector::State m_state
Detector description state.
Definition: DetectorData.h:142
dd4hep::DetectorImp::invisible
virtual VisAttr invisible() const override
Return handle to "invisible" visualization attributes.
Definition: DetectorImp.h:173
dd4hep::DetectorData::m_volManager
VolumeManager m_volManager
Volume manager reference.
Definition: DetectorData.h:139
dd4hep::DetectorData::m_readouts
ObjectHandleMap m_readouts
Map of readout descriptors indexed by subdetector name.
Definition: DetectorData.h:108
dd4hep::LimitSet
Handle class describing a set of limits as they are used for simulation.
Definition: Objects.h:425
dd4hep::DetectorImp::dump
virtual void dump() const override
Stupid legacy method.
Definition: DetectorImp.cpp:825
dd4hep::DetectorImp::add
virtual Detector & add(SensitiveDetector x) override
Add a new sensitive detector to the detector description.
Definition: DetectorImp.h:368
dd4hep::DetectorImp::visAttributes
virtual const HandleMap & visAttributes() const override
Accessor to the map of visualisation attributes.
Definition: DetectorImp.h:282
dd4hep::DetectorData::m_detectors
ObjectHandleMap m_detectors
The map of top level sub-detector objects indexed by name.
Definition: DetectorData.h:112
dd4hep::DetectorImp::constant
virtual Constant constant(const std::string &name) const override
Retrieve a constant by its name from the detector description.
Definition: DetectorImp.cpp:476
dd4hep::DetectorImp::apply
virtual long apply(const char *factory, int argc, char **argv) const override
Manipulate geometry using facroy converter.
Definition: DetectorImp.cpp:833
dd4hep::DetectorImp::removeUserExtension
virtual void * removeUserExtension(unsigned long long int key, bool destroy=true) override
Remove an existing extension object from the Detector instance. If not destroyed, the instance is ret...
Definition: DetectorImp.cpp:293
TNamed
Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html.
Definition: ROOTClasses.h:37
dd4hep::DetectorImp::saveObject
Int_t saveObject(const char *name=0, Int_t option=0, Int_t bufsize=0) const
ROOT I/O call.
Definition: DetectorImp.cpp:258
dd4hep::DetectorImp::idSpecifications
virtual const HandleMap & idSpecifications() const override
Accessor to the map of ID specifications.
Definition: DetectorImp.h:310
dd4hep::DetectorImp::DetectorImp
DetectorImp(const DetectorImp &copy)=delete
Disable copy constructor.
dd4hep::Region
Handle class describing a region as used in simulation.
Definition: Objects.h:462
dd4hep::DetectorData::m_materialAir
Material m_materialAir
Definition: DetectorData.h:128
dd4hep::DetectorImp::constants
virtual const HandleMap & constants() const override
Accessor to the map of constants.
Definition: DetectorImp.h:278
dd4hep::Header
Handle class describing the basic information about geometry objects as it is defined in Detector.
Definition: Objects.h:158
dd4hep::DetectorImp::idSpecification
virtual IDDescriptor idSpecification(const std::string &name) const override
Retrieve a id descriptor by its name from the detector description.
Definition: DetectorImp.h:258
dd4hep::DetectorImp::endDocument
virtual void endDocument(bool close_geometry) override
Close the geometry.
Definition: DetectorImp.cpp:712
dd4hep::DetectorImp::material
virtual Material material(const std::string &name) const override
Retrieve a matrial by its name from the detector description.
Definition: DetectorImp.cpp:518
dd4hep::DetectorImp::add
virtual Detector & add(VisAttr x) override
Add a new visualisation attribute to the detector description.
Definition: DetectorImp.h:356
dd4hep::DetectorLoad
Data implementation class of the Detector interface.
Definition: DetectorLoad.h:44
dd4hep::DetectorImp::trackingVolume
virtual Volume trackingVolume() const override
Return handle to the world volume containing the volume with the tracking devices.
Definition: DetectorImp.h:193
dd4hep::DetectorData::m_properties
Detector::Properties m_properties
Definition: DetectorData.h:133
dd4hep::DetectorImp::addRegion
virtual Detector & addRegion(const Handle< NamedObject > &x) override
Add a new detector region by named reference to the detector description.
Definition: DetectorImp.h:389
dd4hep::DetectorData::m_fields
ObjectHandleMap m_fields
The map of electro magnet field components for the global overlay field.
Definition: DetectorData.h:116
dd4hep::DetectorImp::stdConditions
virtual const STD_Conditions & stdConditions() const override
Access default conditions (temperature and pressure.
Definition: DetectorImp.cpp:358
dd4hep::DetectorImp::pickMotherVolume
virtual Volume pickMotherVolume(const DetElement &sd) const override
Access mother volume by detector element.
Definition: DetectorImp.cpp:329
DetectorData.h
dd4hep::xml::UriReader
Class supporting to read data given a URI.
Definition: UriReader.h:35
dd4hep::Detector::HandleMap
std::map< std::string, Handle< NamedObject > > HandleMap
Type definition of a map of named handles.
Definition: Detector.h:93
dd4hep::DetectorImp::region
virtual Region region(const std::string &name) const override
Retrieve a region object by its name from the detector description.
Definition: DetectorImp.h:254
dd4hep::DetectorImp::m_surfaceManager
detail::OpticalSurfaceManagerObject * m_surfaceManager
Optical surface manager.
Definition: DetectorImp.h:74
dd4hep::DetectorImp::userExtension
virtual void * userExtension(unsigned long long int key, bool alert=true) const override
Access an existing extension object from the Detector instance.
Definition: DetectorImp.cpp:298
dd4hep::DetectorImp::add
virtual Detector & add(CartesianField x) override
Add a field component to the detector description.
Definition: DetectorImp.h:376
key
unsigned char key
Definition: AlignmentsCalculator.cpp:69
dd4hep::DetectorImp::addUserExtension
virtual void * addUserExtension(unsigned long long int key, ExtensionEntry *entry) override
Add an extension object to the Detector instance.
Definition: DetectorImp.cpp:288
dd4hep::DetectorImp::constantAsString
virtual std::string constantAsString(const std::string &name) const override
Typed access to constants: access string values.
Definition: DetectorImp.cpp:484
dd4hep::DetectorData::m_trackers
DetElement m_trackers
Definition: DetectorData.h:123
dd4hep::DetectorImp::buildType
virtual DetectorBuildType buildType() const override
Access flag to steer the detail of building of the geometry/detector description.
Definition: DetectorImp.h:111
dd4hep::DetectorImp::addVisAttribute
virtual Detector & addVisAttribute(const Handle< NamedObject > &x) override
Add a new visualisation attribute by named reference to the detector description.
Definition: DetectorImp.h:404
dd4hep::DetectorImp::fromXML
virtual void fromXML(const std::string &fname, DetectorBuildType type=BUILD_DEFAULT) override
Read any XML file.
Definition: DetectorImp.cpp:812
dd4hep::DetectorData::m_parallelWorldVol
Volume m_parallelWorldVol
Definition: DetectorData.h:125
dd4hep::DetectorImp::field
virtual CartesianField field(const std::string &name) const override
Retrieve a subdetector element by its name from the detector description.
Definition: DetectorImp.h:273
dd4hep::DetectorData::m_materialVacuum
Material m_materialVacuum
Definition: DetectorData.h:129
dd4hep::DetectorImp::DetectorTypeMap
std::map< std::string, std::vector< DetElement > > DetectorTypeMap
Cached map with detector types:
Definition: DetectorImp.h:62
dd4hep::DetectorImp::readout
virtual Readout readout(const std::string &name) const override
Retrieve a readout object by its name from the detector description.
Definition: DetectorImp.h:262
dd4hep::DetectorImp::setStdConditions
virtual void setStdConditions(double temp, double pressure) override
Set the STD temperature and pressure.
Definition: DetectorImp.cpp:368
dd4hep::DetectorImp::limitSet
virtual LimitSet limitSet(const std::string &name) const override
Retrieve a limitset by its name from the detector description.
Definition: DetectorImp.h:243
DetectorLoad.h
dd4hep::DetectorBuildType
DetectorBuildType
Detector description build types.
Definition: BuildType.h:34
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::DetectorData
Data implementation class of the Detector interface.
Definition: DetectorData.h:38
dd4hep::DetectorImp::vacuum
virtual Material vacuum() const override
Return handle to material describing vacuum.
Definition: DetectorImp.h:169
dd4hep::DetectorImp::Write
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0) override
TObject overload: We need to set the Volume and PlacedVolume extensions to be persistent.
Definition: DetectorImp.h:419
dd4hep::DetectorImp::mapDetectorTypes
void mapDetectorTypes()
Internal helper to map detector types once the geometry is closed.
Definition: DetectorImp.cpp:527
dd4hep::DetectorImp::surfaceManager
virtual OpticalSurfaceManager surfaceManager() const override
Access the optical surface manager.
Definition: DetectorImp.h:205
dd4hep::Detector
The main interface to the dd4hep detector description package.
Definition: Detector.h:90
dd4hep::Readout
Handle to the implementation of the readout structure of a subdetector.
Definition: Readout.h:38
dd4hep::DetectorData::m_manager
TGeoManager * m_manager
Reference to the geometry manager object from ROOT.
Definition: DetectorData.h:100
dd4hep::DetectorImp::Write
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0) const override
TObject overload: We need to set the Volume and PlacedVolume extensions to be persistent.
Definition: DetectorImp.h:423
dd4hep::DetectorImp::detectorTypes
virtual std::vector< std::string > detectorTypes() const override
Access the availible detector types.
Definition: DetectorImp.cpp:548
dd4hep::DetectorImp::getRefChild
virtual Handle< NamedObject > getRefChild(const HandleMap &e, const std::string &name, bool throw_if_not=true) const
Definition: DetectorImp.cpp:619
dd4hep::detail::tools::copy
void copy(Alignment from, Alignment to)
Copy alignment object from source object.
Definition: AlignmentTools.cpp:43
dd4hep::DetectorData::m_invisibleVis
VisAttr m_invisibleVis
Definition: DetectorData.h:130
dd4hep::BUILD_DEFAULT
@ BUILD_DEFAULT
Definition: BuildType.h:36
__R
#define __R
Definition: DetectorImp.h:342
dd4hep::DetectorImp::add
virtual Detector & add(Region x) override
Add a new detector region to the detector description.
Definition: DetectorImp.h:352
dd4hep::DetectorImp::ClassDefOverride
ClassDefOverride(DetectorImp, 100)
dd4hep::DetectorImp::imp_loadVolumeManager
void imp_loadVolumeManager()
Local method (no interface): Load volume manager.
Definition: DetectorImp.cpp:282
dd4hep::DetectorImp::field
virtual OverlayedField field() const override
Return handle to the combined electromagentic field description.
Definition: DetectorImp.h:210
dd4hep::DetectorImp::constantAsDouble
virtual double constantAsDouble(const std::string &name) const override
Typed access to constants: double values.
Definition: DetectorImp.cpp:503
dd4hep::DetectorImp
Concrete implementation class of the Detector interface.
Definition: DetectorImp.h:59
dd4hep::DetectorData::m_limits
ObjectHandleMap m_limits
Map of limit sets.
Definition: DetectorData.h:104
dd4hep::DetectorImp::add
virtual Detector & add(DetElement x) override
Add a new subdetector to the detector description.
Definition: DetectorImp.h:372
dd4hep::DetectorImp::header
virtual Header header() const override
Accessor to the header entry.
Definition: DetectorImp.h:222
dd4hep::OpticalSurfaceManager
Class to support the handling of optical surfaces.
Definition: OpticalSurfaceManager.h:37
dd4hep::CartesianField
Base class describing any field with 3D cartesian vectors for the field strength.
Definition: Fields.h:40