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

Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData). More...

#include <CscStripPrepData.h>

Inheritance diagram for Muon::CscStripPrepData:
Collaboration diagram for Muon::CscStripPrepData:

Public Member Functions

 CscStripPrepData ()
 CscStripPrepData (const CscStripPrepData &)
CscStripPrepDataoperator= (const CscStripPrepData &)
 CscStripPrepData (const Identifier &RDOId, const IdentifierHash &collectionHash, const Amg::Vector2D &locpos, const Amg::MatrixX &locErrMat, const MuonGM::CscReadoutElement *detEl, const std::vector< float > &sampleCharges, float timeOfFirstSample, unsigned short samplingRate)
 Constructor.
 CscStripPrepData (const Identifier &RDOId, const IdentifierHash &collectionHash, const Amg::Vector2D &locpos, Amg::MatrixX &&locErrMat, const MuonGM::CscReadoutElement *detEl, const std::vector< float > &sampleCharges, float timeOfFirstSample, unsigned short samplingRate)
virtual ~CscStripPrepData ()
 Destructor:
const Amg::Vector3DglobalPosition () const
 return global position reference
virtual const MuonGM::CscReadoutElementdetectorElement () const override final
 return 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 final
 Interface method checking the type.
virtual const IdentifierHash collectionHash () const final
 returns the IdentifierHash corresponding to the channel.
const std::vector< float > & sampleCharges () const
 Return the time samples.
double timeOfFirstSample () const
 return the time of the first sample
bool samplingPhase () const
 return the sampling phase
unsigned short samplingTime () const
 return the sampling time in ns: the time between samplings
virtual MsgStream & dump (MsgStream &stream) const override final
 dump information about the PRD
virtual std::ostream & dump (std::ostream &stream) const override final
 dump information about the PRD
void set_samplingPhase ()
 set the sampling phase
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

Private Attributes

IdentifierHash m_collectionHash
 The IdenifierHash of the collection used to store this PRD.
CxxUtils::CachedUniquePtr< const Amg::Vector3Dm_globalPosition
 The global position is calculated 'on the fly' and is not written to disk.
const MuonGM::CscReadoutElementm_detEl
std::vector< float > m_sampleCharges
float m_timeOfFirstSample
unsigned short m_samplingTime
bool m_samplingPhase
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 ::CscStripPrepDataContainerCnv
class Muon::CscStripPrepDataContainerCnv_p1

Detailed Description

Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).

Author
niels van Eldik niels.nosp@m..van.nosp@m..eldi.nosp@m.k@ce.nosp@m.rn.ch

Definition at line 39 of file CscStripPrepData.h.

Constructor & Destructor Documentation

◆ CscStripPrepData() [1/4]

Muon::CscStripPrepData::CscStripPrepData ( )

Definition at line 69 of file CscStripPrepData.cxx.

69 :
73 m_detEl(nullptr),
77 m_samplingPhase(false)
78 { }
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
The global position is calculated 'on the fly' and is not written to disk.
const MuonGM::CscReadoutElement * m_detEl
unsigned short m_samplingTime
IdentifierHash m_collectionHash
The IdenifierHash of the collection used to store this PRD.
std::vector< float > m_sampleCharges
PrepRawData()
public because of DataPool

◆ CscStripPrepData() [2/4]

Muon::CscStripPrepData::CscStripPrepData ( const CscStripPrepData & RIO)

Definition at line 81 of file CscStripPrepData.cxx.

81 :
82 PrepRawData(RIO),
85 m_detEl( RIO.m_detEl ),
90 { }
const MuonGM::CscReadoutElement * m_detEl
unsigned short m_samplingTime
IdentifierHash m_collectionHash
The IdenifierHash of the collection used to store this PRD.
std::vector< float > m_sampleCharges

◆ CscStripPrepData() [3/4]

Muon::CscStripPrepData::CscStripPrepData ( const Identifier & RDOId,
const IdentifierHash & collectionHash,
const Amg::Vector2D & locpos,
const Amg::MatrixX & locErrMat,
const MuonGM::CscReadoutElement * detEl,
const std::vector< float > & sampleCharges,
float timeOfFirstSample,
unsigned short samplingRate )

