26#include "G4StepPoint.hh"
27#include "G4VProcess.hh"
28#include "G4TouchableHistory.hh"
29#include "G4VPhysicalVolume.hh"
30#include "G4LogicalVolume.hh"
32using std::string;
using std::vector;
33using std::pair;
using std::make_pair;
46 ATH_MSG_ERROR(
"Dynamic cast failed in VolumeTreeNavigator::VolumeTreeNavigator");
57 int thPVRep = (int)(thPV->GetCopyNo());
58 pair<G4VPhysicalVolume*, int> thPVID = make_pair(thPV, thPVRep);
74 if (name ==
"CALO::CALO") cut = CALO+1;
75 else if (name ==
"BeamPipe::BeamPipe") cut = BeamPipe+1;
76 else if (name ==
"IDET::IDET" || name ==
"ITK::ITK") cut = IDET+1;
77 else if (name ==
"MUONQ02::MUONQ02") cut = MUONQ02+1;
78 else {
ATH_MSG_INFO(
"Level 1 volume not found, output default depth"); }
94 static const vector<string> volumes = [&]() {
96 msg() << MSG::INFO <<
"SetDepthCutDetail path parsed as ";
98 string::size_type slash = 0;
99 string::size_type start = path.find_first_not_of(
'/' );
100 while ( slash != string::npos ) {
102 slash = path.find_first_of(
'/', start );
103 v.push_back( path.substr(start, slash-start) );
104 msg() << MSG::INFO <<
"/"<<volumes.back();
111 vector<string>::const_iterator v_nav = volumes.begin();
144 advance(
m_h_nav, -abs(levels));
172 std::string name_string =
stringify( pds->GetProcessName() );
173 const char* name = name_string.c_str();
174 va_start(procs, pr1);
175 for (
int i = 0; i != numProc; i++ ) {
176 if ( name == va_arg(procs,
const char*) ) {
std::vector< VolID > VolTree
std::string stringify(T obj)
MsgStream & msg() const
The standard message stream.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
bool KillProcesses(const int, const char *,...)
int m_stepNo
depth of volume tree, step number
bool Ascend(int levels=1)
VolNav m_h_end
specifies cut termination in history
VolTree m_history
full volume history, cast as const after preparation
void SetDepthCutDetail(const char *)
bool Descend(int levels=1)
G4Track * m_track
current track
const G4TouchableHistory * m_preHistory
touchable history containing current volume's history
void SetDepthCutSimple(const int, const int, const int, const int)
VolumeTreeNavigator(const G4Step *)
G4StepPoint * m_preStepPoint
volume/process/etc.
G4StepPoint * m_postStepPoint
volume/process/etc.
VolNav m_h_nav
VolTree iterator with no access below cut.