ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Private Attributes | Friends | List of all members
Muon::MdtTwinPrepData Class Reference

Class to represent measurements from the Monitored Drift Tubes. More...

#include <MdtTwinPrepData.h>

Inheritance diagram for Muon::MdtTwinPrepData:
Collaboration diagram for Muon::MdtTwinPrepData:

Public Member Functions

 MdtTwinPrepData ()=default
 
 MdtTwinPrepData (const MdtTwinPrepData &)=default
 
MdtTwinPrepDataoperator= (const MdtTwinPrepData &)=default
 
 MdtTwinPrepData (const Identifier &id, const Amg::Vector2D &driftRadiusXTwin, const Amg::MatrixX &errDriftRadiusXTwin, const MuonGM::MdtReadoutElement *detEl, const int tdc, const int adc, const int tdcTwin, const int adcTwin, const MdtDriftCircleStatus status)
 Constructor with parameters: this class owns the pointers passed (except the MuonDetectorElement) More...
 
virtual ~MdtTwinPrepData ()=default
 Destructor. More...
 
const Amg::Vector3DglobalPosition () const
 Returns the global position of the hit using twin hit information. More...
 
int tdcTwin () const
 Returns the TDC of twin tube(typically range is 0 to 2500). More...
 
int adcTwin () const
 Returns the ADC of twin tube(typically range is 0 to 250) More...
 
virtual MsgStream & dump (MsgStream &stream) const
 Dumps information about the PRD. More...
 
virtual std::ostream & dump (std::ostream &stream) const
 Dumps information about the PRD. More...
 
virtual const MuonGM::MdtReadoutElementdetectorElement () const override
 Returns the detector element corresponding to this PRD. More...
 
virtual bool type (Trk::PrepRawDataType type) const override
 Interface method checking the type. More...
 
unsigned int dimension () const
 Returns the dimension of the MdtPrepData. More...
 
int tdc () const
 Returns the TDC (typically range is 0 to 2500). More...
 
int adc () const
 Returns the ADC (typically range is 0 to 250) More...
 
MdtDriftCircleStatus status () const
 Returns the status of the measurement. More...
 
virtual IdentifierHash collectionHash () const
 Returns the IdentifierHash corresponding to the Mdt tube which was hit. 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

int m_tdcTwin {0}
 TDC value of twin tube - typical TDC spectra can go from 0 up to 2500. More...
 
int m_adcTwin {0}
 ADC value of twin tube - typical ADC spectra can go from 0 up to 250. More...
 
const MuonGM::MdtReadoutElementm_detEl {nullptr}
 Cached pointer to detector element (not deleted in destructor, not written to disk) More...
 
int m_tdc {0}
 TDC value - typical TDC spectra can go from 0 up to 2500. More...
 
int m_adc {0}
 ADC value - typical ADC spectra can go from 0 up to 250. More...
 
MdtDriftCircleStatus m_status {MdtDriftCircleStatus::MdtStatusUnDefined}
 enum to hold 'status' of measurement More...
 
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 ::MdtPrepDataContainerCnv
 

Detailed Description

Class to represent measurements from the Monitored Drift Tubes.

Definition at line 32 of file MdtTwinPrepData.h.

Constructor & Destructor Documentation

◆ MdtTwinPrepData() [1/3]

Muon::MdtTwinPrepData::MdtTwinPrepData ( )
default

◆ MdtTwinPrepData() [2/3]

Muon::MdtTwinPrepData::MdtTwinPrepData ( const MdtTwinPrepData )
default

◆ MdtTwinPrepData() [3/3]

Muon::MdtTwinPrepData::MdtTwinPrepData ( const Identifier id,
const Amg::Vector2D driftRadiusXTwin,
const Amg::MatrixX errDriftRadiusXTwin,
const MuonGM::MdtReadoutElement detEl,
const int  tdc,
const int  adc,
const int  tdcTwin,
const int  adcTwin,
const MdtDriftCircleStatus  status 
)

Constructor with parameters: this class owns the pointers passed (except the MuonDetectorElement)

Parameters
idIdentifier of the tube which generated DriftCircle,
collectionHashIdentifierHash of the PRD collection in which the MdtTwinPrepData is stored
driftRadiusthis local position object should contain the drift radius and xTwin(local position along tube) calculated from twin hit
errDriftRadiusthe error on the driftRadius and xTwin (i.e. 2d error matix)
detElpointer to the associated detectr element (will not be owned by MdtTwinPrepData - i.e. will not be deleted)
tdcTDC count
adcADC count
tdcTDC twin count
adcADC twin count
statusenum to indicate whether the measurement is masked, in time, etc (see MdtTwinPrepDataStatus for details).

