|
||||
File indexing completed on 2025-01-18 09:10:52
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 LayerArrayCreator(const Config& /*cfg*/, 0043 std::unique_ptr<const Logger> logger = 0044 getDefaultLogger("LayerArrayCreator", Logging::INFO)) 0045 : m_logger(std::move(logger)) {} 0046 0047 /// Destructor 0048 ~LayerArrayCreator() override = default; 0049 0050 /// LayerArrayCreator interface method 0051 /// 0052 /// @param gctx is the geometry context for witch the array is built 0053 /// @param layersInput are the layers to be moved into an array 0054 /// @param min is the minimum value for binning 0055 /// @param max is the maximum value for binning 0056 /// @param bType is the binning type 0057 /// @param aDir is the axis direction for the layer binning 0058 /// 0059 /// @return unique pointer to a newly created LayerArray 0060 std::unique_ptr<const LayerArray> layerArray( 0061 const GeometryContext& gctx, const LayerVector& layersInput, double min, 0062 double max, BinningType bType = arbitrary, 0063 AxisDirection aDir = AxisDirection::AxisX) const override; 0064 0065 /// set logging instance 0066 void setLogger(std::unique_ptr<const Logger> logger) { 0067 m_logger = std::move(logger); 0068 } 0069 0070 private: 0071 /// Private access method to the logging instance 0072 const Logger& logger() const { return *m_logger; } 0073 0074 /// logging instance 0075 std::unique_ptr<const Logger> m_logger = nullptr; 0076 0077 /// Private helper method for creating a surface for 0078 /// the NavigationLayer, it clones the 0079 /// @param layer object and thus needs the 0080 /// @param gctx geometry context. 0081 /// 0082 /// @param aDir is the axis direction for the binning 0083 /// @param offset is the sift for the navigation layer 0084 std::shared_ptr<Surface> createNavigationSurface(const GeometryContext& gctx, 0085 const Layer& layer, 0086 AxisDirection aDir, 0087 double offset) const; 0088 }; 0089 0090 } // 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 |