Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateAccessor.h"
0002 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0003 #include "TrackingTools/TrajectoryParametrization/interface/CurvilinearTrajectoryError.h"
0004 
0005 float TrajectoryStateAccessor::inversePtError() const {
0006   GlobalVector momentum = theFts.momentum();
0007   AlgebraicSymMatrix55 const& errMatrix = theFts.curvilinearError().matrix();
0008 
0009   float ptRec2 = momentum.perp2();
0010   float pzRec = momentum.z();
0011   float pzRec2 = pzRec * pzRec;
0012   float CosTheta2 = (pzRec2) / (ptRec2 + pzRec2);
0013   float SinTheta2 = 1.f - CosTheta2;
0014 
0015   float par2 = CosTheta2 / ptRec2;
0016 
0017   float InvpErr = errMatrix(0, 0);
0018   float thetaErr = errMatrix(1, 1);
0019   float corr = errMatrix(0, 1);
0020 
0021   float invPtErr2 = (InvpErr + par2 * thetaErr - 2.f * std::sqrt(par2) * corr) / (SinTheta2);
0022   return std::sqrt(invPtErr2);
0023 }