62 const std::string& gdml);
67 G4VPhysicalVolume* findDaughterByName(G4VPhysicalVolume* pvol, G4String name);
68 void getAllDaughters(G4VPhysicalVolume* pvol);
70 static bool compareZlocation(
const G4VPhysicalVolume& pvol_a,
71 const G4VPhysicalVolume& pvol_b) {
72 return (pvol_a.GetTranslation().z() < pvol_b.GetTranslation().z());
75 void convertG4Rot(
const G4RotationMatrix* g4rot,
76 Acts::RotationMatrix3& rot)
const;
77 Acts::Vector3 convertG4Pos(
const G4ThreeVector& g4pos)
const;
79 void dumpGeometry(
const std::string& outputDir,
80 const Acts::GeometryContext& gctx)
const;
82 std::shared_ptr<const Acts::TrackingGeometry> getTG()
const {
86 Acts::Transform3 getTransform(
const G4VPhysicalVolume& phex,
87 bool toTrackingFrame =
false)
const;
89 Acts::Transform3 toTracker(
const Acts::Transform3& trans)
const;
94 void makeLayerSurfacesMap();
96 void getSurfaces(std::vector<const Acts::Surface*>& surfaces)
const;
98 const Acts::Surface* getSurface(
int layerid)
const {
99 return layer_surface_map_.at(layerid);
102 std::unordered_map<unsigned int, const Acts::Surface*> layer_surface_map_;
106 std::vector<std::shared_ptr<DetectorElement>> det_elements_;
109 const Acts::GeometryContext& gctx_;
110 std::string gdml_{
""};
112 Acts::RotationMatrix3 x_rot_, y_rot_;
113 std::shared_ptr<const Acts::TrackingGeometry> t_geometry_{
nullptr};
114 G4VPhysicalVolume* f_world_phys_vol_{
nullptr};
117 enableLogging(
"TrackingGeometry")