22 #include <G4Version.hh>
23 #include <G4VisAttributes.hh>
24 #include <G4ProductionCuts.hh>
25 #include <G4VUserRegionInformation.hh>
26 #include <G4Element.hh>
27 #include <G4SDManager.hh>
29 #include <G4AssemblyVolume.hh>
35 #include <G4Sphere.hh>
36 #include <G4Polycone.hh>
37 #include <G4Polyhedra.hh>
38 #include <G4UnionSolid.hh>
39 #include <G4Paraboloid.hh>
40 #include <G4SubtractionSolid.hh>
41 #include <G4IntersectionSolid.hh>
43 #include <G4Region.hh>
44 #include <G4UserLimits.hh>
45 #include <G4VSensitiveDetector.hh>
47 #include <G4LogicalVolume.hh>
48 #include <G4Material.hh>
49 #include <G4Element.hh>
50 #include <G4Isotope.hh>
51 #include <G4Transform3D.hh>
52 #include <G4ThreeVector.hh>
53 #include <G4PVPlacement.hh>
54 #include <G4ElectroMagneticField.hh>
55 #include <G4FieldManager.hh>
64 static const char* _T(
const std::string& str) {
70 : m_detDesc(description), m_flags(flags)
80 G4LogicalVolume* lv =
v->GetLogicalVolume();
82 G4RotationMatrix* rot =
v->GetObjectRotation();
83 G4Material* mat = lv->GetMaterial();
84 G4VSolid* sol = lv->GetSolid();
85 G4Region* rg = lv->GetRegion();
87 G4int ndau = lv->GetNoDaughters();
88 std::stringstream str;
91 printout(INFO,
"Geant4Hierarchy",
"%s -> Placement:%s LV:%s Material:%s Solid:%s # of Daughters:%d CopyNo:%d",
92 _T(indent), _T(
v->GetName()), _T(lv->GetName()), _T(mat->GetName()),
93 _T(sol->GetName()), ndau,
v->GetCopyNo());
98 printout(INFO,
"Geant4Hierarchy",
"%s Solid:%s", _T(indent), str.str().c_str());
103 str << indent <<
" Region:" << rg->GetName() <<
" #Materials:" << rg->GetNumberOfMaterials() <<
" #Volumes:"
104 << rg->GetNumberOfRootVolumes();
106 str <<
" Limits:" << rg_limits->GetType();
107 printout(INFO,
"Geant4Hierarchy", str.str().c_str());
110 printout(INFO,
"Geant4Hierarchy",
"%s Sens.det:%p %s path:%s Active:%-3s #Coll:%d", _T(indent), sd,
111 _T(sd->GetName()), _T(sd->GetFullPathName()), yes_no(sd->isActive()), sd->GetNumberOfCollections());
114 printout(INFO,
"Geant4Hierarchy",
"%s Limits:%s ", _T(indent), _T(ul->GetType()));
117 const G4ThreeVector t =
v->GetTranslation();
118 const G4RotationMatrix& r = *rot;
120 r.xx()*r.yy()*r.zz() + r.xy()*r.yz()*r.zx() + r.xz()*r.yx()*r.zy() -
121 r.zx()*r.yy()*r.xz() - r.zy()*r.yz()*r.xx() - r.zz()*r.yx()*r.xy();
122 printout(INFO,
"Geant4Hierarchy",
"%s Matrix: %sREFLECTED Tr: %8.3g %8.3g %8.3g [mm]",
123 _T(indent),
det > 0e0 ?
"NOT " :
"", t.x(), t.y(), t.z());
125 for (G4int idau = 0; idau < ndau; ++idau) {
126 ::snprintf(text,
sizeof(text),
" %-3d", idau);
127 dump(indent + text, lv->GetDaughter(idau));