ATLAS Offline Software
Loading...
Searching...
No Matches
VolumeTreeNavigator.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5//VolumeTreeNavigator.icc - Access functions for VolumeTreeNavigator class
6
7inline
8int VolumeTreeNavigator::GetCurrentDepth()
9{
10 // returns current depth in volume tree
11 return distance( m_history.begin(), m_h_nav );
12}
13
14
15// typedef std::pair<G4VPhysicalVolume*,int> VolID;
16// typedef std::vector<VolID> VolTree;
17// typedef VolTree::iterator VolNav;
18
19inline
20G4VPhysicalVolume* VolumeTreeNavigator::GetVolume(int rel) const
21{
22 // returns volume at relative level rel to h_nav; -:above, +:below
23 VolNav it = m_h_nav;
24
25 advance(it, rel);
26
27 return it->first;
28}
29
30inline
31int VolumeTreeNavigator::GetCopyNumber(int rel) const
32{
33 // returns copy number of volume at relative level rel to h_nav; -:above, +:below
34 VolNav it = m_h_nav;
35 advance(it, rel);
36 return it->second;
37}
38
39inline
40const G4Track* VolumeTreeNavigator::GetTrack() const
41{
42 return m_track;
43}
44
45inline
46const G4StepPoint* VolumeTreeNavigator::GetPreStepPoint() const
47{
48 return m_preStepPoint;
49}
50
51inline
52const G4StepPoint* VolumeTreeNavigator::GetPostStepPoint() const
53{
54 return m_postStepPoint;
55}
56
57inline
58int VolumeTreeNavigator::GetStepNumber() const
59{
60 return m_stepNo;
61}
62
63inline
64const VolTree& VolumeTreeNavigator::GetHistory() const
65{
66 return m_history;
67}
68
69inline
70int VolumeTreeNavigator::GetFullDepth() const
71{
72 return (int)m_preDepth;
73}