DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | List of all members
dd4hep::DetectorImp Class Reference

Concrete implementation class of the Detector interface. More...

#include <DetectorImp.h>

Inheritance diagram for dd4hep::DetectorImp:
TNamed dd4hep::Detector dd4hep::DetectorData dd4hep::DetectorLoad

Public Member Functions

void imp_loadVolumeManager ()
 Local method (no interface): Load volume manager. More...
 
 DetectorImp ()
 Default constructor used by ROOT I/O. More...
 
 DetectorImp (const std::string &name)
 Initializing constructor. More...
 
virtual ~DetectorImp ()
 Standard destructor. More...
 
virtual State state () const override
 Access the state of the geometry. More...
 
virtual DetectorBuildType buildType () const override
 Access flag to steer the detail of building of the geometry/detector description. More...
 
virtual void fromCompact (const std::string &fname, DetectorBuildType type=BUILD_DEFAULT) override
 Read compact geometry description or alignment file. More...
 
virtual void fromXML (const std::string &fname, DetectorBuildType type=BUILD_DEFAULT) override
 Read any XML file. More...
 
virtual void fromXML (const std::string &fname, xml::UriReader *entity_resolver, DetectorBuildType type=BUILD_DEFAULT) override
 Read any geometry description or alignment file with external XML entity resolution. More...
 
virtual void dump () const override
 Stupid legacy method. More...
 
virtual long apply (const char *factory, int argc, char **argv) const override
 Manipulate geometry using facroy converter. More...
 
virtual void init () override
 Open the geometry at startup. More...
 
virtual void endDocument (bool close_geometry) override
 Close the geometry. More...
 
virtual void * addUserExtension (unsigned long long int key, ExtensionEntry *entry) override
 Add an extension object to the Detector instance. More...
 
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 returned. More...
 
virtual void * userExtension (unsigned long long int key, bool alert=true) const override
 Access an existing extension object from the Detector instance. More...
 
virtual Handle< NamedObjectgetRefChild (const HandleMap &e, const std::string &name, bool throw_if_not=true) const
 
virtual void declareParent (const std::string &detector_name, const DetElement &parent) override
 Register new mother volume using the detector name. More...
 
virtual Volume pickMotherVolume (const DetElement &sd) const override
 Access mother volume by detector element. More...
 
virtual TGeoManager & manager () const override
 Access the geometry manager of this instance. More...
 
Propertiesproperties () const override
 Access to properties. More...
 
virtual Material air () const override
 Return handle to material describing air. More...
 
virtual Material vacuum () const override
 Return handle to material describing vacuum. More...
 
virtual VisAttr invisible () const override
 Return handle to "invisible" visualization attributes. More...
 
virtual DetElement world () const override
 Return reference to the top-most (world) detector element. More...
 
virtual DetElement trackers () const override
 Return reference to detector element with all tracker devices. More...
 
virtual Volume worldVolume () const override
 Return handle to the world volume containing everything. More...
 
virtual Volume parallelWorldVolume () const override
 Return handle to the world volume containing the volume with the tracking devices. More...
 
virtual Volume trackingVolume () const override
 Return handle to the world volume containing the volume with the tracking devices. More...
 
virtual void setTrackingVolume (Volume vol) override
 Set the tracking volume of the detector. More...
 
virtual VolumeManager volumeManager () const override
 Return handle to the VolumeManager. More...
 
virtual OpticalSurfaceManager surfaceManager () const override
 Access the optical surface manager. More...
 
virtual OverlayedField field () const override
 Return handle to the combined electromagentic field description. More...
 
