Belle II Software light-2406-ragdoll
Projection.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * External Contributor: Wouter Hulsbergen *
5 * *
6 * See git log for contributors and copyright holders. *
7 * This file is licensed under LGPL-3.0, see LICENSE.md. *
8 **************************************************************************/
9#pragma once
10
11#include <analysis/VertexFitting/TreeFitter/EigenStackConfig.h>
12
13#include <Eigen/Dense>
14
15namespace TreeFitter {
16
18 class Projection {
19
20 public:
21
23 Projection(int dimP, int dimC);
24
26 virtual ~Projection() {};
27
29 Eigen::Matrix < double, -1, -1, 0, 7, MAX_MATRIX_SIZE > & getH() {return m_H;}
30
32 const Eigen::Matrix < double, -1, -1, 0, 7, MAX_MATRIX_SIZE > getH() const {return m_H;}
33
35 Eigen::Matrix < double, -1, 1, 0, 7, 1 > & getResiduals() {return m_residual;}
36
38 const Eigen::Matrix < double, -1, 1, 0, 7, 1 > getResiduals() const {return m_residual;}
39
41 double getElementInResiduals(int row) { return m_residual(m_offset + row, 1); }
42
44 Eigen::Matrix < double, -1, -1, 0, 7, 7 > & getV() {return m_V;}
45
47 const Eigen::Matrix < double, -1, -1, 0, 7, 7 > & getV() const {return m_V;}
48
50 void resetProjection();
51
53 unsigned int getOffset() const { return m_offset; }
54
56 void incrementOffset(unsigned int i) { m_offset += i; }
57
59 unsigned int offset() const { return m_offset; }
60
62 int getDim() const { return m_dimProj; }
63
65 int getDimCov() const { return m_dimCov; }
66 private:
67
69 Eigen::Matrix < double, -1, -1, 0, 7, MAX_MATRIX_SIZE > m_H;
70
72 Eigen::Matrix < double, -1, -1, 0, 7, 7 > m_V;
73
75 Eigen::Matrix < double, -1, 1, 0, 7, 1 > m_residual;
76
79
82
84 unsigned int m_offset;
85 };
86}
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...
Definition: Projection.h:18
int m_dimProj
dimension of H
Definition: Projection.h:81
unsigned int offset() const
get offset
Definition: Projection.h:59
int getDim() const
get size
Definition: Projection.h:62
Eigen::Matrix< double, -1, 1, 0, 7, 1 > m_residual
residuals of constraint
Definition: Projection.h:75
Eigen::Matrix< double, -1, -1, 0, 7, 7 > & getV()
get residuals cov matrix
Definition: Projection.h:44
unsigned int m_offset
offset for constraint index.
Definition: Projection.h:84
const Eigen::Matrix< double, -1, 1, 0, 7, 1 > getResiduals() const
get residuals
Definition: Projection.h:38
int getDimCov() const
get size
Definition: Projection.h:65
const Eigen::Matrix< double, -1, -1, 0, 7, 7 > & getV() const
get residuals cov matrix
Definition: Projection.h:47
double getElementInResiduals(int row)
ge element in residuals
Definition: Projection.h:41
const Eigen::Matrix< double, -1, -1, 0, 7, MAX_MATRIX_SIZE > getH() const
get projection matrix
Definition: Projection.h:32
int m_dimCov
dimension of the covariance
Definition: Projection.h:78
Eigen::Matrix< double, -1, -1, 0, 7, MAX_MATRIX_SIZE > & getH()
get projection matrix
Definition: Projection.h:29
Eigen::Matrix< double, -1, -1, 0, 7, 7 > m_V
covariance matrix of this constraint (r')
Definition: Projection.h:72
void resetProjection()
reset projection
Definition: Projection.cc:23
Eigen::Matrix< double, -1, 1, 0, 7, 1 > & getResiduals()
get residuals
Definition: Projection.h:35
void incrementOffset(unsigned int i)
increment offset
Definition: Projection.h:56
virtual ~Projection()
destructor
Definition: Projection.h:26
Eigen::Matrix< double, -1, -1, 0, 7, MAX_MATRIX_SIZE > m_H
jacobian of the constraint, converts x,p,E<->system of residuals
Definition: Projection.h:69
unsigned int getOffset() const
get offset (for mergedcosntraints)
Definition: Projection.h:53