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/ConeBounds.hpp"
0015 #include "Acts/Surfaces/ConeSurface.hpp"
0016 #include "Acts/Surfaces/SurfaceArray.hpp"
0017 
0018 #include <algorithm>
0019 #include <memory>
0020 #include <utility>
0021 
0022 namespace Acts {
0023 class ConeBounds;
0024 
0025 /// @class ConeLayer
0026 ///
0027 /// Class to describe a conical detector layer for tracking, it inhertis from
0028 /// both, Layer base class and ConeSurface class
0029 class ConeLayer : virtual public ConeSurface, public Layer {
0030  public:
0031   /// Factory for shared layer
0032   ///
0033   /// @param transform is the 3D transform that positions the layer in 3D frame
0034   /// @param cbounds is the conical bound description
0035   /// @param surfaceArray is the array of sensitive surfaces
0036   /// @param thickness is the layer thickness along the normal axis
0037   /// @param ad is the approach descriptor for navigation towards the layer
0038   /// @param laytyp is the layer type
0039   ///
0040   /// @todo change od and ad to unique_ptr
0041   ///
0042   /// @return is a shared pointer to a layer
0043   static MutableLayerPtr create(
0044       const Transform3& transform, std::shared_ptr<const ConeBounds> cbounds,
0045       std::unique_ptr<SurfaceArray> surfaceArray, double thickness = 0.,
0046       std::unique_ptr<ApproachDescriptor> ad = nullptr,
0047       LayerType laytyp = Acts::active) {
0048     return MutableLayerPtr(new ConeLayer(transform, std::move(cbounds),
0049                                          std::move(surfaceArray), thickness,
0050                                          std::move(ad), laytyp));
0051   }
0052 
0053   ConeLayer() = delete;
0054   ConeLayer(const ConeLayer& cla) = delete;
0055   ~ConeLayer() override = default;
0056   ConeLayer& operator=(const ConeLayer&) = delete;
0057 
0058   /// Transforms the layer into a Surface representation for extrapolation
0059   const ConeSurface& surfaceRepresentation() const override;
0060 
0061   // Non-const version
0062   ConeSurface& surfaceRepresentation() override;
0063 
0064  protected:
0065   /// Private constructor with arguments
0066   ///
0067   /// @param transform is the 3D transform that positions the layer in 3D frame
0068   /// @param cbounds is the conical bound description
0069   /// @param surfaceArray is the array of sensitive surfaces
0070   /// @param thickness is the layer thickness along the normal axis
0071   /// @param ade is the approach descriptor for navigation towards the layer
0072   /// @param laytyp is the layer type
0073   ///
0074   /// @todo change od and ad to unique_ptr
0075   ConeLayer(const Transform3& transform,
0076             std::shared_ptr<const ConeBounds> cbounds,
0077             std::unique_ptr<SurfaceArray> surfaceArray, double thickness = 0.,
0078             std::unique_ptr<ApproachDescriptor> ade = nullptr,
0079             LayerType laytyp = Acts::active);
0080 
0081   /// Private copy constructor with shift, called by create(args*)
0082   ///
0083   /// @param cla is the source clone layer
0084   /// @param shift is the additional shift applied after copying
0085   ConeLayer(const ConeLayer& cla, const Transform3& shift);
0086 };
0087 
0088 }  // namespace Acts