ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Trk::CaloCluster_OnTrack Class Referencefinal

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

Static Public Member Functions

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

Protected Attributes

Amg::Vector3D m_globalpos
 global position of the cluster hit More...
 
std::unique_ptr< const Trk::EnergyLossm_eloss
 Energy Loss. More...
 
LocalParameters m_localParams
 
Amg::MatrixX m_localCovariance
 
const S * m_associatedSurface = nullptr
 

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.

34  , m_globalpos{ INVALID_VECTOR3D }
35  , m_eloss{ nullptr }
36 {}

◆ CaloCluster_OnTrack() [2/4]

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

Copy Constructor.

Definition at line 39 of file CaloCluster_OnTrack.cxx.

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 {}

◆ ~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()

template<typename S >
static const S* Trk::SurfacePtrHolderImpl< S >::cloneHelper ( const S *  input)
inlinestaticinherited

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

Definition at line 147 of file SurfaceHolderImpl.h.

148  {
149  return (input && input->isFree() ? input->clone() : input);
150  }

◆ destroySurface()

template<typename S >
void Trk::SurfacePtrHolderImpl< S >::destroySurface ( )
inlinenoexceptinherited

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

Definition at line 128 of file SurfaceHolderImpl.h.

129  {
130  if (m_associatedSurface && m_associatedSurface->isFree()) {
131  delete m_associatedSurface;
132  }
133  //
134  m_associatedSurface = nullptr;
135  }

◆ 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 }

◆ 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 }

◆ 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 }

◆ release()

template<typename S >
const S* Trk::SurfacePtrHolderImpl< S >::release ( )
inlinenoexceptinherited

release ala unique_ptr release

Definition at line 139 of file SurfaceHolderImpl.h.

140  {
141  const S* tmp = m_associatedSurface;
142  m_associatedSurface = nullptr;
143  return tmp;
144  }

◆ surfacePtr()

template<typename S >
const S* Trk::SurfacePtrHolderImpl< S >::surfacePtr ( )
inlineinherited

return the ptr we hold useful for tests

Definition at line 137 of file SurfaceHolderImpl.h.

137 { 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  }

◆ 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  }

Member Data Documentation

◆ m_associatedSurface

template<typename S >
const S* Trk::SurfacePtrHolderImpl< S >::m_associatedSurface = nullptr
protectedinherited

Definition at line 153 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:
Trk::MeasurementBase::operator=
MeasurementBase & operator=(const MeasurementBase &)=default
Trk::SurfacePtrHolder
SurfacePtrHolderImpl< Surface > SurfacePtrHolder
Definition: SurfaceHolders.h:25
Trk::MeasurementBaseType::CaloCluster_OnTrack
@ CaloCluster_OnTrack
Definition: MeasurementBase.h:53
Trk::CaloCluster_OnTrack::type
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
Definition: CaloCluster_OnTrack.h:75
JetTiledMap::S
@ S
Definition: TiledEtaPhiMap.h:44
Trk::MeasurementBase::MeasurementBase
MeasurementBase()=default
Default constructor - needed for POOL/SEAL.
Trk::CaloCluster_OnTrack::m_globalpos
Amg::Vector3D m_globalpos
global position of the cluster hit
Definition: CaloCluster_OnTrack.h:88
Trk::CaloCluster_OnTrack::associatedSurface
virtual const Surface & associatedSurface() const override final
returns the surface for the local to global transformation
Definition: CaloCluster_OnTrack.h:98
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::CaloCluster_OnTrack::clone
virtual CaloCluster_OnTrack * clone() const override final
Pseudo-constructor, needed to avoid excessive RTTI.
Definition: CaloCluster_OnTrack.cxx:62
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
Trk::SurfacePtrHolderImpl::m_associatedSurface
const S * m_associatedSurface
Definition: SurfaceHolderImpl.h:153
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
Trk::MeasurementBase::m_localParams
LocalParameters m_localParams
Definition: MeasurementBase.h:111
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk::EnergyLoss
This class describes energy loss material effects in the ATLAS tracking EDM.
Definition: EnergyLoss.h:34
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Trk::MeasurementBase::m_localCovariance
Amg::MatrixX m_localCovariance
Definition: MeasurementBase.h:112
Trk::SurfacePtrHolderImpl::operator=
SurfacePtrHolderImpl & operator=(const SurfacePtrHolderImpl &other)
copy assingmemnt if surface is free we clone/copy.
Definition: SurfaceHolderImpl.h:105
Trk::CaloCluster_OnTrack::m_eloss
std::unique_ptr< const Trk::EnergyLoss > m_eloss
Energy Loss.
Definition: CaloCluster_OnTrack.h:91