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

Class to represent calibrated clusters formed from TGC strips. More...

#include <sTgcClusterOnTrack.h>

Inheritance diagram for Muon::sTgcClusterOnTrack:
Collaboration diagram for Muon::sTgcClusterOnTrack:

Public Member Functions

 sTgcClusterOnTrack ()
 sTgcClusterOnTrack (const sTgcClusterOnTrack &)
sTgcClusterOnTrackoperator= (const sTgcClusterOnTrack &)
 sTgcClusterOnTrack (const sTgcPrepData *RIO, Trk::LocalParameters &&locpos, Amg::MatrixX &&locerr, double positionAlongStrip)
 Constructor with parameters : The base class owns local position, error matrix.
 sTgcClusterOnTrack (const ElementLinkToIDC_STGC_Container &RIO, Trk::LocalParameters &&locpos, Amg::MatrixX &&locerr, const Identifier &id, const MuonGM::sTgcReadoutElement *detEl, double positionAlongStrip)
virtual ~sTgcClusterOnTrack ()
 Destructor.
virtual sTgcClusterOnTrackclone () const override final
 Clone this ROT.
virtual const sTgcPrepDataprepRawData () const override final
 Returns the sTgcPrepData - is a TRT_DriftCircle in this scope.
const ElementLinkToIDC_STGC_ContainerprepRawDataLink () const
virtual const MuonGM::sTgcReadoutElementdetectorElement () const override final
 Returns the detector element, assoicated with the PRD of this class.
virtual const Trk::SurfaceassociatedSurface () const override final
 Returns the surface on which this measurement was taken.
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 const Amg::Vector3DglobalPosition () const override
 Returns global position.
virtual double positionAlongStrip () const
virtual IdentifierHash collectionHash () const
 Returns the hashID of the PRD collection.
virtual IdentifierHash idDE () const override
 Returns an invalid hash.
virtual bool rioType (Trk::RIO_OnTrackType::Type type) const override final
 Method checking the Rio On Track type.
std::unique_ptr< RIO_OnTrackuniqueClone () const
 NVI clone returning unique_ptr.
virtual bool type (MeasurementBaseType::Type type) const override final
 Extended method checking the type.
Identifier identify () const
 return the identifier -extends MeasurementBase
const LocalParameters & localParameters () const
 Interface method to get the LocalParameters.
const Amg::MatrixXlocalCovariance () const
 Interface method to get the localError.

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
 cache global position, the global position has to be calculated in the inheriting classes
double m_positionAlongStrip
 The position along the strip - used to calculate the GlobalPosition.
Identifier m_identifier {}
 Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)
LocalParameters m_localParams
Amg::MatrixX m_localCovariance

Private Member Functions

virtual void setValues (const Trk::TrkDetElementBase *, const Trk::PrepRawData *) override final
 Sets the DetElement and Trk::PrepRawData pointers after reading from disk.

Private Attributes

ElementLinkToIDC_STGC_Container m_rio
 PrepRawData object assoicated with this measurement.
const MuonGM::sTgcReadoutElementm_detEl
 The detector element, assoicated with this measurement.

Friends

class Trk::ITrkEventCnvTool
class ::STGC_ClusterOnTrackCnv_p1

Detailed Description

Class to represent calibrated clusters formed from TGC strips.

Definition at line 29 of file sTgcClusterOnTrack.h.

Constructor & Destructor Documentation

◆ sTgcClusterOnTrack() [1/4]

Muon::sTgcClusterOnTrack::sTgcClusterOnTrack ( )

Definition at line 12 of file sTgcClusterOnTrack.cxx.

12 :
13 MuonClusterOnTrack(), // call base class ctor
14 m_rio(),
15 m_detEl(nullptr)
16 {}
MuonClusterOnTrack()
Pool constructor.
ElementLinkToIDC_STGC_Container m_rio
PrepRawData object assoicated with this measurement.
const MuonGM::sTgcReadoutElement * m_detEl
The detector element, assoicated with this measurement.

◆ sTgcClusterOnTrack() [2/4]

Muon::sTgcClusterOnTrack::sTgcClusterOnTrack ( const sTgcClusterOnTrack & )
default

◆ sTgcClusterOnTrack() [3/4]

