|
|
|||
File indexing completed on 2026-06-17 07:46:04
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 #include "Acts/Utilities/BinUtility.hpp" 0015 0016 #include <iosfwd> 0017 0018 namespace Acts { 0019 0020 /// @ingroup material 0021 /// 0022 /// It extends the @ref ISurfaceMaterial base class and is an array pf 0023 /// MaterialSlab. This is not memory optimised as every bin 0024 /// holds one material property object. 0025 /// 0026 /// The split factors: 0027 /// - 1. : oppositePre 0028 /// - 0. : alongPre 0029 class BinnedSurfaceMaterial : public ISurfaceMaterial { 0030 public: 0031 /// Explicit constructor with only full MaterialSlab, 0032 /// for one-dimensional binning. 0033 /// 0034 /// @param binUtility defines the binning structure on the surface (copied) 0035 /// @param materialVector is the vector of material slabs as recorded (moved) 0036 /// @param splitFactor is the pre/post splitting directive 0037 /// @param mappingType is the type of surface mapping associated to the surface 0038 BinnedSurfaceMaterial(const BinUtility& binUtility, 0039 MaterialSlabVector materialVector, 0040 double splitFactor = 0., 0041 MappingType mappingType = MappingType::Default); 0042 0043 /// Explicit constructor with only full MaterialSlab, 0044 /// for two-dimensional binning. 0045 /// 0046 /// @param binUtility defines the binning structure on the surface (copied) 0047 /// @param materialMatrix is the matrix of material slabs as recorded (moved) 0048 /// @param splitFactor is the pre/post splitting directive 0049 /// @param mappingType is the type of surface mapping associated to the surface 0050 BinnedSurfaceMaterial(const BinUtility& binUtility, 0051 MaterialSlabMatrix materialMatrix, 0052 double splitFactor = 0., 0053 MappingType mappingType = MappingType::Default); 0054 0055 /// Scale operation 0056 /// 0057 /// @param factor is the scale factor for the full material 0058 /// @return Reference to this object after scaling 0059 BinnedSurfaceMaterial& scale(double factor) final; 0060 0061 /// Return the BinUtility 0062 /// @return Reference to the bin utility used for material binning 0063 const BinUtility& binUtility() const { return m_binUtility; } 0064 0065 /// @brief Retrieve the entire material slab matrix 0066 /// @return Reference to the complete matrix of material slabs 0067 const MaterialSlabMatrix& fullMaterial() const { return m_fullMaterial; } 0068 0069 /// @copydoc ISurfaceMaterial::materialSlab(const Vector2&) const 0070 const MaterialSlab& materialSlab(const Vector2& lp) const final; 0071 0072 /// @copydoc ISurfaceMaterial::materialSlab(const Vector3&) const 0073 [[deprecated( 0074 "Use materialSlab(const Vector2& lp) with a prior " 0075 "Surface::globalToLocal() call instead")]] const MaterialSlab& 0076 materialSlab(const Vector3& gp) const final; 0077 0078 using ISurfaceMaterial::materialSlab; 0079 0080 /// @copydoc ISurfaceMaterial::localAxisDirections() const 0081 std::vector<AxisDirection> localAxisDirections() const final; 0082 0083 /// Output Method for std::ostream, to be overloaded by child classes 0084 /// @param sl The output stream to write to 0085 /// @return Reference to the output stream after writing 0086 std::ostream& toStream(std::ostream& sl) const final; 0087 0088 private: 0089 /// The helper for the bin finding 0090 BinUtility m_binUtility; 0091 0092 /// The five different MaterialSlab 0093 MaterialSlabMatrix m_fullMaterial; 0094 }; 0095 0096 } // 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 |
|