EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
make_projection_matrix.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file make_projection_matrix.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2016-2020 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include "
Acts/Utilities/Definitions.hpp
"
12
13
namespace
Acts {
14
namespace
detail {
15
29
template
<
unsigned
int
columns,
unsigned
int
... rows>
30
struct
make_projection_matrix
;
31
32
// build projection matrix by iteratively stacking row vectors
33
template
<
unsigned
int
columns,
unsigned
int
i,
unsigned
int
...
N
>
34
struct
make_projection_matrix
<columns, i,
N
...> {
35
static
ActsMatrixD
<
sizeof
...(N) + 1, columns>
init
() {
36
ActsRowVectorD<columns>
v
;
37
v.setZero();
38
v
(i) = 1;
39
40
ActsMatrixD
<
sizeof
...(N) + 1, columns>
m
;
41
m
.row(0) <<
v
;
42
m
.block(1, 0,
sizeof
...(
N
), columns)
43
<<
make_projection_matrix<columns, N...>::init
();
44
45
return
m
;
46
}
47
};
48
49
// projection matrix for a single local parameter is a simple row vector
50
template
<
unsigned
int
columns,
unsigned
int
i>
51
struct
make_projection_matrix
<columns, i> {
52
static
ActsRowVectorD<columns>
init
() {
53
ActsRowVectorD<columns>
v
;
54
v.setZero();
55
v
(i) = 1;
56
return
v
;
57
}
58
};
59
60
}
// namespace detail
61
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
EventData
detail
make_projection_matrix.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:22
using
1.8.2 with
EIC GitHub integration