Belle II Software
development
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
24
struct
ParameterVectorUtil
{
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>
37
static
ParameterVector < N1 + N2 >
stack
(
const
ParameterVector<N1>& upperPar,
38
const
ParameterVector<N2>& lowerPar)
39
{
40
ParameterVector < N1 + N2 > result;
41
mapToEigen(result) << mapToEigen(upperPar), mapToEigen(lowerPar);
42
return
result;
43
}
44
};
45
}
47
}
Belle2
Abstract base class for different kinds of events.
Definition
MillepedeAlgorithm.h:17
Belle2::TrackFindingCDC::ParameterVectorUtil
Structure to gather some utility functions for the ParameterVector.
Definition
ParameterVectorUtil.h:24
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:37
Belle2::TrackFindingCDC::ParameterVectorUtil::getSub
static AParameterVector getSub(const ParameterVector< N > &par)
Gets a sub vector from a parameter vector.
Definition
ParameterVectorUtil.h:28
tracking
trackFindingCDC
numerics
include
ParameterVectorUtil.h
Generated on Mon Sep 1 2025 03:00:54 for Belle II Software by
1.13.2