16#ifndef _RMG_NAVIGATION_TOOLS_HH_
17#define _RMG_NAVIGATION_TOOLS_HH_
22#include <unordered_map>
25#include "G4AffineTransform.hh"
26#include "G4LogicalVolume.hh"
27#include "G4RotationMatrix.hh"
28#include "G4ThreeVector.hh"
29#include "G4VPhysicalVolume.hh"
36namespace RMGNavigationTools {
47 G4LogicalVolume* FindLogicalVolume(std::string name);
60 std::set<G4VPhysicalVolume*> FindPhysicalVolume(std::string name, std::string copy_nr =
".*");
70 G4VPhysicalVolume* FindDirectMother(
const G4VPhysicalVolume* volume);
81 std::set<G4VPhysicalVolume*> FindDirectMothers(
const G4VPhysicalVolume* volume);
89 void PrintListOfLogicalVolumes();
96 void PrintListOfPhysicalVolumes();
98 struct VolumeTreeEntry {
99 VolumeTreeEntry() =
delete;
100 VolumeTreeEntry(
const VolumeTreeEntry&) =
default;
101 VolumeTreeEntry& operator=(
const VolumeTreeEntry&) =
default;
106 G4ThreeVector vol_global_translation;
107 G4RotationMatrix vol_global_rotation;
108 std::vector<G4RotationMatrix> partial_rotations;
109 std::vector<G4ThreeVector> partial_translations;
128 size_t num_daughters{};
129 std::vector<G4AffineTransform> daughter_transforms;
130 std::vector<const G4VSolid*> daughter_solids;
135 extern G4ThreadLocal std::unordered_map<const G4VPhysicalVolume*, VolumeCacheEntry> volume_cache;
144 std::unordered_map<const G4VPhysicalVolume*, VolumeCacheEntry>::iterator GetVolumeCacheEntry(
Cache structure for volume geometry data.
Definition RMGNavigationTools.hh:125
Definition RMGNavigationTools.hh:98