DD4hep  1.31.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 
114  virtual void fromCompact(const std::string& fname, DetectorBuildType type = BUILD_DEFAULT) override {
115  fromXML(fname, type);
116  }
117 
119  virtual void fromXML(const std::string& fname, DetectorBuildType type = BUILD_DEFAULT) override;
120 
122  virtual void fromXML(const std::string& fname,
123  xml::UriReader* entity_resolver,
124  DetectorBuildType type = BUILD_DEFAULT) override;
125 
126  virtual void dump() const override;
127 
129  virtual long apply(const char* factory, int argc, char** argv) const override;
130 
132  virtual void init() override;
133 
135  virtual void endDocument(bool close_geometry) override;
136 
138  virtual void* addUserExtension(unsigned long long int key, ExtensionEntry* entry) override;
139 
141  virtual void* removeUserExtension(unsigned long long int key, bool destroy=true) override;
142 
144  virtual void* userExtension(unsigned long long int key, bool alert=true) const override;
145 
146  virtual Handle<NamedObject> getRefChild(const HandleMap& e, const std::string& name, bool throw_if_not = true) const;
147 
149  virtual void declareParent(const std::string& detector_name, const DetElement& parent) override;
150 
152  virtual Volume pickMotherVolume(const DetElement& sd) const override;
153 
155  virtual TGeoManager& manager() const override {
156  return *m_manager;
157  }
159  Properties& properties() const override {
160  return *(Properties*)&m_properties;
161  }
163  virtual Material air() const override {
164  return m_materialAir;
165  }
167  virtual Material vacuum() const override {
168  return m_materialVacuum;
169  }
171  virtual VisAttr invisible() const override {
172  return m_invisibleVis;
173  }
175  virtual DetElement world() const override {
176  return m_world;
177  }
179  virtual DetElement trackers() const override {
180  return m_trackers;
181  }
183  virtual Volume worldVolume() const override {
184  return m_worldVol;
185  }
187  virtual Volume parallelWorldVolume() const override {
188  return m_parallelWorldVol;
189  }
191  virtual Volume trackingVolume() const override {
192  return m_trackingVol;
193  }
195  virtual void setTrackingVolume(Volume vol) override {
196  m_trackingVol = vol;
197  }
199  virtual VolumeManager volumeManager() const override {
200  return m_volManager;
201  }
203  virtual OpticalSurfaceManager surfaceManager() const override {
205  }
206 
208  virtual OverlayedField field() const override {
209  return m_field;
210  }
211 
213  virtual const STD_Conditions& stdConditions() const override;
215  virtual void setStdConditions(double temp, double pressure) override;
217  virtual void setStdConditions(const std::string& type) override;
218 
220  virtual Header header() const override {
221  return m_header;
222  }
224  virtual void setHeader(Header h) override {
225  m_header = h;
226  }
227 
229  virtual std::string constantAsString(const std::string& name) const override;
230 
232  virtual long constantAsLong(const std::string& name) const override;
233 
235  virtual double constantAsDouble(const std::string& name) const override;
236 
238  virtual Constant constant(const std::string& name) const override;
239 
241  virtual LimitSet limitSet(const std::string& name) const override {
242  return getRefChild(m_limits, name);
243  }
245  virtual VisAttr visAttributes(const std::string& name) const override {
246  return getRefChild(m_display, name, false);
247  }
249  virtual Material material(const std::string& name) const override;
250 
252  virtual Region region(const std::string& name) const override {
253  return getRefChild(m_regions, name);
254  }
256  virtual IDDescriptor idSpecification(const std::string& name) const override {
257  return getRefChild(m_idDict, name);
258  }
260  virtual Readout readout(const std::string& name) const override {
261  return getRefChild(m_readouts, name);
262  }
264  virtual DetElement detector(const std::string& name) const override;
265  //{ return getRefChild(m_detectors, name); }
267  virtual SensitiveDetector sensitiveDetector(const std::string& name) const override {
268  return getRefChild(m_sensitive, name, false);
269  }
271  virtual CartesianField field(const std::string& name) const override {
272  return getRefChild(m_fields, name, false);
273  }
274 
276  virtual const HandleMap& constants() const override {
277  return m_define;
278  }
280  virtual const HandleMap& visAttributes() const override {
281  return m_display;
282  }
284  virtual const HandleMap& limitsets() const override {
285  return m_limits;
286  }
288  virtual const HandleMap& regions() const override {
289  return m_regions;
290  }
292  virtual const HandleMap& readouts() const override {
293  return m_readouts;
294  }
296  virtual const HandleMap& detectors() const override {
297  return m_detectors;
298  }
300  virtual const HandleMap& sensitiveDetectors() const override {
301  return m_sensitive;
302  }
304  virtual const HandleMap& fields() const override {
305  return m_fields;
306  }
308  virtual const HandleMap& idSpecifications() const override {
309  return m_idDict;
310  }
311 
313 
321  virtual const std::vector<DetElement>& detectors(const std::string& type, bool throw_exc) const override;
322 
324  virtual std::vector<DetElement> detectors(const std::string& type1,
325  const std::string& type2,
326  const std::string& type3="",
327  const std::string& type4="",
328  const std::string& type5="" ) override;
329 
331  virtual std::vector<std::string> detectorTypes() const override;
332 
336  virtual std::vector<DetElement> detectors(unsigned int includeFlag,
337  unsigned int excludeFlag=0 ) const override;
338 
339 
340 #define __R return *this
341  virtual Detector& add(Constant x) override {
343  return addConstant(x);
344  }
346  virtual Detector& add(LimitSet x) override {
347  return addLimitSet(x);
348  }
350  virtual Detector& add(Region x) override {
351  return addRegion(x);
352  }
354  virtual Detector& add(VisAttr x) override {
355  return addVisAttribute(x);
356  }
358  virtual Detector& add(IDDescriptor x) override {
359  return addIDSpecification(x);
360  }
362  virtual Detector& add(Readout x) override {
363  return addReadout(x);
364  }
366  virtual Detector& add(SensitiveDetector x) override {
367  return addSensitiveDetector(x);
368  }
370  virtual Detector& add(DetElement x) override {
371  return addDetector(x);
372  }
374  virtual Detector& add(CartesianField x) override {
375  return addField(x);
376  }
377 
379  virtual Detector& addConstant(const Handle<NamedObject>& x) override;
380 
382  virtual Detector& addLimitSet(const Handle<NamedObject>& x) override {
383  m_limits.append(x);
384  __R;
385  }
387  virtual Detector& addRegion(const Handle<NamedObject>& x) override {
388  m_regions.append(x);
389  __R;
390  }
392  virtual Detector& addIDSpecification(const Handle<NamedObject>& x) override {
393  m_idDict.append(x);
394  __R;
395  }
397  virtual Detector& addReadout(const Handle<NamedObject>& x) override {
398  m_readouts.append(x);
399  __R;
400  }
402  virtual Detector& addVisAttribute(const Handle<NamedObject>& x) override {
403  m_display.append(x);
404  __R;
405  }
407  virtual Detector& addSensitiveDetector(const Handle<NamedObject>& x) override {
408  m_sensitive.append(x);
409  __R;
410  }
412  virtual Detector& addDetector(const Handle<NamedObject>& x) override;
414  virtual Detector& addField(const Handle<NamedObject>& x) override;
415 #undef __R
416  virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0) override {
418  return saveObject(name, option, bufsize);
419  }
421  virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0) const override {
422  return saveObject(name, option, bufsize);
423  }
424 
426 
427  };
428 } /* End namespace dd4hep */
429 
430 #if defined(__CINT__) || defined(__MAKECINT__) || defined(__CLING__) || defined(__ROOTCLING__)
431 #pragma link C++ class dd4hep::DetectorImp+;
432 #endif
433 #endif // DD4HEP_DETECTORIMP_H
dd4hep::DetectorImp::setTrackingVolume
virtual void setTrackingVolume(Volume vol) override
Set the tracking volume of the detector.
Definition: DetectorImp.h:195
dd4hep::DetectorImp::detectors
virtual const HandleMap & detectors() const override
Accessor to the map of sub-detectors.
Definition: DetectorImp.h:296
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:342
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:757
dd4hep::DetectorImp::worldVolume
virtual Volume worldVolume() const override
Return handle to the world volume containing everything.
Definition: DetectorImp.h:183
dd4hep::DetectorData::m_display
ObjectHandleMap m_display
The map of display attributes in use.
Definition: DetectorData.h:114
dd4hep::DetectorImp::buildType
virtual DetectorBuildType buildType() const override
Access flag to steer the detail of building of the geometry/detector description.
Definition: DetectorImp.cpp:303
dd4hep::DetectorImp::air
virtual Material air() const override
Return handle to material describing air.
Definition: DetectorImp.h:163
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:179
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:397
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:284
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:472
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:518
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:288
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:416
dd4hep::DetectorImp::sensitiveDetectors
virtual const HandleMap & sensitiveDetectors() const override
Retrieve a sensitive detector by its name from the detector description.
Definition: DetectorImp.h:300
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:114
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:407
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:346
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:358
dd4hep::DetectorImp::world
virtual DetElement world() const override
Return reference to the top-most (world) detector element.
Definition: DetectorImp.h:175
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:382
dd4hep::DetectorData::m_worldVol
Volume m_worldVol
Definition: DetectorData.h:124
dd4hep::DetectorImp::properties
Properties & properties() const override
Access to properties.
Definition: DetectorImp.h:159
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:392
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:502
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:310
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:407
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:245
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:267
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:292
dd4hep::DetectorImp::setHeader
virtual void setHeader(Header h) override
Accessor to the header entry.
Definition: DetectorImp.h:224
dd4hep::DetectorImp::manager
virtual TGeoManager & manager() const override
Access the geometry manager of this instance.
Definition: DetectorImp.h:155
dd4hep::DetectorImp::volumeManager
virtual VolumeManager volumeManager() const override
Return handle to the VolumeManager.
Definition: DetectorImp.h:199
dd4hep::DetectorImp::parallelWorldVolume
virtual Volume parallelWorldVolume() const override
Return handle to the world volume containing the volume with the tracking devices.
Definition: DetectorImp.h:187
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:362
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:370
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:304
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:171
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:832
dd4hep::DetectorImp::add
virtual Detector & add(SensitiveDetector x) override
Add a new sensitive detector to the detector description.
Definition: DetectorImp.h:366
dd4hep::DetectorImp::visAttributes
virtual const HandleMap & visAttributes() const override
Accessor to the map of visualisation attributes.
Definition: DetectorImp.h:280
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:483
dd4hep::DetectorImp::apply
virtual long apply(const char *factory, int argc, char **argv) const override
Manipulate geometry using facroy converter.
Definition: DetectorImp.cpp:840
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:308
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:276
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:256
dd4hep::DetectorImp::endDocument
virtual void endDocument(bool close_geometry) override
Close the geometry.
Definition: DetectorImp.cpp:719
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:525
dd4hep::DetectorImp::add
virtual Detector & add(VisAttr x) override
Add a new visualisation attribute to the detector description.
Definition: DetectorImp.h:354
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:191
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:387
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:365
dd4hep::DetectorImp::pickMotherVolume
virtual Volume pickMotherVolume(const DetElement &sd) const override
Access mother volume by detector element.
Definition: DetectorImp.cpp:336
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:252
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:374
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:491
dd4hep::DetectorData::m_trackers
DetElement m_trackers
Definition: DetectorData.h:123
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:402
dd4hep::DetectorImp::fromXML
virtual void fromXML(const std::string &fname, DetectorBuildType type=BUILD_DEFAULT) override
Read any XML file.
Definition: DetectorImp.cpp:819
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:271
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:260
dd4hep::DetectorImp::setStdConditions
virtual void setStdConditions(double temp, double pressure) override
Set the STD temperature and pressure.
Definition: DetectorImp.cpp:375
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:241
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:167
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:417
dd4hep::DetectorImp::mapDetectorTypes
void mapDetectorTypes()
Internal helper to map detector types once the geometry is closed.
Definition: DetectorImp.cpp:534
dd4hep::DetectorImp::surfaceManager
virtual OpticalSurfaceManager surfaceManager() const override
Access the optical surface manager.
Definition: DetectorImp.h:203
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:421
dd4hep::DetectorImp::detectorTypes
virtual std::vector< std::string > detectorTypes() const override
Access the availible detector types.
Definition: DetectorImp.cpp:555
dd4hep::DetectorImp::getRefChild
virtual Handle< NamedObject > getRefChild(const HandleMap &e, const std::string &name, bool throw_if_not=true) const
Definition: DetectorImp.cpp:626
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:340
dd4hep::DetectorImp::add
virtual Detector & add(Region x) override
Add a new detector region to the detector description.
Definition: DetectorImp.h:350
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:208
dd4hep::DetectorImp::constantAsDouble
virtual double constantAsDouble(const std::string &name) const override
Typed access to constants: double values.
Definition: DetectorImp.cpp:510
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:370
dd4hep::DetectorImp::header
virtual Header header() const override
Accessor to the header entry.
Definition: DetectorImp.h:220
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