12#include "GaudiKernel/MsgStream.h"
40 std::make_unique<Transforms>(tTransform, tTransform.translation(),
s_xAxis);
56 Surface::m_transforms = std::make_unique<Transforms>(
57 pesf.m_transforms->transform, pesf.m_transforms->center, s_xAxis);
66 Surface::m_transforms =
67 std::make_unique<Transforms>(shift * pesf.m_transforms->transform,
68 shift * pesf.m_transforms->center,
106 return std::make_unique<ParametersT<5, Charged, PerigeeSurface>>(
107 l1, l2,
phi,
theta, qop, *
this, std::move(cov));
118 return std::make_unique<ParametersT<5, Charged, PerigeeSurface>>(
119 position, momentum,
charge, *
this, std::move(cov));
133 return std::make_unique<ParametersT<5, Neutral, PerigeeSurface>>(
134 l1, l2,
phi,
theta, qop, *
this, std::move(cov));
146 return std::make_unique<ParametersT<5, Neutral, PerigeeSurface>>(
147 position, momentum,
charge, *
this, std::move(cov));
183 double phi = glomom.phi();
202 double phi = glomom.phi();
216 double d0 = perPos.perp();
217 double z0 = perPos.z();
219 d0 *= ((
lineDirection().cross(glomom)).dot(perPos) < 0.0) ? -1.0 : 1.0;
239 double eaTeb = ea.dot(eb);
240 double denom = 1 - eaTeb * eaTeb;
241 if (std::abs(denom) > 10e-7) {
242 double lambda0 = (mab.dot(ea) - mab.dot(eb) * eaTeb) / denom;
244 bool isValid = forceDir ? (lambda0 > 0.) :
true;
260 mFrame.col(0) = measX;
261 mFrame.col(1) = measY;
262 mFrame.col(2) = measDepth;
274 double D = dir.dot(S);
275 double A = (1. - D) * (1. + D);
277 return {1, pos.perp(),
false, 0.};
279 double sol = (pos -
C).
dot(D * S - dir) /
A;
280 return {1, pos.perp(),
false, sol};
288 double dx = pos[0] - T(3, 0);
289 double dy = pos[1] - T(3, 1);
290 double A = dir[0] * dir[0] + dir[1] * dir[1];
295 return {1, 0.,
false, -(dir[0] * dx + dir[1] * dy) /
A};
297 return {1, 0.,
false, 0.};
304 sl << std::setiosflags(std::ios::fixed);
305 sl << std::setprecision(7);
306 sl <<
"Trk::PerigeeSurface:" << std::endl;
307 sl <<
" Center position (x, y, z) = (" <<
center().x() <<
", " <<
center().y() <<
", " <<
center().z() <<
")";
308 sl << std::setprecision(-1);
316 sl << std::setiosflags(std::ios::fixed);
317 sl << std::setprecision(7);
318 sl <<
"Trk::PerigeeSurface:" << std::endl;
319 sl <<
" Center position (x, y, z) = (" <<
center().x() <<
", " <<
center().y() <<
", " <<
center().z() <<
")";
320 sl << std::setprecision(-1);
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...
Access to distance solutions.
bool contains(ParamDefs par) const
The simple check for the clients whether the parameter is contained.
Bounds object for a boundless surface (...)
Class describing the Line to which the Perigee refers to.
Amg::Vector3D localToGlobal(const LocalParameters &locpos) const
Local to global method: Take care that by just providing locR and locZ the global position cannot be ...
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
GlobalToLocal method without dynamic memory allocation - boolean checks if on surface.
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.
CxxUtils::CachedValue< Amg::Vector3D > m_lineDirection
< data members cache of the line direction (speeds up)
const Amg::Vector3D & lineDirection() const
Special method for StraightLineSurface - provides the Line direction from cache: speedup.
virtual MsgStream & dump(MsgStream &sl) const override
Output Method for MsgStream.
PerigeeSurface()
Default Constructor - needed for persistency.
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...
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override final
fast straight line distance evaluation to Surface
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.
static const NoBounds s_perigeeBounds
PerigeeSurface & operator=(const PerigeeSurface &slsf)
Assignment operator.
virtual Amg::RotationMatrix3D measurementFrame(const Amg::Vector3D &glopos, const Amg::Vector3D &glomom) const override final
Return the measurement frame - this is needed for alignment, in particular for StraightLine and Perig...
virtual bool operator==(const Surface &sf) const override
Equality operator.
Abstract Base Class for tracking surfaces.
std::unique_ptr< ParametersBase< 5, Trk::Charged > > ChargedTrackParametersUniquePtr
Unique ptr types.
Surface & operator=(const Surface &sf)
Amg::Vector3D inverseTransformMultHelper(const Amg::Vector3D &glopos) const
Surface()
Default Constructor for inheriting classes.
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
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
static const Amg::Vector3D s_xAxis(1, 0, 0)
global x Axis;
@ z
global position (cartesian)
hold the test vectors and ease the comparison