|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #ifndef TRKNIRVANA_TSOSCOMPARISONFUNCTION_H
16 #define TRKNIRVANA_TSOSCOMPARISONFUNCTION_H
68 if ( ! (
one->trackParameters() ||
one->measurementOnTrack() ) ){
69 std::cout <<
"TrackStateOnSurfaceComparisonFunction: input TSOS one not sufficient" << std::endl;
72 if ( ! (
two->trackParameters() ||
two->measurementOnTrack() ) ){
73 std::cout <<
"TrackStateOnSurfaceComparisonFunction: input TSOS two not sufficient" << std::endl;
76 if (
one->trackParameters()){
77 gp1 =
one->trackParameters()->position();
78 surf1 = &
one->trackParameters()->associatedSurface();
79 if (!surf1 &&
one->measurementOnTrack() ) surf1 = &(
one->measurementOnTrack()->associatedSurface());
80 }
else if (
one->measurementOnTrack()){
81 gp1 =
one->measurementOnTrack()->globalPosition();
82 surf1 = &(
one->measurementOnTrack()->associatedSurface());
84 if (
two->trackParameters()){
85 gp2 =
two->trackParameters()->position();
86 surf2 = &
two->trackParameters()->associatedSurface();
87 if (!surf2 &&
two->measurementOnTrack() ) surf2 = &(
two->measurementOnTrack()->associatedSurface());
88 }
else if (
two->measurementOnTrack()) {
89 gp2 =
two->measurementOnTrack()->globalPosition();
90 surf2 = &(
two->measurementOnTrack()->associatedSurface());
100 if ( ! ( surf1 && surf2 ) ){
101 std::cout <<
"TrackStateOnSurfaceComparisonFunction: surface missing" << std::endl;
106 return path1 < path2;
120 switch (pSurface->
type()){
137 std::cout <<
"TrackStateOnSurfaceComparisonFunction: surface type error" << std::endl;
155 double denom = 1 - parallelity*parallelity;
156 return (std::abs(
denom)>10
e-7) ?
158 - trackToWire.dot(dirWire)*parallelity)/
denom :
165 double parallelity =
m_direction.dot(Trk::s_zAxis);
166 double denom = 1 - parallelity*parallelity;
167 return (std::abs(
denom)>10
e-7) ?
168 (trackToWire.dot(
m_direction)- trackToWire.dot(Trk::s_zAxis) * parallelity)/
denom :
195 double k = (direc.y())/(direc.x());
196 double d = (point2.x()*point1.y() - point1.x()*point2.y())/(point2.x() - point1.x());
204 double q =
d*
d - R*R;
214 double t1 = (
first - point1.x())/direc.x();
215 double t2 = (
second - point1.x())/direc.x();
220 if ( dist1raw.mag() < dist2raw.mag() ) {
231 #endif //TRKNIRVANA_TSOSCOMPARISONFUNCTION_H
double pathIntersectWithLine(const Trk::StraightLineSurface *lsf) const
TrackStateOnSurfaceComparisonFunction(const Amg::Vector3D &sp, const Amg::Vector3D &dir)
Full relation definition using a straight line propagation.
const Amg::Vector3D m_direction
path
python interpreter configuration --------------------------------------—
double pathIntersectWithDisc(const Trk::DiscSurface *dsf) const
double pathIntersectWithLine(const Trk::PerigeeSurface *pgsf) const
TrackStateOnSurfaceComparisonFunction(double cradius)
Default Constructor, using a given radius.
const Amg::Vector3D m_point
std::vector< ALFA_RawDataCollection_p1 > t1
virtual const CylinderBounds & bounds() const override final
This method returns the CylinderBounds by reference (NoBounds is not possible for cylinder)
const Amg::Vector3D & center() const
Returns the center position of the Surface.
double calculateAppropriatePath(const Trk::Surface *pSurface, const Amg::Vector3D gp) const
double pathIntersectWithPlane(const Trk::PlaneSurface *psf) const
Class providing comparison function, or relational definition, for sorting MeasurementBase objects.
TrackStateOnSurfaceComparisonFunction(const Amg::Vector3D &dir)
Simple relation definition using a 3d distance to the reference point.
Eigen::Affine3d Transform3D
double pathIntersectWithCylinder(const Trk::CylinderSurface *csf, const Amg::Vector3D &globalHit) const
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
Ensure that the ATLAS eigen extensions are properly loaded.
represents the track state (measurement, material, fit parameters and quality) at a surface.
const ComparisonMode m_mode
Eigen::Matrix< double, 3, 1 > Vector3D
bool operator()(const Trk::TrackStateOnSurface *one, const Trk::TrackStateOnSurface *two) const
The comparison function defining in what case a PRD is 'smaller' than a second one.
std::vector< ALFA_RawDataContainer_p1 > t2
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
constexpr virtual SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
Scalar mag() const
mag method
virtual double r() const override final
This method returns the radius.