16 : scale_(conf.getParameter<double>(
"NSigmaInside")),
17 preFilter_(conf.existsAs<
bool>(
"PreFilter") ? conf.getParameter<
bool>(
"PreFilter") :
false) {}
32 std::vector<std::unique_ptr<SiStripMatchedRecHit2D>>& collector,
35 std::vector<SiStripMatchedRecHit2D*>
result;
38 for (std::vector<SiStripMatchedRecHit2D*>::iterator
p =
result.begin();
p !=
result.end();
p++)
39 collector.emplace_back(*
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);
Point3DBase< Scalar, LocalTag > LocalPoint
virtual const Topology & topology() const
std::unique_ptr< SiStripMatchedRecHit2D > match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection, bool force) const
Global3DPoint GlobalPoint
std::function< void(SiStripMatchedRecHit2D const &)> Collector
std::pair< LocalPoint, LocalPoint > StripPosition
static float sigmaPitch(LocalPoint const &pos, LocalError const &err, const StripTopology &topol)
ROOT::Math::SVector< double, 2 > AlgebraicVector2
SiStripMatchedRecHit2D * clone() const override
SiStripRecHitMatcher(const edm::ParameterSet &conf)
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const LocalPoint & localPositionFast() const
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const GeomDetUnit * monoDet() const
LocalError localPositionError() const override
const Plane & surface() const
The nominal surface of the GeomDet.
std::vector< const SiStripRecHit2D * > SimpleHitCollection
SiStripRecHit2DCollectionNew::DetSet::const_iterator RecHitIterator
const GeomDetUnit * stereoDet() const
SimpleHitCollection::const_iterator SimpleHitIterator
LocalPoint localPosition() const override
static int position[264][3]
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepStd< double, 2, 2 > > AlgebraicMatrix22
virtual LocalPoint localPosition(float strip) const =0
StripPosition project(const GeomDetUnit *det, const GluedGeomDet *glueddet, StripPosition strip, LocalVector trackdirection) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.