CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoPixelVertexing/PixelTriplets/plugins/ThirdHitZPrediction.h

Go to the documentation of this file.
00001 #ifndef ThirdHitZPrediction_H
00002 #define ThirdHitZPrediction_H
00003 
00004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00005 #include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"
00006 #include<cmath>
00007 
00008 
00009 class  ThirdHitZPrediction {
00010 public:
00011   typedef PixelRecoRange<float> Range;
00012   ThirdHitZPrediction(const GlobalPoint& p1, float erroRPhi1, float errorZ1,
00013                       const GlobalPoint& p2, float erroRPhi2, float errorZ2, 
00014                       double curvature, double  nSigma = 3.) : 
00015     thePoint2(p2),
00016     sqr_errorXY12(erroRPhi1*erroRPhi1+erroRPhi2*erroRPhi2),
00017     sqr_errorXY2(erroRPhi2*erroRPhi2),
00018     theErrorZ1(errorZ1),
00019     theErrorZ2(errorZ2),
00020     theCurvature(curvature), theNSigma(nSigma){
00021     auto d = p2-p1;
00022     dR12 = d.perp();   if (dR12 < 1.e-5) dR12 = 1.e-5;
00023     dS12 = std::abs(0.5*dR12*theCurvature) <1 ? std::asin(0.5*dR12*theCurvature) : 1.;
00024     dZ12 = d.z();
00025   }
00026   Range operator()(const GlobalPoint& p3, float erroRPhi3) const;
00027 private:
00028   GlobalPoint thePoint2;
00029   double dR12, dZ12, dS12;
00030   double sqr_errorXY12; 
00031   double sqr_errorXY2; 
00032   double theErrorZ1, theErrorZ2;
00033   double theCurvature;
00034   double theNSigma;
00035 };
00036 #endif
00037