CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrajectoryStateAccessor.cc
Go to the documentation of this file.
4 
6  GlobalVector momentum = theFts.momentum();
7  AlgebraicSymMatrix55 const& errMatrix = theFts.curvilinearError().matrix();
8 
9  float ptRec2 = momentum.perp2();
10  float pzRec = momentum.z();
11  float pzRec2 = pzRec * pzRec;
12  float CosTheta2 = (pzRec2) / (ptRec2 + pzRec2);
13  float SinTheta2 = 1.f - CosTheta2;
14 
15  float par2 = CosTheta2 / ptRec2;
16 
17  float InvpErr = errMatrix(0, 0);
18  float thetaErr = errMatrix(1, 1);
19  float corr = errMatrix(0, 1);
20 
21  float invPtErr2 = (InvpErr + par2 * thetaErr - 2.f * std::sqrt(par2) * corr) / (SinTheta2);
22  return std::sqrt(invPtErr2);
23 }
const FreeTrajectoryState & theFts
T perp2() const
Definition: PV3DBase.h:68
const CurvilinearTrajectoryError & curvilinearError() const
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
GlobalVector momentum() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const AlgebraicSymMatrix55 & matrix() const