Muon::sTgcClusterOnTrack::sTgcClusterOnTrack ( const sTgcPrepData * RIO,
Trk::LocalParameters && locpos,
Amg::MatrixX && locerr,
double positionAlongStrip )

Constructor with parameters : The base class owns local position, error matrix.

Everything else has ownership elsewhere.

Parameters
[in]RIORequired (i.e. must not be NULL). Ownership is not taken.
[in]locposRequired (i.e. must not be NULL). Ownership is taken.
[in]locerrRequired (i.e. must not be NULL). Ownership is taken.
[in]positionAlongStripRequired Used to calculate global position.

Definition at line 22 of file sTgcClusterOnTrack.cxx.

26 :
27 MuonClusterOnTrack(std::move(locpos), std::move(locerr), RIO->identify(), positionAlongStrip), //call base class constructor
28 m_detEl( RIO->detectorElement() )
29 {
30 //Set EL
31 // m_rio = ElementLinkToIDC_TGC_Container("TGC_Measurements", RIO->getHashAndIndex().hashAndIndex(), RIO);
32 m_rio.setElement(RIO);
33 }
virtual double positionAlongStrip() const

◆ sTgcClusterOnTrack() [4/4]

Muon::sTgcClusterOnTrack::sTgcClusterOnTrack ( const ElementLinkToIDC_STGC_Container & RIO,
Trk::LocalParameters && locpos,
Amg::MatrixX && locerr,
const Identifier & id,
const MuonGM::sTgcReadoutElement * detEl,
double positionAlongStrip )

Definition at line 36 of file sTgcClusterOnTrack.cxx.

43 : MuonClusterOnTrack(std::move(locpos), std::move(locerr), id, positionAlongStrip),
44 m_rio (RIO),
45 m_detEl( detEl )
46 {
47 }

◆ ~sTgcClusterOnTrack()

Muon::sTgcClusterOnTrack::~sTgcClusterOnTrack ( )
virtual

Destructor.

Definition at line 50 of file sTgcClusterOnTrack.cxx.

51 {
52 // we don't own the m_rio object (it belongs to SG), so don't delete it.
53 }

Member Function Documentation

◆ associatedSurface()

const Trk::Surface & Muon::sTgcClusterOnTrack::associatedSurface ( ) const
inlinefinaloverridevirtual

Returns the surface on which this measurement was taken.

(i.e. a surface of a detector element)

Implements Trk::RIO_OnTrack.

Definition at line 128 of file sTgcClusterOnTrack.h.

129 {
130 assert(0!=detectorElement());
131 return detectorElement()->surface(identify());
132 }
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
virtual const MuonGM::sTgcReadoutElement * detectorElement() const override final
Returns the detector element, assoicated with the PRD of this class.
Identifier identify() const
return the identifier -extends MeasurementBase

◆ clone()

sTgcClusterOnTrack * Muon::sTgcClusterOnTrack::clone ( ) const
inlinefinaloverridevirtual

Clone this ROT.

Implements Muon::MuonClusterOnTrack.

Definition at line 107 of file sTgcClusterOnTrack.h.

108 {
109 return new sTgcClusterOnTrack(*this);
110 }

◆ collectionHash()

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

Returns the hashID of the PRD collection.

Definition at line 111 of file MuonClusterOnTrack.h.

111 {
112 if( this->prepRawData() ) return prepRawData()->collectionHash();
113 return IdentifierHash();
114 }
virtual const MuonCluster * prepRawData() const override=0
Returns the Trk::PrepRawData - is a MuonCluster in this scope.
virtual IdentifierHash collectionHash() const
Returns the IdentifierHash corresponding to the PRD collection in the PRD container.

◆ detectorElement()

const MuonGM::sTgcReadoutElement * Muon::sTgcClusterOnTrack::detectorElement ( ) const
inlinefinaloverridevirtual

Returns the detector element, assoicated with the PRD of this class.

Implements Muon::MuonClusterOnTrack.

Definition at line 123 of file sTgcClusterOnTrack.h.

124 {
125 return m_detEl;
126 }

◆ dump() [1/2]

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

Dumps information about the PRD.

Reimplemented from Muon::MuonClusterOnTrack.

Definition at line 67 of file sTgcClusterOnTrack.cxx.

68 {
69 stream << MSG::INFO<<"sTgcClusterOnTrack {"<<std::endl;
70
72
73 stream<<"}"<<endmsg;
74 return stream;
75 }
#define endmsg
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.

