|
|
|||
File indexing completed on 2026-09-17 08:20:51
0001 // This file is part of the ACTS project. 0002 // 0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/. 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 <iosfwd> 0016 0017 namespace Acts { 0018 0019 /// @ingroup material 0020 /// 0021 /// It extends the ISurfaceMaterial virtual base class to describe 0022 /// a simple homogeneous material on a surface 0023 class HomogeneousSurfaceMaterial : public ISurfaceMaterial { 0024 public: 0025 /// Default Constructor - defaulted 0026 HomogeneousSurfaceMaterial() = default; 0027 0028 /// Explicit constructor 0029 /// 0030 /// @param full are the full material properties 0031 /// @param splitFactor is the split for pre/post update 0032 /// @param mappingType is the type of surface mapping associated to the surface 0033 explicit HomogeneousSurfaceMaterial( 0034 const MaterialSlab& full, double splitFactor = 1., 0035 MappingType mappingType = MappingType::Default); 0036 0037 /// Copy Constructor 0038 /// 0039 /// @param hsm is the source material 0040 HomogeneousSurfaceMaterial(const HomogeneousSurfaceMaterial& hsm) = default; 0041 0042 /// Copy Move Constructor 0043 /// 0044 /// @param hsm is the source material 0045 HomogeneousSurfaceMaterial(HomogeneousSurfaceMaterial&& hsm) = default; 0046 0047 /// Destructor 0048 ~HomogeneousSurfaceMaterial() override = default; 0049 0050 /// Assignment operator 0051 /// 0052 /// @param hsm is the source material 0053 /// @return Reference to this material after assignment 0054 HomogeneousSurfaceMaterial& operator=(const HomogeneousSurfaceMaterial& hsm) = 0055 default; 0056 0057 /// Assignment Move operator 0058 /// 0059 /// @param hsm is the source material 0060 /// @return Reference to this material after move assignment 0061 HomogeneousSurfaceMaterial& operator=(HomogeneousSurfaceMaterial&& hsm) = 0062 default; 0063 0064 /// Scale operator 0065 /// - it is effectively a thickness scaling 0066 /// 0067 /// @param factor is the scale factor 0068 /// @return Reference to this scaled material 0069 HomogeneousSurfaceMaterial& scale(double factor) final; 0070 0071 /// @copydoc ISurfaceMaterial::materialSlab(const Vector2&) const 0072 /// 0073 /// @note the input parameter is ignored 0074 const MaterialSlab& materialSlab(const Vector2& lp = Vector2{0., 0075 0.}) const final; 0076 0077 /// @copydoc ISurfaceMaterial::localAxisDirections() const 0078 std::vector<AxisDirection> localAxisDirections() const final; 0079 0080 /// @copydoc ISurfaceMaterial::materialSlab(const Vector3&) const 0081 /// 0082 /// @note the input parameter is ignored 0083 /// @deprecated Use materialSlab(const Vector2&) with a prior 0084 /// Surface::globalToLocal() call instead. 0085 [[deprecated( 0086 "Use materialSlab(const Vector2& lp) with a prior " 0087 "Surface::globalToLocal() call instead")]] const MaterialSlab& 0088 materialSlab(const Vector3& gp) const final; 0089 0090 // Inherit additional materialSlab overloads from base class 0091 using ISurfaceMaterial::materialSlab; 0092 0093 /// The inherited methods - for scale access 0094 /// 0095 /// @param pDir Direction through the surface 0096 /// @param mode Material update directive 0097 /// @return The scaling factor for the material 0098 using ISurfaceMaterial::factor; 0099 0100 /// Output Method for std::ostream 0101 /// 0102 /// @param sl The outoput stream 0103 /// @return Reference to the output stream for chaining 0104 std::ostream& toStream(std::ostream& sl) const final; 0105 0106 private: 0107 /// The five different MaterialSlab 0108 MaterialSlab m_fullMaterial = MaterialSlab::Nothing(); 0109 0110 /// @brief Check if two materials are exactly equal. 0111 /// 0112 /// This is a strict equality check, i.e. the materials must have identical 0113 /// properties. 0114 /// 0115 /// @param lhs is the left hand side material 0116 /// @param rhs is the right hand side material 0117 /// 0118 /// @return true if the materials are equal 0119 friend constexpr bool operator==(const HomogeneousSurfaceMaterial& lhs, 0120 const HomogeneousSurfaceMaterial& rhs) { 0121 return lhs.m_fullMaterial == rhs.m_fullMaterial; 0122 } 0123 }; 0124 0125 } // namespace Acts
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|