Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 09:23:52

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/CylinderBounds.hpp"
0015 #include "Acts/Surfaces/CylinderSurface.hpp"
0016 
0017 #include <memory>
0018 
0019 namespace Acts {
0020 
0021 class CylinderBounds;
0022 class SurfaceArray;
0023 
0024 /// @class CylinderLayer
0025 ///
0026 /// Class to describe a cylindrical detector layer for tracking, it inhertis
0027 /// from both, Layer base class and CylinderSurface class
0028 ///
0029 class CylinderLayer : public CylinderSurface, public Layer {
0030  public:
0031   /// Factory for shared Layer pointer
0032   /// create a shared, fully deployed CylinderLayer
0033   ///
0034   /// @param transform is the 3D transform that places the layer in 3D space
0035   /// @param cbounds are the cylindrical bounds of the layer
0036   /// @param surfaceArray is the Binned Array that holds the sensitive surfaces
0037   /// @param thickness is the layer thickness (along the normal)
0038   /// @param ad is the approach descriptor for approaching the layer
0039   /// @param laytyp is the layer type
0040   ///
0041   /// @todo ApproachDescriptor to unique_ptr
0042   ///
0043   /// @return The return object is a shared pointer to the layer.
0044   static std::shared_ptr<CylinderLayer> create(
0045       const Transform3& transform,
0046       const std::shared_ptr<const CylinderBounds>& cbounds,
0047       std::unique_ptr<SurfaceArray> surfaceArray = nullptr,
0048       double thickness = 0., std::unique_ptr<ApproachDescriptor> ad = nullptr,
0049       LayerType laytyp = passive);
0050 
0051   CylinderLayer(const CylinderLayer& cla) = delete;
0052   CylinderLayer() = delete;
0053   ~CylinderLayer() override = default;
0054   CylinderLayer& operator=(const CylinderLayer&) = delete;
0055 
0056   /// Transforms the layer into a Surface representation
0057   /// This is for positioning and extrapolation
0058   /// @return Const reference to the cylinder surface representing this layer
0059   const CylinderSurface& surfaceRepresentation() const override;
0060 
0061   /// Non-const version of surface representation access
0062   /// @return Mutable reference to the cylinder surface
0063   CylinderSurface& surfaceRepresentation() override;
0064 
0065  private:
0066   /// build approach surfaces */
0067   void buildApproachDescriptor();
0068 
0069  protected:
0070   /// Private constructor for CylinderLayer, called by create(args*) factory
0071   ///
0072   /// @param transform is the 3D transform that places the layer in 3D space
0073   /// @param cBounds The cylindrical bounds of the layer
0074   /// @param surfaceArray is the Binned Array that holds the sensitive surfaces
0075   /// @param thickness is the layer thickness (along the normal)
0076   /// @param ades are the approach descriptors for approaching the layer
0077   /// @param laytyp is the layer type
0078   /// @todo change ApproachDescriptor to unique_ptr
0079   CylinderLayer(const Transform3& transform,
0080                 const std::shared_ptr<const CylinderBounds>& cBounds,
0081                 std::unique_ptr<SurfaceArray> surfaceArray = nullptr,
0082                 double thickness = 0.,
0083                 std::unique_ptr<ApproachDescriptor> ades = nullptr,
0084                 LayerType laytyp = passive);
0085 
0086   /// Private copy constructor with shift, called by create(args*)
0087   ///
0088   /// @param cla is the source cylinder layer for the copy
0089   /// @param shift is the additional transform applied after cloning
0090   CylinderLayer(const CylinderLayer& cla, const Transform3& shift);
0091 };
0092 
0093 }  // namespace Acts