ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DiscSurface.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DiscSurface.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
20 
21 namespace Acts {
22 
23 class DetectorElementBase;
24 
45 class DiscSurface : public Surface {
46  friend Surface;
47 
48  protected:
57  DiscSurface(std::shared_ptr<const Transform3D> htrans, double rmin,
58  double rmax, double hphisec = M_PI);
59 
72  DiscSurface(std::shared_ptr<const Transform3D> htrans, double minhalfx,
73  double maxhalfx, double maxR, double minR, double avephi = 0.,
74  double stereo = 0.);
75 
80  DiscSurface(std::shared_ptr<const Transform3D> htrans,
81  std::shared_ptr<const DiscBounds> dbounds = nullptr);
82 
87  DiscSurface(const std::shared_ptr<const DiscBounds>& dbounds,
88  const DetectorElementBase& detelement);
89 
93  DiscSurface(const DiscSurface& other);
94 
100  DiscSurface(const GeometryContext& gctx, const DiscSurface& other,
101  const Transform3D& transf);
102 
103  public:
105  ~DiscSurface() override = default;
106 
108  DiscSurface() = delete;
109 
113  DiscSurface& operator=(const DiscSurface& other);
114 
116  SurfaceType type() const override;
117 
124  const Vector3D normal(const GeometryContext& gctx,
125  const Vector2D& lposition) const final;
126 
128  using Surface::normal;
129 
137  const Vector3D binningPosition(const GeometryContext& gctx,
138  BinningValue bValue) const final;
139 
141  const SurfaceBounds& bounds() const final;
142 
154  void localToGlobal(const GeometryContext& gctx, const Vector2D& lposition,
155  const Vector3D& momentum, Vector3D& position) const final;
156 
169  bool globalToLocal(const GeometryContext& gctx, const Vector3D& position,
170  const Vector3D& momentum, Vector2D& lposition) const final;
171 
178  const Vector2D localPolarToCartesian(const Vector2D& lpolar) const;
179 
186  const Vector2D localCartesianToPolar(const Vector2D& lcart) const;
187 
195  const Vector2D localPolarToLocalCartesian(const Vector2D& locpol) const;
196 
204  const Vector3D localCartesianToGlobal(const GeometryContext& gctx,
205  const Vector2D& lposition) const;
206 
214  const Vector2D globalToLocalCartesian(const GeometryContext& gctx,
215  const Vector3D& position,
216  double tol = 0.) const;
217 
229  void initJacobianToGlobal(const GeometryContext& gctx,
230  BoundToFreeMatrix& jacobian,
231  const Vector3D& position, const Vector3D& direction,
232  const BoundVector& pars) const final;
233 
245  const RotationMatrix3D initJacobianToLocal(
246  const GeometryContext& gctx, FreeToBoundMatrix& jacobian,
247  const Vector3D& position, const Vector3D& direction) const final;
248 
255  double pathCorrection(const GeometryContext& gctx, const Vector3D& position,
256  const Vector3D& direction) const final;
257 
284  const GeometryContext& gctx, const Vector3D& position,
285  const Vector3D& direction,
286  const BoundaryCheck& bcheck = false) const final;
287 
296  double binningPositionValue(const GeometryContext& gctx,
297  BinningValue bValue) const final;
298 
300  std::string name() const override;
301 
310  Polyhedron polyhedronRepresentation(const GeometryContext& gctx,
311  size_t lseg) const override;
312 
313  protected:
314  std::shared_ptr<const DiscBounds> m_bounds;
315 };
316 
317 #include "Acts/Surfaces/detail/DiscSurface.ipp"
318 
319 } // end of namespace Acts