Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:23:23

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2016-2018 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 http://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/PlaneSurface.hpp"
0015 #include "Acts/Surfaces/SurfaceArray.hpp"
0016 
0017 #include <memory>
0018 #include <utility>
0019 
0020 namespace Acts {
0021 
0022 class PlanarBounds;
0023 
0024 /// @class PlaneLayer
0025 ///
0026 /// Class to describe a planar detector layer for tracking,
0027 /// it inhertis from both, Layer base class and PlaneSurface class
0028 ///
0029 class PlaneLayer : virtual public PlaneSurface, public Layer {
0030  public:
0031   /// Factory for a shared plane layer
0032   ///
0033   /// @param transform which places the layer in the global frame
0034   /// @param pbounds the planar bounds that define the layer dimensions
0035   /// @param surfaceArray is the surface array that holds the sensitive surfaces
0036   /// @param thickness is the thickness of the layer (normal direction to plane)
0037   /// @param ad is the approach descriptor for describing the approach surface
0038   /// @param laytyp is the layer type
0039   ///
0040   /// @return shared pointer to a PlaneLayer
0041   static MutableLayerPtr create(
0042       const Transform3& transform, std::shared_ptr<const PlanarBounds> pbounds,
0043       std::unique_ptr<SurfaceArray> surfaceArray = nullptr,
0044       double thickness = 0., std::unique_ptr<ApproachDescriptor> ad = nullptr,
0045       LayerType laytyp = Acts::active) {
0046     return MutableLayerPtr(new PlaneLayer(transform, pbounds,
0047                                           std::move(surfaceArray), thickness,
0048                                           std::move(ad), laytyp));
0049   }
0050 
0051   PlaneLayer() = delete;
0052   PlaneLayer(const PlaneLayer& pla) = delete;
0053   ~PlaneLayer() override = default;
0054   PlaneLayer& operator=(const PlaneLayer&) = delete;
0055 
0056   /// Transforms the layer into a Surface representation for extrapolation
0057   /// @return returns a reference to a PlaneSurface
0058   const PlaneSurface& surfaceRepresentation() const override;
0059 
0060   // Non-const version
0061   PlaneSurface& surfaceRepresentation() override;
0062 
0063  private:
0064   /// private helper method to build approach surfaces
0065   void buildApproachDescriptor();
0066 
0067  protected:
0068   /// Private constructor for a PlaneLayer is called by create(args*)
0069   ///
0070   /// @param transform which places the layer in the global frame
0071   /// @param pbounds the planar bounds that define the layer dimensions
0072   /// @param surfaceArray is the surface array that holds the sensitive surfaces
0073   /// @param thickness is the thickness of the layer (normal direction to plane)
0074   /// @param ades is the approach descriptor for describing the approach surface
0075   /// @param laytyp is the layer type
0076   PlaneLayer(const Transform3& transform,
0077              std::shared_ptr<const PlanarBounds>& pbounds,
0078              std::unique_ptr<SurfaceArray> surfaceArray = nullptr,
0079              double thickness = 0.,
0080              std::unique_ptr<ApproachDescriptor> ades = nullptr,
0081              LayerType laytyp = Acts::active);
0082 
0083   /// Private constructor for a PlaneLayer, is called by create(arge*
0084   ///
0085   /// @param pla is the plain layer to be coped
0086   /// @param shift is the additional shift applied after copying
0087   PlaneLayer(const PlaneLayer& pla, const Transform3& shift);
0088 };
0089 
0090 }  // namespace Acts