ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkEvent
TrkEventPrimitives
TrkEventPrimitives
LocalParameters.icc
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
namespace Trk {
5
6
template <size_t N>
7
LocalParameters::LocalParameters(
8
const std::array<Trk::DefinedParameter,N>& parms)
9
: Amg::VectorX(N), m_parameterkey(0) {
10
static_assert(N > 0 && N <= 5, "Number of params required to be >0 and <=5");
11
for (size_t idx = 0; idx < N; ++idx) {
12
Amg::VectorX::operator[](idx) = parms[idx].first;
13
m_parameterkey |= 1 << int(parms[idx].second);
14
}
15
}
16
17
inline LocalParameters*
18
LocalParameters::clone() const
19
{
20
return new LocalParameters(*this);
21
}
22
23
inline const Amg::VectorX&
24
LocalParameters::asVector() const
25
{
26
return (*this);
27
}
28
29
inline int
30
LocalParameters::dimension() const
31
{
32
return Amg::VectorX::rows();
33
}
34
35
inline int
36
LocalParameters::parameterKey() const
37
{
38
return m_parameterkey;
39
}
40
41
inline bool
42
LocalParameters::contains(ParamDefs par) const
43
{
44
return (m_parameterkey & (1 << int(par)));
45
}
46
47
inline double
48
LocalParameters::get(ParamDefs par) const
49
{
50
return (*this)[par];
51
}
52
53
inline double
54
LocalParameters::get(ParamDefs par)
55
{
56
return (*this)[par];
57
}
58
}
Generated on
for ATLAS Offline Software by
1.17.0