DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Geometry converter from dd4hep to Geant 4 in Detector format. More...
#include <LCDDConverter.h>
Classes | |
class | GeometryInfo |
Data structure of the geometry converter from dd4hep to Geant 4 in Detector format. More... | |
Public Types | |
typedef xml::XmlElement | XmlElement |
typedef std::map< Atom, XmlElement * > | ElementMap |
typedef std::map< Material, XmlElement * > | MaterialMap |
typedef std::map< LimitSet, XmlElement * > | LimitMap |
typedef std::map< PlacedVolume, XmlElement * > | PlacementMap |
typedef std::map< Region, XmlElement * > | RegionMap |
typedef std::map< SensitiveDetector, XmlElement * > | SensDetMap |
typedef std::map< Volume, XmlElement * > | VolumeMap |
typedef std::map< IDDescriptor, XmlElement * > | IdSpecMap |
typedef std::map< VisAttr, XmlElement * > | VisMap |
typedef std::map< const TGeoShape *, XmlElement * > | SolidMap |
typedef std::map< OverlayedField, XmlElement * > | FieldMap |
typedef std::map< const TGeoMatrix *, XmlElement * > | TrafoMap |
typedef std::set< std::string > | NameSet |
Public Member Functions | |
GeometryInfo & | data () const |
void | checkVolumes (const std::string &name, Volume volume) const |
Data integrity checker. More... | |
LCDDConverter (Detector &description) | |
Initializing Constructor. More... | |
virtual | ~LCDDConverter () |
Standard destructor. More... | |
xml_doc_t | createGDML (DetElement top) |
Create geometry conversion in GDML format. More... | |
xml_doc_t | createDetector (DetElement top) |
Create geometry conversion in Detector format. More... | |
xml_doc_t | createVis (DetElement top) |
Create geometry conversion in Vis format. More... | |
virtual void | handleHeader () const |
Add header information in Detector format. More... | |
virtual xml_h | handleMaterial (const std::string &name, Material medium) const |
Convert the geometry type material into the corresponding Xml object(s). More... | |
virtual xml_h | handleElement (const std::string &name, Atom element) const |
Convert the geometry type element into the corresponding Xml object(s). More... | |
virtual xml_h | handleSolid (const std::string &name, const TGeoShape *volume) const |
Convert the geometry type solid into the corresponding Xml object(s). More... | |
virtual xml_h | handleVolume (const std::string &name, Volume volume) const |
Convert the geometry type logical volume into the corresponding Xml object(s). More... | |
virtual xml_h | handleVolumeVis (const std::string &name, const TGeoVolume *volume) const |
Dump logical volume in GDML format to output stream. More... | |
virtual void | collectVolume (const std::string &name, const TGeoVolume *volume) const |
Dump logical volume in GDML format to output stream. More... | |
virtual xml_h | handlePlacement (const std::string &name, PlacedVolume node) const |
Convert the geometry type volume placement into the corresponding Xml object(s). More... | |
virtual xml_h | handleRegion (const std::string &name, Region region) const |
Convert the geometry type region into the corresponding Xml object(s). More... | |
virtual xml_h | handleVis (const std::string &name, VisAttr vis) const |
Convert the geometry visualisation attributes to the corresponding Xml object(s). More... | |
virtual xml_h | handleIdSpec (const std::string &name, IDDescriptor idspec) const |
Convert the geometry id dictionary entry to the corresponding Xml object(s). More... | |
virtual xml_h | handleLimitSet (const std::string &name, LimitSet limitset) const |
Convert the geometry type LimitSet into the corresponding Xml object(s). More... | |
virtual xml_h | handleSensitive (const std::string &name, SensitiveDetector sens_det) const |
Convert the geometry type SensitiveDetector into the corresponding Xml object(s). More... | |
virtual xml_h | handleSegmentation (Segmentation seg) const |
Convert the segmentation of a SensitiveDetector into the corresponding Detector object. More... | |
virtual xml_h | handlePosition (const std::string &name, const TGeoMatrix *trafo) const |
Convert the Position into the corresponding Xml object(s). More... | |
virtual xml_h | handleRotation (const std::string &name, const TGeoMatrix *trafo) const |
Convert the Rotation into the corresponding Xml object(s). More... | |
virtual xml_h | handleField (const std::string &name, OverlayedField field) const |
Convert the electric or magnetic fields into the corresponding Xml object(s). More... | |
void | handleProperties (Detector::Properties &prp) const |
Handle the geant 4 specific properties. More... | |
Public Member Functions inherited from dd4hep::detail::GeoHandler | |
GeoHandler () | |
Default constructor. More... | |
GeoHandler (std::map< int, std::vector< const TGeoNode * > > *ptr, std::map< int, std::set< const TGeoNode * > > *ptr_set, std::map< const TGeoNode *, std::vector< TGeoNode * > > *daus=nullptr) | |
Initializing constructor. More... | |
virtual | ~GeoHandler () |
Default destructor. More... | |
bool | setPropagateRegions (bool value) |
Propagate regions. Returns the previous value. More... | |
GeoHandler & | collect (DetElement top) |
Collect geometry information from traversal. More... | |
GeoHandler & | collect (DetElement top, GeometryInfo &info) |
Collect geometry information from traversal with aggregated information. More... | |
std::map< int, std::vector< const TGeoNode * > > * | release () |
Access to collected node list. More... | |
Public Attributes | |
Detector & | m_detDesc |
Reference to detector description. More... | |
NameSet | m_checkNames |
GeometryInfo * | m_dataPtr |
Additional Inherited Members | |
Protected Member Functions inherited from dd4hep::detail::GeoHandler | |
GeoHandler & | i_collect (const TGeoNode *parent, const TGeoNode *node, int level, Region rg, LimitSet ls) |
Internal helper to collect geometry information from traversal. More... | |
Protected Attributes inherited from dd4hep::detail::GeoHandler | |
bool | m_propagateRegions { false } |
std::map< int, std::vector< const TGeoNode * > > * | m_data { nullptr } |
actual container with std::vector (preserves order) More... | |
std::map< int, std::set< const TGeoNode * > > * | m_set_data { nullptr } |
redundant container with std::set (for lookup purpose) More... | |
std::map< const TGeoNode *, std::vector< TGeoNode * > > * | m_daughters { nullptr } |
Geometry converter from dd4hep to Geant 4 in Detector format.
Definition at line 50 of file LCDDConverter.h.
typedef std::map<Atom, XmlElement*> dd4hep::detail::LCDDConverter::ElementMap |
Definition at line 53 of file LCDDConverter.h.
typedef std::map<OverlayedField, XmlElement*> dd4hep::detail::LCDDConverter::FieldMap |
Definition at line 63 of file LCDDConverter.h.
typedef std::map<IDDescriptor, XmlElement*> dd4hep::detail::LCDDConverter::IdSpecMap |
Definition at line 60 of file LCDDConverter.h.
typedef std::map<LimitSet, XmlElement*> dd4hep::detail::LCDDConverter::LimitMap |
Definition at line 55 of file LCDDConverter.h.
typedef std::map<Material, XmlElement*> dd4hep::detail::LCDDConverter::MaterialMap |
Definition at line 54 of file LCDDConverter.h.
typedef std::set<std::string> dd4hep::detail::LCDDConverter::NameSet |
Definition at line 118 of file LCDDConverter.h.
typedef std::map<PlacedVolume, XmlElement*> dd4hep::detail::LCDDConverter::PlacementMap |
Definition at line 56 of file LCDDConverter.h.
typedef std::map<Region, XmlElement*> dd4hep::detail::LCDDConverter::RegionMap |
Definition at line 57 of file LCDDConverter.h.
typedef std::map<SensitiveDetector, XmlElement*> dd4hep::detail::LCDDConverter::SensDetMap |
Definition at line 58 of file LCDDConverter.h.
typedef std::map<const TGeoShape*, XmlElement*> dd4hep::detail::LCDDConverter::SolidMap |
Definition at line 62 of file LCDDConverter.h.
typedef std::map<const TGeoMatrix*, XmlElement*> dd4hep::detail::LCDDConverter::TrafoMap |
Definition at line 64 of file LCDDConverter.h.
typedef std::map<VisAttr, XmlElement*> dd4hep::detail::LCDDConverter::VisMap |
Definition at line 61 of file LCDDConverter.h.
typedef std::map<Volume, XmlElement*> dd4hep::detail::LCDDConverter::VolumeMap |
Definition at line 59 of file LCDDConverter.h.
typedef xml::XmlElement dd4hep::detail::LCDDConverter::XmlElement |
Definition at line 52 of file LCDDConverter.h.
LCDDConverter::LCDDConverter | ( | Detector & | description | ) |
Initializing Constructor.
Definition at line 126 of file LCDDConverter.cpp.
|
virtual |
Standard destructor.
Definition at line 130 of file LCDDConverter.cpp.
void LCDDConverter::checkVolumes | ( | const std::string & | name, |
Volume | volume | ||
) | const |
Data integrity checker.
Definition at line 779 of file LCDDConverter.cpp.
|
virtual |
Dump logical volume in GDML format to output stream.
Definition at line 760 of file LCDDConverter.cpp.
xml_doc_t LCDDConverter::createDetector | ( | DetElement | top | ) |
Create geometry conversion in Detector format.
Create geometry conversion.
Definition at line 1203 of file LCDDConverter.cpp.
xml_doc_t LCDDConverter::createGDML | ( | DetElement | top | ) |
Create geometry conversion in GDML format.
Create geometry conversion.
Definition at line 1123 of file LCDDConverter.cpp.
xml_doc_t LCDDConverter::createVis | ( | DetElement | top | ) |
Create geometry conversion in Vis format.
Create geometry conversion.
Definition at line 1179 of file LCDDConverter.cpp.
|
inline |
Definition at line 125 of file LCDDConverter.h.
Convert the geometry type element into the corresponding Xml object(s).
Dump element in GDML format to output stream.
Definition at line 137 of file LCDDConverter.cpp.
|
virtual |
Convert the electric or magnetic fields into the corresponding Xml object(s).
Definition at line 1010 of file LCDDConverter.cpp.
|
virtual |
Add header information in Detector format.
Definition at line 1084 of file LCDDConverter.cpp.
|
virtual |
Convert the geometry id dictionary entry to the corresponding Xml object(s).
Definition at line 941 of file LCDDConverter.cpp.
Convert the geometry type material into the corresponding Xml object(s).
Dump material in GDML format to output stream.
Definition at line 160 of file LCDDConverter.cpp.
|
virtual |
Convert the geometry type volume placement into the corresponding Xml object(s).
Dump volume placement in GDML format to output stream.
Definition at line 803 of file LCDDConverter.cpp.
|
virtual |
Convert the Position into the corresponding Xml object(s).
Definition at line 604 of file LCDDConverter.cpp.
void LCDDConverter::handleProperties | ( | Detector::Properties & | prp | ) | const |
Handle the geant 4 specific properties.
Definition at line 1034 of file LCDDConverter.cpp.
Convert the geometry type region into the corresponding Xml object(s).
Convert the geometry type region into the corresponding Detector object(s).
Convert the geometry type field into the corresponding Xml object(s). virtual xml_h handleField(const std::string& name, Ref_t field) const;
Definition at line 845 of file LCDDConverter.cpp.
|
virtual |
Convert the Rotation into the corresponding Xml object(s).
Definition at line 638 of file LCDDConverter.cpp.
|
virtual |
Convert the segmentation of a SensitiveDetector into the corresponding Detector object.
Definition at line 883 of file LCDDConverter.cpp.
|
virtual |
Convert the geometry type SensitiveDetector into the corresponding Xml object(s).
Convert the geometry type SensitiveDetector into the corresponding Detector object(s).
Definition at line 915 of file LCDDConverter.cpp.
|
virtual |
Convert the geometry type solid into the corresponding Xml object(s).
Dump solid in GDML format to output stream.
Definition at line 221 of file LCDDConverter.cpp.
Convert the geometry visualisation attributes to the corresponding Xml object(s).
Convert the geometry visualisation attributes to the corresponding Detector object(s).
Definition at line 976 of file LCDDConverter.cpp.
Convert the geometry type logical volume into the corresponding Xml object(s).
Dump logical volume in GDML format to output stream.
Definition at line 672 of file LCDDConverter.cpp.
|
virtual |
Dump logical volume in GDML format to output stream.
Definition at line 739 of file LCDDConverter.cpp.
|
mutable |
Definition at line 122 of file LCDDConverter.h.
GeometryInfo* dd4hep::detail::LCDDConverter::m_dataPtr |
Definition at line 123 of file LCDDConverter.h.
Detector& dd4hep::detail::LCDDConverter::m_detDesc |
Reference to detector description.
Definition at line 121 of file LCDDConverter.h.