Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 09:42:08

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/NavigationPolicyFactory.hpp"
0012 #include "Acts/Geometry/TrackingVolume.hpp"
0013 #include "Acts/Surfaces/Surface.hpp"
0014 #include "Acts/Utilities/Logger.hpp"
0015 #include "Acts/Utilities/ProtoAxis.hpp"
0016 
0017 namespace Acts::Experimental {
0018 
0019 /// @class MultiWireVolumeBuilder
0020 /// @brief A class to build multiwire tracking volumes (e.g wire chambers)
0021 class MultiWireVolumeBuilder {
0022  public:
0023   /// The axis configuration for the binning
0024   using Binning = std::tuple<DirectedProtoAxis, std::size_t>;
0025   /// Configuration Struct
0026   struct Config {
0027     /// The name of the tracking volume
0028     std::string name = "undefined";
0029 
0030     /// The surfaces to be wrapped from the tracking volume
0031     std::vector<std::shared_ptr<Surface>> mlSurfaces = {};
0032 
0033     /// The transform of the tracking volume
0034     Transform3 transform = Transform3::Identity();
0035 
0036     /// The bounds of the tracking volume
0037     std::shared_ptr<Acts::VolumeBounds> bounds = nullptr;
0038 
0039     /// Binning configuration for multi-wire volume
0040     std::vector<Binning> binning = {};
0041   };
0042   /// Constructor
0043   /// @param config The configuration struct
0044   /// @param logger The logger instance for screen output
0045   explicit MultiWireVolumeBuilder(
0046       const Config& config,
0047       std::unique_ptr<const Acts::Logger> logger = Acts::getDefaultLogger(
0048           "MultiWireVolumeBuilder", Acts::Logging::INFO));
0049 
0050   /// @brief Constructs the tracking volume with the wrapped surfaces
0051   /// @return a unique ptr of the tracking volume
0052   std::unique_ptr<Acts::TrackingVolume> buildVolume() const;
0053 
0054   /// @brief Creates a multilayer navigation policy factory that can be used for the trackingVolume
0055   /// or attached to a blueprint node
0056   /// @return Unique pointer to the created navigation policy factory
0057   std::unique_ptr<NavigationPolicyFactory> createNavigationPolicyFactory()
0058       const;
0059 
0060  private:
0061   Config m_config;
0062 
0063   const Acts::Logger& logger() const { return *m_logger; }
0064 
0065   std::unique_ptr<const Acts::Logger> m_logger;
0066 };
0067 
0068 }  // namespace Acts::Experimental