CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Chi2Strip1DEstimator.cc
Go to the documentation of this file.
6 using namespace std;
7 
8 pair<bool,double>
9 Chi2Strip1DEstimator::estimate(const TrajectoryStateOnSurface& state,
10  const TransientTrackingRecHit& hit) const {
11 
12  if(//hit.isMatched() ||
13  hit.detUnit()->type().isTrackerPixel()
14  ) return HitReturnType(false,0.);
15 
16 
17  const StripTopology* topology =
18  dynamic_cast<const StripTopology*>(&(hit.detUnit()->topology()));
19 
20  double m = topology->measurementPosition(hit.localPosition()).x();
21 
22  double x = topology->measurementPosition(state.localPosition()).x();
23 
24  double V =
25  topology->measurementError(hit.localPosition(),
26  hit.localPositionError()).uu();
27  double C =
28  topology->measurementError(state.localPosition(),
29  state.localError().positionError()).uu();
30  double r = m - x;
31  double R = V + C;
32 
33  double est = r*r/R;
34 
35  return returnIt(est);
36 }
37 
LocalError positionError() const
virtual const Topology & topology() const =0
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
const LocalTrajectoryError & localError() const
virtual const GeomDetType & type() const =0
bool isTrackerPixel() const
Definition: GeomDetType.cc:30
virtual LocalError localPositionError() const =0
virtual const GeomDetUnit * detUnit() const
Definition: DDAxes.h:10
virtual LocalPoint localPosition() const =0