ATLAS Offline Software
HGTD_ClusterOnTrack.cxx
Go to the documentation of this file.
1 
11 #include "GaudiKernel/MsgStream.h"
13 #include <ostream>
14 #include <utility>
15 
16 // Default constructor:
18  : RIO_OnTrack(),
19  m_det_el(nullptr),
20  m_id_hash(),
21  m_global_position(),
22  m_calibrated_time(0),
23  m_calibrated_time_resolution(0) {}
24 
25 // Constructor with parameters - no global position specified
27  Trk::LocalParameters&& locpars,
28  Amg::MatrixX&& locerr,
29  const float calib_time,
30  const float calib_time_res,
31  const IdentifierHash& id_hash)
32  : RIO_OnTrack(std::move(locpars), std::move(locerr), rio->identify()),
33  m_det_el(rio->detectorElement()),
34  m_id_hash(id_hash),
35  m_calibrated_time(calib_time),
36  m_calibrated_time_resolution(calib_time_res) {
37  m_rio.setElement(rio);
38 }
39 
40 // Constructor with parameters
42  Trk::LocalParameters&& locpars,
43  Amg::MatrixX&& locerr,
44  const float calib_time,
45  const float calib_time_res,
46  const IdentifierHash& id_hash,
47  const Amg::Vector3D& global_position)
48  : RIO_OnTrack(std::move(locpars), std::move(locerr), rio->identify()),
49  m_det_el(rio->detectorElement()),
50  m_id_hash(id_hash),
51  m_global_position(global_position),
52  m_calibrated_time(calib_time),
53  m_calibrated_time_resolution(calib_time_res) {
54  m_rio.setElement(rio);
55 }
56 
58  return (detectorElement()->surface());
59 }
60 
62  return m_global_position;
63 }
64 
65 MsgStream& HGTD_ClusterOnTrack::dump(MsgStream& sl) const {
66  sl << "HGTD_ClusterOnTrack {" << endmsg;
67 
69 
70  sl << "Global position (x,y,z) = (";
71  sl << this->globalPosition().x() << ", " << this->globalPosition().y()
72  << ", " << this->globalPosition().z() << ")" << endmsg;
73  sl << "}" << endmsg;
74  return sl;
75 }
76 
77 std::ostream& HGTD_ClusterOnTrack::dump(std::ostream& sl) const {
78  sl << "HGTD_ClusterOnTrack {" << std::endl;
79 
81 
82  sl << "Global position (x,y,z) = (";
83  sl << this->globalPosition().x() << ", " << this->globalPosition().y()
84  << ", " << this->globalPosition().z() << ")" << std::endl;
85  sl << "}" << std::endl;
86  return sl;
87 }
88 
90  const Trk::PrepRawData* /*prd*/) {
91  m_det_el =
92  dynamic_cast<const InDetDD::SolidStateDetectorElementBase*>(det_el);
93 }
Trk::LocalParameters
Definition: LocalParameters.h:98
HGTD_ClusterOnTrack::m_rio
ElementLink< HGTD_ClusterContainer > m_rio
Definition: HGTD_ClusterOnTrack.h:140
Trk::RIO_OnTrack::dump
virtual MsgStream & dump(MsgStream &out) const override
returns the some information about this RIO_OnTrack.
Definition: RIO_OnTrack.cxx:32
HGTD_ClusterOnTrack::setValues
virtual void setValues(const Trk::TrkDetElementBase *det_el, const Trk::PrepRawData *prd) override final
ONLY for use in custom convertor Allows the custom convertor to reset values when persistying/reading...
Definition: HGTD_ClusterOnTrack.cxx:89
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
InDetDD::SolidStateDetectorElementBase
Definition: SolidStateDetectorElementBase.h:132
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
HGTD_Cluster
Definition: HGTD_Cluster.h:35
HGTD_ClusterOnTrack::dump
virtual MsgStream & dump(MsgStream &out) const override final
returns some information about this RIO_OnTrack.
Definition: HGTD_ClusterOnTrack.cxx:65
HGTD_ClusterOnTrack::detectorElement
virtual const InDetDD::SolidStateDetectorElementBase * detectorElement() const override final
returns the detector element, assoicated with the PRD of this class
Definition: HGTD_ClusterOnTrack.h:157
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
HGTD_ClusterOnTrack::associatedSurface
virtual const Trk::Surface & associatedSurface() const override final
returns the surface for the local to global transformation
Definition: HGTD_ClusterOnTrack.cxx:57
Trk::PrepRawData
Definition: PrepRawData.h:62
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
LocalParameters.h
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
HGTD_ClusterOnTrack::m_global_position
Amg::Vector3D m_global_position
The global position, managed by the cluster on track.
Definition: HGTD_ClusterOnTrack.h:133
IdentifierHash
Definition: IdentifierHash.h:38
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
HGTD_ClusterOnTrack::HGTD_ClusterOnTrack
HGTD_ClusterOnTrack()
Definition: HGTD_ClusterOnTrack.cxx:17
HGTD_ClusterOnTrack::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
returns global position (gathered through Surface constraint)
Definition: HGTD_ClusterOnTrack.cxx:61
HGTD_ClusterOnTrack.h
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
HGTD_ClusterOnTrack::m_det_el
const InDetDD::SolidStateDetectorElementBase * m_det_el
Detector element associated to this cluster on track.
Definition: HGTD_ClusterOnTrack.h:126