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

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

#include <RpcClusterOnTrack.h>

Inheritance diagram for Muon::RpcClusterOnTrack:
Collaboration diagram for Muon::RpcClusterOnTrack:

Public Member Functions

 RpcClusterOnTrack ()
 
 RpcClusterOnTrack (const RpcClusterOnTrack &)
 
RpcClusterOnTrackoperator= (const RpcClusterOnTrack &)
 
 RpcClusterOnTrack (const RpcPrepData *RIO, Trk::LocalParameters &&locpos, Amg::MatrixX &&locerr, double positionAlongStrip, float time=0.0)
 Constructor with parameters : The base class owns local position, error matrix. More...
 
 RpcClusterOnTrack (const ElementLinkToIDC_RPC_Container &RIO, Trk::LocalParameters &&locpos, Amg::MatrixX &&locerr, const Identifier &id, const MuonGM::RpcReadoutElement *detEl, double positionAlongStrip, float time)
 
virtual ~RpcClusterOnTrack ()
 Destructor. More...
 
virtual RpcClusterOnTrackclone () const override final
 Clone this ROT. More...
 
virtual const RpcPrepDataprepRawData () const override final
 Returns the RpcPrepData - is a TRT_DriftCircle in this scope. More...
 
const ElementLinkToIDC_RPC_ContainerprepRawDataLink () const
 
virtual const MuonGM::RpcReadoutElementdetectorElement () const override final
 Returns the detector element, assoicated with the PRD of this class. More...
 
virtual const Trk::SurfaceassociatedSurface () const override final
 Returns the surface on which this measurement was taken. More...
 
float time () const
 Return the time (ns) More...
 
virtual MsgStream & dump (MsgStream &stream) const override final
 Dumps information about the PRD. More...
 
virtual std::ostream & dump (std::ostream &stream) const override final
 Dumps information about the PRD. More...
 
virtual const Amg::Vector3DglobalPosition () const override
 Returns global position. More...
 
virtual double positionAlongStrip () const
 
virtual IdentifierHash collectionHash () const
 Returns the hashID of the PRD collection. More...
 
virtual IdentifierHash idDE () const override
 Returns an invalid hash. More...
 
virtual bool rioType (Trk::RIO_OnTrackType::Type type) const override final
 Method checking the Rio On Track type. More...
 
std::unique_ptr< RIO_OnTrackuniqueClone () const
 NVI clone returning unique_ptr. More...
 
virtual bool type (MeasurementBaseType::Type type) const override final
 Extended method checking the type. More...
 
Identifier identify () const
 return the identifier -extends MeasurementBase More...
 
const LocalParameters & localParameters () const
 Interface method to get the LocalParameters. More...
 
const Amg::MatrixXlocalCovariance () const
 Interface method to get the localError. More...
 

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 More...
 
double m_positionAlongStrip
 The position along the strip - used to calculate the GlobalPosition. More...
 
Identifier m_identifier {}
 Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData) More...
 
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. More...
 

Private Attributes

ElementLinkToIDC_RPC_Container m_rio
 PrepRawData object assoicated with this measurement. More...
 
const MuonGM::RpcReadoutElementm_detEl
 The detector element, assoicated with this measurement. More...
 
float m_time
 The time in ns. More...
 

Friends

class Trk::ITrkEventCnvTool
 
class ::RpcClusterOnTrackCnv_p1
 

Detailed Description

Class to represent calibrated clusters formed from RPC strips.

Definition at line 34 of file RpcClusterOnTrack.h.

Constructor & Destructor Documentation

◆ RpcClusterOnTrack() [1/4]

Muon::RpcClusterOnTrack::RpcClusterOnTrack ( )

Definition at line 22 of file RpcClusterOnTrack.cxx.

23  :
24  MuonClusterOnTrack(), // call base class ctor
25  m_rio(),
26  m_detEl(nullptr),
27  m_time(0.0)
28 {}

◆ RpcClusterOnTrack() [2/4]

Muon::RpcClusterOnTrack::RpcClusterOnTrack ( const RpcClusterOnTrack )
default

◆ RpcClusterOnTrack() [3/4]

Muon::RpcClusterOnTrack::RpcClusterOnTrack ( const RpcPrepData RIO,
Trk::LocalParameters &&  locpos,
Amg::MatrixX &&  locerr,
double  positionAlongStrip,
float  time = 0.0 
)

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 35 of file RpcClusterOnTrack.cxx.

41  :
42  MuonClusterOnTrack(std::move(locpos), std::move(locerr), RIO->identify(), positionAlongStrip ), //call base class constructor
43  m_detEl( RIO->detectorElement() ),
44  m_time(time)
45 {
46  //Set EL
47  // m_rio = ElementLinkToIDC_RPC_Container("RPC_Measurements", RIO->getHashAndIndex().hashAndIndex(), RIO);
48  m_rio.setElement(RIO);
49  }

