14#ifndef TRKNIRVANA_MEASUREMENTBASECOMPARISONFUNCTION_H
15#define TRKNIRVANA_MEASUREMENTBASECOMPARISONFUNCTION_H
100 throw std::runtime_error(
101 "MeasurementBaseComparisonFunction: surface type error for Sf1!");
136 throw std::runtime_error(
137 "MeasurementBaseComparisonFunction: surface type error for Sf2!");
140 return path1 < path2;
158 double denom = 1 - parallelity * parallelity;
159 return (fabs(denom) > 10e-7) ? (trackToWire.dot(
m_direction) -
160 trackToWire.dot(dirWire) * parallelity) /
169 double denom = 1 - parallelity * parallelity;
170 return (fabs(denom) > 10e-7)
202 double k = (direc.y()) / (direc.x());
203 double d = (point2.x() * point1.y() - point1.x() * point2.y()) /
204 (point2.x() - point1.x());
211 double a = 1 + k * k;
212 double p = 2 * k * d;
213 double q = d * d - R * R;
214 double discriminant = p * p - 4 *
a * q;
215 if (discriminant < 0) {
220 -0.5 * (p + (p > 0 ? sqrt(discriminant) : -sqrt(discriminant)));
224 double t1 = (first - point1.x()) / direc.x();
225 double t2 = (second - point1.x()) / direc.x();
230 if (dist1raw.mag() < dist2raw.mag()) {
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
virtual double r() const override final
This method returns the radius.
Class for a CylinderSurface in the ATLAS detector.
virtual const CylinderBounds & bounds() const override final
This method returns the CylinderBounds by reference (NoBounds is not possible for cylinder)
Class for a DiscSurface in the ATLAS detector.
bool operator()(const Trk::MeasurementBase *one, const Trk::MeasurementBase *two) const
The comparison function defining in what case a Measurement is 'smaller' than a second one.
double pathIntersectWithLine(const Trk::PerigeeSurface &pgsf) const
double pathIntersectWithLine(const Trk::StraightLineSurface &lsf) const
MeasurementBaseComparisonFunction()=delete
MeasurementBaseComparisonFunction(const Amg::Vector3D &sp, const Amg::Vector3D &dir)
Full relation definition using a straight line propagation.
double pathIntersectWithCylinder(const Trk::CylinderSurface &csf, const Amg::Vector3D &globalHit) const
MeasurementBaseComparisonFunction & operator=(MeasurementBaseComparisonFunction &MCF)=default
MeasurementBaseComparisonFunction(MeasurementBaseComparisonFunction &&MCF)=default
MeasurementBaseComparisonFunction & operator=(MeasurementBaseComparisonFunction &&MCF)=default
MeasurementBaseComparisonFunction(const MeasurementBaseComparisonFunction &MCF)=default
double pathIntersectWithDisc(const Trk::DiscSurface &dsf) const
double pathIntersectWithPlane(const Trk::PlaneSurface &psf) const
Amg::Vector3D m_direction
~MeasurementBaseComparisonFunction()=default
This class is the pure abstract base class for all fittable tracking measurements.
Class describing the Line to which the Perigee refers to.
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
Class for a StraightLineSurface in the ATLAS detector to describe dirft tube and straw like detectors...
const Amg::Vector3D & lineDirection() const
Special method for StraightLineSurface - provides the Line direction from cache: speedup.
Abstract Base Class for tracking surfaces.
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.
virtual constexpr SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
SurfaceType
This enumerator simplifies the persistency & calculations,.
static const Amg::Vector3D s_zAxis(0, 0, 1)
global z Axis;