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

Class representing clusters from the CSC. More...

#include <CscPrepData.h>

Inheritance diagram for Muon::CscPrepData:
Collaboration diagram for Muon::CscPrepData:

Public Member Functions

 CscPrepData ()
 CscPrepData (const CscPrepData &)=default
 CscPrepData (CscPrepData &&) noexcept=default
CscPrepDataoperator= (const CscPrepData &)=default
CscPrepDataoperator= (CscPrepData &&) noexcept=default
 CscPrepData (const Identifier &RDOId, const IdentifierHash &idDE, const Amg::Vector2D &locpos, const std::vector< Identifier > &rdoList, const Amg::MatrixX &locErrMat, const MuonGM::CscReadoutElement *detEl, const int charge, const double time, const CscClusterStatus status, const CscTimeStatus timeStatus=Muon::CscTimeStatusUndefined)
 Full constructor.
 CscPrepData (const Identifier &RDOId, const IdentifierHash &idDE, const Amg::Vector2D &locpos, std::vector< Identifier > &&rdoList, Amg::MatrixX &&locErrMat, const MuonGM::CscReadoutElement *detEl, const int charge, const double time, const CscClusterStatus status, const CscTimeStatus timeStatus=Muon::CscTimeStatusUndefined)
virtual ~CscPrepData ()
 Destructor.
virtual const Amg::Vector3DglobalPosition () const override final
 Returns the global position.
virtual const MuonGM::CscReadoutElementdetectorElement () const override final
 Return the detector element corresponding to this PRD.
virtual Trk::PrepRawDataType prdType () const override final
 Interface method returning the prdType.
int charge () const
 Returns the charge.
double time () const
 Returns the time.
CscClusterStatus status () const
 Returns the Csc status (position measurement) flag.
CscTimeStatus timeStatus () const
 Returns the Csc time status flag.
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::CscReadoutElementm_detEl
 Pointer to the detector element.
int m_charge
double m_time
CscClusterStatus m_status
CscTimeStatus m_timeStatus
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 ::CscPrepDataContainerCnv
class Muon::CscPrepDataContainerCnv_p1

Detailed Description

Class representing clusters from the CSC.

Author
Edwar.nosp@m.d.Mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch
Ketevi A. Assamagan

Definition at line 38 of file CscPrepData.h.

Constructor & Destructor Documentation

◆ CscPrepData() [1/5]

Muon::CscPrepData::CscPrepData ( )

Definition at line 64 of file CscPrepData.cxx.

64 :
66 m_detEl(nullptr),
67 m_charge(0),
68 m_time(0),
71 { }
CscTimeStatus m_timeStatus
CscClusterStatus m_status
const MuonGM::CscReadoutElement * m_detEl
Pointer to the detector element.
@ CscStatusUndefined
Undefined, should not happen, most likely indicates a problem.
@ CscTimeStatusUndefined
Time is not assessed indicating potential bug.

◆ CscPrepData() [2/5]

Muon::CscPrepData::CscPrepData ( const CscPrepData & )
default

◆ CscPrepData() [3/5]

Muon::CscPrepData::CscPrepData ( CscPrepData && )
defaultnoexcept

◆ CscPrepData() [4/5]

Muon::CscPrepData::CscPrepData ( const Identifier & RDOId,
const IdentifierHash & idDE,
const Amg::Vector2D & locpos,
const std::vector< Identifier > & rdoList,
const Amg::MatrixX & locErrMat,
const MuonGM::CscReadoutElement * detEl,
const int charge,
const double time,
const CscClusterStatus status,
const CscTimeStatus timeStatus = Muon::CscTimeStatusUndefined )

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)
chargeThe charge measured by the CSC
timeThe time measured by the CSC
statusThe status of the position measurement. See Muon::CscClusterStatus for more information.
timestatusThe status of the time measurement (peak strip due to max charge). See Muon::CscTimeStatus for more information.

Definition at line 22 of file CscPrepData.cxx.

31 :
32 MuonCluster(RDOId, idDE, locpos, rdoList, locErrMat), //call base class constructor
33 m_detEl(detEl),
35 m_time(time),
38 { }
CscTimeStatus timeStatus() const
Returns the Csc time status flag.
double time() const
Returns the time.
int charge() const
Returns the charge.
CscClusterStatus status() const
Returns the Csc status (position measurement) flag.
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)

◆ CscPrepData() [5/5]

Muon::CscPrepData::CscPrepData ( const Identifier & RDOId,
const IdentifierHash & idDE,
const Amg::Vector2D & locpos,
std::vector< Identifier > && rdoList,
Amg::MatrixX && locErrMat,
const MuonGM::CscReadoutElement * detEl,
const int charge,
const double time,
const CscClusterStatus status,
const CscTimeStatus timeStatus = Muon::CscTimeStatusUndefined )

Definition at line 40 of file CscPrepData.cxx.

49 :
50 MuonCluster(RDOId, idDE, locpos, std::move(rdoList), std::move(locErrMat)), //call base class constructor
51 m_detEl(detEl),
53 m_time(time),
56 { }

◆ ~CscPrepData()

Muon::CscPrepData::~CscPrepData ( )
virtualdefault

Destructor.

Member Function Documentation

◆ charge()

int Muon::CscPrepData::charge ( ) const
inline

Returns the charge.

Definition at line 152 of file CscPrepData.h.

153 {
154 return m_charge;
155 }

◆ 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::CscReadoutElement * Muon::CscPrepData::detectorElement ( ) const
inlinefinaloverridevirtual

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)

Implements Trk::PrepRawData.

Definition at line 147 of file CscPrepData.h.

148 {
149 return m_detEl;
150 }

◆ dump() [1/2]

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

Dumps information about the PRD.

Reimplemented from Muon::MuonCluster.

Definition at line 74 of file CscPrepData.cxx.

75 {
76 stream << MSG::INFO << "CscPrepData {" <<std::endl;
77
78 MuonCluster::dump(stream);
79
80 std::stringstream s;
81 s << "Charge = "<<this->charge() << ", ";
82 s << std::setiosflags(std::ios::fixed);
83 s << std::setprecision(4);
84 s << "Time = "<<this->time() << ", ";
85 s << "Status = "<<this->status();
86 s << "TimeStatus = "<<this->timeStatus();
87 s << "}" << std::endl;
88 stream << s.str();
89
90 return stream;
91 }
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.

◆ dump() [2/2]

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

Dumps information about the PRD.

Reimplemented from Muon::MuonCluster.

Definition at line 93 of file CscPrepData.cxx.

94 {
95 stream << "CscPrepData {"<<std::endl;
96
97 MuonCluster::dump(stream);
98
99 std::stringstream s;
100 s << "Charge = " << this->charge() << ", ";
101 s << std::setiosflags(std::ios::fixed);
102 s << std::setprecision(4);
103 s << "Time = " << this->time() << ", ";
104 s << "Status = "<<this->status();
105 s << "TimeStatus = "<<this->timeStatus();
106 s << "}" <<std::endl;
107 stream << s.str();
108
109 return stream;
110 }

◆ getHashAndIndex()

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

◆ globalPosition()

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

Returns the global position.

Implements Muon::MuonCluster.

Definition at line 173 of file CscPrepData.h.

174 {
175 if (not m_globalPosition) {
176 m_globalPosition.set(std::make_unique<const Amg::Vector3D>(
177 m_detEl->surface(identify())
179 }
180
181 if (not m_globalPosition) throw Trk::PrepRawDataUndefinedVariable();
182 return *m_globalPosition;
183 }
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]

CscPrepData & Muon::CscPrepData::operator= ( const CscPrepData & )
default

◆ operator=() [2/2]

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

◆ prdType()

virtual Trk::PrepRawDataType Muon::CscPrepData::prdType ( ) const
inlinefinaloverridevirtual

Interface method returning the prdType.

Implements Trk::PrepRawData.

Definition at line 110 of file CscPrepData.h.

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

◆ status()

CscClusterStatus Muon::CscPrepData::status ( ) const
inline

Returns the Csc status (position measurement) flag.

Definition at line 162 of file CscPrepData.h.

163 {
164 return m_status;
165 }

◆ time()

double Muon::CscPrepData::time ( ) const
inline

Returns the time.

Definition at line 157 of file CscPrepData.h.

158 {
159 return m_time;
160 }

◆ timeStatus()

CscTimeStatus Muon::CscPrepData::timeStatus ( ) const
inline

Returns the Csc time status flag.

Definition at line 167 of file CscPrepData.h.

168 {
169 return m_timeStatus;
170 }

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

◆ ::CscPrepDataContainerCnv

friend class ::CscPrepDataContainerCnv
friend

Definition at line 46 of file CscPrepData.h.

◆ Muon::CscPrepDataContainerCnv_p1

friend class Muon::CscPrepDataContainerCnv_p1
friend

Definition at line 47 of file CscPrepData.h.

Member Data Documentation

◆ m_charge

int Muon::CscPrepData::m_charge
private

Definition at line 137 of file CscPrepData.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::CscReadoutElement* Muon::CscPrepData::m_detEl
private

Pointer to the detector element.

This is owned by this object and is therefore not deleted.

Definition at line 136 of file CscPrepData.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{};

◆ m_status

CscClusterStatus Muon::CscPrepData::m_status
private

Definition at line 139 of file CscPrepData.h.

◆ m_time

double Muon::CscPrepData::m_time
private

Definition at line 138 of file CscPrepData.h.

◆ m_timeStatus

CscTimeStatus Muon::CscPrepData::m_timeStatus
private

Definition at line 140 of file CscPrepData.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: