32 if(trackdirection.
mag2()<FLT_MIN){
44 LocalVector RPHIpositiononGluedendvector=projectedstripmono.second-projectedstripmono.first;
45 double c1=
sin(RPHIpositiononGluedendvector.
phi());
46 double s1=-
cos(RPHIpositiononGluedendvector.
phi());
49 double sigmap12=errormonoRH.uu()*pitch*pitch;
66 m(0,0)=-(projectedstripmono.second.y()-projectedstripmono.first.y());
m(0,1)=(projectedstripmono.second.x()-projectedstripmono.first.x());
67 m(1,0)=-(projectedstripstereo.second.y()-projectedstripstereo.first.y());
m(1,1)=(projectedstripstereo.second.x()-projectedstripstereo.first.x());
68 c(0)=
m(0,1)*projectedstripmono.first.y()+
m(0,0)*projectedstripmono.first.x();
69 c(1)=
m(1,1)*projectedstripstereo.first.y()+
m(1,0)*projectedstripstereo.first.x();
70 m.Invert(); solution = m *
c;
82 LocalVector stereopositiononGluedendvector=projectedstripstereo.second-projectedstripstereo.first;
83 double c2=
sin(stereopositiononGluedendvector.
phi());
double s2=-
cos(stereopositiononGluedendvector.
phi());
86 double sigmap22=errorstereoRH.uu()*pitch*pitch;
87 double diff=(c1*s2-c2*s1);
88 double invdet2=1/(diff*
diff);
89 float xx=invdet2*(sigmap12*s2*s2+sigmap22*s1*s1);
90 float xy=-invdet2*(sigmap12*c2*s2+sigmap22*c1*s1);
91 float yy=invdet2*(sigmap12*c2*c2+sigmap22*c1*
c1);
103 if(det.subdetId() > 2) {
129 true, adjustedMonoRH, adjustedStereoRH);
130 delete adjustedMonoRH;
131 delete adjustedStereoRH;
157 float scale=-positiononGluedini.
z()/trackdirection.
z();
159 LocalPoint projpositiononGluedini= positiononGluedini + scale*trackdirection;
160 LocalPoint projpositiononGluedend= positiononGluedend + scale*trackdirection;
162 return StripPosition(projpositiononGluedini,projpositiononGluedend);
179 LocalPoint projectedHitPos = lhitPos - ldir * delta/ldir.
z();
216 SiTrackerGSRecHit2D *otherRH =
new SiTrackerGSRecHit2D(
LocalPoint(-10000,-10000,-10000),
LocalError(0,0,0),
DetId(000000000), 0,0,0,monoRH->
cluster(),0,0);
217 if ((isMono && isStereo)||(!isMono&&!isStereo))
throw cms::Exception(
"GSRecHitMatcher") <<
"Something wrong with DetIds.";
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
const int & simhitId() const
const GeomDetUnit * monoDet() const
SiTrackerGSMatchedRecHit2D * match(const SiTrackerGSRecHit2D *monoRH, const SiTrackerGSRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector &trackdirection) const
virtual LocalError localPositionError() const
GlobalVector normalVector() const
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
Global3DPoint GlobalPoint
float localZ(const GlobalPoint &gp) const
Fast access to distance from plane for a point.
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
static int position[TOTALCHAMBERS][3]
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepStd< double, 2, 2 > > AlgebraicMatrix22
const int & simtrackId() const
virtual const Topology & topology() const =0
virtual float localPitch(const LocalPoint &) const =0
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
std::pair< LocalPoint, LocalPoint > StripPosition
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
LocalPoint toLocal(const GlobalPoint &gp) const
Cos< T >::type cos(const T &t)
DetId geographicalId() const
The label of this GeomDet.
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const int & simMultX() const
const uint32_t & eeId() const
const int & simMultY() const
SiTrackerGSMatchedRecHit2D * projectOnly(const SiTrackerGSRecHit2D *monoRH, const GeomDet *monoDet, const GluedGeomDet *gluedDet, LocalVector &ldir) const
StripPosition project(const GeomDetUnit *det, const GluedGeomDet *glueddet, const StripPosition &strip, const LocalVector &trackdirection) const
ClusterRef const & cluster() const
const BoundPlane & surface() const
The nominal surface of the GeomDet.
virtual LocalPoint localPosition() const
virtual LocalPoint localPosition(float strip) const =0
DetId geographicalId() const
LocalError rotate(float x, float y) const
Return a new LocalError, rotated by an angle defined by the direction (x,y)
const PositionType & position() const
ROOT::Math::SVector< double, 2 > AlgebraicVector2
const GeomDetUnit * stereoDet() const