8 #include "G4VPhysicalVolume.hh" 9 #include "G4LogicalVolume.hh" 10 #include "G4NavigationHistory.hh" 11 #include "G4TransportationManager.hh" 35 dd4hep_ =
p.getParameter<
bool>(
"DD4hep");
38 G4cout <<
"PrintSensitive:: Print position of all Sensitive Touchables: " 45 G4VPhysicalVolume *theTopPV =
getTopPV();
47 G4cout <<
"\nTotal number of sensitive detector volumes for " <<
name_ <<
" is " << nsens << G4endl;
57 G4ThreeVector globalpoint =
fHistory.GetTopTransform().Inverse().TransformPoint(G4ThreeVector(0, 0, 0));
58 G4LogicalVolume *lv =
pv->GetLogicalVolume();
62 static_cast<std::string>(
pv->GetMotherLogical()->GetSolid()->GetName()),
dd4hep_))
66 lvname.assign(lvname, 0,
nchar_);
73 if (lv->GetSensitiveDetector() &&
printIt) {
76 out << nsens <<
":" << leafDepth <<
" ### VOLUME = " << lvname <<
" Copy No " <<
pv->GetCopyNo() <<
" in " << mother
77 <<
" global position of centre " << globalpoint <<
" (r=" << globalpoint.perp()
78 <<
", phi=" << globalpoint.phi() / CLHEP::deg <<
")\n";
81 int NoDaughters = lv->GetNoDaughters();
82 while ((NoDaughters--) > 0) {
83 G4VPhysicalVolume *pvD = lv->GetDaughter(NoDaughters);
84 if (!pvD->IsReplicated())
94 return G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
#define DEFINE_SIMWATCHER(type)
G4NavigationHistory fHistory
PrintSensitive(edm::ParameterSet const &p)
void update(const BeginOfRun *run) override
This routine will be called when the appropriate signal arrives.
G4VPhysicalVolume * getTopPV()
ALPAKA_FN_ACC void printIt(const TAcc &acc, C *m, const char *prefix="")
int dumpTouch(G4VPhysicalVolume *pv, unsigned int leafDepth, bool printIt, int ns, std::ostream &out=G4cout)
std::string nameSolid(const std::string &name, bool dd4hep)
~PrintSensitive() override