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