18 #include "G4LogicalVolume.hh"
19 #include "G4VPhysicalVolume.hh"
22 Cache& cache,
const G4Transform3D& g4ToGlobal,
25 auto g4Translation = g4PhysVol.GetTranslation();
26 auto g4Rotation = g4PhysVol.GetRotation();
28 G4Transform3D g4Transform =
29 (g4Rotation ==
nullptr)
30 ? G4Transform3D(CLHEP::HepRotation(), g4Translation)
31 : G4Transform3D(*g4Rotation, g4Translation);
33 G4Transform3D newToGlobal = g4ToGlobal * g4Transform;
36 auto g4LogicalVolume = g4PhysVol.GetLogicalVolume();
37 std::size_t nDaughters = g4LogicalVolume->GetNoDaughters();
38 for (std::size_t d = 0; d < nDaughters; ++d) {
39 auto daughter = g4LogicalVolume->GetDaughter(d);
40 construct(cache, newToGlobal, *daughter, option);
49 if (sensitive or passive) {
61 if (
surface->surfaceMaterial() !=
nullptr) {
68 auto detectorElement = std::make_shared<Acts::Geant4DetectorElement>(
69 surface, g4PhysVol, surface->transform({}), 0.1);
70 surface->assignDetectorElement(*detectorElement);