ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Private Attributes | List of all members
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. More...
 
 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. More...
 
 MuonCluster (const Identifier &RDOId, const IdentifierHash &collectionHash, const Amg::Vector2D &locpos, std::vector< Identifier > &&rdoList, Amg::MatrixX &&locErrMat)
 
virtual ~MuonCluster ()
 Destructor. More...
 
virtual const Amg::Vector3DglobalPosition () const =0
 Returns the global position of the measurement (calculated on the fly) More...
 
virtual IdentifierHash collectionHash () const
 Returns the IdentifierHash corresponding to the PRD collection in the PRD container. More...
 
virtual const MuonGM::MuonClusterReadoutElementdetectorElement () const override=0
 Returns the detector element corresponding to this PRD. More...
 
virtual bool type (Trk::PrepRawDataType type) const override=0
 Interface method checking the type. More...
 
virtual MsgStream & dump (MsgStream &stream) const override
 Dumps information about the PRD. More...
 
virtual std::ostream & dump (std::ostream &stream) const override
 Dumps information about the PRD. More...
 
Identifier identify () const
 return the identifier More...
 
const Amg::Vector2DlocalPosition () const
 return the local position reference More...
 
const std::vector< Identifier > & rdoList () const
 return the List of rdo identifiers (pointers) More...
 
const Amg::MatrixXlocalCovariance () const
 return const ref to the error matrix More...
 
bool hasLocalCovariance () const
 returns localCovariance().size()!=0 More...
 
void setHashAndIndex (unsigned short collHash, unsigned short objIndex)
 TEMP for testing: might make some classes friends later ... More...
 
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. More...
 

Private Attributes

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

Detailed Description

Class representing clusters in the muon system.

Author
Niels.nosp@m..van.nosp@m..Eldi.nosp@m.k@ce.nosp@m.rn.ch
Edwar.nosp@m.d.Mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch
Ketevi A. Assamagan

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

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

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

◆ 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 104 of file MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h.

105  {
106  return getHashAndIndex().collHash();
107  }

◆ detectorElement()

virtual const MuonGM::MuonClusterReadoutElement* Muon::MuonCluster::detectorElement ( ) const
overridepure virtual

Returns 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)

Implements Trk::PrepRawData.

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

◆ dump() [1/2]

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

Dumps information about the PRD.

Reimplemented from Trk::PrepRawData.

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

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  }

◆ dump() [2/2]

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

Dumps information about the PRD.

Reimplemented from Trk::PrepRawData.

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

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 Muon::MMPrepData, Muon::CscPrepData, Muon::TgcPrepData, Muon::sTgcPrepData, and Muon::RpcPrepData.

◆ hasLocalCovariance()

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

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

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

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

◆ operator=() [2/2]

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

◆ 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 Muon::MuonCluster::type ( Trk::PrepRawDataType  type) const
overridepure virtual

Interface method checking the type.

Implements Trk::PrepRawData.

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

Member Data Documentation

◆ m_clusId

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

PrepRawData ID, not const because of DataPool.

Definition at line 151 of file PrepRawData.h.

◆ m_globalPosition

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

Global position of measurement.

Calculated on demand and cached

Definition at line 96 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 162 of file PrepRawData.h.

◆ m_localCovariance

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

See derived classes for definition of ErrorMatrix.

Definition at line 158 of file PrepRawData.h.

◆ m_localPos

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

see derived classes for definition of meaning of LocalPosition

Definition at line 154 of file PrepRawData.h.

◆ m_rdoList

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

Stores the identifiers of the RDOs.

Definition at line 156 of file PrepRawData.h.

◆ 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:
Trk::PrepRawData::dump
virtual MsgStream & dump(MsgStream &stream) const
dump information about the PRD object.
Definition: PrepRawData.cxx:79
Trk::PrepRawData::rdoList
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
Muon::MuonCluster::globalPosition
virtual const Amg::Vector3D & globalPosition() const =0
Returns the global position of the measurement (calculated on the fly)
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::PrepRawData::operator=
PrepRawData & operator=(const PrepRawData &)=default
Trk::PrepRawData::PrepRawData
PrepRawData()
public because of DataPool
Definition: PrepRawData.cxx:68
Trk::PrepRawData::getHashAndIndex
const IdentContIndex & getHashAndIndex() const
Trk::ObjectCounter< Trk::PrepRawData >::s_numberOfInstantiations
static std::atomic_size_t s_numberOfInstantiations
Definition: TrkObjectCounter.h:22
Muon::MuonCluster::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
Global position of measurement.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:96
IdentContIndex::collHash
unsigned short collHash() const
Accessor to hash, obj index and combined index.
Definition: IdentContIndex.h:85