ATLAS Offline Software
Loading...
Searching...
No Matches
SpaceTimePoint.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "GaudiKernel/MsgStream.h"
7
9 SpaceTimePointBase(0.0, 0.0, 0.0),
11 m_detectorID(Trk::TrackState::unidentified)
12{
13
14}
15
17(const Amg::Vector3D& position, const float& t, const float& t_error, const float& weight, const Trk::TrackState::MeasurementType detector) :
18 SpaceTimePointBase(t,t_error,weight),
19 m_position(position),
20 m_detectorID(detector)
21{
22
23}
24
26MsgStream& operator << ( MsgStream& sl, const Trk::SpaceTimePoint& stp)
27// if namespace, need to use MsgStream& Trk::operator :-(
28{
29 sl <<"SpaceTimePoint from ";
30 switch (stp.measurementType())
31 {
33 sl << "TRT "; break;
35 sl << "Tile"; break;
37 sl << "MDT "; break;
39 sl << "RPC "; break;
41 sl << "CSC "; break;
42 default:
43 sl << "??? "; break;
44 }
45 sl << endmsg << "at "<< stp.globalPosition() << ", time= "<<stp.time()
46 << " +/- "<<stp.errorTime()<<", w=" << stp.weight();
47 sl << endmsg;
48 return sl;
49}
50
52std::ostream& operator << ( std::ostream& sl, const Trk::SpaceTimePoint& stp)
53// if namespace, need to use MsgStream& Rec::operator :-(
54{
55 sl <<"SpaceTimePoint from ";
56 switch (stp.measurementType())
57 {
59 sl << "TRT "; break;
61 sl << "Tile"; break;
63 sl << "MDT "; break;
65 sl << "RPC "; break;
67 sl << "CSC "; break;
68 default:
69 sl << "??? "; break;
70 }
71 sl << " at "<< stp.globalPosition() << ", time= "<<stp.time()
72 << " +/- "<<stp.errorTime()<<", w=" << stp.weight();
73 sl << std::endl;
74 return sl;
75}
76
77
#define endmsg
Eigen::Matrix< double, 3, 1 > Vector3D
float errorTime() const
access to the error on the measured time
SpaceTimePointBase(const float &t, const float &t_error, const float &weight)
constructor taking a time, an error on the time and a weight
float weight() const
access to the weight of the space time point
float time() const
access to the measured time
SpaceTimePoint.
TrackState::MeasurementType m_detectorID
enum to denote origin of timing information
SpaceTimePoint()
T/P framework default constructor.
TrackState::MeasurementType measurementType() const
return information about detector from which timing info originates
const Amg::Vector3D & globalPosition() const
access to the global position
Amg::Vector3D m_position
global position of the point
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, 3, 1 > Vector3D
MeasurementType
enum describing the flavour of MeasurementBase
Ensure that the ATLAS eigen extensions are properly loaded.
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output