DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Geometry converter from dd4hep to Geant 4. More...
#include <Geant4Converter.h>
Public Member Functions | |
Geant4Converter (const Detector &description) | |
Initializing Constructor. More... | |
Geant4Converter (const Detector &description, PrintLevel level) | |
Initializing Constructor. More... | |
virtual | ~Geant4Converter () |
Standard destructor. More... | |
Geant4Converter & | create (DetElement top) |
Create geometry conversion. More... | |
virtual void * | handleMaterialProperties (TObject *matrix) const |
Convert the geometry type material into the corresponding Geant4 object(s). More... | |
void * | handleOpticalSurface (TObject *surface) const |
Convert the optical surface to Geant4. More... | |
void * | handleSkinSurface (TObject *surface) const |
Convert the skin surface to Geant4. More... | |
void * | handleBorderSurface (TObject *surface) const |
Convert the border surface to Geant4. More... | |
virtual void * | handleMaterial (const std::string &name, Material medium) const |
Convert the geometry type material into the corresponding Geant4 object(s). More... | |
virtual void * | handleIsotope (const std::string &name, const TGeoIsotope *iso) const |
Handle the conversion of isotopes. More... | |
virtual void * | handleElement (const std::string &name, Atom element) const |
Convert the geometry type element into the corresponding Geant4 object(s). More... | |
virtual void * | handleSolid (const std::string &name, const TGeoShape *volume) const |
Convert the geometry type solid into the corresponding Geant4 object(s). More... | |
virtual void * | handleVolume (const std::string &name, const TGeoVolume *volume) const |
Convert the geometry type logical volume into the corresponding Geant4 object(s). More... | |
virtual void * | collectVolume (const std::string &name, const TGeoVolume *volume) const |
Dump logical volume in GDML format to output stream. More... | |
virtual void * | handlePlacement (const std::string &name, const TGeoNode *node) const |
Convert the geometry type volume placement into the corresponding Geant4 object(s). More... | |
virtual void * | handleAssembly (const std::string &name, const TGeoNode *node) const |
Dump volume placement in GDML format to output stream. More... | |
virtual void * | handleRegion (Region region, const std::set< const TGeoVolume * > &volumes) const |
Convert the geometry type region into the corresponding Geant4 object(s). More... | |
virtual void * | handleVis (const std::string &name, VisAttr vis) const |
Convert the geometry visualisation attributes to the corresponding Geant4 object(s). More... | |
virtual void * | handleLimitSet (LimitSet limitset, const std::set< const TGeoVolume * > &volumes) const |
Convert the geometry type LimitSet into the corresponding Geant4 object(s). More... | |
void | handleProperties (Detector::Properties &prp) const |
Handle the geant 4 specific properties. More... | |
virtual void | printSensitive (SensitiveDetector sens_det, const std::set< const TGeoVolume * > &volumes) const |
Print the geometry type SensitiveDetector. More... | |
virtual void * | printPlacement (const std::string &name, const TGeoNode *node) const |
Print Geant4 placement. 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 Member Functions inherited from dd4hep::sim::Geant4Mapping | |
Geant4Mapping (const Detector &description) | |
Initializing Constructor. More... | |
virtual | ~Geant4Mapping () |
Standard destructor. More... | |
const Detector & | detectorDescription () const |
Accesor to the Detector instance. More... | |
Geant4GeometryInfo & | data () const |
Access to the data pointer. More... | |
Geant4GeometryInfo * | ptr () const |
Access to the data pointer. More... | |
Geant4GeometryInfo & | init () |
Create and attach new data block. Delete old data block if present. More... | |
Geant4GeometryInfo * | detach () |
Release data and pass over the ownership. More... | |
void | attach (Geant4GeometryInfo *data) |
Set a new data block. More... | |
Geant4VolumeManager | volumeManager () const |
Access the volume manager. More... | |
PlacedVolume | placement (const G4VPhysicalVolume *node) const |
Accessor to resolve geometry placements. More... | |
Public Attributes | |
bool | debugMaterials = false |
Property: Flag to debug materials during conversion mechanism. More... | |
bool | debugElements = false |
Property: Flag to debug elements during conversion mechanism. More... | |
bool | debugShapes = false |
Property: Flag to debug shapes during conversion mechanism. More... | |
bool | debugVolumes = false |
Property: Flag to debug volumes during conversion mechanism. More... | |
bool | debugPlacements = false |
Property: Flag to debug placements during conversion mechanism. More... | |
bool | debugReflections = false |
Property: Flag to debug reflections during conversion mechanism. More... | |
bool | debugRegions = false |
Property: Flag to debug regions during conversion mechanism. More... | |
bool | debugLimits = false |
Property: Flag to debug LimitSets during conversion mechanism. More... | |
bool | debugSurfaces = false |
Property: Flag to debug surfaces during conversion mechanism. More... | |
bool | printPlacements = false |
Property: Flag to dump all placements after the conversion procedure. More... | |
bool | printSensitives = false |
Property: Flag to dump all sensitives after the conversion procedure. More... | |
bool | checkOverlaps = true |
Property: Check geometrical overlaps for volume placements and G4 imprints. More... | |
PrintLevel | outputLevel = INFO |
Property: Output level for debug printing. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from dd4hep::sim::Geant4Mapping | |
static Geant4Mapping & | instance () |
Possibility to define a singleton instance. More... | |
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 Member Functions inherited from dd4hep::sim::Geant4Mapping | |
void | checkValidity () const |
When resolving pointers, we must check for the validity of the data block. 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 } |
Protected Attributes inherited from dd4hep::sim::Geant4Mapping | |
const Detector & | m_detDesc |
Geant4GeometryInfo * | m_dataPtr |
Geometry converter from dd4hep to Geant 4.
Definition at line 32 of file Geant4Converter.h.
Geant4Converter::Geant4Converter | ( | const Detector & | description | ) |
Initializing Constructor.
Definition at line 289 of file Geant4Converter.cpp.
Geant4Converter::Geant4Converter | ( | const Detector & | description, |
PrintLevel | level | ||
) |
Initializing Constructor.
Definition at line 297 of file Geant4Converter.cpp.
|
virtual |
Standard destructor.
Definition at line 304 of file Geant4Converter.cpp.
|
virtual |
Dump logical volume in GDML format to output stream.
Definition at line 845 of file Geant4Converter.cpp.
Geant4Converter & Geant4Converter::create | ( | DetElement | top | ) |
Create geometry conversion.
Handle concrete surfaces
Definition at line 1663 of file Geant4Converter.cpp.
|
virtual |
Dump volume placement in GDML format to output stream.
Definition at line 865 of file Geant4Converter.cpp.
void * Geant4Converter::handleBorderSurface | ( | TObject * | surface | ) | const |
Convert the border surface to Geant4.
Definition at line 1568 of file Geant4Converter.cpp.
|
virtual |
Convert the geometry type element into the corresponding Geant4 object(s).
Handle the conversion of elements.
Definition at line 322 of file Geant4Converter.cpp.
|
virtual |
Handle the conversion of isotopes.
Definition at line 308 of file Geant4Converter.cpp.
|
virtual |
Convert the geometry type LimitSet into the corresponding Geant4 object(s).
Definition at line 1185 of file Geant4Converter.cpp.
|
virtual |
Convert the geometry type material into the corresponding Geant4 object(s).
Dump material in GDML format to output stream.
Attach the material properties if any
Attach the material properties if any
Definition at line 350 of file Geant4Converter.cpp.
|
virtual |
Convert the geometry type material into the corresponding Geant4 object(s).
Definition at line 1288 of file Geant4Converter.cpp.
void * Geant4Converter::handleOpticalSurface | ( | TObject * | surface | ) | const |
Convert the optical surface to Geant4.
Convert non-scalar properties from GDML tables
Convert scalar properties
Definition at line 1417 of file Geant4Converter.cpp.
|
virtual |
Convert the geometry type volume placement into the corresponding Geant4 object(s).
Dump volume placement in GDML format to output stream.
Update replica list to avoid additional conversions...
Definition at line 938 of file Geant4Converter.cpp.
void Geant4Converter::handleProperties | ( | Detector::Properties & | prp | ) | const |
Handle the geant 4 specific properties.
Definition at line 1253 of file Geant4Converter.cpp.
|
virtual |
Convert the geometry type region into the corresponding Geant4 object(s).
Convert the geometry type field into the corresponding Geant4 object(s). virtual void* handleField(const std::string& name, Ref_t field) const;
Assign cuts to region if they were created
Definition at line 1107 of file Geant4Converter.cpp.
void * Geant4Converter::handleSkinSurface | ( | TObject * | surface | ) | const |
Convert the skin surface to Geant4.
Definition at line 1550 of file Geant4Converter.cpp.
|
virtual |
Convert the geometry type solid into the corresponding Geant4 object(s).
Dump solid in GDML format to output stream.
Definition at line 597 of file Geant4Converter.cpp.
|
virtual |
Convert the geometry visualisation attributes to the corresponding Geant4 object(s).
Definition at line 1227 of file Geant4Converter.cpp.
|
virtual |
Convert the geometry type logical volume into the corresponding Geant4 object(s).
Dump logical volume in GDML format to output stream.
Check all pre-conditions
Definition at line 742 of file Geant4Converter.cpp.
|
virtual |
|
virtual |
Print the geometry type SensitiveDetector.
Convert the geometry type SensitiveDetector into the corresponding Geant4 object(s).
Definition at line 1587 of file Geant4Converter.cpp.
bool dd4hep::sim::Geant4Converter::checkOverlaps = true |
Property: Check geometrical overlaps for volume placements and G4 imprints.
Definition at line 59 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::debugElements = false |
Property: Flag to debug elements during conversion mechanism.
Definition at line 37 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::debugLimits = false |
Property: Flag to debug LimitSets during conversion mechanism.
Definition at line 49 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::debugMaterials = false |
Property: Flag to debug materials during conversion mechanism.
Definition at line 35 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::debugPlacements = false |
Property: Flag to debug placements during conversion mechanism.
Definition at line 43 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::debugReflections = false |
Property: Flag to debug reflections during conversion mechanism.
Definition at line 45 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::debugRegions = false |
Property: Flag to debug regions during conversion mechanism.
Definition at line 47 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::debugShapes = false |
Property: Flag to debug shapes during conversion mechanism.
Definition at line 39 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::debugSurfaces = false |
Property: Flag to debug surfaces during conversion mechanism.
Definition at line 51 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::debugVolumes = false |
Property: Flag to debug volumes during conversion mechanism.
Definition at line 41 of file Geant4Converter.h.
PrintLevel dd4hep::sim::Geant4Converter::outputLevel = INFO |
Property: Output level for debug printing.
Definition at line 61 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::printPlacements = false |
Property: Flag to dump all placements after the conversion procedure.
Definition at line 54 of file Geant4Converter.h.
bool dd4hep::sim::Geant4Converter::printSensitives = false |
Property: Flag to dump all sensitives after the conversion procedure.
Definition at line 56 of file Geant4Converter.h.