The comparison function defining in what case a Measurement is 'smaller' than a second one.
67 {
68
69
70 double path1 = 0;
71 const Trk::Surface& sf1 =
one->associatedSurface();
73 switch (surfType1) {
75 const Trk::PlaneSurface& opsf =
76 static_cast<const Trk::PlaneSurface&>(sf1);
78 } break;
80 const Trk::StraightLineSurface& ossf =
81 static_cast<const Trk::StraightLineSurface&>(sf1);
83 } break;
85 const Trk::DiscSurface& odsf =
86 static_cast<const Trk::DiscSurface&>(sf1);
88 } break;
90 const Trk::CylinderSurface& ocsf =
91 static_cast<const Trk::CylinderSurface&>(sf1);
93 } break;
95 const Trk::PerigeeSurface& ogsf =
96 static_cast<const Trk::PerigeeSurface&>(sf1);
98 } break;
99 default: {
100 throw std::runtime_error(
101 "MeasurementBaseComparisonFunction: surface type error for Sf1!");
102 }
103 }
104
105
106 double path2 = 0;
107 const Trk::Surface& sf2 =
two->associatedSurface();
109 switch (surfType2) {
111 const Trk::PlaneSurface& tpsf =
112 static_cast<const Trk::PlaneSurface&>(sf2);
114 } break;
116 const Trk::StraightLineSurface& tssf =
117 static_cast<const Trk::StraightLineSurface&>(sf2);
119 } break;
121 const Trk::DiscSurface& tdsf =
122 static_cast<const Trk::DiscSurface&>(sf2);
124 } break;
126 const Trk::CylinderSurface& tcsf =
127 static_cast<const Trk::CylinderSurface&>(sf2);
129 } break;
131 const Trk::PerigeeSurface& tgsf =
132 static_cast<const Trk::PerigeeSurface&>(sf2);
134 } break;
135 default: {
136 throw std::runtime_error(
137 "MeasurementBaseComparisonFunction: surface type error for Sf2!");
138 }
139 }
140 return path1 < path2;
141 }
double pathIntersectWithLine(const Trk::StraightLineSurface &lsf) const
double pathIntersectWithCylinder(const Trk::CylinderSurface &csf, const Amg::Vector3D &globalHit) const
double pathIntersectWithDisc(const Trk::DiscSurface &dsf) const
double pathIntersectWithPlane(const Trk::PlaneSurface &psf) const
virtual constexpr SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
SurfaceType
This enumerator simplifies the persistency & calculations,.