Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-06-21 08:08:33

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/TrackingVolume.hpp"
0012 #include "Acts/Surfaces/Surface.hpp"
0013 #include "Acts/Utilities/Logger.hpp"
0014 #include "Acts/Utilities/ProtoAxis.hpp"
0015 
0016 namespace Acts::Experimental {
0017 
0018 /// @class MultiWireVolumeBuilder
0019 /// @brief A class to build multiwire tracking volumes (e.g wire chambers)
0020 class MultiWireVolumeBuilder {
0021  public:
0022   /// Configuration Struct
0023   struct Config {
0024     /// The name of the tracking volume
0025     std::string name = "undefined";
0026 
0027     // The surfaces to be wrapped from the tracking volume
0028     std::vector<std::shared_ptr<Surface>> mlSurfaces = {};
0029 
0030     /// The transform of the tracking volume
0031     Transform3 transform = Transform3::Identity();
0032 
0033     /// The bounds of the tracking volume
0034     std::shared_ptr<Acts::VolumeBounds> bounds = nullptr;
0035 
0036     /// The binning of the tracking volume
0037     /// The protoAxis and the expansion of the binning for the neighbors
0038     std::vector<std::tuple<DirectedProtoAxis, std::size_t>> binning = {};
0039   };
0040   /// Constructor
0041   /// @param config The configuration struct
0042   /// @param logger The logger instance for screen output
0043   explicit MultiWireVolumeBuilder(
0044       const Config& config,
0045       std::unique_ptr<const Acts::Logger> logger = Acts::getDefaultLogger(
0046           "MultiWireVolumeBuilder", Acts::Logging::VERBOSE));
0047 
0048   /// @brief Constructs the tracking volume with the wrapped surfaces
0049   /// @return a unique ptr of the tracking volume
0050   std::unique_ptr<Acts::TrackingVolume> buildVolume(
0051       const Acts::GeometryContext& gctx) const;
0052 
0053  private:
0054   Config m_config;
0055 
0056   const Acts::Logger& logger() const { return *m_logger; }
0057 
0058   std::unique_ptr<const Acts::Logger> m_logger;
0059 };
0060 
0061 }  // namespace Acts::Experimental