Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-11 07:49: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/Detector/LayerStructureBuilder.hpp"
0012 #include "Acts/Detector/interface/IDetectorComponentBuilder.hpp"
0013 #include "Acts/Detector/interface/IExternalStructureBuilder.hpp"
0014 #include "Acts/Detector/interface/IInternalStructureBuilder.hpp"
0015 #include "Acts/Geometry/GeometryContext.hpp"
0016 #include "Acts/Surfaces/Surface.hpp"
0017 #include "Acts/Utilities/Logger.hpp"
0018 #include "Acts/Utilities/ProtoAxis.hpp"
0019 
0020 #include <iostream>
0021 #include <string>
0022 #include <tuple>
0023 #include <vector>
0024 
0025 namespace Acts::Experimental {
0026 
0027 class MultiWireStructureBuilder {
0028  public:
0029   /// @brief Configuration struct for the MultiWireStructure Builder
0030 
0031   struct Config {
0032     /// The name of the detector volume component
0033     std::string name = "";
0034 
0035     /// The surfaces of the Multi Wire
0036     std::vector<std::shared_ptr<Acts::Surface>> mlSurfaces = {};
0037 
0038     /// The transform of the Multi Wire
0039     Transform3 transform = Transform3::Identity();
0040 
0041     /// The bounds of the multi-wire volume
0042     std::vector<double> mlBounds = {};
0043 
0044     // The binning of the multi wire structure
0045     std::vector<std::tuple<DirectedProtoAxis, std::size_t>> mlBinning = {};
0046 
0047     /// A tolerance config
0048     float toleranceOverlap = 10.;
0049   };
0050 
0051   /// Constructor
0052   /// @param config The configure of the MultiWireStructureBuilder
0053   /// @param logger logging instance for screen output
0054 
0055   explicit MultiWireStructureBuilder(
0056       const Config& config,
0057       std::unique_ptr<const Acts::Logger> logger = Acts::getDefaultLogger(
0058           "MultiWireStructureBuilder", Acts::Logging::VERBOSE));
0059 
0060   ~MultiWireStructureBuilder() = default;
0061 
0062   /// Construct the detector component
0063 
0064   /// @param gctx The Geometry Context of the current geometry
0065   /// @return a detector component object with the detector volume of the multilayer
0066 
0067   Acts::Experimental::DetectorComponent construct(
0068       const Acts::GeometryContext& gctx);
0069 
0070  private:
0071   Config mCfg;
0072 
0073   const Acts::Logger& logger() const { return *mLogger; }
0074 
0075   std::unique_ptr<const Acts::Logger> mLogger;
0076 };
0077 
0078 }  // namespace Acts::Experimental