◆ RpcClusterOnTrack() [4/4]

Muon::RpcClusterOnTrack::RpcClusterOnTrack ( const ElementLinkToIDC_RPC_Container RIO,
Trk::LocalParameters &&  locpos,
Amg::MatrixX &&  locerr,
const Identifier id,
const MuonGM::RpcReadoutElement detEl,
double  positionAlongStrip,
float  time 
)

Definition at line 52 of file RpcClusterOnTrack.cxx.

60  :
61  MuonClusterOnTrack(std::move(locpos), std::move(locerr), id, positionAlongStrip ), //call base class constructor
62  m_rio (RIO),
63  m_detEl( detEl ),
64  m_time(time)
65 {
66 }

◆ ~RpcClusterOnTrack()

Muon::RpcClusterOnTrack::~RpcClusterOnTrack ( )
virtual

Destructor.

Definition at line 69 of file RpcClusterOnTrack.cxx.

70 {
71  // we don't own the m_rio object (it belongs to SG), so don't delete it.
72 }

Member Function Documentation

◆ associatedSurface()

const Trk::Surface & Muon::RpcClusterOnTrack::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 143 of file RpcClusterOnTrack.h.

144 {
145  // FIXME! This will crash if detectorElement() returns 0! EJWM
146  return detectorElement()->surface(identify());
147 }

◆ clone()

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

Clone this ROT.

Implements Muon::MuonClusterOnTrack.

Definition at line 122 of file RpcClusterOnTrack.h.

123 {
124  return new RpcClusterOnTrack(*this);
125 }

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

◆ detectorElement()

const MuonGM::RpcReadoutElement * Muon::RpcClusterOnTrack::detectorElement ( ) const
inlinefinaloverridevirtual

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

Implements Muon::MuonClusterOnTrack.

Definition at line 138 of file RpcClusterOnTrack.h.

139 {
140  return m_detEl;
141 }

◆ dump() [1/2]

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

Dumps information about the PRD.

Reimplemented from Muon::MuonClusterOnTrack.

Definition at line 87 of file RpcClusterOnTrack.cxx.

88 {
89  stream << MSG::INFO<<"RpcClusterOnTrack {"<<std::endl;
90  stream <<"Time: "<<m_time<<std::endl;
92 
93  stream<<"}"<<endmsg;
94  return stream;
95 }

◆ dump() [2/2]

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

Dumps information about the PRD.

Reimplemented from Muon::MuonClusterOnTrack.

Definition at line 97 of file RpcClusterOnTrack.cxx.

98 {
99  stream << "RpcClusterOnTrack {"<<std::endl;
100  stream <<"Time: "<<m_time<<std::endl;
101 
103 
104  stream<<"}"<<std::endl;
105  return stream;
106 }

◆ 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
104  else
106 
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 }

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

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

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

◆ numberOfInstantiations()

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

◆ operator=()

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

Definition at line 75 of file RpcClusterOnTrack.cxx.

76 {
77  if ( &rot != this)
78  {
79  MuonClusterOnTrack::operator=(rot);//base class ass. op.
80  m_rio = rot.m_rio;
81  m_detEl = rot.m_detEl;
82  m_time = rot.m_time;
83  }
84  return *this;
85 }

◆ positionAlongStrip()

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

Definition at line 68 of file MuonClusterOnTrack.h.

68  {
69  return m_positionAlongStrip;
70  }

◆ prepRawData()

const RpcPrepData * Muon::RpcClusterOnTrack::prepRawData ( ) const
inlinefinaloverridevirtual

Returns the RpcPrepData - is a TRT_DriftCircle in this scope.

Implements Muon::MuonClusterOnTrack.

Definition at line 127 of file RpcClusterOnTrack.h.

128 {
129  if (m_rio.isValid()) return m_rio.cachedElement();
130  else return 0;
131 }

◆ prepRawDataLink()

const ElementLinkToIDC_RPC_Container & Muon::RpcClusterOnTrack::prepRawDataLink ( ) const
inline

Definition at line 133 of file RpcClusterOnTrack.h.

134 {
135  return m_rio;
136 }

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

◆ setValues()

void Muon::RpcClusterOnTrack::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 149 of file RpcClusterOnTrack.h.

151 {
152  // TODO should check this works EJWM
153  //m_rio = dynamic_cast<const RpcPrepData*>(rio);
154  //assert(0!=m_rio);
155  m_detEl = dynamic_cast<const MuonGM::RpcReadoutElement*>(detEl);
156  assert(0!=m_detEl);
157 }

◆ time()

float Muon::RpcClusterOnTrack::time ( ) const
inline

Return the time (ns)

Definition at line 159 of file RpcClusterOnTrack.h.

160 {
161  return m_time;
162 }

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

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

Friends And Related Function Documentation

