![]() |
|
|||
File indexing completed on 2025-07-06 07:51:42
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/Geometry/GeometryContext.hpp" 0012 #include "Acts/Geometry/ILayerArrayCreator.hpp" 0013 #include "Acts/Utilities/AxisDefinitions.hpp" 0014 #include "Acts/Utilities/Logger.hpp" 0015 0016 #include <memory> 0017 #include <utility> 0018 0019 namespace Acts { 0020 0021 class Surface; 0022 class Layer; 0023 0024 /// @class LayerArrayCreator 0025 /// The LayerArrayCreator is a simple Tool that helps to construct 0026 /// LayerArrays from std::vector of Acts::CylinderLayer, Acts::DiscLayer, 0027 /// Acts::PlaneLayer. 0028 /// 0029 /// It fills the gaps automatically with Acts::NavigationLayer to be processed 0030 /// easily in the 0031 /// Navigation of the Extrapolation process. 0032 /// 0033 0034 class LayerArrayCreator : public ILayerArrayCreator { 0035 public: 0036 /// @brief This struct stores the configuration of the tracking geometry 0037 struct Config {}; 0038 0039 /// Constructor 0040 /// 0041 /// @param logger logging instance 0042 explicit LayerArrayCreator(const Config& /*cfg*/, 0043 std::unique_ptr<const Logger> logger = 0044 getDefaultLogger("LayerArrayCreator", 0045 Logging::INFO)) 0046 : m_logger(std::move(logger)) {} 0047 0048 /// Destructor 0049 ~LayerArrayCreator() override = default; 0050 0051 /// LayerArrayCreator interface method 0052 /// 0053 /// @param gctx is the geometry context for witch the array is built 0054 /// @param layersInput are the layers to be moved into an array 0055 /// @param min is the minimum value for binning 0056 /// @param max is the maximum value for binning 0057 /// @param bType is the binning type 0058 /// @param aDir is the axis direction for the layer binning 0059 /// 0060 /// @return unique pointer to a newly created LayerArray 0061 std::unique_ptr<const LayerArray> layerArray( 0062 const GeometryContext& gctx, const LayerVector& layersInput, double min, 0063 double max, BinningType bType = arbitrary, 0064 AxisDirection aDir = AxisDirection::AxisX) const override; 0065 0066 /// set logging instance 0067 void setLogger(std::unique_ptr<const Logger> logger) { 0068 m_logger = std::move(logger); 0069 } 0070 0071 private: 0072 /// Private access method to the logging instance 0073 const Logger& logger() const { return *m_logger; } 0074 0075 /// logging instance 0076 std::unique_ptr<const Logger> m_logger = nullptr; 0077 0078 /// Private helper method for creating a surface for 0079 /// the NavigationLayer, it clones the 0080 /// @param layer object and thus needs the 0081 /// @param gctx geometry context. 0082 /// 0083 /// @param aDir is the axis direction for the binning 0084 /// @param offset is the sift for the navigation layer 0085 std::shared_ptr<Surface> createNavigationSurface(const GeometryContext& gctx, 0086 const Layer& layer, 0087 AxisDirection aDir, 0088 double offset) const; 0089 }; 0090 0091 } // 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 |
![]() ![]() |