|
|
|||
File indexing completed on 2026-06-21 07:45:58
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 #include <vector> 0017 0018 namespace Acts { 0019 0020 /// @ingroup material 0021 /// 0022 /// Sentinel surface material used by `Portal::merge` in its "keep going" mode. 0023 /// 0024 /// When two portal surfaces that both carry material (or one of them does) are 0025 /// merged, the original material cannot be transferred onto the (larger) merged 0026 /// surface. Instead of aborting the construction, the merge can be configured 0027 /// to discard the input material and tag the merged surface with this marker. 0028 /// 0029 /// The marker carries no physical material -- it always returns 0030 /// @ref MaterialSlab::Nothing() -- but its presence makes the lossy merge 0031 /// discoverable downstream (e.g. when inspecting or writing out the geometry). 0032 class MergedMaterialMarker final : public ISurfaceMaterial { 0033 public: 0034 /// Default constructor 0035 MergedMaterialMarker() = default; 0036 0037 /// Destructor 0038 ~MergedMaterialMarker() override = default; 0039 0040 /// Scale operator -- no-op, the marker carries no material 0041 /// @param factor is the scale factor (ignored) 0042 /// @return Reference to this marker 0043 MergedMaterialMarker& scale(double factor) override; 0044 0045 /// @copydoc ISurfaceMaterial::materialSlab(const Vector2&) const 0046 /// 0047 /// @note the input parameter is ignored, always returns 0048 /// @ref MaterialSlab::Nothing() 0049 const MaterialSlab& materialSlab(const Vector2& lp = Vector2{ 0050 0., 0.}) const override; 0051 0052 /// @copydoc ISurfaceMaterial::localAxisDirections() const 0053 std::vector<AxisDirection> localAxisDirections() const override; 0054 0055 /// @copydoc ISurfaceMaterial::materialSlab(const Vector3&) const 0056 /// 0057 /// @note the input parameter is ignored, always returns 0058 /// @ref MaterialSlab::Nothing() 0059 [[deprecated( 0060 "Use materialSlab(const Vector2& lp) with a prior " 0061 "Surface::globalToLocal() call instead")]] const MaterialSlab& 0062 materialSlab(const Vector3& gp) const override; 0063 0064 // Inherit additional materialSlab overloads from base class 0065 using ISurfaceMaterial::materialSlab; 0066 0067 // Inherit the scale-access helper from the base class 0068 using ISurfaceMaterial::factor; 0069 0070 /// Output Method for std::ostream 0071 /// @param sl The output stream 0072 /// @return Reference to the output stream for chaining 0073 std::ostream& toStream(std::ostream& sl) const override; 0074 0075 private: 0076 /// The marker carries no material 0077 MaterialSlab m_slab = MaterialSlab::Nothing(); 0078 }; 0079 0080 } // 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 |
|