Constructor.

Parameters
RDOIdThe identifier of the strip
collectionHashThe 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)
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)
sampleChargesThe vector of charges measured by the strip.
Todo
More info.
Parameters
timeOfFirstSampleThe time measured by the CSC
Todo
More info.
Parameters
samplingRateThe sampling rate.

Definition at line 23 of file CscStripPrepData.cxx.

31 :
32 PrepRawData(RDOId, locpos, locErrMat), //call base class constructor
35 m_detEl(detEl),
39 m_samplingPhase(false)
40 {
41 }
double timeOfFirstSample() const
return the time of the first sample
const std::vector< float > & sampleCharges() const
Return the time samples.
virtual const IdentifierHash collectionHash() const final
returns the IdentifierHash corresponding to the channel.
unsigned short samplingTime() const
return the sampling time in ns: the time between samplings

◆ CscStripPrepData() [4/4]

Muon::CscStripPrepData::CscStripPrepData ( const Identifier & RDOId,
const IdentifierHash & collectionHash,
const Amg::Vector2D & locpos,
Amg::MatrixX && locErrMat,
const MuonGM::CscReadoutElement * detEl,
const std::vector< float > & sampleCharges,
float timeOfFirstSample,
unsigned short samplingRate )

Definition at line 43 of file CscStripPrepData.cxx.

51 :
52 PrepRawData(RDOId, locpos, std::move(locErrMat)), //call base class constructor
55 m_detEl(detEl),
59 m_samplingPhase(false)
60 {
61 }

◆ ~CscStripPrepData()

Muon::CscStripPrepData::~CscStripPrepData ( )
virtualdefault

Destructor:

Member Function Documentation

◆ collectionHash()

const IdentifierHash Muon::CscStripPrepData::collectionHash ( ) const
inlinefinalvirtual

returns the IdentifierHash corresponding to the channel.

Definition at line 157 of file CscStripPrepData.h.

158 {
159 return m_collectionHash;
160 }

◆ detectorElement()

const MuonGM::CscReadoutElement * Muon::CscStripPrepData::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 152 of file CscStripPrepData.h.

153 {
154 return m_detEl;
155 }

◆ dump() [1/2]

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

dump information about the PRD

Reimplemented from Trk::PrepRawData.

Definition at line 109 of file CscStripPrepData.cxx.

110 {
111 stream << MSG::INFO << "CscStripPrepData {" <<endmsg;
112
113 std::stringstream s;
114 s << std::setiosflags(std::ios::fixed);
115 s << std::setprecision(4);
116 s << "Samples = ";
117 for( unsigned int i=0;i<m_sampleCharges.size();++i) s << m_sampleCharges[i] << " , ";
118 s << std::endl;
119 s << "Time of first sample= "<<this->timeOfFirstSample() << ", sampling Time (ns) "
120 << this->samplingTime() << ", sampling Phase " << this->samplingPhase();
121 s << "} End CscStripPrepData" << std::endl;
122 stream << s.str();
123
124 return stream;
125 }
#define endmsg
bool samplingPhase() const
return the sampling phase

◆ dump() [2/2]

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

dump information about the PRD

Reimplemented from Trk::PrepRawData.

Definition at line 127 of file CscStripPrepData.cxx.

128 {
129 stream << "CscStripPrepData {"<<std::endl;
130
131 std::stringstream s;
132 s << std::setiosflags(std::ios::fixed);
133 s << std::setprecision(4);
134
135 s << "Samples = ";
136 for( unsigned int i=0;i<m_sampleCharges.size();++i) s << m_sampleCharges[i] << " , ";
137 s << std::endl;
138 s << "Time of first sample= "<<this->timeOfFirstSample() << ", sampling time(ns) "
139 << this->samplingTime();
140 s << "} End CscStripPrepData" << std::endl;
141 stream << s.str();
142
143 return stream;
144 }

