Belle II Software  release-05-02-19
ParameterVectorUtil.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/ParameterVector.h>
13 
14 #include <tracking/trackFindingCDC/numerics/EigenView.h>
15 
16 #include <type_traits>
17 
18 namespace Belle2 {
23  namespace TrackFindingCDC {
24 
26  struct ParameterVectorUtil {
27 
29  template <class AParameterVector, int I = 0, int N = 0>
30  static AParameterVector getSub(const ParameterVector<N>& par)
31  {
32  constexpr const int M =
33  std::remove_reference_t<decltype(mapToEigen(AParameterVector()))>::RowsAtCompileTime;
34  return par.template block<M, 1>(I, 0);
35  }
36 
38  template <int N1, int N2>
40  const ParameterVector<N2>& lowerPar)
41  {
43  mapToEigen(result) << mapToEigen(upperPar), mapToEigen(lowerPar);
44  return result;
45  }
46  };
47  }
49 }
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::PlainMatrix
A matrix implementation to be used as an interface typ through out the track finder.
Definition: PlainMatrix.h:50
Belle2::TrackFindingCDC::ParameterVectorUtil::stack
static ParameterVector< N1+N2 > stack(const ParameterVector< N1 > &upperPar, const ParameterVector< N2 > &lowerPar)
Combines two parameter vectors by stacking them over each other.
Definition: ParameterVectorUtil.h:47
Belle2::TrackFindingCDC::ParameterVectorUtil::getSub
static AParameterVector getSub(const ParameterVector< N > &par)
Gets a sub vector from a parameter vector.
Definition: ParameterVectorUtil.h:38