19#include "GaudiKernel/MsgStream.h"
85 std::shared_ptr<const Trk::DiscBounds> dbounds)
93 std::shared_ptr<const Trk::DiscTrapezoidalBounds> dbounds)
100 std::shared_ptr<const Trk::AnnulusBoundsPC> annpcbounds)
113 if(detElem !=
nullptr) {
120 m_bounds = std::make_shared<AnnulusBoundsPC>(
res.first);
121 double phiShift =
res.second;
129 originTrf = transl * rot;
173 double l1,
double l2,
double phi,
double theta,
double qop,
175 return std::make_unique<ParametersT<5, Charged, DiscSurface>>(
176 l1, l2,
phi,
theta, qop, *
this, std::move(cov));
184 return std::make_unique<ParametersT<5, Charged, DiscSurface>>(
185 position, momentum,
charge, *
this, std::move(cov));
192 double l1,
double l2,
double phi,
double theta,
double qop,
194 return std::make_unique<ParametersT<5, Neutral, DiscSurface>>(
195 l1, l2,
phi,
theta, qop, *
this, std::move(cov));
204 return std::make_unique<ParametersT<5, Neutral, DiscSurface>>(
205 position, momentum,
charge, *
this, std::move(cov));
215 double rMedium =
bounds().r();
224 double rMedium =
bounds().r();
264 double denom = dir.dot(
normal());
269 bool isValid = forceDir ? (
u > 0.) :
true;
298 Amg::Vector2D(loc3Dframe.perp(), loc3Dframe.phi()), tol1, tol2)
313 double b = S < 0. ? -1 : 1;
314 double d = (pos -
C).
dot(N);
316 double A = b * dir.dot(N);
319 return {1, 0.,
true, 0.};
321 return {0, d,
true, 0.};
324 double D = b * (S - (pos.dot(N))) /
A;
325 return {1, d,
true, D};
334 const double Az[3] = { T(0, 2), T(1, 2), T(2, 2) };
338 const double dx = pos[0] - T(0, 3);
339 const double dy = pos[1] - T(1, 3);
340 const double dz = pos[2] - T(2, 3);
341 const double z = dx * Az[0] + dy * Az[1] + dz * Az[2];
342 const double az = dir[0] * Az[0] + dir[1] * Az[1] + dir[2] * Az[2];
352 double dist = std::abs(
z);
354 return {ns, dist,
true, s};
359 const double x = dx * T(0, 0) + dy * T(1, 0) + dz * T(2, 0);
360 const double y = dx * T(0, 1) + dy * T(1, 1) + dz * T(2, 1);
364 double d =
bounds().minDistance(lp);
366 dist = std::sqrt(dist * dist + d * d);
369 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)
std::pair< std::vector< unsigned int >, bool > res
static std::pair< AnnulusBoundsPC, double > fromCartesian(const AnnulusBounds &annbo)
Static factory method to produce an instance of this class from the cartesian implementation.
Bounds for a annulus-like, planar Surface.
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
Class to describe the bounds for a planar DiscSurface.
double averagePhi() const
This method returns the average phi.
Class for a DiscSurface in the ATLAS detector.
virtual const Amg::Vector3D & globalReferencePoint() const override final
Returns a global reference point: For the Disc this is Where denote the r(), averagePhi() of the Bo...
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
Specialized for DiscSurface: LocalToGlobal method without dynamic memory allocation.
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const override
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
DiscSurface()
Default Constructor.
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_referencePoint
static member for boundless approach
DiscSurface & operator=(const DiscSurface &dsf)
Assignement operator.
virtual NeutralTrackParametersUniquePtr createUniqueNeutralParameters(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 - neutral.
std::shared_ptr< const SurfaceBounds > m_bounds
reference Point on the Surface
virtual Intersection straightLineIntersection(const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool forceDir=false, Trk::BoundaryCheck bchk=false) const override final
fast straight line intersection schema - standard: provides closest intersection and (signed) path le...
const SurfaceBounds & bounds() const override final
This method returns the bounds by reference.
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override
fast straight line distance evaluation to Surface
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override
Specialized for DiscSurface: GlobalToLocal method without dynamic memory allocation - boolean checks ...
static const NoBounds s_boundless
virtual bool operator==(const Surface &sf) const override
Equality operator.
Class to describe the bounds for a planar DiscSurface.
double averagePhi() const
This method returns the average phi.
Access to distance solutions.
Bounds object for a boundless surface (...)
Abstract Base Class for tracking surfaces.
std::unique_ptr< ParametersBase< 5, Trk::Charged > > ChargedTrackParametersUniquePtr
Unique ptr types.
Surface & operator=(const Surface &sf)
static constexpr double s_onSurfaceTolerance
Tolerance for being on Surface.
const TrkDetElementBase * m_associatedDetElement
Not owning Pointer to the Detector Element.
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.
Identifier m_associatedDetElementId
Identifier to the Detector Element.
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
This is the base class for all tracking detector elements with read-out relevant information.
Eigen::AngleAxisd AngleAxis3D
Eigen::Quaternion< double > Rotation3D
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.
hold the test vectors and ease the comparison