ATLAS Offline Software
LocalParameters.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // LocalParameters.h, (c) ATLAS Detector software
8 
9 #ifndef TRKEVENTPRIMITIVES_LOCALPARAMETERS_H
10 #define TRKEVENTPRIMITIVES_LOCALPARAMETERS_H
11 
14 //
18 //
19 #include <array>
20 #include <vector>
21 #include <iosfwd> //std::ostream
22 
23 
24 class MsgStream;
25 
27 
28 namespace Trk {
29 
100  class LocalParameters : public Amg::VectorX {
101 
102  public:
104  LocalParameters() = default;
105  //default other operations
106  LocalParameters(const LocalParameters&) = default;
110  ~LocalParameters() = default;
111 
114 
117  const DefinedParameter& two);
118 
120  LocalParameters(const Amg::Vector2D& lp);
121 
123  LocalParameters(double locone, double loctwo, double tphi, double ttheta, double tqOverp);
124 
126  template <size_t N>
127  LocalParameters(const std::array<DefinedParameter,N>& parms);
128 
130  LocalParameters(const std::vector<DefinedParameter>& parms);
131 
134 
136  const Amg::MatrixX& reductionMatrix() const;
137 
139  const Amg::MatrixX& expansionMatrix() const;
140 
142  const Amg::VectorX& asVector() const;
143 
145  int dimension() const;
146 
148  int parameterKey() const;
149 
151  bool contains(ParamDefs par) const;
152 
154  const double & operator[](ParamDefs par) const;
155 
157  double & operator[](ParamDefs par);
158 
165  double get(ParamDefs par) const;
166 
173  double get(ParamDefs par);
174 
176  friend MsgStream& operator << ( MsgStream& sl, const LocalParameters& lp);
177  friend std::ostream& operator << ( std::ostream& sl, const LocalParameters& lp);
178 
179  protected:
180  friend class ::LocalParametersCnv_p1;
181  int m_parameterkey = 0;
182  };
183 
184 } // end of namespace
185 
187 #endif // TRKEVENTPRIMITIVES_LOCALPARAMETERS_H
Trk::LocalParameters::reductionMatrix
const Amg::MatrixX & reductionMatrix() const
Reduction matrix from 5x5 to the [dimension()]x[dimension()].
Definition: LocalParameters.cxx:72
Trk::LocalParameters::LocalParameters
LocalParameters(const LocalParameters &)=default
Trk::LocalParameters::expansionMatrix
const Amg::MatrixX & expansionMatrix() const
Expansion matrix from 5x5 to the [dimension()]x[dimension()].
Definition: LocalParameters.cxx:76
Trk::LocalParameters
Definition: LocalParameters.h:100
Trk::LocalParameters::asVector
const Amg::VectorX & asVector() const
Amg Vector representation.
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Trk::LocalParameters::LocalParameters
LocalParameters(const std::array< DefinedParameter, N > &parms)
constructor for N Dim size known at compile time
Trk::LocalParameters::parameterKey
int parameterKey() const
Identifier key for matrix expansion/reduction.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::ParamDefs
ParamDefs
Definition: ParamDefs.h:32
Trk::LocalParameters::LocalParameters
LocalParameters()=default
Default constructor used for POOL.
Trk::LocalParameters::contains
bool contains(ParamDefs par) const
The simple check for the clients whether the parameter is contained.
Trk::one
@ one
Definition: TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h:22
LocalParametersCnv_p1
Definition: LocalParametersCnv_p1.h:24
Trk::LocalParameters::get
double get(ParamDefs par)
Retrieve specified parameter.
ParamDefs.h
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
Trk::LocalParameters::get
double get(ParamDefs par) const
Retrieve specified parameter (const version).
GeoPrimitives.h
DefinedParameter.h
Trk::two
@ two
Definition: TrkDetDescr/TrkSurfaces/TrkSurfaces/RealQuadraticEquation.h:23
Trk::LocalParameters::operator=
LocalParameters & operator=(LocalParameters &&)=default
Trk::LocalParameters::operator<<
friend MsgStream & operator<<(MsgStream &sl, const LocalParameters &lp)
Overload of << operator for both, MsgStream and std::ostream for debug output.
Definition: LocalParameters.cxx:101
Trk::LocalParameters::LocalParameters
LocalParameters(LocalParameters &&)=default
Trk::LocalParameters::clone
LocalParameters * clone() const
Pseudo-constructor.
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::LocalParameters::operator[]
const double & operator[](ParamDefs par) const
Read from data members.
Definition: LocalParameters.cxx:80
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:28
Trk::LocalParameters::operator=
LocalParameters & operator=(const LocalParameters &)=default
Trk::LocalParameters::dimension
int dimension() const
Dimension of this localParameters() vector.
Trk::LocalParameters::m_parameterkey
int m_parameterkey
Definition: LocalParameters.h:181
ProjectionMatricesSet.h
Trk::LocalParameters::~LocalParameters
~LocalParameters()=default
LocalParameters.icc