ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCluster_OnTrack.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4
5// Trk
7
8// Gaudi & AthenaCommon
9#include "GaudiKernel/MsgStream.h"
10#include <limits>
11#include <ostream>
12#include <string>
13
14namespace {
15const double NaN(std::numeric_limits<double>::quiet_NaN());
16const Amg::Vector3D INVALID_VECTOR3D(NaN, NaN, NaN);
17}
18
20 Trk::LocalParameters&& locpars,
21 Amg::MatrixX&& locerr,
22 const Trk::Surface& surface,
23 const Trk::EnergyLoss* eloss)
24 : MeasurementBase(std::move(locpars), std::move(locerr))
25 , SurfacePtrHolder(surface)
26 , m_globalpos(surface.localToGlobal(m_localParams))
27 , m_eloss(eloss)
28{}
29
30// default constructor:
34 , m_globalpos{ INVALID_VECTOR3D }
35 , m_eloss{ nullptr }
36{}
37
38// copy constructor:
47
48// assignment operator:
51{
52 if (&cot != this) {
56 m_eloss.reset(cot.m_eloss ? new Trk::EnergyLoss(*cot.m_eloss) : nullptr);
57 }
58 return *this;
59}
60
63{
64 return new Trk::CaloCluster_OnTrack(*this);
65}
66
67const Amg::Vector3D&
72
73MsgStream&
75{
76 sl << "Trk::CaloCluster_OnTrack { "
77 << "\n";
78 sl << "\t surface = " << associatedSurface() << "\n";
79 sl << "\t position = (" << localParameters() << endmsg;
80 sl << "\t has Error Matrix: "
81 << "\n";
82 sl << localCovariance() << "}"
83 << "\n";
84
85 return sl;
86}
87
88std::ostream&
89Trk::CaloCluster_OnTrack::dump(std::ostream& sl) const
90{
91 sl << "\t surface = " << associatedSurface() << "\n";
92 sl << "\t position = (" << localParameters() << "\n";
93 sl << "\t has Error Matrix: "
94 << "\n";
95 sl << localCovariance() << "}"
96 << "\n";
97 return sl;
98}
99
#define endmsg
Class to handle Cluster On Tracks (ROT) for CaloClusters, it inherits from the common MeasurementBase...
Amg::Vector3D m_globalpos
global position of the cluster hit
virtual const Amg::Vector3D & globalPosition() const override final
Interface method to get the global Position.
virtual CaloCluster_OnTrack * clone() const override final
Pseudo-constructor, needed to avoid excessive RTTI.
virtual MsgStream & dump(MsgStream &out) const override final
returns the some information about this CaloCluster_OnTrack.
std::unique_ptr< const Trk::EnergyLoss > m_eloss
Energy Loss.
CaloCluster_OnTrack()
Default Constructor for POOL.
virtual const Surface & associatedSurface() const override final
returns the surface for the local to global transformation
CaloCluster_OnTrack & operator=(const CaloCluster_OnTrack &cot)
Assignment operator.
This class describes energy loss material effects in the ATLAS tracking EDM.
Definition EnergyLoss.h:34
MeasurementBase & operator=(const MeasurementBase &)=default
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
MeasurementBase()=default
Default constructor - needed for POOL/SEAL.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
LocalParameters m_localParams
SurfacePtrHolderImpl & operator=(const SurfacePtrHolderImpl &other)
Abstract Base Class for tracking surfaces.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
SurfacePtrHolderImpl< Surface > SurfacePtrHolder
STL namespace.