File indexing completed on 2025-10-13 08:16:38
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/SpacePointFormation2/PixelSpacePointBuilder.hpp"
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Surfaces/Surface.hpp"
0013 #include "Acts/Utilities/MathHelpers.hpp"
0014
0015 namespace Acts {
0016
0017 Vector2 PixelSpacePointBuilder::computeVarianceZR(
0018 const GeometryContext& gctx, const Surface& surface,
0019 const Vector3& spacePoint, const SquareMatrix2& localCov) {
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 const double x = spacePoint.x();
0032 const double y = spacePoint.y();
0033 const double scale = 2 / fastHypot(x, y);
0034 ActsMatrix<2, 3> jacXyzToZr = ActsMatrix<2, 3>::Zero();
0035 jacXyzToZr(0, 2) = 1;
0036 jacXyzToZr(1, 0) = scale * x;
0037 jacXyzToZr(1, 1) = scale * y;
0038
0039
0040 SquareMatrix3 rotLocalToGlobal =
0041 surface.referenceFrame(gctx, spacePoint, Vector3::Zero());
0042
0043
0044 SquareMatrix2 jac = jacXyzToZr * rotLocalToGlobal.topLeftCorner<3, 2>();
0045
0046
0047 Vector2 result = (jac * localCov * jac.transpose()).diagonal();
0048 return result;
0049 }
0050
0051 }