|
||||
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/IVolumeMaterial.hpp" 0013 #include "Acts/Material/Material.hpp" 0014 0015 #include <iosfwd> 0016 0017 namespace Acts { 0018 0019 /// @class HomogeneousVolumeMaterial 0020 /// 0021 /// It extends the IVolumeMaterial base class to describe a simple 0022 /// homogeneous material in a volume 0023 class HomogeneousVolumeMaterial : public IVolumeMaterial { 0024 public: 0025 /// Explicit constructor 0026 /// 0027 /// @param material is the material held by this 0028 HomogeneousVolumeMaterial(const Material& material); 0029 0030 /// Copy Constructor 0031 /// 0032 /// @param hvm is the source material 0033 HomogeneousVolumeMaterial(const HomogeneousVolumeMaterial& hvm) = default; 0034 0035 /// Copy Move Constructor 0036 /// 0037 /// @param hvm is the source material 0038 HomogeneousVolumeMaterial(HomogeneousVolumeMaterial&& hvm) = default; 0039 0040 /// Destructor 0041 ~HomogeneousVolumeMaterial() override = default; 0042 0043 /// Assignment operator 0044 /// 0045 /// @param hvm is the source material 0046 HomogeneousVolumeMaterial& operator=(const HomogeneousVolumeMaterial& hvm) = 0047 default; 0048 0049 /// Access to actual material 0050 /// 0051 /// @param position is the request position for the material call 0052 /// @note @p position is ignored 0053 /// @todo interface to change including 'cell' 0054 const Material material(const Vector3& position) const final; 0055 0056 /// Output Method for std::ostream 0057 /// 0058 /// @param sl The outoput stream 0059 std::ostream& toStream(std::ostream& sl) const final; 0060 0061 private: 0062 Material m_material; 0063 0064 /// @brief Check if two materials are exactly equal. 0065 /// 0066 /// This is a strict equality check, i.e. the materials must have identical 0067 /// properties. 0068 /// 0069 /// @param lhs is the left hand side material 0070 /// @param rhs is the right hand side material 0071 /// 0072 /// @return true if the materials are equal 0073 friend constexpr bool operator==(const HomogeneousVolumeMaterial& lhs, 0074 const HomogeneousVolumeMaterial& rhs) { 0075 return lhs.m_material == rhs.m_material; 0076 } 0077 }; 0078 0079 } // 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 |