◆ dump() [2/2]

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

Dumps information about the PRD.

Reimplemented from Muon::MuonClusterOnTrack.

Definition at line 77 of file sTgcClusterOnTrack.cxx.

78 {
79 stream << "sTgcClusterOnTrack {"<<std::endl;
80
82
83 stream<<"}"<<std::endl;
84 return stream;
85 }

◆ globalPosition()

const Amg::Vector3D & Muon::MuonClusterOnTrack::globalPosition ( ) const
overridevirtualinherited

Returns global position.

Implements Trk::RIO_OnTrack.

Definition at line 93 of file MuonClusterOnTrack.cxx.

93 {
94 if (detectorElement()==nullptr){
95 // Not much we can do here - no detelement, so just return 0,0,0
96 m_globalPosition.set(std::make_unique<const Amg::Vector3D>(0.0,0.0,0.0));
97 }
98
99 if (not m_globalPosition) {
100 // calculate global position from the position of the strip and the position along the strip
101 Amg::Vector2D lpos{Amg::Vector2D::Zero()};
104 else
106
107 Amg::Vector3D gpos{Amg::Vector3D::Zero()};
108 detectorElement()->surface( identify() ).localToGlobal(lpos, gpos, gpos);
109
110 m_globalPosition.set(std::make_unique<const Amg::Vector3D>(gpos));
111 }
112
113 return *m_globalPosition;
114}
double m_positionAlongStrip
The position along the strip - used to calculate the GlobalPosition.
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
cache global position, the global position has to be calculated in the inheriting classes
virtual const MuonGM::MuonClusterReadoutElement * detectorElement() const override=0
Returns the detector element, associated with the PRD of this class.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37

◆ idDE()

IdentifierHash Muon::MuonClusterOnTrack::idDE ( ) const
inlineoverridevirtualinherited

Returns an invalid hash.

Implements Trk::RIO_OnTrack.

Definition at line 116 of file MuonClusterOnTrack.h.

116 {
117 return IdentifierHash();
118 }

◆ identify()

Identifier Trk::RIO_OnTrack::identify ( ) const
inlineinherited

return the identifier -extends MeasurementBase

Definition at line 152 of file RIO_OnTrack.h.

153 { return m_identifier; }
Identifier m_identifier
Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)

◆ localCovariance()

const Amg::MatrixX & Trk::MeasurementBase::localCovariance ( ) const
inlineinherited

Interface method to get the localError.

Definition at line 138 of file MeasurementBase.h.

139{
140 return m_localCovariance;
141}
Amg::MatrixX m_localCovariance

◆ localParameters()

const Trk::LocalParameters & Trk::MeasurementBase::localParameters ( ) const
inlineinherited

Interface method to get the LocalParameters.

Definition at line 132 of file MeasurementBase.h.

133{
134 return m_localParams;
135}
LocalParameters m_localParams

◆ numberOfInstantiations()

std::size_t Trk::ObjectCounter< Trk::RIO_OnTrack >::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=()

sTgcClusterOnTrack & Muon::sTgcClusterOnTrack::operator= ( const sTgcClusterOnTrack & rot)

Definition at line 56 of file sTgcClusterOnTrack.cxx.

57 {
58 if ( &rot != this)
59 {
60 MuonClusterOnTrack::operator=(rot);//base class ass. op.
61 m_rio = rot.m_rio;
62 m_detEl = rot.m_detEl;
63 }
64 return *this;
65 }
MuonClusterOnTrack & operator=(const MuonClusterOnTrack &)

◆ positionAlongStrip()

virtual double Muon::MuonClusterOnTrack::positionAlongStrip ( ) const
inlinevirtualinherited

Definition at line 68 of file MuonClusterOnTrack.h.

68 {
70 }

◆ prepRawData()

const sTgcPrepData * Muon::sTgcClusterOnTrack::prepRawData ( ) const
inlinefinaloverridevirtual

Returns the sTgcPrepData - is a TRT_DriftCircle in this scope.

Implements Muon::MuonClusterOnTrack.

Definition at line 112 of file sTgcClusterOnTrack.h.

113 {
114 if (m_rio.isValid()) return m_rio.cachedElement();
115 else return 0;
116 }

◆ prepRawDataLink()

