File indexing completed on 2025-10-26 08:10:56
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Geometry/Extent.hpp"
0012 #include "Acts/Geometry/GeometryContext.hpp"
0013 #include "Acts/Surfaces/Surface.hpp"
0014 #include "Acts/Utilities/BinningData.hpp"
0015 #include "Acts/Utilities/BinningType.hpp"
0016 #include "Acts/Utilities/Logger.hpp"
0017
0018 #include <functional>
0019 #include <map>
0020 #include <memory>
0021 #include <optional>
0022 #include <string>
0023 #include <tuple>
0024 #include <vector>
0025
0026 namespace Acts {
0027
0028 struct ProtoVolume;
0029
0030 namespace Experimental {
0031
0032 class DetectorVolume;
0033 class Portal;
0034
0035
0036 using DetectorVolumes = std::vector<std::shared_ptr<DetectorVolume>>;
0037
0038 using ProtoContainer = std::map<unsigned int, std::shared_ptr<Portal>>;
0039
0040 using DetectorBlock = std::tuple<DetectorVolumes, ProtoContainer>;
0041
0042
0043 using DetectorBlockBuilder = std::function<void(
0044 DetectorBlock&, const GeometryContext&, Acts::Logging::Level)>;
0045 }
0046
0047
0048
0049 struct ProtoVolume {
0050
0051 struct InternalStructure {
0052
0053 Surface::SurfaceType layerType = Surface::SurfaceType::Other;
0054
0055 std::vector<BinningData> surfaceBinning = {};
0056 };
0057
0058
0059 struct ContainerStructure {
0060
0061 std::vector<ProtoVolume> constituentVolumes = {};
0062
0063 std::vector<BinningData> constituentBinning = {};
0064
0065 bool layerContainer = false;
0066 };
0067
0068
0069 std::string name = "";
0070
0071 Extent extent;
0072
0073
0074 std::optional<InternalStructure> internal = std::nullopt;
0075
0076
0077 std::optional<ContainerStructure> container = std::nullopt;
0078
0079
0080 Experimental::DetectorBlockBuilder blockBuilder;
0081
0082
0083
0084
0085 bool operator==(const ProtoVolume& ptVolume) const;
0086
0087
0088
0089
0090
0091
0092 void harmonize(bool legacy = true);
0093
0094
0095
0096
0097
0098 void extendUp(ProtoVolume& ptVolume);
0099
0100
0101
0102 void propagateMinDown(AxisDirection aDir);
0103
0104
0105
0106 void propagateMaxDown(AxisDirection aDir);
0107
0108
0109
0110
0111
0112 void constrainDown(const ProtoVolume& ptVolume);
0113
0114
0115
0116 std::string toString(const std::string& indent = "") const;
0117 };
0118
0119
0120
0121 struct ProtoDetector {
0122 std::string name = "";
0123 ProtoVolume worldVolume;
0124
0125
0126
0127
0128
0129
0130
0131 void harmonize(bool legacy = true) {
0132 worldVolume.extendUp(worldVolume);
0133 worldVolume.constrainDown(worldVolume);
0134 worldVolume.harmonize(legacy);
0135 }
0136
0137
0138
0139 std::string toString(const std::string& indent = "") const;
0140 };
0141
0142 }