Back to home page

Project CMSSW displayed by LXR

 
 

    


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   // Warning: after the transverseFlightPath.Unit() statement, the
0012   // transverseFlightPath vector is CHANGED to a UNIT vector.
0013   double ipError = sqrt(ROOT::Math::Similarity(transverseFlightPath.Unit(), error));
0014   return Measurement1D(length, ipError);
0015 }