const ElementLinkToIDC_STGC_Container & Muon::sTgcClusterOnTrack::prepRawDataLink ( ) const
inline

Definition at line 118 of file sTgcClusterOnTrack.h.

119 {
120 return m_rio;
121 }

◆ rioType()

virtual bool Muon::MuonClusterOnTrack::rioType ( Trk::RIO_OnTrackType::Type type) const
inlinefinaloverridevirtualinherited

Method checking the Rio On Track type.

Implements Trk::RIO_OnTrack.

Definition at line 78 of file MuonClusterOnTrack.h.

79 {
81 }
virtual bool type(MeasurementBaseType::Type type) const =0
Interface method checking the type.

◆ setValues()

void Muon::sTgcClusterOnTrack::setValues ( const Trk::TrkDetElementBase * detEl,
const Trk::PrepRawData *  )
inlinefinaloverrideprivatevirtual

Sets the DetElement and Trk::PrepRawData pointers after reading from disk.

Warning
Only intended for use by persistency convertors.
Todo
Throw exception if TrkDetElementBase isn't correct concrete type

Implements Muon::MuonClusterOnTrack.

Definition at line 134 of file sTgcClusterOnTrack.h.

136 {
137 // m_rio = dynamic_cast<const sTgcPrepData*>(rio);
138 //assert(0!=m_rio);
139 m_detEl = dynamic_cast<const MuonGM::sTgcReadoutElement*>(detEl);
140 assert(0!=m_detEl);
141 }

◆ type()

virtual bool Trk::RIO_OnTrack::type ( MeasurementBaseType::Type type) const
inlinefinaloverridevirtualinherited

Extended method checking the type.

Implements Trk::MeasurementBase.

Definition at line 110 of file RIO_OnTrack.h.

111 {
113 }
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.

◆ uniqueClone()

std::unique_ptr< RIO_OnTrack > Trk::RIO_OnTrack::uniqueClone ( ) const
inlineinherited

NVI clone returning unique_ptr.

Definition at line 97 of file RIO_OnTrack.h.

97 {
98 return std::unique_ptr<RIO_OnTrack>(clone());
99 };
virtual RIO_OnTrack * clone() const override=0
Pseudo-constructor, needed to avoid excessive RTTI.

◆ ::STGC_ClusterOnTrackCnv_p1

friend class ::STGC_ClusterOnTrackCnv_p1
friend

Definition at line 34 of file sTgcClusterOnTrack.h.

◆ Trk::ITrkEventCnvTool

friend class Trk::ITrkEventCnvTool
friend

Definition at line 33 of file sTgcClusterOnTrack.h.

Member Data Documentation

◆ m_detEl

const MuonGM::sTgcReadoutElement* Muon::sTgcClusterOnTrack::m_detEl
private

The detector element, assoicated with this measurement.

Definition at line 98 of file sTgcClusterOnTrack.h.

◆ m_globalPosition

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

cache global position, the global position has to be calculated in the inheriting classes

Definition at line 94 of file MuonClusterOnTrack.h.

◆ m_identifier

Identifier Trk::RIO_OnTrack::m_identifier {}
protectedinherited

Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)

Definition at line 149 of file RIO_OnTrack.h.

149{};

◆ m_localCovariance

Amg::MatrixX Trk::MeasurementBase::m_localCovariance
protectedinherited

Definition at line 112 of file MeasurementBase.h.

◆ m_localParams

LocalParameters Trk::MeasurementBase::m_localParams
protectedinherited

Definition at line 111 of file MeasurementBase.h.

◆ m_positionAlongStrip

double Muon::MuonClusterOnTrack::m_positionAlongStrip
protectedinherited

The position along the strip - used to calculate the GlobalPosition.

Definition at line 97 of file MuonClusterOnTrack.h.

◆ m_rio

ElementLinkToIDC_STGC_Container Muon::sTgcClusterOnTrack::m_rio
private

PrepRawData object assoicated with this measurement.

Definition at line 95 of file sTgcClusterOnTrack.h.

◆ s_numberOfInstantiations

std::atomic_size_t Trk::ObjectCounter< Trk::RIO_OnTrack >::s_numberOfInstantiations
inlinestaticinherited

Definition at line 22 of file TrkObjectCounter.h.


The documentation for this class was generated from the following files: