20 #include "G4VTouchable.hh"
25 using namespace DD4hep::Simulation;
29 const G4StepPoint* p = use_post_step_point ? step->GetPostStepPoint() : step->GetPreStepPoint();
35 touchable = step->GetPreStepPoint()->GetTouchable();
49 for (i=0; i < n; ++i) {
50 G4VPhysicalVolume* pv =
touchable->GetVolume(i);
51 path_val.push_back(pv);
56 throw std::runtime_error(
"Attempt to access invalid G4 touchable object.");
std::vector< const G4VPhysicalVolume * > Geant4PlacementPath
std::string path() const
Helper: Access the placement path of a Geant4 touchable object as a string.
Geant4TouchableHandler(const G4VTouchable *t)
Default constructor.
const G4VTouchable * touchable
Data member of the helper objects.
Geant4PlacementPath placementPath(bool exception=false) const
Helper: Generate placement path from touchable object.
int depth() const
Touchable history depth.
std::string placementPath(const Geant4PlacementPath &path, bool reverse=true)
Assemble Geant4 volume path.