![]() |
|
|||
File indexing completed on 2025-10-19 07:57:13
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 /// @class HomogeneousSurfaceMaterial 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) const final; 0075 0076 /// @copydoc ISurfaceMaterial::materialSlab(const Vector3&) const 0077 /// 0078 /// @note the input parameter is ignored 0079 const MaterialSlab& materialSlab(const Vector3& gp = Vector3{0., 0., 0080 0.}) const final; 0081 0082 // Inherit additional materialSlab overloads from base class 0083 using ISurfaceMaterial::materialSlab; 0084 0085 /// The inherited methods - for scale access 0086 /// 0087 /// @param pDir Direction through the surface 0088 /// @param mStage Material update directive (onapproach, full, onleave) 0089 /// @return The scaling factor for the material 0090 using ISurfaceMaterial::factor; 0091 0092 /// Output Method for std::ostream 0093 /// 0094 /// @param sl The outoput stream 0095 /// @return Reference to the output stream for chaining 0096 std::ostream& toStream(std::ostream& sl) const final; 0097 0098 private: 0099 /// The five different MaterialSlab 0100 MaterialSlab m_fullMaterial = MaterialSlab::Nothing(); 0101 0102 /// @brief Check if two materials are exactly equal. 0103 /// 0104 /// This is a strict equality check, i.e. the materials must have identical 0105 /// properties. 0106 /// 0107 /// @param lhs is the left hand side material 0108 /// @param rhs is the right hand side material 0109 /// 0110 /// @return true if the materials are equal 0111 friend constexpr bool operator==(const HomogeneousSurfaceMaterial& lhs, 0112 const HomogeneousSurfaceMaterial& rhs) { 0113 return lhs.m_fullMaterial == rhs.m_fullMaterial; 0114 } 0115 }; 0116 0117 } // 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 |
![]() ![]() |