ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::TgcPrepData Class Referencefinal

Class to represent TGC measurements. More...

#include <TgcPrepData.h>

Inheritance diagram for Muon::TgcPrepData:
Collaboration diagram for Muon::TgcPrepData:

Public Types

enum  { BCBIT_UNDEFINED =0 , BCBIT_NEXT =1 , BCBIT_CURRENT =2 , BCBIT_PREVIOUS =4 }

Public Member Functions

 TgcPrepData ()
 TgcPrepData (const TgcPrepData &)
 TgcPrepData (TgcPrepData &&) noexcept=default
TgcPrepDataoperator= (const TgcPrepData &)
TgcPrepDataoperator= (TgcPrepData &&) noexcept=default
 TgcPrepData (const Identifier &RDOId, const IdentifierHash &idDE, const Amg::Vector2D &locpos, const std::vector< Identifier > &rdoList, const Amg::MatrixX &locErrMat, const MuonGM::TgcReadoutElement *detEl, const uint16_t bcBitMap=0)
 Full constructor.
 TgcPrepData (const Identifier &RDOId, const IdentifierHash &idDE, const Amg::Vector2D &locpos, std::vector< Identifier > &&rdoList, Amg::MatrixX &&locErrMat, const MuonGM::TgcReadoutElement *detEl, const uint16_t bcBitMap=0)
virtual ~TgcPrepData ()
 Destructor:
virtual const Amg::Vector3DglobalPosition () const override final
 Returns the global position.
virtual const MuonGM::TgcReadoutElementdetectorElement () const override final
 Returns the detector element corresponding to this PRD The pointer will be zero if the det el is not defined (i.e.
virtual Trk::PrepRawDataType prdType () const override
 Interface method returning the prdType.
uint16_t getBcBitMap () const
 Returns the bcBitMap of this PRD bit2 for Previous BC, bit1 for Current BC, bit0 for Next BC.
void setBcBitMap (const uint16_t)
 set the bcBitMap for this PRD
virtual MsgStream & dump (MsgStream &stream) const override final
 Dumps information about the PRD.
virtual std::ostream & dump (std::ostream &stream) const override final
 Dumps information about the PRD.
virtual IdentifierHash collectionHash () const
 Returns the IdentifierHash corresponding to the PRD collection in the PRD container.
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 bool type (PrepRawDataType type) const
 Interface method checking the type.
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

const MuonGM::TgcReadoutElementm_detEl
uint16_t m_bcBitMap
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)

Friends

class ::TgcPrepDataContainerCnv
class TgcPrepDataContainerCnv_p1

Detailed Description

Class to represent TGC measurements.

Definition at line 31 of file TgcPrepData.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
BCBIT_UNDEFINED 
BCBIT_NEXT 
BCBIT_CURRENT 
BCBIT_PREVIOUS 

Definition at line 96 of file TgcPrepData.h.

Constructor & Destructor Documentation

◆ TgcPrepData() [1/5]

Muon::TgcPrepData::TgcPrepData ( )

Definition at line 52 of file TgcPrepData.cxx.

52 :
54 m_detEl(nullptr),
55 m_bcBitMap(0)
56{ }
const MuonGM::TgcReadoutElement * m_detEl

◆ TgcPrepData() [2/5]

Muon::TgcPrepData::TgcPrepData ( const TgcPrepData & )
default

◆ TgcPrepData() [3/5]

Muon::TgcPrepData::TgcPrepData ( TgcPrepData && )
defaultnoexcept

◆ TgcPrepData() [4/5]

Muon::TgcPrepData::TgcPrepData ( const Identifier & RDOId,
const IdentifierHash & idDE,
const Amg::Vector2D & locpos,
const std::vector< Identifier > & rdoList,
const Amg::MatrixX & locErrMat,
const MuonGM::TgcReadoutElement * detEl,
const uint16_t bcBitMap = 0 )

Full constructor.

Parameters
RDOIdThe identifier of the central strip of the cluster
idDEThe IdenifierHash of the collection used to store this object (i.e. of Muon::CscPrepDataCollection)
locposThe local coords of the measurement (this object will now own the LocalPostion)
rdoListVector of all the Identifiers of the strips used in this cluster
locErrMatThe error of the measurement (this object will now own the ErrorMatrix)
detElThe pointer to the Detector Element on which this measurement was made (must NOT be zero). Ownership is NOT taken (the pointer is assumed to belong to GeoModel and will not be deleted)

Definition at line 21 of file TgcPrepData.cxx.

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

◆ TgcPrepData() [5/5]

Muon::TgcPrepData::TgcPrepData ( const Identifier & RDOId,
const IdentifierHash & idDE,
const Amg::Vector2D & locpos,
std::vector< Identifier > && rdoList,
Amg::MatrixX && locErrMat,
const MuonGM::TgcReadoutElement * detEl,
const uint16_t bcBitMap = 0 )

