Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GsfUtils.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GsfUtils.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2021 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
10 
12 
13 #include <cstddef>
14 
15 namespace Acts {
16 namespace detail {
17 
18 using TrackStateTraits =
20 
22  const double* fullCalibrated, const double* fullCalibratedCovariance,
23  TrackStateTraits::Covariance predictedCovariance,
24  TrackStateTraits::Projector projector, unsigned int calibratedSize) {
25  return visit_measurement(calibratedSize, [&](auto N) {
26  constexpr size_t kMeasurementSize = decltype(N)::value;
27 
29  calibrated{fullCalibrated};
30 
31  typename Acts::TrackStateTraits<
32  kMeasurementSize, true>::MeasurementCovariance calibratedCovariance{
33  fullCalibratedCovariance};
34 
35  const auto H =
36  projector.template topLeftCorner<kMeasurementSize, eBoundSize>().eval();
37 
38  return (H * predictedCovariance * H.transpose() + calibratedCovariance)
39  .determinant();
40  });
41 }
42 } // namespace detail
43 } // namespace Acts