#include <TrajectoryStateAccessor.h>
Public Member Functions | |
double | inversePtError () const |
TrajectoryStateAccessor (const FreeTrajectoryState &fts) | |
Private Attributes | |
const FreeTrajectoryState & | theFts |
Helper class to obtain the uncertainty on specific trajectory parameters.
Definition at line 10 of file TrajectoryStateAccessor.h.
TrajectoryStateAccessor::TrajectoryStateAccessor | ( | const FreeTrajectoryState & | fts | ) | [inline] |
Definition at line 13 of file TrajectoryStateAccessor.h.
: theFts(fts) {}
double TrajectoryStateAccessor::inversePtError | ( | ) | const |
Definition at line 5 of file TrajectoryStateAccessor.cc.
References corr, FreeTrajectoryState::curvilinearError(), CurvilinearTrajectoryError::matrix(), FreeTrajectoryState::momentum(), PV3DBase< T, PVType, FrameType >::perp2(), mathSSE::sqrt(), theFts, and PV3DBase< T, PVType, FrameType >::z().
Referenced by MinPtTrajectoryFilter::test(), and ThresholdPtTrajectoryFilter::test().
{ GlobalVector momentum = theFts.momentum(); AlgebraicSymMatrix55 errMatrix = theFts.curvilinearError().matrix(); float ptRec2= momentum.perp2(); float pzRec = momentum.z(); float pzRec2 = pzRec*pzRec; float CosTheta2 = (pzRec2)/(ptRec2+pzRec2); float SinTheta2 = 1.f-CosTheta2; float par2 = CosTheta2/ptRec2; float InvpErr=errMatrix(0,0); float thetaErr=errMatrix(1,1); float corr=errMatrix(0,1); float invPtErr2 = ( InvpErr + par2*thetaErr - 2.f*std::sqrt(par2)*corr )/(SinTheta2); return std::sqrt(invPtErr2); }
const FreeTrajectoryState& TrajectoryStateAccessor::theFts [private] |
Definition at line 20 of file TrajectoryStateAccessor.h.
Referenced by inversePtError().