Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CovarianceTransport.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CovarianceTransport.hpp
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 
9 #pragma once
10 
15 
16 #include <algorithm>
17 #include <optional>
18 #include <tuple>
19 #include <variant>
20 
21 namespace Acts {
22 
23 using VariantCovariance = std::variant<BoundSquareMatrix, FreeSquareMatrix>;
24 
26  std::variant<BoundMatrix, BoundToFreeMatrix, FreeToBoundMatrix, FreeMatrix>;
27 
32  bool applyTransport = false;
33 
35  const Surface* atSurface = nullptr;
36 
38  Vector3 atPosition = Vector3::Zero();
39 
42 
44  std::optional<BoundToFreeMatrix> boundToFreeJacobian = std::nullopt;
46  std::optional<ActsMatrix<8, 7>> anglesToDirectionJacobian = std::nullopt;
47  std::optional<ActsMatrix<7, 8>> directionToAnglesJacobian = std::nullopt;
48 
50  FreeMatrix freeTransportJacobian = FreeMatrix::Identity();
52  FreeVector freeToPathDerivatives = FreeVector::Zero();
53 
55  CovarianceCache() = default;
56 
69  const Vector3& position, const BoundVector& boundParameters,
70  const BoundSquareMatrix& boundCovariance);
71 
81  CovarianceCache(const Vector3& position, const Vector3& direction,
82  const BoundSquareMatrix& boundCovariance);
83 
89  CovarianceCache(const FreeVector& freeParameters,
90  const FreeSquareMatrix& freeCovariance);
91 };
92 
101 std::tuple<VariantCovariance, VariantTransportJacobian>
103  const FreeVector& parameters,
104  CovarianceCache& cCache);
105 
110 std::tuple<VariantCovariance, VariantTransportJacobian>
112  CovarianceCache& cCache);
113 
117 std::tuple<VariantCovariance, VariantTransportJacobian>
119 
120 } // namespace Acts