CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/TrackingTools/TrajectoryState/src/TrajectoryStateAccessor.cc

Go to the documentation of this file.
00001 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateAccessor.h"
00002 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00003 #include "TrackingTools/TrajectoryParametrization/interface/CurvilinearTrajectoryError.h"
00004 
00005 double TrajectoryStateAccessor::inversePtError() const
00006 {
00007   GlobalVector momentum = theFts.momentum();
00008   AlgebraicSymMatrix55 errMatrix = theFts.curvilinearError().matrix();
00009   
00010   float ptRec2= momentum.perp2();
00011   float pzRec = momentum.z();
00012   float pzRec2 = pzRec*pzRec;
00013   float CosTheta2 = (pzRec2)/(ptRec2+pzRec2);
00014   float SinTheta2 = 1.f-CosTheta2;
00015  
00016   float par2 = CosTheta2/ptRec2;
00017 
00018   float InvpErr=errMatrix(0,0);
00019   float thetaErr=errMatrix(1,1);
00020   float corr=errMatrix(0,1);
00021 
00022   float invPtErr2 =
00023     ( InvpErr + par2*thetaErr - 
00024       2.f*std::sqrt(par2)*corr
00025     )/(SinTheta2);
00026   return std::sqrt(invPtErr2);
00027 }
00028