|
||||
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 #include "Acts/Utilities/BinUtility.hpp" 0015 0016 #include <iosfwd> 0017 0018 namespace Acts { 0019 0020 /// @class BinnedSurfaceMaterial 0021 /// 0022 /// It extends the @c 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 class BinnedSurfaceMaterial : public ISurfaceMaterial { 0027 public: 0028 /// Default Constructor - deleted 0029 BinnedSurfaceMaterial() = delete; 0030 0031 /// Explicit constructor with only full MaterialSlab, 0032 /// for one-dimensional binning. 0033 /// 0034 /// The split factors: 0035 /// - 1. : oppositePre 0036 /// - 0. : alongPre 0037 /// ===> 1 Dimensional array 0038 /// 0039 /// @param binUtility defines the binning structure on the surface (copied) 0040 /// @param fullProperties is the vector of properties as recorded (moved) 0041 /// @param splitFactor is the pre/post splitting directive 0042 /// @param mappingType is the type of surface mapping associated to the surface 0043 BinnedSurfaceMaterial(const BinUtility& binUtility, 0044 MaterialSlabVector fullProperties, 0045 double splitFactor = 0., 0046 MappingType mappingType = MappingType::Default); 0047 0048 /// Explicit constructor with only full MaterialSlab, 0049 /// for two-dimensional binning. 0050 /// 0051 /// The split factors: 0052 /// - 1. : oppositePre 0053 /// - 0. : alongPre 0054 /// ===> 1 Dimensional array 0055 /// 0056 /// @param binUtility defines the binning structure on the surface (copied) 0057 /// @param fullProperties is the vector of properties as recorded (moved) 0058 /// @param splitFactor is the pre/post splitting directive 0059 /// @param mappingType is the type of surface mapping associated to the surface 0060 BinnedSurfaceMaterial(const BinUtility& binUtility, 0061 MaterialSlabMatrix fullProperties, 0062 double splitFactor = 0., 0063 MappingType mappingType = MappingType::Default); 0064 0065 /// Copy Move Constructor 0066 /// 0067 /// @param bsm is the source object to be copied 0068 BinnedSurfaceMaterial(BinnedSurfaceMaterial&& bsm) = default; 0069 0070 /// Copy Constructor 0071 /// 0072 /// @param bsm is the source object to be copied 0073 BinnedSurfaceMaterial(const BinnedSurfaceMaterial& bsm) = default; 0074 0075 /// Assignment Move operator 0076 BinnedSurfaceMaterial& operator=(BinnedSurfaceMaterial&& bsm) = default; 0077 0078 /// Assignment operator 0079 BinnedSurfaceMaterial& operator=(const BinnedSurfaceMaterial& bsm) = default; 0080 0081 /// Destructor 0082 ~BinnedSurfaceMaterial() override = default; 0083 0084 /// Scale operation 0085 /// 0086 /// @param factor is the scale factor for the full material 0087 BinnedSurfaceMaterial& scale(double factor) final; 0088 0089 /// Return the BinUtility 0090 const BinUtility& binUtility() const; 0091 0092 /// @brief Retrieve the entire material slab matrix 0093 const MaterialSlabMatrix& fullMaterial() const; 0094 0095 /// @copydoc ISurfaceMaterial::materialSlab(const Vector2&) const 0096 const MaterialSlab& materialSlab(const Vector2& lp) const final; 0097 0098 /// @copydoc ISurfaceMaterial::materialSlab(const Vector3&) const 0099 const MaterialSlab& materialSlab(const Vector3& gp) const final; 0100 0101 /// Output Method for std::ostream, to be overloaded by child classes 0102 std::ostream& toStream(std::ostream& sl) const final; 0103 0104 private: 0105 /// The helper for the bin finding 0106 BinUtility m_binUtility; 0107 0108 /// The five different MaterialSlab 0109 MaterialSlabMatrix m_fullMaterial; 0110 }; 0111 0112 inline const BinUtility& BinnedSurfaceMaterial::binUtility() const { 0113 return (m_binUtility); 0114 } 0115 0116 inline const MaterialSlabMatrix& BinnedSurfaceMaterial::fullMaterial() const { 0117 return m_fullMaterial; 0118 } 0119 0120 } // 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 |