File indexing completed on 2026-08-09 08:17:47
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Material/ISurfaceMaterial.hpp"
0013 #include "Acts/Material/MaterialSlab.hpp"
0014 #include "Acts/Utilities/BinUtility.hpp"
0015 #include "Acts/Utilities/ProtoAxis.hpp"
0016
0017 #include <iosfwd>
0018 #include <vector>
0019
0020 namespace Acts {
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 template <typename BinningType>
0034 class ProtoSurfaceMaterialT : public ISurfaceMaterial {
0035 public:
0036
0037 ProtoSurfaceMaterialT() = default;
0038
0039
0040
0041
0042 explicit ProtoSurfaceMaterialT(const BinningType& binning,
0043 MappingType mappingType = MappingType::Default)
0044 : ISurfaceMaterial(1., mappingType), m_binning(binning) {}
0045
0046
0047
0048
0049 ProtoSurfaceMaterialT(const ProtoSurfaceMaterialT<BinningType>& smproxy) =
0050 default;
0051
0052
0053
0054
0055 ProtoSurfaceMaterialT(ProtoSurfaceMaterialT<BinningType>&& smproxy) noexcept =
0056 default;
0057
0058
0059 ~ProtoSurfaceMaterialT() override = default;
0060
0061
0062
0063
0064
0065 ProtoSurfaceMaterialT<BinningType>& operator=(
0066 const ProtoSurfaceMaterialT<BinningType>& smproxy) = default;
0067
0068
0069
0070
0071
0072 ProtoSurfaceMaterialT<BinningType>& operator=(
0073 ProtoSurfaceMaterialT<BinningType>&& smproxy) noexcept = default;
0074
0075
0076
0077
0078 ProtoSurfaceMaterialT<BinningType>& scale(double ) final {
0079 return (*this);
0080 }
0081
0082
0083
0084 const BinningType& binning() const { return (m_binning); }
0085
0086
0087
0088
0089
0090 const MaterialSlab& materialSlab(const Vector2& ) const final {
0091 return (m_materialSlab);
0092 }
0093
0094
0095 std::vector<AxisDirection> localAxisDirections() const final { return {}; }
0096
0097
0098
0099
0100
0101
0102
0103 [[deprecated(
0104 "Use materialSlab(const Vector2& lp) with a prior "
0105 "Surface::globalToLocal() call instead")]] const MaterialSlab&
0106 materialSlab(const Vector3& ) const final {
0107 return (m_materialSlab);
0108 }
0109
0110 using ISurfaceMaterial::materialSlab;
0111
0112
0113
0114
0115
0116 std::ostream& toStream(std::ostream& sl) const final {
0117 sl << "Acts::ProtoSurfaceMaterial : " << std::endl;
0118 sl << m_binning << std::endl;
0119 return sl;
0120 }
0121
0122 private:
0123
0124 BinningType m_binning;
0125
0126
0127 MaterialSlab m_materialSlab = MaterialSlab::Nothing();
0128 };
0129
0130
0131
0132 using ProtoSurfaceMaterial = ProtoSurfaceMaterialT<Acts::BinUtility>;
0133
0134
0135
0136
0137 using ProtoGridSurfaceMaterial =
0138 ProtoSurfaceMaterialT<std::vector<DirectedProtoAxis>>;
0139
0140
0141
0142 }