![]() |
|
|||
File indexing completed on 2025-07-15 08:11:53
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 HomogeneousSurfaceMaterial& operator=(const HomogeneousSurfaceMaterial& hsm) = 0054 default; 0055 0056 /// Assignment Move operator 0057 /// 0058 /// @param hsm is the source material 0059 HomogeneousSurfaceMaterial& operator=(HomogeneousSurfaceMaterial&& hsm) = 0060 default; 0061 0062 /// Scale operator 0063 /// - it is effectively a thickness scaling 0064 /// 0065 /// @param factor is the scale factor 0066 HomogeneousSurfaceMaterial& scale(double factor) final; 0067 0068 /// @copydoc ISurfaceMaterial::materialSlab(const Vector2&) const 0069 /// 0070 /// @note the input parameter is ignored 0071 const MaterialSlab& materialSlab(const Vector2& lp) const final; 0072 0073 /// @copydoc ISurfaceMaterial::materialSlab(const Vector3&) const 0074 /// 0075 /// @note the input parameter is ignored 0076 const MaterialSlab& materialSlab(const Vector3& gp = Vector3{0., 0., 0077 0.}) const final; 0078 0079 /// The inherited methods - for MaterialSlab access 0080 using ISurfaceMaterial::materialSlab; 0081 0082 /// The inherited methods - for scale access 0083 using ISurfaceMaterial::factor; 0084 0085 /// Output Method for std::ostream 0086 /// 0087 /// @param sl The outoput stream 0088 std::ostream& toStream(std::ostream& sl) const final; 0089 0090 private: 0091 /// The five different MaterialSlab 0092 MaterialSlab m_fullMaterial = MaterialSlab::Nothing(); 0093 0094 /// @brief Check if two materials are exactly equal. 0095 /// 0096 /// This is a strict equality check, i.e. the materials must have identical 0097 /// properties. 0098 /// 0099 /// @param lhs is the left hand side material 0100 /// @param rhs is the right hand side material 0101 /// 0102 /// @return true if the materials are equal 0103 friend constexpr bool operator==(const HomogeneousSurfaceMaterial& lhs, 0104 const HomogeneousSurfaceMaterial& rhs) { 0105 return lhs.m_fullMaterial == rhs.m_fullMaterial; 0106 } 0107 }; 0108 0109 } // 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 |
![]() ![]() |