ATLAS Offline Software
Loading...
Searching...
No Matches
HGTD_ClusterOnTrack.cxx
Go to the documentation of this file.
1
9
11#include "GaudiKernel/MsgStream.h"
13#include <ostream>
14#include <utility>
15
16// Default constructor:
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()),
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()),
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
64
65MsgStream& 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
77std::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}
#define endmsg
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
ElementLink< HGTD_ClusterContainer > m_rio
IdentifierHash m_id_hash
The IdentifierHash - needed to comply with RIO_OnTrack interface, currently not used.
Amg::Vector3D m_global_position
The global position, managed by the cluster on track.
const InDetDD::SolidStateDetectorElementBase * m_det_el
Detector element associated to this cluster on track.
virtual MsgStream & dump(MsgStream &out) const override final
returns some information about this RIO_OnTrack.
virtual const InDetDD::SolidStateDetectorElementBase * detectorElement() const override final
returns the detector element, assoicated with the PRD of this class
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...
virtual const Trk::Surface & associatedSurface() const override final
returns the surface for the local to global transformation
virtual const Amg::Vector3D & globalPosition() const override final
returns global position (gathered through Surface constraint)
This is a "hash" representation of an Identifier.
Class to hold geometrical description of a solid state detector element.
virtual MsgStream & dump(MsgStream &out) const override
returns the some information about this RIO_OnTrack.
RIO_OnTrack(LocalParameters &&locpars, Amg::MatrixX &&loccov, const Identifier &id)
Constructor with parameters and without externalPrediction.
Identifier identify() const
return the identifier -extends MeasurementBase
Abstract Base Class for tracking surfaces.
This is the base class for all tracking detector elements with read-out relevant information.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 3, 1 > Vector3D
STL namespace.