Belle II Software  release-05-02-19
UncertainParameters.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/numerics/CovarianceMatrix.h>
13 #include <tracking/trackFindingCDC/numerics/PrecisionMatrix.h>
14 #include <tracking/trackFindingCDC/numerics/JacobianMatrix.h>
15 #include <tracking/trackFindingCDC/numerics/ParameterVector.h>
16 
17 namespace Belle2 {
22  namespace TrackFindingCDC {
23 
25  template <class T, class AEParameters>
26  struct UncertainParametersUtil {
27 
29  using EParamaters = AEParameters;
30 
32  static const size_t c_N = EParamaters::c_N;
33 
35  using ParameterVector = TrackFindingCDC::ParameterVector<c_N>;
36 
38  using CovarianceMatrix = TrackFindingCDC::CovarianceMatrix<c_N>;
39 
41  using PrecisionMatrix = TrackFindingCDC::PrecisionMatrix<c_N>;
42 
44  using JacobianMatrix = TrackFindingCDC::JacobianMatrix<c_N>;
45 
47  static void transport(const JacobianMatrix& jacobian, CovarianceMatrix& cov);
48 
50  static CovarianceMatrix transported(const JacobianMatrix& jacobian,
51  const CovarianceMatrix& cov);
52 
55 
57  static void reverse(CovarianceMatrix& cov);
58 
60  static CovarianceMatrix reversed(const CovarianceMatrix& cov);
61 
63  static CovarianceMatrix identity();
64 
67 
70 
76 
82 
84  template <class AParameterVector, int I = 0>
85  static AParameterVector getSubParameterVector(const ParameterVector& par);
86 
88  template <class ACovarianceMatrix, int I = 0>
89  static ACovarianceMatrix getSubCovarianceMatrix(const CovarianceMatrix& cov);
90  };
91  }
93 }
Belle2::TrackFindingCDC::UncertainParametersUtil::reversalJacobian
static JacobianMatrix reversalJacobian()
Jacobian matrix needed in the reversal operation of the parameter vector.
Definition: UncertainParameters.icc.h:48
Belle2::TrackFindingCDC::UncertainParametersUtil::transport
static void transport(const JacobianMatrix &jacobian, CovarianceMatrix &cov)
Transport the covariance matrix inplace with the given jacobian matrix.
Definition: UncertainParameters.icc.h:34
Belle2::TrackFindingCDC::UncertainParametersUtil::identity
static CovarianceMatrix identity()
Returns an identity matrix.
Definition: UncertainParameters.icc.h:65
Belle2::TrackFindingCDC::UncertainParametersUtil::JacobianMatrix
TrackFindingCDC::JacobianMatrix< c_N > JacobianMatrix
The matrix type used to translate covariances and precisions im auto mapping of the parameter space.
Definition: UncertainParameters.h:52
Belle2::TrackFindingCDC::UncertainParametersUtil::precisionFromCovariance
static PrecisionMatrix precisionFromCovariance(const CovarianceMatrix &cov)
Convert the covariance matrix to the corresponding precision matrix.
Definition: UncertainParameters.icc.h:94
Belle2::TrackFindingCDC::UncertainParametersUtil::getSubCovarianceMatrix
static ACovarianceMatrix getSubCovarianceMatrix(const CovarianceMatrix &cov)
Getter for a sub part of the covariance matrix.
Definition: UncertainParameters.icc.h:80
Belle2::TrackFindingCDC::UncertainParametersUtil::transported
static CovarianceMatrix transported(const JacobianMatrix &jacobian, const CovarianceMatrix &cov)
Return a copy of the covariance matrix transported with the given jacobian matrix.
Definition: UncertainParameters.icc.h:41
Belle2::TrackFindingCDC::UncertainParametersUtil::ParameterVector
TrackFindingCDC::ParameterVector< c_N > ParameterVector
The vector type representing the n related parameters.
Definition: UncertainParameters.h:43
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::UncertainParametersUtil::getSubParameterVector
static AParameterVector getSubParameterVector(const ParameterVector &par)
Getter for a sub part of the covariance matrix.
Definition: UncertainParameters.icc.h:72
Belle2::TrackFindingCDC::UncertainParametersUtil::covarianceFromPrecision
static CovarianceMatrix covarianceFromPrecision(const PrecisionMatrix &prec)
Convert the precision matrix to the corresponding covariance matrix.
Definition: UncertainParameters.icc.h:87
Belle2::TrackFindingCDC::UncertainParametersUtil::PrecisionMatrix
TrackFindingCDC::PrecisionMatrix< c_N > PrecisionMatrix
The matrix type representing the precision of the n related parameters.
Definition: UncertainParameters.h:49
Belle2::TrackFindingCDC::UncertainParametersUtil::EParamaters
AEParameters EParamaters
Indices of the parameters.
Definition: UncertainParameters.h:37
Belle2::TrackFindingCDC::UncertainParametersUtil::c_N
static const size_t c_N
Number of elements.
Definition: UncertainParameters.h:40
Belle2::TrackFindingCDC::UncertainParametersUtil::covarianceFromFullPrecision
static CovarianceMatrix covarianceFromFullPrecision(const PrecisionMatrix &prec)
Convert the precision matrix to the corresponding covariance matrix.
Definition: UncertainParameters.icc.h:101
Belle2::TrackFindingCDC::UncertainParametersUtil::CovarianceMatrix
TrackFindingCDC::CovarianceMatrix< c_N > CovarianceMatrix
The matrix type representing the covariance of the n related parameters.
Definition: UncertainParameters.h:46
Belle2::TrackFindingCDC::PlainMatrix
A matrix implementation to be used as an interface typ through out the track finder.
Definition: PlainMatrix.h:50
Belle2::TrackFindingCDC::UncertainParametersUtil::reversed
static CovarianceMatrix reversed(const CovarianceMatrix &cov)
Return a copy of the reversed covariance matrix.
Definition: UncertainParameters.icc.h:59
Belle2::TrackFindingCDC::UncertainParametersUtil::reverse
static void reverse(CovarianceMatrix &cov)
Reverse the covariance matrix inplace.
Definition: UncertainParameters.icc.h:53
Belle2::TrackFindingCDC::UncertainParametersUtil::precisionFromFullCovariance
static PrecisionMatrix precisionFromFullCovariance(const CovarianceMatrix &cov)
Convert the covariance matrix to the corresponding precision matrix.
Definition: UncertainParameters.icc.h:108