Definition at line 15 of file MdtTwinPrepData.cxx.

21  :
22  MdtPrepData(id, driftRadiusXTwin, errDriftRadiusXTwin, detEl, tdc, adc, status), //call base class constructor
24  m_adcTwin(adcTwin) {}

◆ ~MdtTwinPrepData()

virtual Muon::MdtTwinPrepData::~MdtTwinPrepData ( )
virtualdefault

Destructor.

Member Function Documentation

◆ adc()

int Muon::MdtPrepData::adc ( ) const
inlineinherited

Returns the ADC (typically range is 0 to 250)

Definition at line 146 of file MdtPrepData.h.

146 { return m_adc; }

◆ adcTwin()

int Muon::MdtTwinPrepData::adcTwin ( ) const
inline

Returns the ADC of twin tube(typically range is 0 to 250)

Definition at line 100 of file MdtTwinPrepData.h.

100 { return m_adcTwin; }

◆ collectionHash()

IdentifierHash Muon::MdtPrepData::collectionHash ( ) const
inlinevirtualinherited

Returns the IdentifierHash corresponding to the Mdt tube which was hit.

Definition at line 148 of file MdtPrepData.h.

148  {
149  return getHashAndIndex().collHash();
150 }

◆ detectorElement()

const MuonGM::MdtReadoutElement * Muon::MdtPrepData::detectorElement ( ) const
inlineoverridevirtualinherited

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

141  {
142  return m_detEl;
143 }

◆ dimension()

unsigned int Muon::MdtPrepData::dimension ( ) const
inlineinherited

Returns the dimension of the MdtPrepData.

Ordinary prepData has dimension one twin drift circles have dimension 2

Definition at line 85 of file MdtPrepData.h.

85  {
86  return localCovariance().rows();
87  }

◆ dump() [1/2]

MsgStream & Muon::MdtTwinPrepData::dump ( MsgStream &  stream) const
virtual

Dumps information about the PRD.

Reimplemented from Muon::MdtPrepData.

Definition at line 27 of file MdtTwinPrepData.cxx.

28  {
29  stream << MSG::INFO<<"MdtTwinPrepData {"<<std::endl;
30 
32 
33  //MdtTwinPrepData methods
34  stream <<"TDC TWIN = "<<tdcTwin()<<", ";
35  stream <<"ADC TWIN= "<<adcTwin()<<", ";
36  stream<<"} End MdtTwinPrepData"<<endmsg;
37 
38  return stream;
39  }

◆ dump() [2/2]

std::ostream & Muon::MdtTwinPrepData::dump ( std::ostream &  stream) const
virtual

Dumps information about the PRD.

Reimplemented from Muon::MdtPrepData.

Definition at line 41 of file MdtTwinPrepData.cxx.

42  {
43  stream << "MdtTwinPrepData {"<<std::endl;
44 
46 
47  //MdtTwinPrepData methods
48  stream <<"TDC TWIN = "<<tdcTwin()<<", ";
49  stream <<"ADC TWIN = "<<adcTwin()<<", ";
50  stream<<"} End MdtTwinPrepData"<<std::endl;
51  return stream;
52  }

◆ getHashAndIndex()

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

◆ globalPosition()

const Amg::Vector3D & Muon::MdtTwinPrepData::globalPosition ( ) const
inlinevirtual

Returns the global position of the hit using twin hit information.

Reimplemented from Muon::MdtPrepData.

Definition at line 103 of file MdtTwinPrepData.h.

103  {
104  if (!m_globalPosition){
106  .Trk::Surface::localToGlobal(localPosition())};
107  m_globalPosition.set(std::make_unique<Amg::Vector3D>(std::move(gPos)));
108  }
109  return *m_globalPosition;
110  }

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

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

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

MdtDriftCircleStatus Muon::MdtPrepData::status ( ) const
inlineinherited

Returns the status of the measurement.

Definition at line 147 of file MdtPrepData.h.

147 { return m_status; }

◆ tdc()

int Muon::MdtPrepData::tdc ( ) const
inlineinherited

Returns the TDC (typically range is 0 to 2500).

Definition at line 145 of file MdtPrepData.h.

145 { return m_tdc; }

◆ tdcTwin()

int Muon::MdtTwinPrepData::tdcTwin ( ) const
inline

Returns the TDC of twin tube(typically range is 0 to 2500).

Definition at line 99 of file MdtTwinPrepData.h.

99 { return m_tdcTwin; }

◆ type()

virtual bool Muon::MdtPrepData::type ( Trk::PrepRawDataType  type) const
inlineoverridevirtualinherited

Interface method checking the type.

Implements Trk::PrepRawData.

