Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:10:51

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/Definitions/Algebra.hpp"
0012 #include "Acts/Geometry/ApproachDescriptor.hpp"
0013 #include "Acts/Geometry/Layer.hpp"
0014 #include "Acts/Surfaces/DiscSurface.hpp"
0015 #include "Acts/Surfaces/SurfaceArray.hpp"
0016 
0017 #include <memory>
0018 #include <utility>
0019 
0020 namespace Acts {
0021 
0022 class DiscBounds;
0023 
0024 /// @class DiscLayer
0025 ///
0026 /// Class to describe a disc-like detector layer for tracking,
0027 /// it inhertis from both, Layer base class
0028 /// and DiscSurface class
0029 
0030 class DiscLayer : virtual public DiscSurface, public Layer {
0031  public:
0032   ///  Factory constructor with DiscSurface components
0033   ///
0034   /// @param transform is the transform to place the layer in the 3D frame
0035   /// @param dbounds are the disc bounds that describe the layer dimensions
0036   /// @param surfaceArray is the array of sensitive surfaces
0037   /// @param thickness is the layer thickness (along the normal vector)
0038   /// @param ad is the approach descriptor that provides the approach surface
0039   /// @param laytyp is the layer type
0040   ///
0041   /// @todo move ApproachDescriptor to unqique_ptr
0042   ///
0043   /// @return a sharted pointer to the new layer
0044   static std::shared_ptr<DiscLayer> create(
0045       const Transform3& transform,
0046       const std::shared_ptr<const DiscBounds>& dbounds,
0047       std::unique_ptr<SurfaceArray> surfaceArray = nullptr,
0048       double thickness = 0., std::unique_ptr<ApproachDescriptor> ad = nullptr,
0049       LayerType laytyp = Acts::passive) {
0050     return std::shared_ptr<DiscLayer>(
0051         new DiscLayer(transform, dbounds, std::move(surfaceArray), thickness,
0052                       std::move(ad), laytyp));
0053   }
0054 
0055   DiscLayer() = delete;
0056   DiscLayer(const DiscLayer& cla) = delete;
0057   ~DiscLayer() override = default;
0058   DiscLayer& operator=(const DiscLayer&) = delete;
0059 
0060   /// Transforms the layer into a Surface representation for extrapolation
0061   /// @return This method returns a surface reference
0062   const DiscSurface& surfaceRepresentation() const override;
0063 
0064   // Non-const version
0065   DiscSurface& surfaceRepresentation() override;
0066 
0067  private:
0068   /// build approach surfaces
0069   void buildApproachDescriptor();
0070 
0071  protected:
0072   // Constructor with DiscSurface components and pointer to SurfaceArray
0073   ///
0074   /// @param transform is the transform to place the layer in the 3D frame
0075   /// @param dbounds are the disc bounds that describe the layer dimensions
0076   /// @param surfaceArray is the array of sensitive surfaces
0077   /// @param thickness is the layer thickness (along the normal vector)
0078   /// @param ades Are the approach descriptors that provides the approach surface
0079   /// @param laytyp is the layer taype
0080   DiscLayer(const Transform3& transform,
0081             const std::shared_ptr<const DiscBounds>& dbounds,
0082             std::unique_ptr<SurfaceArray> surfaceArray = nullptr,
0083             double thickness = 0.,
0084             std::unique_ptr<ApproachDescriptor> ades = nullptr,
0085             LayerType laytyp = Acts::active);
0086 
0087   /// Copy constructor with shift
0088   DiscLayer(const DiscLayer& cla, const Transform3& tr);
0089 };
0090 
0091 }  // namespace Acts