ATLAS Offline Software
Loading...
Searching...
No Matches
ParametersT.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6// ParametersT.h, (c) ATLAS Detector software
8
9#ifndef TRKPARAMETERSBASE_PARAMETERS_T_H
10#define TRKPARAMETERSBASE_PARAMETERS_T_H
11
18namespace Trk {
20
45template<int DIM, class T, class S>
46class ParametersT final
47 : public ParametersBase<DIM, T>
48 , public SurfaceUniqHolderImpl<S>
49{
50public:
51 static_assert(
52 (S::staticType == SurfaceType::Cone ||
53 S::staticType == SurfaceType::Cylinder ||
54 S::staticType == SurfaceType::Disc ||
55 S::staticType == SurfaceType::Perigee ||
56 S::staticType == SurfaceType::Plane || S::staticType == SurfaceType::Line),
57 "The surface type must be one of Cone, Cylinder, Disc, Perigee, Plane, "
58 "Line");
59
63 ParametersT() = default;
64
67 double loc2,
68 double phi,
69 double theta,
70 double qop,
71 const S& surface,
72 std::optional<AmgSymMatrix(DIM)> covariance = std::nullopt);
73
75 ParametersT(const AmgVector(DIM) & parameters,
76 const S& surface,
77 std::optional<AmgSymMatrix(DIM)> covariance = std::nullopt);
78
83 double charge,
84 const S& surface,
85 std::optional<AmgSymMatrix(DIM)> covariance = std::nullopt);
86
90 double phi,
91 double theta,
92 double qop,
93 const S& surface,
94 std::optional<AmgSymMatrix(DIM)> covariance = std::nullopt);
95
97 ParametersT(const ParametersT<DIM, T, S>& rhs) = default;
98
100 ParametersT(ParametersT<DIM, T, S>&& rhs) noexcept = default;
101
104
107
108 //** Destructor */
109 virtual ~ParametersT() = default;
110
112 virtual bool hasSurface() const override final;
113
115 virtual const S& associatedSurface() const override final;
116
118 virtual bool operator==(
119 const ParametersBase<DIM, T>& rhs) const override final;
120
121 // Needed to avoid ambiguities with c++20.
122 bool operator==(const ParametersT &rhs) const;
123
125 virtual ParametersT<DIM, T, S>* clone() const override final;
126
128 constexpr virtual ParametersType type() const override final;
129
131 constexpr virtual SurfaceType surfaceType() const override final;
132
134 virtual Amg::RotationMatrix3D measurementFrame() const override final;
135
137 virtual MsgStream& dump(MsgStream& out) const override final;
138 virtual std::ostream& dump(std::ostream& out) const override final;
139
140private:
141 /* Helper to factor in update of parameters*/
142 virtual void updateParametersHelper(const AmgVector(DIM) &) override final;
143
148 ParametersT(const AmgVector(DIM) & parameters,
149 const S* surface,
150 std::optional<AmgSymMatrix(DIM)> covariance = std::nullopt);
151 /*
152 * friends needed for Persistency
153 */
154 template<typename pars>
156 friend class ::TrackParametersCnv_p2;
157 friend class ::MeasuredPerigeeCnv_p1;
158 template<class SURFACE_CNV, class ATA_SURFACE>
159 friend class ::AtaSurfaceCnv_p1;
160
163};
164} // end of namespace Trk
165
166#include "TrkParametersBase/ParametersT.icc"
167#endif // TRKTRACKPARAMETERS_H
168
#define AmgSymMatrix(dim)
#define AmgVector(rows)
#define protected
Handle conditional ownership of surfaces.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Material effects engine interface for charged and neutral (fast track simulation) ,...
ParametersBase()=default
virtual ParametersT< DIM, Neutral, ConeSurface > * clone() const override final
ParametersT< DIM, T, S > & operator=(ParametersT< DIM, T, S > &&rhs) noexcept=default
Move assignment operator.
virtual Amg::RotationMatrix3D measurementFrame() const override final
virtual void updateParametersHelper(const AmgVector(DIM) &) override final
ParametersT()=default
default constructor ONLY for POOL
virtual constexpr ParametersType type() const override final
virtual bool hasSurface() const override final
Test to see if there's a surface there.
ParametersT(ParametersT< DIM, T, S > &&rhs) noexcept=default
Move constructor.
ParametersT< DIM, T, S > & operator=(const ParametersT< DIM, T, S > &rhs)=default
Assignment operator.
virtual const ConeSurface & associatedSurface() const override final
ParametersT(double loc1, double loc2, double phi, double theta, double qop, const S &surface, std::optional< AmgSymMatrix(DIM)> covariance=std::nullopt)
Constructor with local arguments - uses global <-> local for parameters.
ParametersT(const Amg::Vector3D &position, double phi, double theta, double qop, const S &surface, std::optional< AmgSymMatrix(DIM)> covariance=std::nullopt)
Constructor with mixed arguments 1 - uses global <-> local for parameters.
virtual ~ParametersT()=default
ParametersT(const Amg::Vector3D &position, const Amg::Vector3D &momentum, double charge, const S &surface, std::optional< AmgSymMatrix(DIM)> covariance=std::nullopt)
Constructor with global arguments - uses global <-> local for parameters.
ParametersT(const ParametersT< DIM, T, S > &rhs)=default
Copy constructor.
virtual constexpr SurfaceType surfaceType() const override final
ParametersT(const AmgVector(DIM) &parameters, const S &surface, std::optional< AmgSymMatrix(DIM)> covariance=std::nullopt)
Constructor with parameters - extract position and momentum.
SurfaceUniqHolderImpl()=default
default ctor
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
SurfaceType
This enumerator simplifies the persistency & calculations,.
ParametersType
Enum to avoid dynamic cast for different parameter types.
@ theta
Definition ParamDefs.h:66
@ loc2
generic first and second local coordinate
Definition ParamDefs.h:35
@ phi
Definition ParamDefs.h:75
@ loc1
Definition ParamDefs.h:34
-event-from-file
STL namespace.
#define private