DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
The main interface to the dd4hep detector description package. More...
#include <Detector.h>
Public Types | |
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, PropertyValues > | Properties |
Public Member Functions | |
virtual | ~Detector ()=default |
Destructor. More... | |
virtual DetectorBuildType | buildType () const =0 |
Access flag to steer the detail of building of the geometry/detector description. More... | |
virtual void | init ()=0 |
Initialize geometry. More... | |
virtual void | endDocument (bool close_geometry=true)=0 |
Finalize the geometry. More... | |
virtual State | state () const =0 |
Access the state of the geometry. More... | |
virtual TGeoManager & | manager () const =0 |
Access the geometry manager of this instance. More... | |
virtual Properties & | properties () const =0 |
Access to properties map. More... | |
virtual Material | air () const =0 |
Return handle to material describing air. More... | |
virtual Material | vacuum () const =0 |
Return handle to material describing vacuum. More... | |
virtual VisAttr | invisible () const =0 |
Return handle to "invisible" visualization attributes. More... | |
virtual DetElement | world () const =0 |
Return reference to the top-most (world) detector element. More... | |
virtual DetElement | trackers () const =0 |
Return reference to detector element with all tracker devices. More... | |
virtual Volume | worldVolume () const =0 |
Return handle to the world volume containing everything. More... | |
virtual Volume | parallelWorldVolume () const =0 |
Return handle to the parallel world volume. More... | |
virtual Volume | trackingVolume () const =0 |
Return handle to the volume containing the tracking devices. More... | |
virtual void | setTrackingVolume (Volume vol)=0 |
Set the tracking volume of the detector. More... | |
virtual VolumeManager | volumeManager () const =0 |
Return handle to the VolumeManager. More... | |
virtual OpticalSurfaceManager | surfaceManager () const =0 |
Access the optical surface manager. More... | |
virtual const STD_Conditions & | stdConditions () const =0 |
Access default conditions (temperature and pressure. More... | |
virtual void | setStdConditions (double temp, double pressure)=0 |
Set the STD temperature and pressure. More... | |
virtual void | setStdConditions (const std::string &type)=0 |
Set the STD conditions according to defined types (STP or NTP) More... | |
virtual Header | header () const =0 |
Accessor to the map of header entries. More... | |
virtual void | setHeader (Header h)=0 |
Accessor to the header entry. More... | |
virtual OverlayedField | field () const =0 |
Return handle to the combined electromagentic field description. More... | |
virtual const HandleMap & | constants () const =0 |
Accessor to the map of constants. More... | |
virtual const HandleMap & | regions () const =0 |
Accessor to the map of region settings. More... | |
virtual const HandleMap & | detectors () const =0 |
Accessor to the map of sub-detectors. More... | |
virtual const HandleMap & | sensitiveDetectors () const =0 |
Accessor to the map of sub-detectors. More... | |
virtual const HandleMap & | readouts () const =0 |
Accessor to the map of readout structures. More... | |
virtual const HandleMap & | visAttributes () const =0 |
Accessor to the map of visualisation attributes. More... | |
virtual const HandleMap & | limitsets () const =0 |
Accessor to the map of limit settings. More... | |
virtual const HandleMap & | fields () const =0 |
Accessor to the map of field entries, which together form the global field. More... | |
virtual const HandleMap & | idSpecifications () const =0 |
Accessor to the map of ID specifications. More... | |
virtual const std::vector< DetElement > & | detectors (const std::string &type, bool throw_exc=false) const =0 |
Access a set of subdetectors according to the sensitive type. More... | |
virtual std::vector< DetElement > | detectors (const std::string &type1, const std::string &type2, const std::string &type3="", const std::string &type4="", const std::string &type5="")=0 |
Access a set of subdetectors according to several sensitive types. More... | |
virtual std::vector< std::string > | detectorTypes () const =0 |
Access the availible detector types. More... | |
virtual std::vector< DetElement > | detectors (unsigned int includeFlag, unsigned int excludeFlag=0) const =0 |
virtual void | declareParent (const std::string &detector_name, const DetElement &det)=0 |
Register new parent detector using the detector name. More... | |
virtual Volume | pickMotherVolume (const DetElement &sd) const =0 |
Access mother volume by detector element. More... | |
virtual std::string | constantAsString (const std::string &name) const =0 |
Typed access to constants: access string values. More... | |
virtual long | constantAsLong (const std::string &name) const =0 |
Typed access to constants: long values. More... | |
virtual double | constantAsDouble (const std::string &name) const =0 |
Typed access to constants: double values. More... | |
virtual Constant | constant (const std::string &name) const =0 |
Retrieve a constant by its name from the detector description. More... | |
template<class T > | |
T | constant (const std::string &name) const |
Typed access to constants: access any type values. More... | |
virtual Material | material (const std::string &name) const =0 |
Retrieve a matrial by its name from the detector description. More... | |
virtual IDDescriptor | idSpecification (const std::string &name) const =0 |
Retrieve a id descriptor by its name from the detector description. More... | |
virtual Region | region (const std::string &name) const =0 |
Retrieve a region object by its name from the detector description. More... | |
virtual VisAttr | visAttributes (const std::string &name) const =0 |
Retrieve a visualization attribute by its name from the detector description. More... | |
virtual LimitSet | limitSet (const std::string &name) const =0 |
Retrieve a limitset by its name from the detector description. More... | |
virtual Readout | readout (const std::string &name) const =0 |
Retrieve a readout object by its name from the detector description. More... | |
virtual SensitiveDetector | sensitiveDetector (const std::string &name) const =0 |
Retrieve a sensitive detector by its name from the detector description. More... | |
virtual CartesianField | field (const std::string &name) const =0 |
Retrieve a field component by its name from the detector description. More... | |
virtual DetElement | detector (const std::string &name) const =0 |
Retrieve a subdetector element by its name from the detector description. More... | |
virtual Detector & | add (Constant constant)=0 |
Add a new constant to the detector description. More... | |
virtual Detector & | add (VisAttr attr)=0 |
Add a new visualisation attribute to the detector description. More... | |
virtual Detector & | add (LimitSet limitset)=0 |
Add a new limit set to the detector description. More... | |
virtual Detector & | add (Region region)=0 |
Add a new detector region to the detector description. More... | |
virtual Detector & | add (IDDescriptor spec)=0 |
Add a new id descriptor to the detector description. More... | |
virtual Detector & | add (Readout readout)=0 |
Add a new detector readout to the detector description. More... | |
virtual Detector & | add (SensitiveDetector entry)=0 |
Add a new sensitive detector to the detector description. More... | |
virtual Detector & | add (DetElement detector)=0 |
Add a new subdetector to the detector description. More... | |
virtual Detector & | add (CartesianField entry)=0 |
Add a field component to the detector description. More... | |
virtual Detector & | addConstant (const Handle< NamedObject > &element)=0 |
Add a new constant by named reference to the detector description. More... | |
virtual Detector & | addVisAttribute (const Handle< NamedObject > &element)=0 |
Add a new visualisation attribute by named reference to the detector description. More... | |
virtual Detector & | addLimitSet (const Handle< NamedObject > &limset)=0 |
Add a new limit set by named reference to the detector description. More... | |
virtual Detector & | addIDSpecification (const Handle< NamedObject > &element)=0 |
Add a new id descriptor by named reference to the detector description. More... | |
virtual Detector & | addRegion (const Handle< NamedObject > ®ion)=0 |
Add a new detector region by named reference to the detector description. More... | |
virtual Detector & | addReadout (const Handle< NamedObject > &readout)=0 |
Add a new detector readout by named reference to the detector description. More... | |
virtual Detector & | addSensitiveDetector (const Handle< NamedObject > &element)=0 |
Add a new sensitive detector by named reference to the detector description. More... | |
virtual Detector & | addDetector (const Handle< NamedObject > &detector)=0 |
Add a new subdetector by named reference to the detector description. More... | |
virtual Detector & | addField (const Handle< NamedObject > &field)=0 |
Add a field component by named reference to the detector description. More... | |
virtual void | fromCompact (const std::string &fname, DetectorBuildType type=BUILD_DEFAULT)=0 |
Deprecated call (use fromXML): Read compact geometry description or alignment file. More... | |
virtual void | fromXML (const std::string &fname, DetectorBuildType type=BUILD_DEFAULT)=0 |
Read any geometry description or alignment file. More... | |
virtual void | fromXML (const std::string &fname, xml::UriReader *entity_resolver, DetectorBuildType type=BUILD_DEFAULT)=0 |
Read any geometry description or alignment file with external XML entity resolution. More... | |
virtual void | dump () const =0 |
Stupid legacy method. More... | |
virtual long | apply (const char *factory, int argc, char **argv) const =0 |
Manipulate geometry using factory converter. More... | |
virtual void * | addUserExtension (unsigned long long int key, ExtensionEntry *entry)=0 |
Add an extension object to the detector element (low level member function) More... | |
virtual void * | removeUserExtension (unsigned long long int key, bool destroy)=0 |
Remove an existing extension object from the Detector instance. More... | |
virtual void * | userExtension (unsigned long long int key, bool alert=true) const =0 |
Access an existing extension object from the detector element (low level member function) 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... | |
Static Public Member Functions | |
static Detector & | getInstance (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< Detector > | make_unique (const std::string &name) |
Unique creation without internal registration. More... | |
The main interface to the dd4hep detector description package.
Note: The usage of the factory method:
static Detector& getInstance(void);
is DEPRECATED!
You should rather use the plugin mechanism to create a new instance.
Definition at line 90 of file Detector.h.
typedef std::map<std::string, Handle<NamedObject> > dd4hep::Detector::HandleMap |
Type definition of a map of named handles.
Definition at line 93 of file Detector.h.
typedef std::map<std::string, PropertyValues> dd4hep::Detector::Properties |
Definition at line 95 of file Detector.h.
typedef std::map<std::string, std::string> dd4hep::Detector::PropertyValues |
Definition at line 94 of file Detector.h.
The detector description states.
Enumerator | |
---|---|
NOT_READY | The detector description object is freshly created. No geometry nothing. |
LOADING | The geometry is being created and loaded. (parsing ongoing) |
READY | The geometry is loaded. |
Definition at line 98 of file Detector.h.
|
virtualdefault |
Destructor.
|
pure virtual |
Add a field component to the detector description.
Implemented in dd4hep::DetectorImp.
Add a new constant to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new subdetector to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new id descriptor to the detector description.
Implemented in dd4hep::DetectorImp.
Add a new limit set to the detector description.
Implemented in dd4hep::DetectorImp.
Add a new detector readout to the detector description.
Implemented in dd4hep::DetectorImp.
Add a new detector region to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new sensitive detector to the detector description.
Implemented in dd4hep::DetectorImp.
Add a new visualisation attribute to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new constant by named reference to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new subdetector by named reference to the detector description.
Implemented in dd4hep::DetectorImp.
|
inline |
Extend the sensitive detector element with an arbitrary structure accessible by the type.
Definition at line 331 of file Detector.h.
|
pure virtual |
Add a field component by named reference to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new id descriptor by named reference to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new limit set by named reference to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new detector readout by named reference to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new detector region by named reference to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new sensitive detector by named reference to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add an extension object to the detector element (low level member function)
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Add a new visualisation attribute by named reference to the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Return handle to material describing air.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Manipulate geometry using factory converter.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Access flag to steer the detail of building of the geometry/detector description.
Implemented in dd4hep::DetectorImp.
T dd4hep::Detector::constant | ( | const std::string & | name | ) | const |
Typed access to constants: access any type values.
|
inline |
Typed access to constants: short values.
Definition at line 362 of file Detector.h.
|
inline |
Typed access to constants: unsigned short values.
Definition at line 367 of file Detector.h.
|
inline |
Typed access to constants: integer values.
Definition at line 372 of file Detector.h.
|
inline |
Typed access to constants: unsigned integer values.
Definition at line 377 of file Detector.h.
|
inline |
Typed access to constants: long values.
Definition at line 382 of file Detector.h.
|
inline |
Typed access to constants: unsigned long values.
Definition at line 387 of file Detector.h.
|
inline |
Typed access to constants: float values.
Definition at line 392 of file Detector.h.
|
inline |
Typed access to constants: double values.
Definition at line 397 of file Detector.h.
|
pure virtual |
Retrieve a constant by its name from the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Typed access to constants: double values.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Typed access to constants: long values.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Typed access to constants: access string values.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Accessor to the map of constants.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Register new parent detector using the detector name.
Miscaneleous accessors to the detexctor description
Volumes must be registered/declared PRIOR to be picked up! Once registered, Detector::pickMotherVolume(detector) will automatically return the proper parent volume!
The method throws an exception if another volume was already declared for this subdetector The method throws an exception if the volume to be registered is invalid.
Implemented in dd4hep::DetectorImp.
|
static |
Destroy the singleton instance.
Destroy the instance.
Definition at line 162 of file DetectorImp.cpp.
|
pure virtual |
Retrieve a subdetector element by its name from the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Accessor to the map of sub-detectors.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Access a set of subdetectors according to the sensitive type.
Access to predefined caches of subdetectors according to the sensitive type Please note:
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Access a set of subdetectors according to several sensitive types.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
return a vector with all detectors that have all the type properties in includeFlag set but none of the properties given in excludeFlag
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Access the availible detector types.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Stupid legacy method.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Finalize the geometry.
Implemented in dd4hep::DetectorImp.
|
inline |
Access extension element by the type.
Definition at line 342 of file Detector.h.
|
pure virtual |
Return handle to the combined electromagentic field description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Retrieve a field component by its name from the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Accessor to the map of field entries, which together form the global field.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Deprecated call (use fromXML): Read compact geometry description or alignment file.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Read any geometry description or alignment file.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Read any geometry description or alignment file with external XML entity resolution.
Implemented in dd4hep::DetectorImp.
|
static |
—Factory method----—
Definition at line 150 of file DetectorImp.cpp.
|
pure virtual |
Accessor to the map of header entries.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Retrieve a id descriptor by its name from the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Accessor to the map of ID specifications.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Initialize geometry.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Return handle to "invisible" visualization attributes.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Retrieve a limitset by its name from the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Accessor to the map of limit settings.
Implemented in dd4hep::DetectorImp.
|
static |
Unique creation without internal registration.
Definition at line 145 of file DetectorImp.cpp.
|
pure virtual |
Access the geometry manager of this instance.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Retrieve a matrial by its name from the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Return handle to the parallel world volume.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Access mother volume by detector element.
The method uses the detector element's name for volume identification. Unregistered detectors are hosted by the world volume.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Access to properties map.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Retrieve a readout object by its name from the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Accessor to the map of readout structures.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Retrieve a region object by its name from the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Accessor to the map of region settings.
Implemented in dd4hep::DetectorImp.
|
inline |
Remove an existing extension object from the Detector instance. If not destroyed, the instance is returned.
Definition at line 337 of file Detector.h.
|
pure virtual |
Remove an existing extension object from the Detector instance.
If not destroyed, the instance is returned (low level member function)
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Retrieve a sensitive detector by its name from the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Accessor to the map of sub-detectors.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Accessor to the header entry.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Set the STD conditions according to defined types (STP or NTP)
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Set the STD temperature and pressure.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Set the tracking volume of the detector.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Access the state of the geometry.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Access default conditions (temperature and pressure.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Access the optical surface manager.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Return reference to detector element with all tracker devices.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Return handle to the volume containing the tracking devices.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Access an existing extension object from the detector element (low level member function)
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Return handle to material describing vacuum.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Accessor to the map of visualisation attributes.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Retrieve a visualization attribute by its name from the detector description.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Return handle to the VolumeManager.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Return reference to the top-most (world) detector element.
Implemented in dd4hep::DetectorImp.
|
pure virtual |
Return handle to the world volume containing everything.
Implemented in dd4hep::DetectorImp.