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