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 SinTheta=sin(momentum.theta()); 00011 float CosTheta=cos(momentum.theta()); 00012 float ptRec=momentum.perp(); 00013 float InvpErr=errMatrix(0,0); 00014 float thetaErr=errMatrix(1,1); 00015 float corr=errMatrix(0,1); 00016 float invPtErr2 = 1/(SinTheta*SinTheta)* 00017 (InvpErr + 00018 ((CosTheta*CosTheta)/(ptRec*ptRec))*thetaErr - 00019 2*(CosTheta/ptRec)*corr); 00020 return sqrt(invPtErr2); 00021 } 00022