ATLAS Offline Software
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 
7 inline
8 int 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 
19 inline
20 G4VPhysicalVolume* 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 
30 inline
31 int 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 
39 inline
40 const G4Track* VolumeTreeNavigator::GetTrack() const
41 {
42  return m_track;
43 }
44 
45 inline
46 const G4StepPoint* VolumeTreeNavigator::GetPreStepPoint() const
47 {
48  return m_preStepPoint;
49 }
50 
51 inline
52 const G4StepPoint* VolumeTreeNavigator::GetPostStepPoint() const
53 {
54  return m_postStepPoint;
55 }
56 
57 inline
58 int VolumeTreeNavigator::GetStepNumber() const
59 {
60  return m_stepNo;
61 }
62 
63 inline
64 const VolTree& VolumeTreeNavigator::GetHistory() const
65 {
66  return m_history;
67 }
68 
69 inline
70 int VolumeTreeNavigator::GetFullDepth() const
71 {
72  return (int)m_preDepth;
73 }