Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:11:04

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/GeometryContext.hpp"
0013 #include "Acts/Surfaces/LineBounds.hpp"
0014 #include "Acts/Surfaces/LineSurface.hpp"
0015 #include "Acts/Surfaces/Surface.hpp"
0016 #include "Acts/Surfaces/SurfaceConcept.hpp"
0017 
0018 #include <memory>
0019 #include <string>
0020 
0021 namespace Acts {
0022 
0023 class DetectorElementBase;
0024 struct Polyhedron;
0025 class LineBounds;
0026 
0027 ///  @class StrawSurface
0028 ///
0029 ///  Class for a StrawSurface in the TrackingGeometry
0030 ///  to describe dirft tube and straw like detectors.
0031 ///
0032 /// @image html LineSurface.png
0033 ///
0034 class StrawSurface : public LineSurface {
0035   friend class Surface;
0036 
0037  protected:
0038   /// Constructor from Transform3 and bounds
0039   ///
0040   /// @param transform the transform that positions the straw in the global
0041   /// frame
0042   /// @param radius is the straw radius
0043   /// @param halez is the half length in z
0044   StrawSurface(const Transform3& transform, double radius, double halez);
0045 
0046   /// Constructor from Transform3 and a shared bounds object
0047   ///
0048   /// @param transform the transform that positions the straw in the global
0049   /// frame
0050   /// @param lbounds are the bounds describing the straw dimensions, can be
0051   /// optionally nullptr
0052   StrawSurface(const Transform3& transform,
0053                std::shared_ptr<const LineBounds> lbounds = nullptr);
0054 
0055   /// Constructor from DetectorElementBase : Element proxy
0056   ///
0057   /// @param lbounds are the bounds describing the straw dimensions, they must
0058   /// not be nullptr
0059   /// @param detelement for which this surface is (at least) one representation
0060   StrawSurface(const std::shared_ptr<const LineBounds>& lbounds,
0061                const DetectorElementBase& detelement);
0062 
0063   /// Copy constructor
0064   ///
0065   /// @param other is the source surface for copying
0066   StrawSurface(const StrawSurface& other);
0067 
0068   /// Copy constructor - with shift
0069   ///
0070   /// @param gctx The current geometry context object, e.g. alignment
0071   /// @param other is the source cone surface
0072   /// @param shift is the additional transform applied after copying
0073   StrawSurface(const GeometryContext& gctx, const StrawSurface& other,
0074                const Transform3& shift);
0075 
0076  public:
0077   /// Assignment operator
0078   ///
0079   /// @param other is the source surface for copying
0080   StrawSurface& operator=(const StrawSurface& other);
0081 
0082   /// Return the surface type
0083   SurfaceType type() const final { return Surface::Straw; }
0084 
0085   /// Return properly formatted class name for screen output */
0086   std::string name() const final { return "Acts::StrawSurface"; }
0087 
0088   /// Return a Polyhedron for the surfaces
0089   ///
0090   /// @param gctx The current geometry context object, e.g. alignment
0091   /// @param quarterSegments is the number of segments used to describe curved
0092   /// segments in a quarter of the phi range. If it is 1, then only the extrema
0093   /// points in phi are inserted next to the segment corners.
0094   ///
0095   /// @return A list of vertices and a face/facett description of it
0096   Polyhedron polyhedronRepresentation(const GeometryContext& gctx,
0097                                       unsigned int quarterSegments) const final;
0098 };
0099 
0100 static_assert(SurfaceConcept<StrawSurface>,
0101               "StrawSurface does not fulfill SurfaceConcept");
0102 
0103 }  // namespace Acts