11 #include <boost/bind.hpp>
16 : scale_(conf.getParameter<double>(
"NSigmaInside")),
17 preFilter_(conf.existsAs<
bool>(
"PreFilter") ? conf.getParameter<
bool>(
"PreFilter") :
false) {}
35 std::vector<SiStripMatchedRecHit2D*>
result;
38 for (std::vector<SiStripMatchedRecHit2D*>::iterator
p =
result.begin();
p !=
result.end();
p++)
45 std::vector<SiStripMatchedRecHit2D*>& collector,
73 stereoHits.push_back(&(*
i));
75 return match(monoRH, stereoHits.begin(), stereoHits.end(), collector, gluedDet, trackdirection);
100 if (trackdirection.
mag2() < FLT_MIN) {
111 double m00 = -(projectedstripmono.second.y() - projectedstripmono.first.y());
112 double m01 = (projectedstripmono.second.x() - projectedstripmono.first.x());
113 double c0 = m01 * projectedstripmono.first.y() + m00 * projectedstripmono.first.x();
124 double l1 = 1. / (
c1 *
c1 + s1 * s1);
132 for (seconditer =
begin; seconditer !=
end; ++seconditer) {
143 StripPosition projectedstripstereo =
project(partnerstripdet, gluedDet, stripstereo, trackdirection);
145 double m10 = -(projectedstripstereo.second.y() - projectedstripstereo.first.y());
146 double m11 = (projectedstripstereo.second.x() - projectedstripstereo.first.x());
157 c(1) = m11 * projectedstripstereo.first.y() + m10 * projectedstripstereo.first.x();
193 double l2 = 1. / (c2 * c2 +
s2 *
s2);
195 double sigmap22 =
sigmaPitch((*seconditer)->localPosition(), (*seconditer)->localPositionError(), partnertopol);
200 double invdet2 = 1 / (
diff *
diff * l1 * l2);
201 float xx = invdet2 * (sigmap12 *
s2 *
s2 * l2 + sigmap22 * s1 * s1 * l1);
202 float xy = -invdet2 * (sigmap12 * c2 *
s2 * l2 + sigmap22 *
c1 * s1 * l1);
203 float yy = invdet2 * (sigmap12 * c2 * c2 * l2 + sigmap22 *
c1 *
c1 * l1);
229 float scale = -positiononGluedini.
z() / trackdirection.
z();
231 LocalPoint projpositiononGluedini = positiononGluedini +
scale * trackdirection;
232 LocalPoint projpositiononGluedend = positiononGluedend +
scale * trackdirection;
234 return StripPosition(projpositiononGluedini, projpositiononGluedend);
258 if (trackdirection.
mag2() < FLT_MIN) {
269 double m00 = -(projectedstripmono.second.y() - projectedstripmono.first.y());
270 double m01 = (projectedstripmono.second.x() - projectedstripmono.first.x());
271 double c0 = m01 * projectedstripmono.first.y() + m00 * projectedstripmono.first.x();
282 double l1 = 1. / (
c1 *
c1 + s1 * s1);
297 StripPosition projectedstripstereo =
project(partnerstripdet, gluedDet, stripstereo, trackdirection);
299 double m10 = -(projectedstripstereo.second.y() - projectedstripstereo.first.y());
300 double m11 = (projectedstripstereo.second.x() - projectedstripstereo.first.x());
305 AlgebraicVector2 c(
c0, m11 * projectedstripstereo.first.y() + m10 * projectedstripstereo.first.x());
315 return std::unique_ptr<SiStripMatchedRecHit2D>(
nullptr);
319 double l2 = 1. / (c2 * c2 +
s2 *
s2);
326 double invdet2 = 1 / (
diff *
diff * l1 * l2);
327 float xx = invdet2 * (sigmap12 *
s2 *
s2 * l2 + sigmap22 * s1 * s1 * l1);
328 float xy = -invdet2 * (sigmap12 * c2 *
s2 * l2 + sigmap22 *
c1 * s1 * l1);
329 float yy = invdet2 * (sigmap12 * c2 * c2 * l2 + sigmap22 *
c1 *
c1 * l1);
336 return std::unique_ptr<SiStripMatchedRecHit2D>(
nullptr);