2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
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);
17 inline LocalParameters*
18 LocalParameters::clone() const
20 return new LocalParameters(*this);
23 inline const Amg::VectorX&
24 LocalParameters::asVector() const
30 LocalParameters::dimension() const
32 return Amg::VectorX::rows();
36 LocalParameters::parameterKey() const
38 return m_parameterkey;
42 LocalParameters::contains(ParamDefs par) const
44 return (m_parameterkey & (1 << int(par)));
48 LocalParameters::get(ParamDefs par) const
54 LocalParameters::get(ParamDefs par)