|
||||
File indexing completed on 2025-01-18 09:10:54
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 HomogeneousSurfaceMaterial(const MaterialSlab& full, double splitFactor = 1., 0034 MappingType mappingType = MappingType::Default); 0035 0036 /// Copy Constructor 0037 /// 0038 /// @param hsm is the source material 0039 HomogeneousSurfaceMaterial(const HomogeneousSurfaceMaterial& hsm) = default; 0040 0041 /// Copy Move Constructor 0042 /// 0043 /// @param hsm is the source material 0044 HomogeneousSurfaceMaterial(HomogeneousSurfaceMaterial&& hsm) = default; 0045 0046 /// Destructor 0047 ~HomogeneousSurfaceMaterial() override = default; 0048 0049 /// Assignment operator 0050 /// 0051 /// @param hsm is the source material 0052 HomogeneousSurfaceMaterial& operator=(const HomogeneousSurfaceMaterial& hsm) = 0053 default; 0054 0055 /// Assignment Move operator 0056 /// 0057 /// @param hsm is the source material 0058 HomogeneousSurfaceMaterial& operator=(HomogeneousSurfaceMaterial&& hsm) = 0059 default; 0060 0061 /// Scale operator 0062 /// - it is effectively a thickness scaling 0063 /// 0064 /// @param factor is the scale factor 0065 HomogeneousSurfaceMaterial& scale(double factor) final; 0066 0067 /// @copydoc ISurfaceMaterial::materialSlab(const Vector2&) const 0068 /// 0069 /// @note the input parameter is ignored 0070 const MaterialSlab& materialSlab(const Vector2& lp) const final; 0071 0072 /// @copydoc ISurfaceMaterial::materialSlab(const Vector3&) const 0073 /// 0074 /// @note the input parameter is ignored 0075 const MaterialSlab& materialSlab(const Vector3& gp = Vector3{0., 0., 0076 0.}) const final; 0077 0078 /// The inherited methods - for MaterialSlab access 0079 using ISurfaceMaterial::materialSlab; 0080 0081 /// The inherited methods - for scale access 0082 using ISurfaceMaterial::factor; 0083 0084 /// Output Method for std::ostream 0085 /// 0086 /// @param sl The outoput stream 0087 std::ostream& toStream(std::ostream& sl) const final; 0088 0089 private: 0090 /// The five different MaterialSlab 0091 MaterialSlab m_fullMaterial; 0092 0093 /// @brief Check if two materials are exactly equal. 0094 /// 0095 /// This is a strict equality check, i.e. the materials must have identical 0096 /// properties. 0097 /// 0098 /// @param lhs is the left hand side material 0099 /// @param rhs is the right hand side material 0100 /// 0101 /// @return true if the materials are equal 0102 friend constexpr bool operator==(const HomogeneousSurfaceMaterial& lhs, 0103 const HomogeneousSurfaceMaterial& rhs) { 0104 return lhs.m_fullMaterial == rhs.m_fullMaterial; 0105 } 0106 }; 0107 0108 } // 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 |