Definition at line 33 of file TgcPrepData.cxx.

39 :
40 MuonCluster(RDOId, idDE, locpos, std::move(rdoList), std::move(locErrMat)), //call base class constructor
41 m_detEl(detEl),
42 m_bcBitMap(bcBitMap)
43{ }

◆ ~TgcPrepData()

Muon::TgcPrepData::~TgcPrepData ( )
virtualdefault

Destructor:

Member Function Documentation

◆ collectionHash()

IdentifierHash MuonCluster::collectionHash ( ) const
inlinevirtualinherited

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

const MuonGM::TgcReadoutElement * Muon::TgcPrepData::detectorElement ( ) const
inlinefinaloverridevirtual

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.

Definition at line 119 of file TgcPrepData.h.

120 {
121 return m_detEl;
122 }

◆ dump() [1/2]

MsgStream & Muon::TgcPrepData::dump ( MsgStream & stream) const
finaloverridevirtual

Dumps information about the PRD.

Reimplemented from Muon::MuonCluster.

Definition at line 85 of file TgcPrepData.cxx.

86 {
87 stream << MSG::INFO<<"TgcPrepData {"<<std::endl;
88
89 MuonCluster::dump(stream);
90
91 stream<<"} End TgcPrepData"<<endmsg;
92
93 return stream;
94 }
#define endmsg
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.

◆ dump() [2/2]

std::ostream & Muon::TgcPrepData::dump ( std::ostream & stream) const
finaloverridevirtual

Dumps information about the PRD.

Reimplemented from Muon::MuonCluster.

Definition at line 96 of file TgcPrepData.cxx.

97 {
98 stream << "TgcPrepData {"<<std::endl;
99
100 MuonCluster::dump(stream);
101
102 stream<<"} End TgcPrepData"<<std::endl;
103 return stream;
104 }

◆ getBcBitMap()

uint16_t Muon::TgcPrepData::getBcBitMap ( ) const

Returns the bcBitMap of this PRD bit2 for Previous BC, bit1 for Current BC, bit0 for Next BC.

Definition at line 75 of file TgcPrepData.cxx.

76{
77 return m_bcBitMap;
78}

◆ getHashAndIndex()

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

◆ globalPosition()

const Amg::Vector3D & Muon::TgcPrepData::globalPosition ( ) const
inlinefinaloverridevirtual

Returns the global position.

Implements Muon::MuonCluster.

Definition at line 124 of file TgcPrepData.h.

125 {
126 if (not m_globalPosition) {
127 m_globalPosition.set(std::make_unique<const Amg::Vector3D>(
128 m_detEl->surface(identify())
130 }
131 if (not m_globalPosition) throw Trk::PrepRawDataUndefinedVariable();
132 return *m_globalPosition;
133 }
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
Global position of measurement.
const Amg::Vector2D & localPosition() const
return the local position reference
Identifier identify() const
return the identifier
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.

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

TgcPrepData & Muon::TgcPrepData::operator= ( const TgcPrepData & RIO)

Definition at line 64 of file TgcPrepData.cxx.

65{
66 if (&RIO !=this)
67 {
69 m_detEl = RIO.m_detEl ;
70 m_bcBitMap = RIO.m_bcBitMap;
71 }
72 return *this;
73}

◆ operator=() [2/2]

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

◆ prdType()

virtual Trk::PrepRawDataType Muon::TgcPrepData::prdType ( ) const
inlineoverridevirtual

Interface method returning the prdType.

Implements Trk::PrepRawData.

Definition at line 89 of file TgcPrepData.h.

◆ rdoList()

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

return the List of rdo identifiers (pointers)

◆ setBcBitMap()

void Muon::TgcPrepData::setBcBitMap ( const uint16_t bcBitMap)

set the bcBitMap for this PRD

Definition at line 80 of file TgcPrepData.cxx.

81{
82 m_bcBitMap = bcBitMap;
83}

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

◆ ::TgcPrepDataContainerCnv

friend class ::TgcPrepDataContainerCnv
friend

Definition at line 39 of file TgcPrepData.h.

◆ TgcPrepDataContainerCnv_p1

friend class TgcPrepDataContainerCnv_p1
friend

Definition at line 40 of file TgcPrepData.h.

Member Data Documentation

◆ m_bcBitMap

uint16_t Muon::TgcPrepData::m_bcBitMap
private

Definition at line 110 of file TgcPrepData.h.

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

const MuonGM::TgcReadoutElement* Muon::TgcPrepData::m_detEl
private

Definition at line 109 of file TgcPrepData.h.

◆ m_globalPosition

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

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: