22#include "Identifier/Identifier.h"
24#include "GaudiKernel/MsgStream.h"
62 curvilinearRotation.col(0) = curvUVT.
curvU();
63 curvilinearRotation.col(1) = curvUVT.
curvV();
64 curvilinearRotation.col(2) = curvUVT.
curvT();
127 std::shared_ptr<const Trk::SurfaceBounds> tbounds)
151 return std::make_unique<ParametersT<5, Charged, PlaneSurface>>(
152 l1, l2,
phi,
theta, qop, *
this, std::move(cov));
163 return std::make_unique<ParametersT<5, Charged, PlaneSurface>>(
164 position, momentum,
charge, *
this, std::move(cov));
178 return std::make_unique<ParametersT<5, Neutral, PlaneSurface>>(
179 l1, l2,
phi,
theta, oop, *
this, std::move(cov));
191 return std::make_unique<ParametersT<5, Neutral, PlaneSurface>>(
192 position, momentum,
charge, *
this, std::move(cov));
214 return (loc3Dframe.z() * loc3Dframe.z() <=
223 double denom = dir.dot(
normal());
228 bool isValid = forceDir ? (
u > 0.) :
true;
244 double norm = 1. / std::sqrt(scYZ.
cs * scYZ.
cs * scXZ.
sn * scXZ.
sn + scYZ.
sn * scYZ.
sn);
247 double sign = (scXZ.
sn < 0.) ? -1. : 1.;
267 double tol1,
double tol2)
const
280 static const double tol = 0.001;
284 const double d = (pos -
center()).
dot(N);
286 const double A = dir.dot(N);
288 if (std::abs(d) < tol) {
289 return {1, 0.,
true, 0.};
291 return {0, d,
true, 0.};
295 return {1, d,
true, -d /
A};
302 double Az[3] = { T(0, 2), T(1, 2), T(2, 2) };
306 double dx = pos[0] - T(0, 3);
307 double dy = pos[1] - T(1, 3);
308 double dz = pos[2] - T(2, 3);
309 double z = dx * Az[0] + dy * Az[1] + dz * Az[2];
310 double az = dir[0] * Az[0] + dir[1] * Az[1] + dir[2] * Az[2];
320 double dist = std::abs(
z);
322 return {ns, std::abs(
z),
true, s};
326 double x = dx * T(0, 0) + dy * T(1, 0) + dz * T(2, 0);
327 double y = dx * T(0, 1) + dy * T(1, 1) + dz * T(2, 1);
331 double d =
bounds().minDistance(lp);
333 dist = std::sqrt(dist * dist + d * d);
335 return {ns, dist,
true, s};
double charge(const T &p)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
#define AmgSymMatrix(dim)
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
simple class that constructs the curvilinear vectors curvU and curvV from a given momentum direction ...
const Amg::Vector3D & curvU() const
Access methods.
const Amg::Vector3D & curvT() const
const Amg::Vector3D & curvV() const
Access to distance solutions.
represents the three-dimensional global direction with respect to a planar surface frame.
double angleXZ() const
access method for angle of local XZ projection
double angleYZ() const
access method for angle of local YZ projection
Bounds object for a boundless surface (...)
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
void localToGlobalDirection(const Trk::LocalDirection &locdir, Amg::Vector3D &globdir) const
This method transforms a local direction wrt the plane to a global direction.
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override final
fast straight line distance evaluation to Surface
virtual NeutralTrackParametersUniquePtr createUniqueNeutralParameters(double l1, double l2, double phi, double theta, double oop, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const override final
Use the Surface as a ParametersBase constructor, from local parameters - neutral.
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const override final
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
virtual Surface::ChargedTrackParametersUniquePtr createUniqueTrackParameters(double l1, double l2, double phi, double theta, double qop, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const override final
Use the Surface as a ParametersBase constructor, from local parameters - charged.
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
static const NoBounds s_boundless
PlaneSurface()
Default Constructor - needed for persistency.
virtual Intersection straightLineIntersection(const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool forceDir, Trk::BoundaryCheck bchk) const override final
fast straight line intersection schema - standard: provides closest intersection and (signed) path le...
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
virtual bool operator==(const Surface &sf) const override
Equality operator.
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
std::shared_ptr< const SurfaceBounds > m_bounds
bounds (shared)
virtual const SurfaceBounds & bounds() const override final
This method returns the bounds by reference, static NoBounds in case of no boundaries.
Bounds for a rectangular, planar surface.
Abstract Base Class for tracking surfaces.
Amg::Transform3D inverseTransformHelper() const
Helper method to factorize in one place common operations calculate inverse transofrm and multiply wi...
std::unique_ptr< ParametersBase< 5, Trk::Charged > > ChargedTrackParametersUniquePtr
Unique ptr types.
static constexpr double s_onSurfaceTolerance
Tolerance for being on Surface.
Amg::Vector3D inverseTransformMultHelper(const Amg::Vector3D &glopos) const
Surface()
Default Constructor for inheriting classes.
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
std::unique_ptr< Transforms > m_transforms
Unique Pointer to the Transforms struct.
const Amg::Vector3D & center() const
Returns the center position of the Surface.
std::unique_ptr< ParametersBase< 5, Trk::Neutral > > NeutralTrackParametersUniquePtr
Bounds for a trapezoidal, planar Surface.
This is the base class for all tracking detector elements with read-out relevant information.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D
Ensure that the ATLAS eigen extensions are properly loaded.
@ z
global position (cartesian)
@ u
Enums for curvilinear frames.
Helper to simultaneously calculate sin and cos of the same angle.
hold the test vectors and ease the comparison
Helper to simultaneously calculate sin and cos of the same angle.