File indexing completed on 2025-01-19 09:23:23
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
0015 #include <cstddef>
0016 #include <iosfwd>
0017
0018 namespace Acts {
0019
0020
0021
0022
0023
0024 class HomogeneousSurfaceMaterial : public ISurfaceMaterial {
0025 public:
0026
0027 HomogeneousSurfaceMaterial() = default;
0028
0029
0030
0031
0032
0033
0034 HomogeneousSurfaceMaterial(const MaterialSlab& full, double splitFactor = 1.,
0035 MappingType mappingType = MappingType::Default);
0036
0037
0038
0039
0040 HomogeneousSurfaceMaterial(const HomogeneousSurfaceMaterial& hsm) = default;
0041
0042
0043
0044
0045 HomogeneousSurfaceMaterial(HomogeneousSurfaceMaterial&& hsm) = default;
0046
0047
0048 ~HomogeneousSurfaceMaterial() override = default;
0049
0050
0051
0052
0053 HomogeneousSurfaceMaterial& operator=(const HomogeneousSurfaceMaterial& hsm) =
0054 default;
0055
0056
0057
0058
0059 HomogeneousSurfaceMaterial& operator=(HomogeneousSurfaceMaterial&& hsm) =
0060 default;
0061
0062
0063
0064
0065
0066 HomogeneousSurfaceMaterial& operator*=(double scale) final;
0067
0068
0069
0070
0071 bool operator==(const HomogeneousSurfaceMaterial& hsm) const;
0072
0073
0074
0075
0076 const MaterialSlab& materialSlab(const Vector2& lp) const final;
0077
0078
0079
0080
0081 const MaterialSlab& materialSlab(const Vector3& gp) const final;
0082
0083
0084 using ISurfaceMaterial::materialSlab;
0085
0086
0087 using ISurfaceMaterial::factor;
0088
0089
0090
0091
0092 std::ostream& toStream(std::ostream& sl) const final;
0093
0094 private:
0095
0096 MaterialSlab m_fullMaterial = MaterialSlab();
0097 };
0098
0099 inline const MaterialSlab& HomogeneousSurfaceMaterial::materialSlab(
0100 const Vector2& ) const {
0101 return (m_fullMaterial);
0102 }
0103
0104 inline const MaterialSlab& HomogeneousSurfaceMaterial::materialSlab(
0105 const Vector3& ) const {
0106 return (m_fullMaterial);
0107 }
0108
0109 inline bool HomogeneousSurfaceMaterial::operator==(
0110 const HomogeneousSurfaceMaterial& hsm) const {
0111 return (m_fullMaterial == hsm.m_fullMaterial);
0112 }
0113
0114 }