ATLAS Offline Software
LocalParameters.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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 <cmath>
20 #include <array>
21 
22 class MsgStream;
23 
25 
26 namespace Trk {
27 
98  class LocalParameters : public Amg::VectorX {
99 
100  public:
102  LocalParameters() = default;
103  //default other operations
104  LocalParameters(const LocalParameters&) = default;
108  ~LocalParameters() = default;
109 
112 
115  const DefinedParameter& two);
116 
118  LocalParameters(const Amg::Vector2D& lp);
119 
121  LocalParameters(double locone, double loctwo, double tphi, double ttheta, double tqOverp);
122 
124  template <size_t N>
125  LocalParameters(const std::array<DefinedParameter,N>& parms);
126 
128  LocalParameters(const std::vector<DefinedParameter>& parms);
129 
132 
134  const Amg::MatrixX& reductionMatrix() const;
135 
137  const Amg::MatrixX& expansionMatrix() const;
138 
140  const Amg::VectorX& asVector() const;
141 
143  int dimension() const;
144 
146  int parameterKey() const;
147 
149  bool contains(ParamDefs par) const;
150 
152  const double & operator[](ParamDefs par) const;
153 
155  double & operator[](ParamDefs par);
156 
163  double get(ParamDefs par) const;
164 
171  double get(ParamDefs par);
172 
174  friend MsgStream& operator << ( MsgStream& sl, const LocalParameters& lp);
175  friend std::ostream& operator << ( std::ostream& sl, const LocalParameters& lp);
176 
177  protected:
178  friend class ::LocalParametersCnv_p1;
179  int m_parameterkey = 0;
180  };
181 
182 } // end of namespace
183 
185 #endif // TRKEVENTPRIMITIVES_LOCALPARAMETERS_H
Trk::LocalParameters::reductionMatrix
const Amg::MatrixX & reductionMatrix() const
Reduction matrix from 5x5 to the [dimension()]x[dimension()].
Definition: LocalParameters.cxx:69
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:73
Trk::LocalParameters
Definition: LocalParameters.h:98
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:32
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
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:38
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:98
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:77
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
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:179
ProjectionMatricesSet.h
Trk::LocalParameters::~LocalParameters
~LocalParameters()=default
LocalParameters.icc