File indexing completed on 2025-09-18 08:33:15
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Plugins/Geant4/Geant4PhysicalVolumeSelectors.hpp"
0013 #include "Acts/Surfaces/Surface.hpp"
0014
0015 #include <cstddef>
0016 #include <memory>
0017 #include <tuple>
0018 #include <vector>
0019
0020 namespace HepGeom {
0021 class Transform3D;
0022 }
0023
0024 class G4VPhysicalVolume;
0025 using G4Transform3D = HepGeom::Transform3D;
0026
0027 namespace Acts {
0028
0029 class Geant4DetectorElement;
0030 class IGeant4PhysicalVolumeSelector;
0031 class Surface;
0032
0033
0034
0035
0036 class Geant4DetectorSurfaceFactory {
0037 public:
0038
0039
0040 struct Config {};
0041
0042
0043 using Geant4SensitiveSurface =
0044 std::tuple<std::shared_ptr<Geant4DetectorElement>,
0045 std::shared_ptr<Surface>>;
0046
0047
0048 using Geant4PassiveSurface = std::shared_ptr<Surface>;
0049
0050
0051 struct Cache {
0052
0053 std::vector<Geant4SensitiveSurface> sensitiveSurfaces;
0054
0055 std::vector<Geant4PassiveSurface> passiveSurfaces;
0056
0057 std::size_t matchedG4Volumes = 0;
0058
0059 std::size_t convertedSurfaces = 0;
0060
0061 std::size_t convertedMaterials = 0;
0062 };
0063
0064
0065 struct Options {
0066
0067 double scaleConversion = 1.;
0068
0069 bool convertMaterial = false;
0070
0071 double convertedMaterialThickness = -1;
0072
0073 std::shared_ptr<IGeant4PhysicalVolumeSelector> sensitiveSurfaceSelector =
0074 nullptr;
0075
0076 std::shared_ptr<IGeant4PhysicalVolumeSelector> passiveSurfaceSelector =
0077 nullptr;
0078 };
0079
0080
0081 Geant4DetectorSurfaceFactory() = default;
0082
0083
0084
0085
0086
0087
0088
0089
0090 void construct(Cache& cache, const G4Transform3D& g4ToGlobal,
0091 const G4VPhysicalVolume& g4PhysVol, const Options& option);
0092 };
0093
0094 }