ATLAS Offline Software
Loading...
Searching...
No Matches
Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.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// SpacePoint.h
7// Header file for ABC SpacePoint
9// (c) ATLAS Detector software
11// Class to handle SPs for InDet and Muons
13// Version 1.0 14/10/2003 Veronique Boisvert
14// Version 2.0 12/12/2005 Martin Siebel
16#ifndef TRKSPACEPOINT_SPACEPOINT_H
17#define TRKSPACEPOINT_SPACEPOINT_H
18
19#include <cassert>
20#include <cmath>
21#include <iosfwd>
22#include <utility> //for std::pair
23
26
27class MsgStream;
28
29namespace Trk {
30
31class LocalParameters;
32class Surface;
33class PrepRawData;
34
36
38 // Public methods:
40 public:
41 // public because of DataPool
42 SpacePoint();
43 // Destructor:
44 virtual ~SpacePoint() = default;
45
47 // Const methods:
49
51 const std::pair<IdentifierHash, IdentifierHash>& elementIdList() const;
52
54 const std::pair<const PrepRawData*, const PrepRawData*>& clusterList() const;
55
59 const AmgSymMatrix(3)& globCovariance() const;
60
62 double eta(double z0 = 0) const;
63
66 double r() const;
67
70 double phi() const;
71
73 virtual const Surface& associatedSurface() const override final;
74
76 virtual const Amg::Vector3D& globalPosition() const override final;
77
79 virtual SpacePoint* clone() const override = 0;
80
83 return std::unique_ptr<SpacePoint>(clone());
84 }
85
87 virtual bool type(MeasurementBaseType::Type type) const override final {
89 }
90
92 virtual MsgStream& dump(MsgStream& out) const override = 0;
94 virtual std::ostream& dump(std::ostream& out) const override = 0;
95
96 protected:
97 std::pair<const PrepRawData*, const PrepRawData*> m_clusList;
98 std::pair<IdentifierHash, IdentifierHash> m_elemIdList;
100 AmgSymMatrix(3) m_globalCovariance;
101
102 //For use by the final derived ones
104 SpacePoint(SpacePoint&&) noexcept = default;
105 SpacePoint& operator=(const SpacePoint&) = default;
106 SpacePoint& operator=(SpacePoint&&) noexcept = default;
107
109};
110
112MsgStream& operator<<(MsgStream& sl, const SpacePoint& spacePoint);
113
115std::ostream& operator<<(std::ostream& sl, const SpacePoint& spacePoint);
116
118// Inline methods:
120
123 return m_elemIdList;
124}
125
126inline const std::pair<const PrepRawData*, const PrepRawData*>&
128 return m_clusList;
129}
130
131inline double SpacePoint::eta(double z0) const {
132 // double zr = (m_z-z0)/m_r;
133 double zr = (m_position.z() - z0) / m_position.perp();
134 return std::log(zr + std::sqrt(1. + zr * zr));
135}
136
137inline double SpacePoint::r() const {
138 return m_position.perp();
139}
140
141inline double SpacePoint::phi() const {
142 return m_position.phi();
143}
144
145// The methods required by MeasurementBase
147 return m_position;
148}
149inline const AmgSymMatrix(3)& SpacePoint::globCovariance() const {
150 return m_globalCovariance;
151}
152
153} // namespace Trk
154
155#endif // TRKSPACEPOINT_SPACEPOINT_H
Scalar eta() const
pseudorapidity method
#define AmgSymMatrix(dim)
Eigen::Matrix< double, 3, 1 > Vector3D
This is a "hash" representation of an Identifier.
MeasurementBase()=default
Default constructor - needed for POOL/SEAL.
double phi() const
returns the phi value of the SpacePoint's position (in cylindrical coordinates).
virtual const Amg::Vector3D & globalPosition() const override final
Interface method to get the global Position.
virtual std::ostream & dump(std::ostream &out) const override=0
Interface method for output, to be overloaded by child classes*.
virtual MsgStream & dump(MsgStream &out) const override=0
Interface method for output, to be overloaded by child classes*.
virtual ~SpacePoint()=default
const AmgSymMatrix(3) &globCovariance() const
return the error matrix by reference The Matrix is calculated from the local Covariance Matrix when d...
void setupGlobalFromLocalCovariance()
set up the global covariance matrix by rotating the local one
std::unique_ptr< SpacePoint > uniqueClone() const
Clone.
double eta(double z0=0) const
calculate eta (not cached), needs z0 info
AmgSymMatrix(3) m_globalCovariance
virtual SpacePoint * clone() const override=0
Clone.
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
const std::pair< IdentifierHash, IdentifierHash > & elementIdList() const
return the pair of Ids of the element by reference
virtual const Surface & associatedSurface() const override final
Interface method to get the associated Surface.
std::pair< IdentifierHash, IdentifierHash > m_elemIdList
double r() const
returns the r value of the SpacePoint's position (in cylindrical coordinates).
const std::pair< const PrepRawData *, const PrepRawData * > & clusterList() const
return the pair of cluster pointers by reference
std::pair< const PrepRawData *, const PrepRawData * > m_clusList
Abstract Base Class for tracking surfaces.
STL class.
STL class.
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
@ z0
Definition ParamDefs.h:64
STL namespace.