ATLAS Offline Software
PatternTrackParameters.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Header file for class PatternTrackParameters
7 // Class for pattern track parameters
8 // author I.Gavrilenko 09/08/2006
10 
11 #ifndef PatternTrackParameters_H
12 #define PatternTrackParameters_H
13 
16 #include "TrkSurfaces/Surface.h"
18 #include <cmath>
19 #include <iosfwd>
20 
21 class MsgStream;
22 
23 namespace Trk {
24 
25  class PlaneSurface ;
26  class StraightLineSurface;
27  class DiscSurface ;
28  class CylinderSurface ;
29  class PerigeeSurface ;
30  class ConeSurface ;
31 
32  class PatternTrackParameters final : public BaseParameters{
33  public:
40 
41  // Main methods
42  bool iscovariance () const {return m_covariance != std::nullopt ;}
43  double sinPhi () const;
44  double cosPhi () const;
45  double sinTheta () const;
46  double cosTheta () const;
47  double cotTheta () const;
48  void changeDirection () ;
49  double transverseMomentum() const;
50 
51  // Methods from ParametersCommon
52  virtual const Surface& associatedSurface () const override final;
55  double charge() const;
56  virtual bool hasSurface() const override final;
57  virtual Amg::RotationMatrix3D measurementFrame() const override final;
58  virtual PatternTrackParameters * clone() const override final;
59  constexpr virtual ParametersType type() const override final;
60  virtual SurfaceType surfaceType() const override final;
61  virtual void updateParametersHelper(const AmgVector(5) &) override final;
62 
63  // set methods
64  void setParameters (const Surface*,const double* );
65  void setCovariance ( const double*);
68 
69  // Convertors
70  std::unique_ptr<TrackParameters> convert(bool) const;
72 
73  // Init methods
74  void diagonalization (double);
76 
77  // Add or remove noise
80 
81  // Print
82  std::ostream& dump(std::ostream&) const;
83  MsgStream& dump(MsgStream& ) const;
84 
85  protected:
86 
87  // Protected data
89 
91  // Comments
92  // m_surface is pointer to associated surface
93  // m_parameters[ 0] - 1 local coordinate
94  // m_parameters[ 1] - 2 local coordinate
95  // m_parameters[ 2] - Azimuthal angle
96  // m_parameters[ 3] - Polar angle
97  // m_parameters[ 4] - charge/Momentum
98  // m_covariance is the covariance matrix
100 
101 
102  // Protected methods
109 
113 
114  private:
115  std::string to_string() const;
116  };
117 
119  // Overload operator
121 
122  std::ostream& operator << (std::ostream&,const PatternTrackParameters&);
123  MsgStream& operator << (MsgStream&, const PatternTrackParameters& );
124 
125 } // end of name space Trk
126 
127 #include "TrkPatternParameters/PatternTrackParameters.icc"
128 
129 #endif // PatternTrackParameters
Trk::ParametersCommon::AmgVector
const AmgVector(DIM) &parameters() const
Access methods for the parameters.
Trk::PatternTrackParameters::localToGlobal
Amg::Vector3D localToGlobal(const PlaneSurface *) const
Definition: PatternTrackParameters.cxx:168
Trk::PatternTrackParameters::transverseMomentum
double transverseMomentum() const
Trk::PatternTrackParameters::setParametersWithCovariance
void setParametersWithCovariance(const Surface *, const double *, const double *)
Trk::ParametersCommon::m_covariance
std::optional< AmgSymMatrix(DIM)> m_covariance
charge definition for this track
Definition: ParametersCommon.h:147
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Trk::PatternTrackParameters::operator=
PatternTrackParameters & operator=(const PatternTrackParameters &)
TrackParameters.h
Surface.h
Trk::PatternTrackParameters::associatedSurface
virtual const Surface & associatedSurface() const override final
Access to the Surface associated to the Parameters.
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::PatternTrackParameters::updateParametersHelper
virtual void updateParametersHelper(const AmgVector(5) &) override final
Trk::PatternTrackParameters::cosTheta
double cosTheta() const
Trk::PatternTrackParameters::sinTheta
double sinTheta() const
Trk::ParametersCommon::AmgSymMatrix
const AmgSymMatrix(DIM) *covariance() const
Access method for the covariance matrix - returns nullptr if no covariance matrix is given.
PropDirection.h
Trk::SurfaceType
SurfaceType
Definition: SurfaceTypes.h:17
Trk::PatternTrackParameters::convert
std::unique_ptr< TrackParameters > convert(bool) const
Definition: PatternTrackParameters.cxx:26
Trk::DiscSurface
Definition: DiscSurface.h:54
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Trk::PatternTrackParameters::absoluteMomentum
double absoluteMomentum() const
Trk::PatternTrackParameters::setParameters
void setParameters(const Surface *, const double *)
Trk::PatternTrackParameters::PatternTrackParameters
PatternTrackParameters(PatternTrackParameters &&) noexcept=default
Trk::NoiseOnSurface
Definition: NoiseOnSurface.h:23
Trk::PatternTrackParameters::sinPhi
double sinPhi() const
Trk::PatternTrackParameters::m_surface
SurfaceUniquePtrT< const Surface > m_surface
Definition: PatternTrackParameters.h:88
Trk::PatternTrackParameters::hasSurface
virtual bool hasSurface() const override final
Test to see if there's a not null surface ptr.
Trk::PatternTrackParameters::charge
double charge() const
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
Trk::PatternTrackParameters::surfaceType
virtual SurfaceType surfaceType() const override final
Returns the Surface Type enum for the surface used to define the derived class.
Trk::PatternTrackParameters::calculateMomentum
Amg::Vector3D calculateMomentum(void) const
Definition: PatternTrackParameters.cxx:441
Trk::PatternTrackParameters::type
constexpr virtual ParametersType type() const override final
Return the ParametersType enum.
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
Trk::PatternTrackParameters::cosPhi
double cosPhi() const
Trk::PatternTrackParameters::clone
virtual PatternTrackParameters * clone() const override final
clone method for polymorphic deep copy
Trk::PatternTrackParameters::removeNoise
void removeNoise(const NoiseOnSurface &, PropDirection)
Trk::PatternTrackParameters::dump
std::ostream & dump(std::ostream &) const
Definition: PatternTrackParameters.cxx:143
Trk::PatternTrackParameters::changeDirection
void changeDirection()
Definition: PatternTrackParameters.cxx:368
Trk::CylinderSurface
Definition: CylinderSurface.h:55
Trk::PatternTrackParameters::cotTheta
double cotTheta() const
Trk::PatternTrackParameters::addNoise
void addNoise(const NoiseOnSurface &, PropDirection)
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::PatternTrackParameters::setCovariance
void setCovariance(const double *)
Trk::PatternTrackParameters::measurementFrame
virtual Amg::RotationMatrix3D measurementFrame() const override final
Return the measurement frame - this is needed for alignment, in particular for StraightLine and Perig...
Trk::PatternTrackParameters::calculatePosition
Amg::Vector3D calculatePosition(void) const
Definition: PatternTrackParameters.cxx:413
Trk::PatternTrackParameters::iscovariance
bool iscovariance() const
Definition: PatternTrackParameters.h:42
Trk::PatternTrackParameters::PatternTrackParameters
PatternTrackParameters()
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Trk::PatternTrackParameters::initiate
bool initiate(PatternTrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &)
Definition: PatternTrackParameters.cxx:321
Trk::SurfaceUniquePtrT
std::unique_ptr< S, SurfaceDeleter< S > > SurfaceUniquePtrT
Definition: SurfaceUniquePtrT.h:32
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::PatternTrackParameters::PatternTrackParameters
PatternTrackParameters(const PatternTrackParameters &)
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
Trk::PatternTrackParameters
Definition: PatternTrackParameters.h:32
Trk::ParametersCommon
Definition: ParametersCommon.h:45
NoiseOnSurface.h
Trk::ConeSurface
Definition: ConeSurface.h:51
Trk::PatternTrackParameters::production
bool production(const TrackParameters *)
Definition: PatternTrackParameters.cxx:42
Trk::PatternTrackParameters::to_string
std::string to_string() const
Definition: PatternTrackParameters.cxx:105
Trk::PatternTrackParameters::position
Amg::Vector3D position() const
Definition: PatternTrackParameters.cxx:79
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
Trk::PatternTrackParameters::momentum
Amg::Vector3D momentum() const
Trk::ParametersType
ParametersType
Definition: ParametersCommon.h:29
Trk::PatternTrackParameters::diagonalization
void diagonalization(double)
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::StraightLineSurface
Definition: StraightLineSurface.h:51