Belle II Software  release-08-01-10
ParameterVectorUtil.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #pragma once
9 
10 #include <tracking/trackFindingCDC/numerics/ParameterVector.h>
11 
12 #include <tracking/trackFindingCDC/numerics/EigenView.h>
13 
14 #include <type_traits>
15 
16 namespace Belle2 {
21  namespace TrackFindingCDC {
22 
25 
27  template <class AParameterVector, int I = 0, int N = 0>
28  static AParameterVector getSub(const ParameterVector<N>& par)
29  {
30  constexpr const int M =
31  std::remove_reference_t<decltype(mapToEigen(AParameterVector()))>::RowsAtCompileTime;
32  return par.template block<M, 1>(I, 0);
33  }
34 
36  template <int N1, int N2>
38  const ParameterVector<N2>& lowerPar)
39  {
41  mapToEigen(result) << mapToEigen(upperPar), mapToEigen(lowerPar);
42  return result;
43  }
44  };
45  }
47 }
A matrix implementation to be used as an interface typ through out the track finder.
Definition: PlainMatrix.h:40
Abstract base class for different kinds of events.
Structure to gather some utility functions for the ParameterVector.
static ParameterVector< N1+N2 > stack(const ParameterVector< N1 > &upperPar, const ParameterVector< N2 > &lowerPar)
Combines two parameter vectors by stacking them over each other.
static AParameterVector getSub(const ParameterVector< N > &par)
Gets a sub vector from a parameter vector.