Skip to content

Instantly share code, notes, and snippets.

@JeremyMcCormick
Created September 20, 2016 00:16
Show Gist options
  • Save JeremyMcCormick/ee053aa401ec49936225dc2eedb6ddde to your computer and use it in GitHub Desktop.
Save JeremyMcCormick/ee053aa401ec49936225dc2eedb6ddde to your computer and use it in GitHub Desktop.
G4TouchableHandle touchable = prePoint->GetTouchableHandle();
const G4NavigationHistory* touchableHistory = touchable->GetHistory();
G4int hdepth = touchable->GetHistoryDepth();
std::cout << "Dumping volume hierarchy ..." << std::endl;
for (int i = hdepth; i > 0; i--) {
G4VPhysicalVolume* pv = touchableHistory->GetVolume(i);
std::cout << " depth: " << i << ", physvol name: " << pv->GetName() << ", copynum: " << pv->GetCopyNo() << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment