ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::CaloCluster_OnTrack Class Referencefinal

Class to handle Cluster On Tracks (ROT) for CaloClusters, it inherits from the common MeasurementBase. More...

#include <CaloCluster_OnTrack.h>

Inheritance diagram for Trk::CaloCluster_OnTrack:
Collaboration diagram for Trk::CaloCluster_OnTrack:

Public Member Functions

 CaloCluster_OnTrack ()
 Default Constructor for POOL.
 CaloCluster_OnTrack (const CaloCluster_OnTrack &cot)
 Copy Constructor.
CaloCluster_OnTrackoperator= (const CaloCluster_OnTrack &cot)
 Assignment operator.
 CaloCluster_OnTrack (CaloCluster_OnTrack &&cot) noexcept=default
 Move Constructor.
CaloCluster_OnTrackoperator= (CaloCluster_OnTrack &&cot) noexcept=default
 Move Assignment operator.
 CaloCluster_OnTrack (LocalParameters &&locpars, Amg::MatrixX &&locerr, const Surface &surf, const EnergyLoss *eloss=nullptr)
 Constructor with parameters.
virtual ~CaloCluster_OnTrack ()=default
 Destructor.
virtual CaloCluster_OnTrackclone () const override final
 Pseudo-constructor, needed to avoid excessive RTTI.
std::unique_ptr< CaloCluster_OnTrackuniqueClone () const
 NVI Clone giving up unique pointer.
virtual const SurfaceassociatedSurface () const override final
 returns the surface for the local to global transformation
virtual const Amg::Vector3DglobalPosition () const override final
 Interface method to get the global Position.
const Trk::EnergyLossenergyLoss () const
 Extended method to get the EnergyLoss.
virtual bool type (MeasurementBaseType::Type type) const override final
 Extended method checking the type.
virtual MsgStream & dump (MsgStream &out) const override final
 returns the some information about this CaloCluster_OnTrack.
virtual std::ostream & dump (std::ostream &out) const override final
 returns the some information about this CaloCluster_OnTrack.
const LocalParameterslocalParameters () const
 Interface method to get the LocalParameters.
const Amg::MatrixXlocalCovariance () const
 Interface method to get the localError.
void destroySurface () noexcept
 destroySurface deletes the ptr if not null and the surface isFree Usefull also for testing
const SurfacesurfacePtr ()
 return the ptr we hold useful for tests
const Surfacerelease () noexcept
 release ala unique_ptr release

Static Public Member Functions

static const SurfacecloneHelper (const Surface *input)
 Helper for cloning or not when we need depending on if the surface isFree.

Protected Attributes

Amg::Vector3D m_globalpos
 global position of the cluster hit
std::unique_ptr< const Trk::EnergyLossm_eloss
 Energy Loss.
LocalParameters m_localParams
Amg::MatrixX m_localCovariance
const Surfacem_associatedSurface

Detailed Description

Class to handle Cluster On Tracks (ROT) for CaloClusters, it inherits from the common MeasurementBase.

The Track holds a vector of TrackStateOnSurface that carry the MeasurmentBase class pointers.

Definition at line 29 of file CaloCluster_OnTrack.h.

Constructor & Destructor Documentation

◆ CaloCluster_OnTrack() [1/4]

Trk::CaloCluster_OnTrack::CaloCluster_OnTrack ( )

Default Constructor for POOL.

Definition at line 31 of file CaloCluster_OnTrack.cxx.

32 : Trk::MeasurementBase()
34 , m_globalpos{ INVALID_VECTOR3D }
35 , m_eloss{ nullptr }
36{}
Amg::Vector3D m_globalpos
global position of the cluster hit
std::unique_ptr< const Trk::EnergyLoss > m_eloss
Energy Loss.
SurfacePtrHolderImpl< Surface > SurfacePtrHolder

◆ CaloCluster_OnTrack() [2/4]

Trk::CaloCluster_OnTrack::CaloCluster_OnTrack ( const CaloCluster_OnTrack & cot)

Copy Constructor.

Definition at line 39 of file CaloCluster_OnTrack.cxx.

41 : Trk::MeasurementBase(cot)
42 , SurfacePtrHolder(cot)
43 , m_globalpos(cot.m_globalpos)
44{
45 m_eloss.reset(cot.m_eloss ? new Trk::EnergyLoss(*cot.m_eloss) : nullptr);
46}

◆ CaloCluster_OnTrack() [3/4]

Trk::CaloCluster_OnTrack::CaloCluster_OnTrack ( CaloCluster_OnTrack && cot)
defaultnoexcept

Move Constructor.

◆ CaloCluster_OnTrack() [4/4]

Trk::CaloCluster_OnTrack::CaloCluster_OnTrack ( Trk::LocalParameters && locpars,
Amg::MatrixX && locerr,
const Surface & surf,
const EnergyLoss * eloss = nullptr )

Constructor with parameters.

Definition at line 19 of file CaloCluster_OnTrack.cxx.

24 : MeasurementBase(std::move(locpars), std::move(locerr))
25 , SurfacePtrHolder(surface)
26 , m_globalpos(surface.localToGlobal(m_localParams))
27 , m_eloss(eloss)
28{}
MeasurementBase()=default
Default constructor - needed for POOL/SEAL.
LocalParameters m_localParams

◆ ~CaloCluster_OnTrack()

virtual Trk::CaloCluster_OnTrack::~CaloCluster_OnTrack ( )
virtualdefault

Destructor.

Member Function Documentation

◆ associatedSurface()

const Trk::Surface & Trk::CaloCluster_OnTrack::associatedSurface ( ) const
inlinefinaloverridevirtual

returns the surface for the local to global transformation

Implements Trk::MeasurementBase.

Definition at line 98 of file CaloCluster_OnTrack.h.

99{
100 return *m_associatedSurface;
101}

◆ clone()

Trk::CaloCluster_OnTrack * Trk::CaloCluster_OnTrack::clone ( ) const
finaloverridevirtual

Pseudo-constructor, needed to avoid excessive RTTI.

Implements Trk::MeasurementBase.

Definition at line 62 of file CaloCluster_OnTrack.cxx.

63{
64 return new Trk::CaloCluster_OnTrack(*this);
65}

◆ cloneHelper()

const Surface * Trk::SurfacePtrHolderImpl< Surface >::cloneHelper ( const Surface * input)
inlinestaticinherited

Helper for cloning or not when we need depending on if the surface isFree.

Definition at line 124 of file SurfaceHolderImpl.h.

125 {
126 return (input && input->isFree() ? input->clone() : input);
127 }

◆ destroySurface()

void Trk::SurfacePtrHolderImpl< Surface >::destroySurface ( )
inlinenoexceptinherited

destroySurface deletes the ptr if not null and the surface isFree Usefull also for testing

Definition at line 105 of file SurfaceHolderImpl.h.

106 {
107 if (m_associatedSurface && m_associatedSurface->isFree()) {
108 delete m_associatedSurface;
109 }
110 //
111 m_associatedSurface = nullptr;
112 }

◆ dump() [1/2]

MsgStream & Trk::CaloCluster_OnTrack::dump ( MsgStream & out) const
finaloverridevirtual

returns the some information about this CaloCluster_OnTrack.

Implements Trk::MeasurementBase.

Definition at line 74 of file CaloCluster_OnTrack.cxx.

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}
#define endmsg
virtual const Surface & associatedSurface() const override final
returns the surface for the local to global transformation
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.

◆ dump() [2/2]

std::ostream & Trk::CaloCluster_OnTrack::dump ( std::ostream & out) const
finaloverridevirtual

returns the some information about this CaloCluster_OnTrack.

Implements Trk::MeasurementBase.

Definition at line 89 of file CaloCluster_OnTrack.cxx.

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}

◆ energyLoss()

const Trk::EnergyLoss * Trk::CaloCluster_OnTrack::energyLoss ( ) const
inline

Extended method to get the EnergyLoss.

Definition at line 104 of file CaloCluster_OnTrack.h.

105{
106 return m_eloss.get();
107}

◆ globalPosition()

const Amg::Vector3D & Trk::CaloCluster_OnTrack::globalPosition ( ) const
finaloverridevirtual

Interface method to get the global Position.

Implements Trk::MeasurementBase.

Definition at line 68 of file CaloCluster_OnTrack.cxx.

69{
70 return m_globalpos;
71}

◆ localCovariance()

const Amg::MatrixX & Trk::MeasurementBase::localCovariance ( ) const
inlineinherited

Interface method to get the localError.

Definition at line 138 of file MeasurementBase.h.

139{
140 return m_localCovariance;
141}
Amg::MatrixX m_localCovariance

◆ localParameters()

const Trk::LocalParameters & Trk::MeasurementBase::localParameters ( ) const
inlineinherited

Interface method to get the LocalParameters.

Definition at line 132 of file MeasurementBase.h.

133{
134 return m_localParams;
135}

◆ operator=() [1/2]

CaloCluster_OnTrack & Trk::CaloCluster_OnTrack::operator= ( CaloCluster_OnTrack && cot)
defaultnoexcept

Move Assignment operator.

◆ operator=() [2/2]

Trk::CaloCluster_OnTrack & Trk::CaloCluster_OnTrack::operator= ( const CaloCluster_OnTrack & cot)

Assignment operator.

Definition at line 50 of file CaloCluster_OnTrack.cxx.

51{
52 if (&cot != this) {
55 m_globalpos = cot.m_globalpos;
56 m_eloss.reset(cot.m_eloss ? new Trk::EnergyLoss(*cot.m_eloss) : nullptr);
57 }
58 return *this;
59}
MeasurementBase & operator=(const MeasurementBase &)=default
SurfacePtrHolderImpl & operator=(const SurfacePtrHolderImpl &other)

◆ release()

const Surface * Trk::SurfacePtrHolderImpl< Surface >::release ( )
inlinenoexceptinherited

release ala unique_ptr release

Definition at line 116 of file SurfaceHolderImpl.h.

117 {
118 const S* tmp = m_associatedSurface;
119 m_associatedSurface = nullptr;
120 return tmp;
121 }

◆ surfacePtr()

const Surface * Trk::SurfacePtrHolderImpl< Surface >::surfacePtr ( )
inlineinherited

return the ptr we hold useful for tests

Definition at line 114 of file SurfaceHolderImpl.h.

114{ return m_associatedSurface; }

◆ type()

virtual bool Trk::CaloCluster_OnTrack::type ( MeasurementBaseType::Type type) const
inlinefinaloverridevirtual

Extended method checking the type.

Implements Trk::MeasurementBase.

Definition at line 75 of file CaloCluster_OnTrack.h.

76 {
78 }
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.

◆ uniqueClone()

std::unique_ptr< CaloCluster_OnTrack > Trk::CaloCluster_OnTrack::uniqueClone ( ) const
inline

NVI Clone giving up unique pointer.

Definition at line 58 of file CaloCluster_OnTrack.h.

59 {
60 return std::unique_ptr<CaloCluster_OnTrack>(clone());
61 }
virtual CaloCluster_OnTrack * clone() const override final
Pseudo-constructor, needed to avoid excessive RTTI.

Member Data Documentation

◆ m_associatedSurface

const Surface* Trk::SurfacePtrHolderImpl< Surface >::m_associatedSurface
protectedinherited

Definition at line 130 of file SurfaceHolderImpl.h.

◆ m_eloss

std::unique_ptr<const Trk::EnergyLoss> Trk::CaloCluster_OnTrack::m_eloss
protected

Energy Loss.

Definition at line 91 of file CaloCluster_OnTrack.h.

◆ m_globalpos

Amg::Vector3D Trk::CaloCluster_OnTrack::m_globalpos
protected

global position of the cluster hit

Definition at line 88 of file CaloCluster_OnTrack.h.

◆ m_localCovariance

Amg::MatrixX Trk::MeasurementBase::m_localCovariance
protectedinherited

Definition at line 112 of file MeasurementBase.h.

◆ m_localParams

LocalParameters Trk::MeasurementBase::m_localParams
protectedinherited

Definition at line 111 of file MeasurementBase.h.


The documentation for this class was generated from the following files: