ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::MuonCluster Class Referenceabstract

Class representing clusters in the muon system. More...

#include <MuonCluster.h>

Inheritance diagram for Muon::MuonCluster:
Collaboration diagram for Muon::MuonCluster:

Public Member Functions

 MuonCluster ()
 Default constructor.
 MuonCluster (const MuonCluster &)
 MuonCluster (MuonCluster &&) noexcept=default
MuonClusteroperator= (const MuonCluster &)
MuonClusteroperator= (MuonCluster &&) noexcept=default
 MuonCluster (const Identifier &RDOId, const IdentifierHash &collectionHash, const Amg::Vector2D &locpos, const std::vector< Identifier > &rdoList, const Amg::MatrixX &locErrMat)
 Full constructor.
 MuonCluster (const Identifier &RDOId, const IdentifierHash &collectionHash, const Amg::Vector2D &locpos, std::vector< Identifier > &&rdoList, Amg::MatrixX &&locErrMat)
virtual ~MuonCluster ()
 Destructor.
virtual const Amg::Vector3DglobalPosition () const =0
 Returns the global position of the measurement (calculated on the fly)
virtual IdentifierHash collectionHash () const
 Returns the IdentifierHash corresponding to the PRD collection in the PRD container.
virtual MsgStream & dump (MsgStream &stream) const override
 Dumps information about the PRD.
virtual std::ostream & dump (std::ostream &stream) const override
 Dumps information about the PRD.
Identifier identify () const
 return the identifier
const Amg::Vector2DlocalPosition () const
 return the local position reference
const std::vector< Identifier > & rdoList () const
 return the List of rdo identifiers (pointers)
const Amg::MatrixXlocalCovariance () const
 return const ref to the error matrix
bool hasLocalCovariance () const
 returns localCovariance().size()!=0
virtual const TrkDetElementBase * detectorElement () const =0
 return the detector element corresponding to this PRD The pointer will be zero if the det el is not defined (i.e.
virtual bool type (PrepRawDataType type) const
 Interface method checking the type.
virtual PrepRawDataType prdType () const =0
 Interface method returning the prdType.
void setHashAndIndex (unsigned short collHash, unsigned short objIndex)
 TEMP for testing: might make some classes friends later ...
const IdentContIndexgetHashAndIndex () const

Static Public Member Functions

static std::size_t numberOfInstantiations ()

Static Public Attributes

static std::atomic_size_t s_numberOfInstantiations

Protected Attributes

CxxUtils::CachedUniquePtr< const Amg::Vector3Dm_globalPosition
 Global position of measurement.

Private Attributes

Identifier m_clusId { 0 }
 PrepRawData ID, not const because of DataPool.
Amg::Vector2D m_localPos {}
 see derived classes for definition of meaning of LocalPosition
std::vector< Identifierm_rdoList {}
 Stores the identifiers of the RDOs.
Amg::MatrixX m_localCovariance {}
 See derived classes for definition of ErrorMatrix.
IdentContIndex m_indexAndHash
 Stores its own position (index) in collection plus the hash id for the collection (needed for the EL to IDC)

Detailed Description

Constructor & Destructor Documentation

◆ MuonCluster() [1/5]

MuonCluster::MuonCluster ( )

Default constructor.

For use by POOL only - do not use!

Definition at line 50 of file MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx.

50 :
51 PrepRawData(),
53 { }
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
Global position of measurement.
PrepRawData()
public because of DataPool

◆ MuonCluster() [2/5]

MuonCluster::MuonCluster ( const MuonCluster & RIO)

Definition at line 56 of file MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx.

56 :
57 PrepRawData(RIO),
59 {
60 // copy only if it exists
61
62 if (RIO.m_globalPosition) m_globalPosition.store(std::make_unique<const Amg::Vector3D>(*RIO.m_globalPosition));
63 }

◆ MuonCluster() [3/5]

Muon::MuonCluster::MuonCluster ( MuonCluster && )
defaultnoexcept

◆ MuonCluster() [4/5]

MuonCluster::MuonCluster ( const Identifier & RDOId,
const IdentifierHash & collectionHash,
const Amg::Vector2D & locpos,
const std::vector< Identifier > & rdoList,
const Amg::MatrixX & locErrMat )

Full constructor.

Parameters
RDOIdThe channel identifier of the central measurement of the cluster.
collectionHashthe hash associated with the PRD collection in storegate
locposThe position of the cluster in the surface reference frame. the first coordinate is the precision coordinate, the second is set to the centre of the strip. Ownership passes to this object!
rdoListList of channels associated with cluster
locErrMatThe measurement errors. Ownership passes to this object!
Parameters
collectionHashcollectionHash

Definition at line 22 of file MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx.

27 :
28 PrepRawData(RDOId, locpos, rdoList, locErrMat), //call base class constructor
30 {
31 }
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)

◆ MuonCluster() [5/5]

MuonCluster::MuonCluster ( const Identifier & RDOId,
const IdentifierHash & collectionHash,
const Amg::Vector2D & locpos,
std::vector< Identifier > && rdoList,
Amg::MatrixX && locErrMat )
Parameters
collectionHashcollectionHash

Definition at line 33 of file MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx.

38 :
39 PrepRawData(RDOId, locpos, std::move(rdoList), std::move(locErrMat)), //call base class constructor
41 {
42 }

◆ ~MuonCluster()

MuonCluster::~MuonCluster ( )
virtualdefault

Destructor.

Member Function Documentation

◆ collectionHash()

IdentifierHash MuonCluster::collectionHash ( ) const
inlinevirtual

Returns the IdentifierHash corresponding to the PRD collection in the PRD container.

Definition at line 97 of file MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h.

98 {
99 return getHashAndIndex().collHash();
100 }
unsigned short collHash() const
Accessor to hash, obj index and combined index.
const IdentContIndex & getHashAndIndex() const

◆ detectorElement()

virtual const TrkDetElementBase * Trk::PrepRawData::detectorElement ( ) const
pure virtualinherited

return the detector element corresponding to this PRD The pointer will be zero if the det el is not defined (i.e.

it was not passed in by the ctor)

Implemented in CscPrepData, CscStripPrepData, HGTD_Cluster, InDet::SiCluster, InDet::TRT_DriftCircle, Muon::CscPrepData, Muon::CscStripPrepData, Muon::MdtPrepData, Muon::MMPrepData, Muon::RpcPrepData, Muon::sTgcPrepData, and Muon::TgcPrepData.

◆ dump() [1/2]

MsgStream & MuonCluster::dump ( MsgStream & stream) const
overridevirtual

Dumps information about the PRD.

Reimplemented from Trk::PrepRawData.

Reimplemented in CscPrepData, Muon::CscPrepData, Muon::MMPrepData, Muon::RpcCoinData, Muon::RpcPrepData, Muon::sTgcPrepData, and Muon::TgcPrepData.

Definition at line 78 of file MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx.

79 {
80 stream << MSG::INFO<<"MuonCluster {"<<std::endl;
82 stream << "Global Coordinates (x,y,z) = (";
83 stream<<this->globalPosition().x()<<", "
84 <<this->globalPosition().y()<<", "
85 <<this->globalPosition().z()<<")"<<std::endl;
86 stream<<"} End MuonCluster"<<endmsg;
87 return stream;
88 }
#define endmsg
virtual const Amg::Vector3D & globalPosition() const =0
Returns the global position of the measurement (calculated on the fly)
virtual MsgStream & dump(MsgStream &stream) const
dump information about the PRD object.

◆ dump() [2/2]

std::ostream & MuonCluster::dump ( std::ostream & stream) const
overridevirtual

Dumps information about the PRD.

Reimplemented from Trk::PrepRawData.

Reimplemented in CscPrepData, Muon::CscPrepData, Muon::MMPrepData, Muon::RpcCoinData, Muon::RpcPrepData, Muon::sTgcPrepData, and Muon::TgcPrepData.

Definition at line 90 of file MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx.

91 {
92 stream << "MuonCluster {"<<std::endl;
94 stream<<"} End MuonCluster"<<std::endl;
95 return stream;
96 }

◆ getHashAndIndex()

const IdentContIndex & Trk::PrepRawData::getHashAndIndex ( ) const
inherited

◆ globalPosition()

virtual const Amg::Vector3D & Muon::MuonCluster::globalPosition ( ) const
pure virtual

Returns the global position of the measurement (calculated on the fly)

Implemented in CscPrepData, Muon::CscPrepData, Muon::MMPrepData, Muon::RpcPrepData, Muon::sTgcPrepData, and Muon::TgcPrepData.

◆ hasLocalCovariance()

bool Trk::PrepRawData::hasLocalCovariance ( ) const
inherited

returns localCovariance().size()!=0

◆ identify()

Identifier Trk::PrepRawData::identify ( ) const
inherited

return the identifier

◆ localCovariance()

const Amg::MatrixX & Trk::PrepRawData::localCovariance ( ) const
inherited

return const ref to the error matrix

◆ localPosition()

const Amg::Vector2D & Trk::PrepRawData::localPosition ( ) const
inherited

return the local position reference

◆ numberOfInstantiations()

std::size_t Trk::ObjectCounter< Trk::PrepRawData >::numberOfInstantiations ( )
inlinestaticinherited

Definition at line 25 of file TrkObjectCounter.h.

26 {
27#ifndef NDEBUG
28 return s_numberOfInstantiations.load();
29#endif
30 return 0;
31 }
Helper to enable counting number of instantiations in debug builds.

◆ operator=() [1/2]

MuonCluster & MuonCluster::operator= ( const MuonCluster & RIO)

Definition at line 67 of file MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx.

68 {
69 if (&RIO !=this)
70 {
72 if (RIO.m_globalPosition) m_globalPosition.store(std::make_unique<const Amg::Vector3D>(*RIO.m_globalPosition));
73 else if (m_globalPosition) m_globalPosition.release().reset();
74 }
75 return *this;
76 }
PrepRawData & operator=(const PrepRawData &)=default

◆ operator=() [2/2]

MuonCluster & Muon::MuonCluster::operator= ( MuonCluster && )
defaultnoexcept

◆ prdType()

◆ rdoList()

const std::vector< Identifier > & Trk::PrepRawData::rdoList ( ) const
inherited

return the List of rdo identifiers (pointers)

◆ setHashAndIndex()

void Trk::PrepRawData::setHashAndIndex ( unsigned short collHash,
unsigned short objIndex )
inherited

TEMP for testing: might make some classes friends later ...

◆ type()

virtual bool Trk::PrepRawData::type ( PrepRawDataType type) const
inlinevirtualinherited

Interface method checking the type.

Reimplemented in InDet::PixelCluster, and InDet::SCT_Cluster.

Definition at line 133 of file PrepRawData.h.

133 {
134 return prdType() == type;
135 }
virtual bool type(PrepRawDataType type) const
Interface method checking the type.
virtual PrepRawDataType prdType() const =0
Interface method returning the prdType.

Member Data Documentation

◆ m_clusId

Identifier Trk::PrepRawData::m_clusId { 0 }
privateinherited

PrepRawData ID, not const because of DataPool.

Definition at line 156 of file PrepRawData.h.

156{ 0 };

◆ m_globalPosition

CxxUtils::CachedUniquePtr<const Amg::Vector3D> Muon::MuonCluster::m_globalPosition
protected

Global position of measurement.

Calculated on demand and cached

Definition at line 89 of file MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h.

◆ m_indexAndHash

IdentContIndex Trk::PrepRawData::m_indexAndHash
privateinherited

Stores its own position (index) in collection plus the hash id for the collection (needed for the EL to IDC)

Definition at line 167 of file PrepRawData.h.

◆ m_localCovariance

Amg::MatrixX Trk::PrepRawData::m_localCovariance {}
privateinherited

See derived classes for definition of ErrorMatrix.

Definition at line 163 of file PrepRawData.h.

163{};

◆ m_localPos

Amg::Vector2D Trk::PrepRawData::m_localPos {}
privateinherited

see derived classes for definition of meaning of LocalPosition

Definition at line 159 of file PrepRawData.h.

159{};

◆ m_rdoList

std::vector<Identifier> Trk::PrepRawData::m_rdoList {}
privateinherited

Stores the identifiers of the RDOs.

Definition at line 161 of file PrepRawData.h.

161{};

◆ s_numberOfInstantiations

std::atomic_size_t Trk::ObjectCounter< Trk::PrepRawData >::s_numberOfInstantiations
inlinestaticinherited

Definition at line 22 of file TrkObjectCounter.h.


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