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,
59 Collector result(std::bind(pb2, std::ref(collector), std::placeholders::_1));
72 stereoHits.reserve(
end - begin);
74 stereoHits.push_back(&(*
i));
76 return match(monoRH, stereoHits.begin(), stereoHits.end(), collector, gluedDet, trackdirection);
101 if (trackdirection.
mag2() < FLT_MIN) {
112 double m00 = -(projectedstripmono.second.y() - projectedstripmono.first.y());
113 double m01 = (projectedstripmono.second.x() - projectedstripmono.first.x());
114 double c0 = m01 * projectedstripmono.first.y() + m00 * projectedstripmono.first.x();
125 double l1 = 1. / (
c1 *
c1 + s1 * s1);
133 for (seconditer = begin; seconditer !=
end; ++seconditer) {
144 StripPosition projectedstripstereo =
project(partnerstripdet, gluedDet, stripstereo, trackdirection);
146 double m10 = -(projectedstripstereo.second.y() - projectedstripstereo.first.y());
147 double m11 = (projectedstripstereo.second.x() - projectedstripstereo.first.x());
158 c(1) = m11 * projectedstripstereo.first.y() + m10 * projectedstripstereo.first.x();
194 double l2 = 1. / (c2 * c2 + s2 * s2);
196 double sigmap22 =
sigmaPitch((*seconditer)->localPosition(), (*seconditer)->localPositionError(), partnertopol);
200 double diff = (
c1 * s2 - c2 * s1);
201 double invdet2 = 1 / (
diff *
diff * l1 * l2);
202 float xx = invdet2 * (sigmap12 * s2 * s2 * l2 + sigmap22 * s1 * s1 * l1);
203 float xy = -invdet2 * (sigmap12 * c2 * s2 * l2 + sigmap22 *
c1 * s1 * l1);
204 float yy = invdet2 * (sigmap12 * c2 * c2 * l2 + sigmap22 *
c1 *
c1 * l1);
230 float scale = -positiononGluedini.
z() / trackdirection.
z();
232 LocalPoint projpositiononGluedini = positiononGluedini +
scale * trackdirection;
233 LocalPoint projpositiononGluedend = positiononGluedend +
scale * trackdirection;
235 return StripPosition(projpositiononGluedini, projpositiononGluedend);
259 if (trackdirection.
mag2() < FLT_MIN) {
270 double m00 = -(projectedstripmono.second.y() - projectedstripmono.first.y());
271 double m01 = (projectedstripmono.second.x() - projectedstripmono.first.x());
272 double c0 = m01 * projectedstripmono.first.y() + m00 * projectedstripmono.first.x();
283 double l1 = 1. / (
c1 *
c1 + s1 * s1);
298 StripPosition projectedstripstereo =
project(partnerstripdet, gluedDet, stripstereo, trackdirection);
300 double m10 = -(projectedstripstereo.second.y() - projectedstripstereo.first.y());
301 double m11 = (projectedstripstereo.second.x() - projectedstripstereo.first.x());
306 AlgebraicVector2 c(
c0, m11 * projectedstripstereo.first.y() + m10 * projectedstripstereo.first.x());
316 return std::unique_ptr<SiStripMatchedRecHit2D>(
nullptr);
320 double l2 = 1. / (c2 * c2 + s2 * s2);
326 double diff = (
c1 * s2 - c2 * s1);
327 double invdet2 = 1 / (
diff *
diff * l1 * l2);
328 float xx = invdet2 * (sigmap12 * s2 * s2 * l2 + sigmap22 * s1 * s1 * l1);
329 float xy = -invdet2 * (sigmap12 * c2 * s2 * l2 + sigmap22 *
c1 * s1 * l1);
330 float yy = invdet2 * (sigmap12 * c2 * c2 * l2 + sigmap22 *
c1 *
c1 * l1);
337 return std::unique_ptr<SiStripMatchedRecHit2D>(
nullptr);