ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
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. More...
 
 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: More...
 
const Amg::Vector3DglobalPosition () const
 return global position reference More...
 
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. More...
 
virtual bool type (Trk::PrepRawDataType type) const override final
 Interface method checking the type. More...
 
virtual const IdentifierHash collectionHash () const final
 returns the IdentifierHash corresponding to the channel. More...
 
const std::vector< float > & sampleCharges () const
 Return the time samples. More...
 
double timeOfFirstSample () const
 return the time of the first sample More...
 
bool samplingPhase () const
 return the sampling phase More...
 
unsigned short samplingTime () const
 return the sampling time in ns: the time between samplings More...
 
virtual MsgStream & dump (MsgStream &stream) const override final
 dump information about the PRD More...
 
virtual std::ostream & dump (std::ostream &stream) const override final
 dump information about the PRD More...
 
void set_samplingPhase ()
 set the sampling phase 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
 

Private Attributes

IdentifierHash m_collectionHash
 The IdenifierHash of the collection used to store this PRD. More...
 
CxxUtils::CachedUniquePtr< const Amg::Vector3Dm_globalPosition
 The global position is calculated 'on the fly' and is not written to disk. More...
 
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. 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...
 

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  :
70  PrepRawData(),
73  m_detEl(nullptr),
76  m_samplingTime(0),
77  m_samplingPhase(false)
78  { }

◆ CscStripPrepData() [2/4]

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

Definition at line 81 of file CscStripPrepData.cxx.

81  :
82  PrepRawData(RIO),
83  m_collectionHash( RIO.m_collectionHash ),
85  m_detEl( RIO.m_detEl ),
86  m_sampleCharges( RIO.m_sampleCharges ),
87  m_timeOfFirstSample ( RIO.m_timeOfFirstSample ),
88  m_samplingTime( RIO.m_samplingTime ),
89  m_samplingPhase( RIO.m_samplingPhase )
90  { }

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

◆ 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 158 of file CscStripPrepData.h.

159  {
160  return m_collectionHash;
161  }

◆ 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 153 of file CscStripPrepData.h.

154  {
155  return m_detEl;
156  }

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

◆ 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 141 of file CscStripPrepData.h.

142  {
143  if (not m_globalPosition) {
144  m_globalPosition.set(std::make_unique<const Amg::Vector3D>(
147  }
148 
150  return *m_globalPosition;
151  }

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

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();
98  m_collectionHash = RIO.m_collectionHash;
99  m_detEl = RIO.m_detEl ;
100  m_sampleCharges = RIO.m_sampleCharges;
101  m_timeOfFirstSample = RIO.m_timeOfFirstSample;
102  m_samplingTime = RIO.m_samplingTime;
103  m_samplingPhase = RIO.m_samplingPhase;
104  PrepRawData::operator=(RIO);
105  }
106  return *this;
107  }

◆ 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 163 of file CscStripPrepData.h.

164  {
165  return m_sampleCharges;
166  }

◆ samplingPhase()

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

return the sampling phase

Definition at line 178 of file CscStripPrepData.h.

179  {
180  return m_samplingPhase;
181  }

◆ samplingTime()

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

return the sampling time in ns: the time between samplings

Definition at line 173 of file CscStripPrepData.h.

174  {
175  return m_samplingTime;
176  }

◆ 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 183 of file CscStripPrepData.h.

184  {
185  m_samplingPhase = true;
186  }

◆ 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 168 of file CscStripPrepData.h.

169  {
170  return m_timeOfFirstSample;
171  }

◆ type()

virtual bool Muon::CscStripPrepData::type ( Trk::PrepRawDataType  type) const
inlinefinaloverridevirtual

Interface method checking the type.

Implements Trk::PrepRawData.

Definition at line 94 of file CscStripPrepData.h.

95  {
97  }

Friends And Related Function Documentation

◆ ::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 151 of file PrepRawData.h.

◆ m_collectionHash

IdentifierHash Muon::CscStripPrepData::m_collectionHash
private

The IdenifierHash of the collection used to store this PRD.

Definition at line 126 of file CscStripPrepData.h.

◆ m_detEl

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

Definition at line 129 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 128 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 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.

◆ m_sampleCharges

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

Definition at line 130 of file CscStripPrepData.h.

◆ m_samplingPhase

bool Muon::CscStripPrepData::m_samplingPhase
private

Definition at line 133 of file CscStripPrepData.h.

◆ m_samplingTime

unsigned short Muon::CscStripPrepData::m_samplingTime
private

Definition at line 132 of file CscStripPrepData.h.

◆ m_timeOfFirstSample

float Muon::CscStripPrepData::m_timeOfFirstSample
private

Definition at line 131 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:
Muon::CscStripPrepData::samplingTime
unsigned short samplingTime() const
return the sampling time in ns: the time between samplings
Definition: CscStripPrepData.h:173
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Muon::CscStripPrepData::type
virtual bool type(Trk::PrepRawDataType type) const override final
Interface method checking the type.
Definition: CscStripPrepData.h:94
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Muon::CscStripPrepData::collectionHash
virtual const IdentifierHash collectionHash() const final
returns the IdentifierHash corresponding to the channel.
Definition: CscStripPrepData.h:158
Muon::CscStripPrepData::m_collectionHash
IdentifierHash m_collectionHash
The IdenifierHash of the collection used to store this PRD.
Definition: CscStripPrepData.h:126
Muon::CscStripPrepData::m_timeOfFirstSample
float m_timeOfFirstSample
Definition: CscStripPrepData.h:131
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::CscStripPrepData::samplingPhase
bool samplingPhase() const
return the sampling phase
Definition: CscStripPrepData.h:178
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Muon::CscStripPrepData::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
The global position is calculated 'on the fly' and is not written to disk.
Definition: CscStripPrepData.h:128
Muon::CscStripPrepData::m_sampleCharges
std::vector< float > m_sampleCharges
Definition: CscStripPrepData.h:130
Trk::PrepRawData::PrepRawData
PrepRawData()
public because of DataPool
Definition: PrepRawData.cxx:68
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Trk::ObjectCounter< Trk::PrepRawData >::s_numberOfInstantiations
static std::atomic_size_t s_numberOfInstantiations
Definition: TrkObjectCounter.h:22
Muon::CscStripPrepData::m_samplingPhase
bool m_samplingPhase
Definition: CscStripPrepData.h:133
Muon::CscStripPrepData::m_samplingTime
unsigned short m_samplingTime
Definition: CscStripPrepData.h:132
Muon::CscStripPrepData::m_detEl
const MuonGM::CscReadoutElement * m_detEl
Definition: CscStripPrepData.h:129
Trk::Surface::localToGlobal
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.
Muon::CscStripPrepData::timeOfFirstSample
double timeOfFirstSample() const
return the time of the first sample
Definition: CscStripPrepData.h:168
Muon::CscStripPrepData::sampleCharges
const std::vector< float > & sampleCharges() const
Return the time samples.
Definition: CscStripPrepData.h:163
Trk::PrepRawDataUndefinedVariable
class thrown in the event of an variable not being defined.
Definition: PrepRawData.h:59