Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:39

0001 #include "TrackingTools/KalmanUpdators/interface/Chi2Strip1DEstimator.h"
0002 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
0003 #include "Geometry/CommonTopologies/interface/StripTopology.h"
0004 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0005 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
0006 using namespace std;
0007 
0008 pair<bool, double> Chi2Strip1DEstimator::estimate(const TrajectoryStateOnSurface& state,
0009                                                   const TrackingRecHit& hit) const {
0010   if (  //hit.isMatched() ||
0011       hit.detUnit()->type().isTrackerPixel())
0012     return HitReturnType(false, 0.);
0013 
0014   const StripTopology* topology = dynamic_cast<const StripTopology*>(&(hit.detUnit()->topology()));
0015 
0016   double m = topology->measurementPosition(hit.localPosition()).x();
0017 
0018   double x = topology->measurementPosition(state.localPosition()).x();
0019 
0020   double V = topology->measurementError(hit.localPosition(), hit.localPositionError()).uu();
0021   double C = topology->measurementError(state.localPosition(), state.localError().positionError()).uu();
0022   double r = m - x;
0023   double R = V + C;
0024 
0025   double est = r * r / R;
0026 
0027   return returnIt(est);
0028 }