Definition at line 80 of file MdtPrepData.h.

80  {
82  }

Friends And Related Function Documentation

◆ ::MdtPrepDataContainerCnv

friend class ::MdtPrepDataContainerCnv
friend

Definition at line 40 of file MdtTwinPrepData.h.

Member Data Documentation

◆ m_adc

int Muon::MdtPrepData::m_adc {0}
privateinherited

ADC value - typical ADC spectra can go from 0 up to 250.

Definition at line 115 of file MdtPrepData.h.

◆ m_adcTwin

int Muon::MdtTwinPrepData::m_adcTwin {0}
private

ADC value of twin tube - typical ADC spectra can go from 0 up to 250.

Definition at line 91 of file MdtTwinPrepData.h.

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

const MuonGM::MdtReadoutElement* Muon::MdtPrepData::m_detEl {nullptr}
privateinherited

Cached pointer to detector element (not deleted in destructor, not written to disk)

Definition at line 109 of file MdtPrepData.h.

◆ m_globalPosition

CxxUtils::CachedUniquePtr<const Amg::Vector3D> Muon::MdtPrepData::m_globalPosition {}
protectedinherited

Global position of measurement.

Calculated on demand and cached (not deleted in destructor, not written to disk)

Definition at line 124 of file MdtPrepData.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_status

MdtDriftCircleStatus Muon::MdtPrepData::m_status {MdtDriftCircleStatus::MdtStatusUnDefined}
privateinherited

enum to hold 'status' of measurement

Definition at line 118 of file MdtPrepData.h.

◆ m_tdc

int Muon::MdtPrepData::m_tdc {0}
privateinherited

TDC value - typical TDC spectra can go from 0 up to 2500.

Definition at line 112 of file MdtPrepData.h.

◆ m_tdcTwin

int Muon::MdtTwinPrepData::m_tdcTwin {0}
private

TDC value of twin tube - typical TDC spectra can go from 0 up to 2500.

Definition at line 88 of file MdtTwinPrepData.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::MdtPrepData::m_adc
int m_adc
ADC value - typical ADC spectra can go from 0 up to 250.
Definition: MdtPrepData.h:115
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
Muon::MdtPrepData::type
virtual bool type(Trk::PrepRawDataType type) const override
Interface method checking the type.
Definition: MdtPrepData.h:80
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Muon::MdtPrepData::m_detEl
const MuonGM::MdtReadoutElement * m_detEl
Cached pointer to detector element (not deleted in destructor, not written to disk)
Definition: MdtPrepData.h:109
Muon::MdtPrepData::adc
int adc() const
Returns the ADC (typically range is 0 to 250)
Definition: MdtPrepData.h:146
Muon::MdtPrepData::m_tdc
int m_tdc
TDC value - typical TDC spectra can go from 0 up to 2500.
Definition: MdtPrepData.h:112
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Muon::MdtPrepData::MdtPrepData
MdtPrepData()
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Muon::MdtPrepData::m_status
MdtDriftCircleStatus m_status
enum to hold 'status' of measurement
Definition: MdtPrepData.h:118
Muon::MdtTwinPrepData::tdcTwin
int tdcTwin() const
Returns the TDC of twin tube(typically range is 0 to 2500).
Definition: MdtTwinPrepData.h:99
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Muon::MdtPrepData::tdc
int tdc() const
Returns the TDC (typically range is 0 to 2500).
Definition: MdtPrepData.h:145
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::MdtTwinPrepData::m_tdcTwin
int m_tdcTwin
TDC value of twin tube - typical TDC spectra can go from 0 up to 2500.
Definition: MdtTwinPrepData.h:88
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::MdtPrepData::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
Global position of measurement.
Definition: MdtPrepData.h:124
Muon::MdtPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Definition: MdtPrepData.cxx:87
MuonGM::MdtReadoutElement::surface
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:891
Muon::MdtTwinPrepData::adcTwin
int adcTwin() const
Returns the ADC of twin tube(typically range is 0 to 250)
Definition: MdtTwinPrepData.h:100
LVL1::gFEXPos
Definition: gFexPos.h:11
Muon::MdtTwinPrepData::m_adcTwin
int m_adcTwin
ADC value of twin tube - typical ADC spectra can go from 0 up to 250.
Definition: MdtTwinPrepData.h:91
Muon::MdtPrepData::status
MdtDriftCircleStatus status() const
Returns the status of the measurement.
Definition: MdtPrepData.h:147
Muon::MdtPrepData::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
Definition: MdtPrepData.h:141
IdentContIndex::collHash
unsigned short collHash() const
Accessor to hash, obj index and combined index.
Definition: IdentContIndex.h:85