11 #include<boost/bind.hpp>
33 std::vector<SiStripMatchedRecHit2D*>
collection;
35 stereoHits.begin(), stereoHits.end(),
37 gluedDet,trackdirection);
47 throw "SiStripRecHitMatcher::match(const SiStripMatchedRecHit2D *,..) is obsoltete since 5.2.0";
75 stereoHits.reserve(end-begin);
78 stereoHits.push_back( &(*
i));
81 stereoHits.begin(), stereoHits.end(),
82 gluedDet,trackdirection);
92 match(monoRH,begin,end,collector,gluedDet,trackdirection);
104 std::vector<SiStripMatchedRecHit2D*>
result;
105 result.reserve(end-begin);
106 match(monoRH,begin,end,result,gluedDet,trackdirection);
107 for (std::vector<SiStripMatchedRecHit2D*>::iterator
p=result.begin();
p!=result.end();
121 std::vector<SiStripMatchedRecHit2D*> & collector,
126 match(monoRH,begin,end,result,gluedDet,trackdirection);
140 stereoHits.reserve(end-begin);
142 stereoHits.push_back( &(*
i));
144 return match( monoRH,
145 stereoHits.begin(), stereoHits.end(),
147 gluedDet,trackdirection);
158 match(monoRH,begin,end,result,gluedDet,trackdirection);
184 if(trackdirection.
mag2()<FLT_MIN){
195 double m00 = -(projectedstripmono.second.y()-projectedstripmono.first.y());
196 double m01 = (projectedstripmono.second.x()-projectedstripmono.first.x());
197 double c0 = m01*projectedstripmono.first.y() + m00*projectedstripmono.first.x();
208 double l1 = 1./(c1*c1+s1*s1);
238 for(seconditer=begin;seconditer!=
end;++seconditer){
249 StripPosition projectedstripstereo=
project(partnerstripdet,gluedDet,stripstereo,trackdirection);
252 double m10=-(projectedstripstereo.second.y()-projectedstripstereo.first.y());
253 double m11=(projectedstripstereo.second.x()-projectedstripstereo.first.x());
263 c(1)=m11*projectedstripstereo.first.y()+m10*projectedstripstereo.first.x();
287 if (!((gluedDet->
surface()).bounds().inside(position,tempError,
scale_)))
continue;
299 double l2 = 1./(c2*c2+s2*
s2);
303 double sigmap22 = (*seconditer)->sigmaPitch();
306 LocalError tmpError((*seconditer)->localPositionErrorFast());
310 double pitch=partnertopol.
localPitch((*seconditer)->localPositionFast());
311 (*seconditer)->setSigmaPitch(sigmap22=errorstereoRH.
uu()*pitch*pitch);
314 double diff=(c1*s2-c2*s1);
315 double invdet2=1/(diff*diff*l1*l2);
316 float xx= invdet2*(sigmap12*s2*s2*l2+sigmap22*s1*s1*l1);
317 float xy=-invdet2*(sigmap12*c2*s2*l2+sigmap22*c1*s1*l1);
318 float yy= invdet2*(sigmap12*c2*c2*l2+sigmap22*c1*c1*l1);
321 if((gluedDet->
surface()).bounds().inside(position,error,
scale_)){
345 float scale=-positiononGluedini.
z()/trackdirection.
z();
347 LocalPoint projpositiononGluedini= positiononGluedini + scale*trackdirection;
348 LocalPoint projpositiononGluedend= positiononGluedend + scale*trackdirection;
350 return StripPosition(projpositiononGluedini,projpositiononGluedend);
T getParameter(std::string const &) const
void push_back(data_type const &d)
const GeomDetUnit * monoDet() const
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
StripPosition project(const GeomDetUnit *det, const GluedGeomDet *glueddet, StripPosition strip, LocalVector trackdirection) const
void setSigmaPitch(double sigmap) const
Global3DPoint GlobalPoint
static void updateWithAPE(LocalError &le, const GeomDet &det)
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepStd< double, 2, 2 > > AlgebraicMatrix22
virtual const Topology & topology() const =0
virtual float localPitch(const LocalPoint &) const =0
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
std::pair< LocalPoint, LocalPoint > StripPosition
SiStripRecHitMatcher(const edm::ParameterSet &conf)
DetId geographicalId() const
The label of this GeomDet.
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const LocalError & localPositionErrorFast() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::vector< const SiStripRecHit2D * > SimpleHitCollection
SiStripRecHit2DCollectionNew::DetSet::const_iterator RecHitIterator
const BoundPlane & surface() const
The nominal surface of the GeomDet.
SimpleHitCollection::const_iterator SimpleHitIterator
static int position[264][3]
virtual LocalPoint localPosition(float strip) const =0
const LocalPoint & localPositionFast() const
boost::function< void(SiStripMatchedRecHit2D const &)> Collector
double sigmaPitch() const
virtual SiStripMatchedRecHit2D * clone() const
ROOT::Math::SVector< double, 2 > AlgebraicVector2
const GeomDetUnit * stereoDet() const