6 #include "G4VPhysicalVolume.hh"
7 #include "G4LogicalVolume.hh"
8 #include "G4TransportationManager.hh"
17 std::cout <<
"PrintSensitive:: Print position of all Sensitive Touchables: "
18 <<
" for names (0-" <<
nchar_ <<
") = " <<
name_ <<
"\n";
24 G4VPhysicalVolume *theTopPV =
getTopPV();
26 std::cout <<
"\nTotal number of sensitive detector volumes for " <<
name_ <<
" is " << nsens << std::endl;
36 G4ThreeVector globalpoint =
fHistory.GetTopTransform().Inverse().TransformPoint(G4ThreeVector(0, 0, 0));
37 G4LogicalVolume *lv =
pv->GetLogicalVolume();
40 if (
pv->GetMotherLogical())
41 mother =
pv->GetMotherLogical()->GetName();
43 lvname.assign(lvname, 0,
nchar_);
47 if (lv->GetSensitiveDetector() && printIt) {
49 out << nsens <<
":" << leafDepth <<
" ### VOLUME = " << lv->GetName() <<
" Copy No " <<
pv->GetCopyNo() <<
" in "
50 << mother <<
" global position of centre " << globalpoint <<
" (r=" << globalpoint.perp()
51 <<
", phi=" << globalpoint.phi() / CLHEP::deg <<
")\n";
54 int NoDaughters = lv->GetNoDaughters();
55 while ((NoDaughters--) > 0) {
56 G4VPhysicalVolume *pvD = lv->GetDaughter(NoDaughters);
57 if (!pvD->IsReplicated())
58 nsens =
dumpTouch(pvD, leafDepth + 1, printIt, nsens,
out);
67 return G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();