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:
56  DiscSurface(const Transform3D& transform, double rmin, double rmax,
57  double hphisec = M_PI);
58 
70  DiscSurface(const Transform3D& transform, double minhalfx, double maxhalfx,
71  double minR, double maxR, double avephi = 0., double stereo = 0.);
72 
77  DiscSurface(const Transform3D& transform,
78  std::shared_ptr<const DiscBounds> dbounds = nullptr);
79 
84  DiscSurface(const std::shared_ptr<const DiscBounds>& dbounds,
85  const DetectorElementBase& detelement);
86 
90  DiscSurface(const DiscSurface& other);
91 
97  DiscSurface(const GeometryContext& gctx, const DiscSurface& other,
98  const Transform3D& shift);
99 
100  public:
101  ~DiscSurface() override = default;
102  DiscSurface() = delete;
103 
107  DiscSurface& operator=(const DiscSurface& other);
108 
110  SurfaceType type() const override;
111 
118  Vector3D normal(const GeometryContext& gctx,
119  const Vector2D& lposition) const final;
120 
122  using Surface::normal;
123 
131  Vector3D binningPosition(const GeometryContext& gctx,
132  BinningValue bValue) const final;
133 
135  const SurfaceBounds& bounds() const final;
136 
146  Vector3D localToGlobal(const GeometryContext& gctx, const Vector2D& lposition,
147  const Vector3D& momentum) const final;
148 
158  Result<Vector2D> globalToLocal(const GeometryContext& gctx,
159  const Vector3D& position,
160  const Vector3D& momentum) const final;
161 
168  Vector2D localPolarToCartesian(const Vector2D& lpolar) const;
169 
176  Vector2D localCartesianToPolar(const Vector2D& lcart) const;
177 
185  Vector2D localPolarToLocalCartesian(const Vector2D& locpol) const;
186 
194  Vector3D localCartesianToGlobal(const GeometryContext& gctx,
195  const Vector2D& lposition) const;
196 
204  Vector2D globalToLocalCartesian(const GeometryContext& gctx,
205  const Vector3D& position,
206  double tol = 0.) const;
207 
219  void initJacobianToGlobal(const GeometryContext& gctx,
220  BoundToFreeMatrix& jacobian,
221  const Vector3D& position, const Vector3D& direction,
222  const BoundVector& pars) const final;
223 
235  RotationMatrix3D initJacobianToLocal(const GeometryContext& gctx,
236  FreeToBoundMatrix& jacobian,
237  const Vector3D& position,
238  const Vector3D& direction) const final;
239 
246  double pathCorrection(const GeometryContext& gctx, const Vector3D& position,
247  const Vector3D& direction) const final;
248 
275  const GeometryContext& gctx, const Vector3D& position,
276  const Vector3D& direction,
277  const BoundaryCheck& bcheck = false) const final;
278 
287  double binningPositionValue(const GeometryContext& gctx,
288  BinningValue bValue) const final;
289 
291  std::string name() const override;
292 
301  Polyhedron polyhedronRepresentation(const GeometryContext& gctx,
302  size_t lseg) const override;
303 
312  LocalCartesianToBoundLocalMatrix localCartesianToBoundLocalDerivative(
313  const GeometryContext& gctx, const Vector3D& position) const final;
314 
315  protected:
316  std::shared_ptr<const DiscBounds> m_bounds;
317 };
318 
319 #include "Acts/Surfaces/detail/DiscSurface.ipp"
320 
321 } // end of namespace Acts