virtual const STD_ConditionsstdConditions () const override
 Access default conditions (temperature and pressure. More...
 
virtual void setStdConditions (double temp, double pressure) override
 Set the STD temperature and pressure. More...
 
virtual void setStdConditions (const std::string &type) override
 Set the STD conditions according to defined types (STP or NTP) More...
 
virtual Header header () const override
 Accessor to the header entry. More...
 
virtual void setHeader (Header h) override
 Accessor to the header entry. More...
 
virtual std::string constantAsString (const std::string &name) const override
 Typed access to constants: access string values. More...
 
virtual long constantAsLong (const std::string &name) const override
 Typed access to constants: long values. More...
 
virtual double constantAsDouble (const std::string &name) const override
 Typed access to constants: double values. More...
 
virtual Constant constant (const std::string &name) const override
 Retrieve a constant by its name from the detector description. More...
 
virtual LimitSet limitSet (const std::string &name) const override
 Retrieve a limitset by its name from the detector description. More...
 
virtual VisAttr visAttributes (const std::string &name) const override
 Retrieve a visualization attribute by its name from the detector description. More...
 
virtual Material material (const std::string &name) const override
 Retrieve a matrial by its name from the detector description. More...
 
virtual Region region (const std::string &name) const override
 Retrieve a region object by its name from the detector description. More...
 
virtual IDDescriptor idSpecification (const std::string &name) const override
 Retrieve a id descriptor by its name from the detector description. More...
 
virtual Readout readout (const std::string &name) const override
 Retrieve a readout object by its name from the detector description. More...
 
virtual DetElement detector (const std::string &name) const override
 Retrieve a subdetector element by its name from the detector description. More...
 
virtual SensitiveDetector sensitiveDetector (const std::string &name) const override
 Retrieve a sensitive detector by its name from the detector description. More...
 
virtual CartesianField field (const std::string &name) const override
 Retrieve a subdetector element by its name from the detector description. More...
 
virtual const HandleMapconstants () const override
 Accessor to the map of constants. More...
 
virtual const HandleMapvisAttributes () const override
 Accessor to the map of visualisation attributes. More...
 
virtual const HandleMaplimitsets () const override
 Accessor to the map of limit settings. More...
 
virtual const HandleMapregions () const override
 Accessor to the map of region settings. More...
 
virtual const HandleMapreadouts () const override
 Accessor to the map of readout structures. More...
 
virtual const HandleMapdetectors () const override
 Accessor to the map of sub-detectors. More...
 
virtual const HandleMapsensitiveDetectors () const override
 Retrieve a sensitive detector by its name from the detector description. More...
 
virtual const HandleMapfields () const override
 Accessor to the map of field entries, which together form the global field. More...
 
virtual const HandleMapidSpecifications () const override
 Accessor to the map of ID specifications. More...
 
virtual const std::vector< DetElement > & detectors (const std::string &type, bool throw_exc) const override
 Access a set of subdetectors according to the sensitive type. More...
 
virtual std::vector< DetElementdetectors (const std::string &type1, const std::string &type2, const std::string &type3="", const std::string &type4="", const std::string &type5="") override
 Access a set of subdetectors according to several sensitive types. More...
 
virtual std::vector< std::string > detectorTypes () const override
 Access the availible detector types. More...
 
virtual std::vector< DetElementdetectors (unsigned int includeFlag, unsigned int excludeFlag=0) const override
 
virtual Detectoradd (Constant x) override
 Add a new constant to the detector description. More...
 
virtual Detectoradd (LimitSet x) override
 Add a new limit set to the detector description. More...
 
virtual Detectoradd (Region x) override
 Add a new detector region to the detector description. More...
 
virtual Detectoradd (VisAttr x) override
 Add a new visualisation attribute to the detector description. More...
 
virtual Detectoradd (IDDescriptor x) override
 Add a new id descriptor to the detector description. More...
 
virtual Detectoradd (Readout x) override
 Add a new detector readout to the detector description. More...
 
virtual Detectoradd (SensitiveDetector x) override
 Add a new sensitive detector to the detector description. More...
 
virtual Detectoradd (DetElement x) override
 Add a new subdetector to the detector description. More...
 
virtual Detectoradd (CartesianField x) override
 Add a field component to the detector description. More...
 
virtual DetectoraddConstant (const Handle< NamedObject > &x) override
 Add a new constant by named reference to the detector description. More...
 
virtual DetectoraddLimitSet (const Handle< NamedObject > &x) override
 Add a new limit set by named reference to the detector description. More...
 
virtual DetectoraddRegion (const Handle< NamedObject > &x) override
 Add a new detector region by named reference to the detector description. More...
 
virtual DetectoraddIDSpecification (const Handle< NamedObject > &x) override
 Add a new id descriptor by named reference to the detector description. More...
 
virtual DetectoraddReadout (const Handle< NamedObject > &x) override
 Add a new detector readout by named reference to the detector description. More...
 
virtual DetectoraddVisAttribute (const Handle< NamedObject > &x) override
 Add a new visualisation attribute by named reference to the detector description. More...
 
virtual DetectoraddSensitiveDetector (const Handle< NamedObject > &x) override
 Add a new sensitive detector by named reference to the detector description. More...
 
virtual DetectoraddDetector (const Handle< NamedObject > &x) override
 Add a new subdetector by named reference to the detector description. More...
 
virtual DetectoraddField (const Handle< NamedObject > &x) override
 Add a field component by named reference to the detector description. More...
 
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. More...
 
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. More...
 
 ClassDefOverride (DetectorImp, 100)
 
- Public Member Functions inherited from dd4hep::Detector
virtual ~Detector ()=default
 Destructor. More...
 
template<class T >
constant (const std::string &name) const
 Typed access to constants: access any type values. More...
 
template<typename IFACE , typename CONCRETE >
IFACE * addExtension (CONCRETE *c)
 Extend the sensitive detector element with an arbitrary structure accessible by the type. More...
 
template<class IFACE >
IFACE * removeExtension (bool destroy=true)
 Remove an existing extension object from the Detector instance. If not destroyed, the instance is returned. More...
 
template<class IFACE >
IFACE * extension (bool alert=true) const
 Access extension element by the type. More...
 
template<>
short constant (const std::string &name) const
 Typed access to constants: short values. More...
 
template<>
unsigned short constant (const std::string &name) const
 Typed access to constants: unsigned short values. More...
 
template<>
int constant (const std::string &name) const
 Typed access to constants: integer values. More...
 
template<>
unsigned int constant (const std::string &name) const
 Typed access to constants: unsigned integer values. More...
 
template<>
long constant (const std::string &name) const
 Typed access to constants: long values. More...
 
template<>
unsigned long constant (const std::string &name) const
 Typed access to constants: unsigned long values. More...
 
template<>
float constant (const std::string &name) const
 Typed access to constants: float values. More...
 
template<>
double constant (const std::string &name) const
 Typed access to constants: double values. More...
 
- Public Member Functions inherited from dd4hep::DetectorData
 DetectorData ()
 Default constructor. More...
 
virtual ~DetectorData ()
 Default destructor. More...
 
 DetectorData (DetectorData &&copy)=delete
 Move constructor. More...
 
 DetectorData (const DetectorData &copy)=delete
 Copy constructor. More...
 
void destroyData (bool destroy_mgr=true)
 Clear data content: releases all allocated resources. More...
 
void clearData ()
 Clear data content: DOES NOT RELEASEW ALLOCATED RESOURCES! More...
 
void adoptData (DetectorData &source, bool CLR=true)
 Adopt all data from source structure. More...
 
TGeoManager & manager () const
 Access the geometry manager of this instance. More...
 
dd4hep::Material air () const
 Return handle to material describing air. More...
 
dd4hep::Material vacuum () const
 Return handle to material describing vacuum. More...
 
dd4hep::VisAttr invisible () const
 Return handle to "invisible" visualization attributes. More...
 
dd4hep::DetElement world () const
 Return reference to the top-most (world) detector element. More...
 
dd4hep::DetElement trackers () const
 Return reference to detector element with all tracker devices. More...
 
dd4hep::Volume worldVolume () const
 Return handle to the world volume containing everything. More...
 
dd4hep::Volume parallelWorldVolume () const
 Return handle to the world volume containing the volume with the tracking devices. More...
 
dd4hep::Volume trackingVolume () const
 Return handle to the world volume containing the volume with the tracking devices. More...
 
dd4hep::VolumeManager volumeManager () const
 Return handle to the VolumeManager. More...
 
dd4hep::OverlayedField field () const
 Return handle to the combined electromagentic field description. More...
 
dd4hep::Header header () const
 Accessor to the header entry. More...
 
const Detector::HandleMapconstants () const
 Accessor to the map of constants. More...
 
const Detector::HandleMapvisAttributes () const
 Accessor to the map of visualisation attributes. More...
 
const Detector::HandleMaplimitsets () const
 Accessor to the map of limit settings. More...
 
const Detector::HandleMapregions () const
 Accessor to the map of region settings. More...
 
const Detector::HandleMapreadouts () const
 Accessor to the map of readout structures. More...
 
const Detector::HandleMapdetectors () const
 Accessor to the map of sub-detectors. More...
 
const Detector::HandleMapsensitiveDetectors () const
 Retrieve a sensitive detector by its name from the detector description. More...
 
const Detector::HandleMapfields () const
 Accessor to the map of field entries, which together form the global field. More...
 
const Detector::HandleMapidSpecifications () const
 Accessor to the map of ID specifications. More...
 
- Public Member Functions inherited from dd4hep::DetectorLoad
 DetectorLoad ()=delete
 No defautl constructor. More...
 
 DetectorLoad (DetectorLoad &&copy)=delete
 No move constructor. More...
 
 DetectorLoad (const DetectorLoad &copy)=default
 Default copy constructor. More...
 
 DetectorLoad (Detector &description)
 Default constructor (public, if used as a handle) More...
 
virtual ~DetectorLoad ()
 Default destructor. More...
 
DetectorLoadoperator= (const DetectorLoad &copy)=default
 Copy assignment constructor. More...
 
DetectorLoadoperator= (DetectorLoad &&copy)=delete
 No move assignment. More...
 
virtual void processXML (const std::string &fname, xml::UriReader *entity_resolver=0)
 Process XML unit and adopt all data from source structure. More...
 
virtual void processXML (const xml::Handle_t &base, const std::string &fname, xml::UriReader *entity_resolver=0)
 Process XML unit and adopt all data from source structure. More...
 
virtual void processXMLString (const char *xmldata)
 Process XML unit and adopt all data from source string in momory. More...
 
virtual void processXMLString (const char *xmldata, xml::UriReader *entity_resolver)
 Process XML unit and adopt all data from source string in momory. More...
 
virtual void processXMLElement (const std::string &msg_source, const xml::Handle_t &root)
 Process a given DOM (sub-) tree. More...
 
virtual void processXMLElement (const xml::Handle_t &root, DetectorBuildType type)
 Process a given DOM (sub-) tree. More...
 

Protected Types

typedef std::map< std::string, std::vector< DetElement > > DetectorTypeMap
 Cached map with detector types: More...
 

Protected Attributes

STD_Conditions m_std_conditions
 Standard conditions. More...
 
DetectorTypeMap m_detectorTypes
 Inventory of detector types. More...
 
DetectorBuildType m_buildType
 VolumeManager m_volManager;. More...
 
detail::OpticalSurfaceManagerObjectm_surfaceManager {nullptr}
 Optical surface manager. More...
 
- Protected Attributes inherited from dd4hep::DetectorLoad
Detectorm_detDesc = 0
 Reference to the Detector instance. More...
 

Private Member Functions

 DetectorImp (DetectorImp &&copy)=delete
 not persistent More...
 
 DetectorImp (const DetectorImp &copy)=delete
 Disable copy constructor. More...
 
DetectorImpoperator= (const DetectorImp &copy)=delete
 Disable assignment operator. More...
 
void mapDetectorTypes ()
 Internal helper to map detector types once the geometry is closed. More...
 
Int_t saveObject (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 ROOT I/O call. More...
 

Additional Inherited Members

- Public Types inherited from dd4hep::Detector
enum  State { NOT_READY = 1<<0, LOADING = 1<<1, READY = 1<<2 }
 The detector description states. More...
 
typedef std::map< std::string, Handle< NamedObject > > HandleMap
 Type definition of a map of named handles. More...
 
typedef std::map< std::string, std::string > PropertyValues
 
typedef std::map< std::string, PropertyValuesProperties
 
- Static Public Member Functions inherited from dd4hep::Detector
static DetectorgetInstance (const std::string &name="default")
 —Factory method----— More...
 
static void destroyInstance (const std::string &name="default")
 Destroy the singleton instance. More...
 
static std::unique_ptr< Detectormake_unique (const std::string &name)
 Unique creation without internal registration. More...
 
- Static Public Member Functions inherited from dd4hep::DetectorData
static void patchRootStreamer (TClass *cl)
 Assignment operator. More...
 
static void unpatchRootStreamer (TClass *cl)
 UNPatch the ROOT streamers to adapt for DD4hep (set fUserExtension transient) More...
 
- Public Attributes inherited from dd4hep::DetectorData
TGeoManager * m_manager
 Reference to the geometry manager object from ROOT. More...
 
ObjectHandleMap m_idDict
 Map of readout IDDescriptors indexed by hit collection name. More...
 
ObjectHandleMap m_limits
 Map of limit sets. More...
 
ObjectHandleMap m_regions
 Map of regions settings for the simulation. More...
 
ObjectHandleMap m_readouts
 Map of readout descriptors indexed by subdetector name. More...
 
ObjectHandleMap m_sensitive
 The map of top level sub-detector sensitive detector objects indexed by the detector name. More...
 
ObjectHandleMap m_detectors
 The map of top level sub-detector objects indexed by name. More...
 
ObjectHandleMap m_display
 The map of display attributes in use. More...
 
ObjectHandleMap m_fields
 The map of electro magnet field components for the global overlay field. More...
 
ObjectHandleMap m_define
 
std::map< std::string, DetElementm_detectorParents
 
DetElement m_world
 
DetElement m_trackers
 
Volume m_worldVol
 
Volume m_parallelWorldVol
 
Volume m_trackingVol
 
Material m_materialAir
 
Material m_materialVacuum
 
VisAttr m_invisibleVis
 
OverlayedField m_field
 
Header m_header
 
Detector::Properties m_properties
 
DetectorBuildType m_buildType
 
ObjectExtensions m_extensions
 Definition of the extension type. More...
 
VolumeManager m_volManager
 Volume manager reference. More...
 
Detector::State m_state = Detector::NOT_READY
 Detector description state. More...
 
bool m_inhibitConstants
 Flag to inhibit the access to global constants. Value set by constants section 'Detector_InhibitConstants'. More...
 
- Protected Member Functions inherited from dd4hep::DetectorLoad
 DetectorLoad (Detector *description)
 Default constructor (protected, for sub-classes) More...
 

Detailed Description

Concrete implementation class of the Detector interface.

The main entry point to the DD4hep detector description

Please note: The inheritance of the TNamed is necessary to properly access the object when loaded from ROOT.

Author
M.Frank
Version
1.0

Definition at line 59 of file DetectorImp.h.

Member Typedef Documentation

◆ DetectorTypeMap

typedef std::map<std::string, std::vector<DetElement> > dd4hep::DetectorImp::DetectorTypeMap
protected

Cached map with detector types:

Definition at line 62 of file DetectorImp.h.

Constructor & Destructor Documentation

◆ DetectorImp() [1/4]

dd4hep::DetectorImp::DetectorImp ( DetectorImp &&  copy)
privatedelete

not persistent

Disable move constructor

◆ DetectorImp() [2/4]

dd4hep::DetectorImp::DetectorImp ( const DetectorImp copy)
privatedelete

Disable copy constructor.

◆ DetectorImp() [3/4]

DetectorImp::DetectorImp ( )

Default constructor used by ROOT I/O.

Definition at line 170 of file DetectorImp.cpp.

◆ DetectorImp() [4/4]

DetectorImp::DetectorImp ( const std::string &  name)

Initializing constructor.

Definition at line 180 of file DetectorImp.cpp.

◆ ~DetectorImp()

DetectorImp::~DetectorImp ( )
virtual

Standard destructor.

Definition at line 236 of file DetectorImp.cpp.

Member Function Documentation

◆ add() [1/9]

virtual Detector& dd4hep::DetectorImp::add ( CartesianField  x)
inlineoverridevirtual

Add a field component to the detector description.

Implements dd4hep::Detector.

Definition at line 376 of file DetectorImp.h.

◆ add() [2/9]

virtual Detector& dd4hep::DetectorImp::add ( Constant  x)
inlineoverridevirtual

Add a new constant to the detector description.

Implements dd4hep::Detector.

Definition at line 344 of file DetectorImp.h.

◆ add() [3/9]

virtual Detector& dd4hep::DetectorImp::add ( DetElement  x)
inlineoverridevirtual

Add a new subdetector to the detector description.

Implements dd4hep::Detector.

Definition at line 372 of file DetectorImp.h.

◆ add() [4/9]

virtual Detector& dd4hep::DetectorImp::add ( IDDescriptor  x)
inlineoverridevirtual

Add a new id descriptor to the detector description.

Implements dd4hep::Detector.

Definition at line 360 of file DetectorImp.h.

◆ add() [5/9]

virtual Detector& dd4hep::DetectorImp::add ( LimitSet  x)
inlineoverridevirtual

Add a new limit set to the detector description.

Implements dd4hep::Detector.

Definition at line 348 of file DetectorImp.h.

◆ add() [6/9]

virtual Detector& dd4hep::DetectorImp::add ( Readout  x)
inlineoverridevirtual

Add a new detector readout to the detector description.

Implements dd4hep::Detector.

Definition at line 364 of file DetectorImp.h.

◆ add() [7/9]

virtual Detector& dd4hep::DetectorImp::add ( Region  x)
inlineoverridevirtual

Add a new detector region to the detector description.

Implements dd4hep::Detector.

Definition at line 352 of file DetectorImp.h.

◆ add() [8/9]

virtual Detector& dd4hep::DetectorImp::add ( SensitiveDetector  x)
inlineoverridevirtual

Add a new sensitive detector to the detector description.

Implements dd4hep::Detector.

Definition at line 368 of file DetectorImp.h.

◆ add() [9/9]

virtual Detector& dd4hep::DetectorImp::add ( VisAttr  x)
inlineoverridevirtual

Add a new visualisation attribute to the detector description.

Implements dd4hep::Detector.

Definition at line 356 of file DetectorImp.h.

◆ addConstant()

Detector & DetectorImp::addConstant ( const Handle< NamedObject > &  x)
overridevirtual

Add a new constant by named reference to the detector description.

Implements dd4hep::Detector.

Definition at line 465 of file DetectorImp.cpp.

◆ addDetector()

Detector & DetectorImp::addDetector ( const Handle< NamedObject > &  x)
overridevirtual

Add a new subdetector by named reference to the detector description.

Check if the parent is part of the compounds

Implements dd4hep::Detector.

Definition at line 409 of file DetectorImp.cpp.

◆ addField()

Detector & DetectorImp::addField ( const Handle< NamedObject > &  x)
overridevirtual

Add a field component by named reference to the detector description.

Implements dd4hep::Detector.

Definition at line 511 of file DetectorImp.cpp.

◆ addIDSpecification()

virtual Detector& dd4hep::DetectorImp::addIDSpecification ( const Handle< NamedObject > &  x)
inlineoverridevirtual

Add a new id descriptor by named reference to the detector description.

Implements dd4hep::Detector.

Definition at line 394 of file DetectorImp.h.

◆ addLimitSet()

virtual Detector& dd4hep::DetectorImp::addLimitSet ( const Handle< NamedObject > &  x)
inlineoverridevirtual

Add a new limit set by named reference to the detector description.

Implements dd4hep::Detector.

Definition at line 384 of file DetectorImp.h.

◆ addReadout()

virtual Detector& dd4hep::DetectorImp::addReadout ( const Handle< NamedObject > &  x)
inlineoverridevirtual

Add a new detector readout by named reference to the detector description.

Implements dd4hep::Detector.

Definition at line 399 of file DetectorImp.h.

◆ addRegion()

virtual Detector& dd4hep::DetectorImp::addRegion ( const Handle< NamedObject > &  x)
inlineoverridevirtual

Add a new detector region by named reference to the detector description.

Implements dd4hep::Detector.

Definition at line 389 of file DetectorImp.h.

◆ addSensitiveDetector()

virtual Detector& dd4hep::DetectorImp::addSensitiveDetector ( const Handle< NamedObject > &  x)
inlineoverridevirtual

Add a new sensitive detector by named reference to the detector description.

Implements dd4hep::Detector.

Definition at line 409 of file DetectorImp.h.

◆ addUserExtension()

void * DetectorImp::addUserExtension ( unsigned long long int  key,
ExtensionEntry entry 
)
overridevirtual

Add an extension object to the Detector instance.

Implements dd4hep::Detector.

Definition at line 288 of file DetectorImp.cpp.

◆ addVisAttribute()

virtual Detector& dd4hep::DetectorImp::addVisAttribute ( const Handle< NamedObject > &  x)
inlineoverridevirtual

Add a new visualisation attribute by named reference to the detector description.

Implements dd4hep::Detector.

Definition at line 404 of file DetectorImp.h.

◆ air()

virtual Material dd4hep::DetectorImp::air ( ) const
inlineoverridevirtual

Return handle to material describing air.

Implements dd4hep::Detector.

Definition at line 165 of file DetectorImp.h.

◆ apply()

long DetectorImp::apply ( const char *  factory,
int  argc,
char **  argv 
) const
overridevirtual

Manipulate geometry using facroy converter.

Implements dd4hep::Detector.

Definition at line 833 of file DetectorImp.cpp.

◆ buildType()

virtual DetectorBuildType dd4hep::DetectorImp::buildType ( ) const
inlineoverridevirtual

Access flag to steer the detail of building of the geometry/detector description.

Implements dd4hep::Detector.

Definition at line 111 of file DetectorImp.h.

◆ ClassDefOverride()

dd4hep::DetectorImp::ClassDefOverride ( DetectorImp  ,
100   
)

◆ constant()

Constant DetectorImp::constant ( const std::string &  name) const
overridevirtual

Retrieve a constant by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 476 of file DetectorImp.cpp.

◆ constantAsDouble()

double DetectorImp::constantAsDouble ( const std::string &  name) const
overridevirtual

Typed access to constants: double values.

Implements dd4hep::Detector.

Definition at line 503 of file DetectorImp.cpp.

◆ constantAsLong()

long DetectorImp::constantAsLong ( const std::string &  name) const
overridevirtual

Typed access to constants: long values.

Implements dd4hep::Detector.

Definition at line 495 of file DetectorImp.cpp.

◆ constantAsString()

std::string DetectorImp::constantAsString ( const std::string &  name) const
overridevirtual

Typed access to constants: access string values.

Implements dd4hep::Detector.

Definition at line 484 of file DetectorImp.cpp.

◆ constants()

virtual const HandleMap& dd4hep::DetectorImp::constants ( ) const
inlineoverridevirtual

Accessor to the map of constants.

Implements dd4hep::Detector.

Definition at line 278 of file DetectorImp.h.

◆ declareParent()

void DetectorImp::declareParent ( const std::string &  detector_name,
const DetElement parent 
)
overridevirtual

Register new mother volume using the detector name.

Implements dd4hep::Detector.

Definition at line 303 of file DetectorImp.cpp.

◆ detector()

DetElement DetectorImp::detector ( const std::string &  name) const
overridevirtual

Retrieve a subdetector element by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 400 of file DetectorImp.cpp.

◆ detectors() [1/4]

virtual const HandleMap& dd4hep::DetectorImp::detectors ( ) const
inlineoverridevirtual

Accessor to the map of sub-detectors.

Implements dd4hep::Detector.

Definition at line 298 of file DetectorImp.h.

◆ detectors() [2/4]

const std::vector< DetElement > & DetectorImp::detectors ( const std::string &  type,
bool  throw_exc 
) const
overridevirtual

Access a set of subdetectors according to the sensitive type.

Please note:

  • The sensitive type of a detector is set in the 'detector constructor'.
  • Not sensitive detector structures have the name 'passive'
  • Compounds (ie. nested detectors) are of type 'compound'
  • If throw_exc is set to true, an exception is thrown if the type is not present. Otherwise an empty detector container is returned.

Implements dd4hep::Detector.

Definition at line 560 of file DetectorImp.cpp.

◆ detectors() [3/4]

std::vector< DetElement > DetectorImp::detectors ( const std::string &  type1,
const std::string &  type2,
const std::string &  type3 = "",
const std::string &  type4 = "",
const std::string &  type5 = "" 
)
overridevirtual

Access a set of subdetectors according to several sensitive types.

Implements dd4hep::Detector.

Definition at line 596 of file DetectorImp.cpp.

◆ detectors() [4/4]

std::vector< DetElement > DetectorImp::detectors ( unsigned int  includeFlag,
unsigned int  excludeFlag = 0 
) const
overridevirtual

return a vector with all detectors that have all the type properties in includeFlag set but none of the properties given in excludeFlag

Implements dd4hep::Detector.

Definition at line 573 of file DetectorImp.cpp.

◆ detectorTypes()

std::vector< std::string > DetectorImp::detectorTypes ( ) const
overridevirtual

Access the availible detector types.

Implements dd4hep::Detector.

Definition at line 548 of file DetectorImp.cpp.

◆ dump()

void DetectorImp::dump ( ) const
overridevirtual

Stupid legacy method.

Implements dd4hep::Detector.

Definition at line 825 of file DetectorImp.cpp.

◆ endDocument()

void DetectorImp::endDocument ( bool  close_geometry)
overridevirtual

Close the geometry.

Finalize/close the geometry.

Implements dd4hep::Detector.

Definition at line 712 of file DetectorImp.cpp.

◆ field() [1/2]

virtual OverlayedField dd4hep::DetectorImp::field ( ) const
inlineoverridevirtual

Return handle to the combined electromagentic field description.

Implements dd4hep::Detector.

Definition at line 210 of file DetectorImp.h.

◆ field() [2/2]

virtual CartesianField dd4hep::DetectorImp::field ( const std::string &  name) const
inlineoverridevirtual

Retrieve a subdetector element by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 273 of file DetectorImp.h.

◆ fields()

virtual const HandleMap& dd4hep::DetectorImp::fields ( ) const
inlineoverridevirtual

Accessor to the map of field entries, which together form the global field.

Implements dd4hep::Detector.

Definition at line 306 of file DetectorImp.h.

◆ fromCompact()

virtual void dd4hep::DetectorImp::fromCompact ( const std::string &  fname,
DetectorBuildType  type = BUILD_DEFAULT 
)
inlineoverridevirtual

Read compact geometry description or alignment file.

Implements dd4hep::Detector.

Definition at line 116 of file DetectorImp.h.

◆ fromXML() [1/2]

void DetectorImp::fromXML ( const std::string &  fname,
DetectorBuildType  type = BUILD_DEFAULT 
)
overridevirtual

Read any XML file.

Read any geometry description or alignment file.

Implements dd4hep::Detector.

Definition at line 812 of file DetectorImp.cpp.

◆ fromXML() [2/2]

void DetectorImp::fromXML ( const std::string &  fname,
xml::UriReader entity_resolver,
DetectorBuildType  type = BUILD_DEFAULT 
)
overridevirtual

Read any geometry description or alignment file with external XML entity resolution.

Implements dd4hep::Detector.

Definition at line 819 of file DetectorImp.cpp.

◆ getRefChild()

Handle< NamedObject > DetectorImp::getRefChild ( const HandleMap e,
const std::string &  name,
bool  throw_if_not = true 
) const
virtual

Definition at line 619 of file DetectorImp.cpp.

◆ header()

virtual Header dd4hep::DetectorImp::header ( ) const
inlineoverridevirtual

Accessor to the header entry.

Implements dd4hep::Detector.

Definition at line 222 of file DetectorImp.h.

◆ idSpecification()

virtual IDDescriptor dd4hep::DetectorImp::idSpecification ( const std::string &  name) const
inlineoverridevirtual

Retrieve a id descriptor by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 258 of file DetectorImp.h.

◆ idSpecifications()

virtual const HandleMap& dd4hep::DetectorImp::idSpecifications ( ) const
inlineoverridevirtual

Accessor to the map of ID specifications.

Implements dd4hep::Detector.

Definition at line 310 of file DetectorImp.h.

◆ imp_loadVolumeManager()

void DetectorImp::imp_loadVolumeManager ( )

Local method (no interface): Load volume manager.

Definition at line 282 of file DetectorImp.cpp.

◆ init()

void DetectorImp::init ( )
overridevirtual

Open the geometry at startup.

Initialize the geometry and set the bounding box of the world volume.

Construct the top level world element

Set the world volume to invisible.

Set the top level volume to the TGeomanager

Construct the parallel world

Construct the field envelope

Implements dd4hep::Detector.

Definition at line 750 of file DetectorImp.cpp.

◆ invisible()

virtual VisAttr dd4hep::DetectorImp::invisible ( ) const
inlineoverridevirtual

Return handle to "invisible" visualization attributes.

Implements dd4hep::Detector.

Definition at line 173 of file DetectorImp.h.

◆ limitSet()

virtual LimitSet dd4hep::DetectorImp::limitSet ( const std::string &  name) const
inlineoverridevirtual

Retrieve a limitset by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 243 of file DetectorImp.h.

◆ limitsets()

virtual const HandleMap& dd4hep::DetectorImp::limitsets ( ) const
inlineoverridevirtual

Accessor to the map of limit settings.

Implements dd4hep::Detector.

Definition at line 286 of file DetectorImp.h.

◆ manager()

virtual TGeoManager& dd4hep::DetectorImp::manager ( ) const
inlineoverridevirtual

Access the geometry manager of this instance.

Implements dd4hep::Detector.

Definition at line 157 of file DetectorImp.h.

◆ mapDetectorTypes()

void DetectorImp::mapDetectorTypes ( )
private

Internal helper to map detector types once the geometry is closed.

Definition at line 527 of file DetectorImp.cpp.

◆ material()

Material DetectorImp::material ( const std::string &  name) const
overridevirtual

Retrieve a matrial by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 518 of file DetectorImp.cpp.

◆ operator=()

DetectorImp& dd4hep::DetectorImp::operator= ( const DetectorImp copy)
privatedelete

Disable assignment operator.

◆ parallelWorldVolume()

virtual Volume dd4hep::DetectorImp::parallelWorldVolume ( ) const
inlineoverridevirtual

Return handle to the world volume containing the volume with the tracking devices.

Implements dd4hep::Detector.

Definition at line 189 of file DetectorImp.h.

◆ pickMotherVolume()

Volume DetectorImp::pickMotherVolume ( const DetElement sd) const
overridevirtual

Access mother volume by detector element.

Implements dd4hep::Detector.

Definition at line 329 of file DetectorImp.cpp.

◆ properties()

Properties& dd4hep::DetectorImp::properties ( ) const
inlineoverridevirtual

Access to properties.

Implements dd4hep::Detector.

Definition at line 161 of file DetectorImp.h.

◆ readout()

virtual Readout dd4hep::DetectorImp::readout ( const std::string &  name) const
inlineoverridevirtual

Retrieve a readout object by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 262 of file DetectorImp.h.

◆ readouts()

virtual const HandleMap& dd4hep::DetectorImp::readouts ( ) const
inlineoverridevirtual

Accessor to the map of readout structures.

Implements dd4hep::Detector.

Definition at line 294 of file DetectorImp.h.

◆ region()

virtual Region dd4hep::DetectorImp::region ( const std::string &  name) const
inlineoverridevirtual

Retrieve a region object by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 254 of file DetectorImp.h.

◆ regions()

virtual const HandleMap& dd4hep::DetectorImp::regions ( ) const
inlineoverridevirtual

Accessor to the map of region settings.

Implements dd4hep::Detector.

Definition at line 290 of file DetectorImp.h.

◆ removeUserExtension()

void * DetectorImp::removeUserExtension ( unsigned long long int  key,
bool  destroy = true 
)
overridevirtual

Remove an existing extension object from the Detector instance. If not destroyed, the instance is returned.

Remove an existing extension object from the Detector instance.

Implements dd4hep::Detector.

Definition at line 293 of file DetectorImp.cpp.

◆ saveObject()

Int_t DetectorImp::saveObject ( const char *  name = 0,
Int_t  option = 0,
Int_t  bufsize = 0 
) const
private

ROOT I/O call.

Definition at line 258 of file DetectorImp.cpp.

◆ sensitiveDetector()

virtual SensitiveDetector dd4hep::DetectorImp::sensitiveDetector ( const std::string &  name) const
inlineoverridevirtual

Retrieve a sensitive detector by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 269 of file DetectorImp.h.

◆ sensitiveDetectors()

virtual const HandleMap& dd4hep::DetectorImp::sensitiveDetectors ( ) const
inlineoverridevirtual

Retrieve a sensitive detector by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 302 of file DetectorImp.h.

◆ setHeader()

virtual void dd4hep::DetectorImp::setHeader ( Header  h)
inlineoverridevirtual

Accessor to the header entry.

Implements dd4hep::Detector.

Definition at line 226 of file DetectorImp.h.

◆ setStdConditions() [1/2]

void DetectorImp::setStdConditions ( const std::string &  type)
overridevirtual

Set the STD conditions according to defined types (STP or NTP)

Implements dd4hep::Detector.

Definition at line 381 of file DetectorImp.cpp.

◆ setStdConditions() [2/2]

void DetectorImp::setStdConditions ( double  temp,
double  pressure 
)
overridevirtual

Set the STD temperature and pressure.

Implements dd4hep::Detector.

Definition at line 368 of file DetectorImp.cpp.

◆ setTrackingVolume()

virtual void dd4hep::DetectorImp::setTrackingVolume ( Volume  vol)
inlineoverridevirtual

Set the tracking volume of the detector.

Implements dd4hep::Detector.

Definition at line 197 of file DetectorImp.h.

◆ state()

virtual State dd4hep::DetectorImp::state ( ) const
inlineoverridevirtual

Access the state of the geometry.

Implements dd4hep::Detector.

Definition at line 106 of file DetectorImp.h.

◆ stdConditions()

const STD_Conditions & DetectorImp::stdConditions ( ) const
overridevirtual

Access default conditions (temperature and pressure.

Implements dd4hep::Detector.

Definition at line 358 of file DetectorImp.cpp.

◆ surfaceManager()

virtual OpticalSurfaceManager dd4hep::DetectorImp::surfaceManager ( ) const
inlineoverridevirtual

Access the optical surface manager.

Implements dd4hep::Detector.

Definition at line 205 of file DetectorImp.h.

◆ trackers()

virtual DetElement dd4hep::DetectorImp::trackers ( ) const
inlineoverridevirtual

Return reference to detector element with all tracker devices.

Implements dd4hep::Detector.

Definition at line 181 of file DetectorImp.h.

◆ trackingVolume()

virtual Volume dd4hep::DetectorImp::trackingVolume ( ) const
inlineoverridevirtual

Return handle to the world volume containing the volume with the tracking devices.

Implements dd4hep::Detector.

Definition at line 193 of file DetectorImp.h.

◆ userExtension()

void * DetectorImp::userExtension ( unsigned long long int  key,
bool  alert = true 
) const
overridevirtual

Access an existing extension object from the Detector instance.

Implements dd4hep::Detector.

Definition at line 298 of file DetectorImp.cpp.

◆ vacuum()

virtual Material dd4hep::DetectorImp::vacuum ( ) const
inlineoverridevirtual

Return handle to material describing vacuum.

Implements dd4hep::Detector.

Definition at line 169 of file DetectorImp.h.

◆ visAttributes() [1/2]

virtual const HandleMap& dd4hep::DetectorImp::visAttributes ( ) const
inlineoverridevirtual

Accessor to the map of visualisation attributes.

Implements dd4hep::Detector.

Definition at line 282 of file DetectorImp.h.

◆ visAttributes() [2/2]

virtual VisAttr dd4hep::DetectorImp::visAttributes ( const std::string &  name) const
inlineoverridevirtual

Retrieve a visualization attribute by its name from the detector description.

Implements dd4hep::Detector.

Definition at line 247 of file DetectorImp.h.

◆ volumeManager()

virtual VolumeManager dd4hep::DetectorImp::volumeManager ( ) const
inlineoverridevirtual

Return handle to the VolumeManager.

Implements dd4hep::Detector.

Definition at line 201 of file DetectorImp.h.

◆ world()

virtual DetElement dd4hep::DetectorImp::world ( ) const
inlineoverridevirtual

Return reference to the top-most (world) detector element.

Implements dd4hep::Detector.

Definition at line 177 of file DetectorImp.h.

◆ worldVolume()

virtual Volume dd4hep::DetectorImp::worldVolume ( ) const
inlineoverridevirtual

Return handle to the world volume containing everything.

Implements dd4hep::Detector.

Definition at line 185 of file DetectorImp.h.

◆ Write() [1/2]

virtual Int_t dd4hep::DetectorImp::Write ( const char *  name = 0,
Int_t  option = 0,
Int_t  bufsize = 0 
) const
inlineoverridevirtual

TObject overload: We need to set the Volume and PlacedVolume extensions to be persistent.

Definition at line 423 of file DetectorImp.h.

◆ Write() [2/2]

virtual Int_t dd4hep::DetectorImp::Write ( const char *  name = 0,
Int_t  option = 0,
Int_t  bufsize = 0 
)
inlineoverridevirtual

TObject overload: We need to set the Volume and PlacedVolume extensions to be persistent.

Definition at line 419 of file DetectorImp.h.

Member Data Documentation

◆ m_buildType

DetectorBuildType dd4hep::DetectorImp::m_buildType
protected

VolumeManager m_volManager;.

Definition at line 71 of file DetectorImp.h.

◆ m_detectorTypes

DetectorTypeMap dd4hep::DetectorImp::m_detectorTypes
protected

Inventory of detector types.

Definition at line 68 of file DetectorImp.h.

◆ m_std_conditions

STD_Conditions dd4hep::DetectorImp::m_std_conditions
mutableprotected

Standard conditions.

Definition at line 65 of file DetectorImp.h.

◆ m_surfaceManager

detail::OpticalSurfaceManagerObject* dd4hep::DetectorImp::m_surfaceManager {nullptr}
protected

Optical surface manager.

Definition at line 74 of file DetectorImp.h.


The documentation for this class was generated from the following files: