File indexing completed on 2024-04-06 12:31:41
0001 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateClosestToBeamLine.h"
0002
0003 Measurement1D TrajectoryStateClosestToBeamLine::transverseImpactParameter() const {
0004 AlgebraicSymMatrix33 error =
0005 theBeamSpot.rotatedCovariance3D() + theFTS.cartesianError().matrix().Sub<AlgebraicSymMatrix33>(0, 0);
0006
0007 GlobalPoint impactPoint = theFTS.position();
0008 AlgebraicVector3 transverseFlightPath(
0009 impactPoint.x() - thePointOnBeamLine.x(), impactPoint.y() - thePointOnBeamLine.y(), 0.);
0010 double length = ROOT::Math::Mag(transverseFlightPath);
0011
0012
0013 double ipError = sqrt(ROOT::Math::Similarity(transverseFlightPath.Unit(), error));
0014 return Measurement1D(length, ipError);
0015 }