◆ ::RpcClusterOnTrackCnv_p1

friend class ::RpcClusterOnTrackCnv_p1
friend

Definition at line 40 of file RpcClusterOnTrack.h.

◆ Trk::ITrkEventCnvTool

friend class Trk::ITrkEventCnvTool
friend

Definition at line 39 of file RpcClusterOnTrack.h.

Member Data Documentation

◆ m_detEl

const MuonGM::RpcReadoutElement* Muon::RpcClusterOnTrack::m_detEl
private

The detector element, assoicated with this measurement.

Definition at line 111 of file RpcClusterOnTrack.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.

◆ 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_RPC_Container Muon::RpcClusterOnTrack::m_rio
private

PrepRawData object assoicated with this measurement.

Definition at line 108 of file RpcClusterOnTrack.h.

◆ m_time

float Muon::RpcClusterOnTrack::m_time
private

The time in ns.

Definition at line 114 of file RpcClusterOnTrack.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:
Muon::RpcClusterOnTrack::detectorElement
virtual const MuonGM::RpcReadoutElement * detectorElement() const override final
Returns the detector element, assoicated with the PRD of this class.
Definition: RpcClusterOnTrack.h:138
Trk::RIO_OnTrackType::MuonCluster
@ MuonCluster
Definition: RIO_OnTrack.h:61
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
Trk::RIO_OnTrack::clone
virtual RIO_OnTrack * clone() const override=0
Pseudo-constructor, needed to avoid excessive RTTI.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Muon::MuonClusterOnTrack::prepRawData
virtual const MuonCluster * prepRawData() const override=0
Returns the Trk::PrepRawData - is a MuonCluster in this scope.
Muon::MuonClusterOnTrack::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
cache global position, the global position has to be calculated in the inheriting classes
Definition: MuonClusterOnTrack.h:94
Muon::MuonClusterOnTrack::dump
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Definition: MuonClusterOnTrack.cxx:62
Muon::MuonCluster::collectionHash
virtual IdentifierHash collectionHash() const
Returns the IdentifierHash corresponding to the PRD collection in the PRD container.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:104
MuonGM::RpcReadoutElement
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:55
Muon::RpcClusterOnTrack::m_time
float m_time
The time in ns.
Definition: RpcClusterOnTrack.h:114
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::RpcClusterOnTrack::m_detEl
const MuonGM::RpcReadoutElement * m_detEl
The detector element, assoicated with this measurement.
Definition: RpcClusterOnTrack.h:111
Trk::RIO_OnTrack::type
virtual bool type(MeasurementBaseType::Type type) const override final
Extended method checking the type.
Definition: RIO_OnTrack.h:110
Muon::MuonClusterOnTrack::MuonClusterOnTrack
MuonClusterOnTrack()
Pool constructor.
Definition: MuonClusterOnTrack.cxx:22
Muon::MuonClusterOnTrack::detectorElement
virtual const MuonGM::MuonClusterReadoutElement * detectorElement() const override=0
Returns the detector element, associated with the PRD of this class.
Muon::RpcClusterOnTrack::m_rio
ElementLinkToIDC_RPC_Container m_rio
PrepRawData object assoicated with this measurement.
Definition: RpcClusterOnTrack.h:108
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
contains
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition: hcg.cxx:111
Trk::MeasurementBase::m_localParams
LocalParameters m_localParams
Definition: MeasurementBase.h:111
Muon::RpcClusterOnTrack::RpcClusterOnTrack
RpcClusterOnTrack()
Definition: RpcClusterOnTrack.cxx:22
Muon::RpcClusterOnTrack::time
float time() const
Return the time (ns)
Definition: RpcClusterOnTrack.h:159
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Trk::MeasurementBase::m_localCovariance
Amg::MatrixX m_localCovariance
Definition: MeasurementBase.h:112
Trk::ObjectCounter< Trk::RIO_OnTrack >::s_numberOfInstantiations
static std::atomic_size_t s_numberOfInstantiations
Definition: TrkObjectCounter.h:22
Trk::RIO_OnTrack::m_identifier
Identifier m_identifier
Identifier of the RIO_OnTrack (comes from the associated Trk::PrepRawData)
Definition: RIO_OnTrack.h:149
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
Muon::MuonClusterOnTrack::positionAlongStrip
virtual double positionAlongStrip() const
Definition: MuonClusterOnTrack.h:68
Trk::PlaneSurface::localToGlobal
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.
Definition: PlaneSurface.cxx:204
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
Muon::MuonClusterOnTrack::m_positionAlongStrip
double m_positionAlongStrip
The position along the strip - used to calculate the GlobalPosition.
Definition: MuonClusterOnTrack.h:97
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Muon::MuonClusterOnTrack::operator=
MuonClusterOnTrack & operator=(const MuonClusterOnTrack &)
Definition: MuonClusterOnTrack.cxx:52