23 #include "G4Version.hh"
24 #include "G4VisAttributes.hh"
25 #include "G4ProductionCuts.hh"
26 #include "G4VUserRegionInformation.hh"
27 #include "G4Element.hh"
28 #include "G4SDManager.hh"
30 #include "G4AssemblyVolume.hh"
36 #include "G4Sphere.hh"
37 #include "G4Polycone.hh"
38 #include "G4Polyhedra.hh"
39 #include "G4UnionSolid.hh"
40 #include "G4Paraboloid.hh"
41 #include "G4SubtractionSolid.hh"
42 #include "G4IntersectionSolid.hh"
44 #include "G4Region.hh"
45 #include "G4UserLimits.hh"
46 #include "G4VSensitiveDetector.hh"
48 #include "G4LogicalVolume.hh"
49 #include "G4Material.hh"
50 #include "G4Element.hh"
51 #include "G4Isotope.hh"
52 #include "G4Transform3D.hh"
53 #include "G4ThreeVector.hh"
54 #include "G4PVPlacement.hh"
55 #include "G4ElectroMagneticField.hh"
56 #include "G4FieldManager.hh"
63 using namespace DD4hep::Simulation;
64 using namespace DD4hep::Geometry;
65 using namespace DD4hep;
68 static const char*
_T(
const std::string&
s) {
94 G4LogicalVolume* lv = v->GetLogicalVolume();
96 G4Material* mat = lv->GetMaterial();
97 G4VSolid* sol = lv->GetSolid();
98 G4Region* rg = lv->GetRegion();
99 G4UserLimits* ul = lv->GetUserLimits();
100 G4int ndau = lv->GetNoDaughters();
105 printout(
INFO,
"Geant4Hierarchy",
"%s -> Placement:%s LV:%s Material:%s Solid:%s # of Daughters:%d", indent.c_str(),
106 _T(v->GetName()),
_T(lv->GetName()),
_T(mat->GetName()),
_T(sol->GetName()), ndau);
110 sol->StreamInfo(str);
111 printout(
INFO,
"Geant4Hierarchy",
"%s Solid:%s", indent.c_str(), str.str().c_str());
114 G4UserLimits* rg_limits = rg->GetUserLimits();
116 str << indent <<
" Region:" << rg->GetName() <<
" #Materials:" << rg->GetNumberOfMaterials() <<
" #Volumes:"
117 << rg->GetNumberOfRootVolumes();
119 str <<
" Limits:" << rg_limits->GetType();
123 printout(
INFO,
"Geant4Hierarchy",
"%s Sens.det:%p %s path:%s Active:%-3s #Coll:%d", indent.c_str(), sd,
124 _T(sd->GetName()),
_T(sd->GetFullPathName()),
yes_no(sd->isActive()), sd->GetNumberOfCollections());
126 if (ul && (
m_flags & G4DUMP_LIMITS)) {
127 printout(
INFO,
"Geant4Hierarchy",
"%s Limits:%s ", indent.c_str(),
_T(ul->GetType()));
129 for (G4int idau = 0; idau < ndau; ++idau) {
130 ::snprintf(text,
sizeof(text),
" %-3d", idau);
131 dump(indent + text, lv->GetDaughter(idau));
Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference.
const char * yes_no(bool value)
Helper function to print booleans in format YES/NO.
virtual ~Geant4HierarchyDump()
Standard destructor.
virtual void dump(const std::string &indent, const G4VPhysicalVolume *vol) const
Dump the volume hierarchy as it is known to geant 4.
The main interface to the DD4hep detector description package.
static const char * _T(const std::string &s)
int printout(PrintLevel severity, const char *src, const char *fmt,...)
Calls the display action with a given severity level.
Geant4HierarchyDump(LCDD &lcdd)
Initializing Constructor.
static unsigned long m_flags