◆ getHashAndIndex()

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

◆ globalPosition()

const Amg::Vector3D & Muon::CscStripPrepData::globalPosition ( ) const
inline

return global position reference

Definition at line 140 of file CscStripPrepData.h.

141 {
142 if (not m_globalPosition) {
143 m_globalPosition.set(std::make_unique<const Amg::Vector3D>(
144 m_detEl->surface(identify())
146 }
147
148 if (not m_globalPosition) throw Trk::PrepRawDataUndefinedVariable();
149 return *m_globalPosition;
150 }
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=()

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

Definition at line 93 of file CscStripPrepData.cxx.

94 {
95 if (&RIO !=this)
96 {
97 if (m_globalPosition) m_globalPosition.release().reset();
99 m_detEl = RIO.m_detEl ;
104 PrepRawData::operator=(RIO);
105 }
106 return *this;
107 }

◆ prdType()

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

Interface method checking the type.

Implements Trk::PrepRawData.

Definition at line 94 of file CscStripPrepData.h.

◆ rdoList()

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

return the List of rdo identifiers (pointers)

◆ sampleCharges()

const std::vector< float > & Muon::CscStripPrepData::sampleCharges ( ) const
inline

Return the time samples.

Definition at line 162 of file CscStripPrepData.h.

163 {
164 return m_sampleCharges;
165 }

◆ samplingPhase()

bool Muon::CscStripPrepData::samplingPhase ( ) const
inline

return the sampling phase

Definition at line 177 of file CscStripPrepData.h.

178 {
179 return m_samplingPhase;
180 }

◆ samplingTime()

unsigned short Muon::CscStripPrepData::samplingTime ( ) const
inline

return the sampling time in ns: the time between samplings

Definition at line 172 of file CscStripPrepData.h.

173 {
174 return m_samplingTime;
175 }

◆ set_samplingPhase()

void Muon::CscStripPrepData::set_samplingPhase ( )
inline

set the sampling phase

Warning
This does not conform to ATLAS Coding Conventions and will be renamed to setSamplingPhase()

Definition at line 182 of file CscStripPrepData.h.

183 {
184 m_samplingPhase = true;
185 }

◆ setHashAndIndex()

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

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

◆ timeOfFirstSample()

double Muon::CscStripPrepData::timeOfFirstSample ( ) const
inline

return the time of the first sample

Definition at line 167 of file CscStripPrepData.h.

168 {
169 return m_timeOfFirstSample;
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.

◆ ::CscStripPrepDataContainerCnv

friend class ::CscStripPrepDataContainerCnv
friend

Definition at line 47 of file CscStripPrepData.h.

◆ Muon::CscStripPrepDataContainerCnv_p1

Definition at line 48 of file CscStripPrepData.h.

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_collectionHash

IdentifierHash Muon::CscStripPrepData::m_collectionHash
private

The IdenifierHash of the collection used to store this PRD.

Definition at line 125 of file CscStripPrepData.h.

◆ m_detEl

const MuonGM::CscReadoutElement* Muon::CscStripPrepData::m_detEl
private

Definition at line 128 of file CscStripPrepData.h.

◆ m_globalPosition

CxxUtils::CachedUniquePtr<const Amg::Vector3D> Muon::CscStripPrepData::m_globalPosition
private

The global position is calculated 'on the fly' and is not written to disk.

Definition at line 127 of file CscStripPrepData.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_sampleCharges

std::vector<float> Muon::CscStripPrepData::m_sampleCharges
private

Definition at line 129 of file CscStripPrepData.h.

◆ m_samplingPhase

bool Muon::CscStripPrepData::m_samplingPhase
private

Definition at line 132 of file CscStripPrepData.h.

◆ m_samplingTime

unsigned short Muon::CscStripPrepData::m_samplingTime
private

Definition at line 131 of file CscStripPrepData.h.

◆ m_timeOfFirstSample

float Muon::CscStripPrepData::m_timeOfFirstSample
private

Definition at line 130 of file CscStripPrepData.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: