ATLAS Offline Software
Loading...
Searching...
No Matches
RpcClusterOnTrack.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONRIOONTRACK_RPCCLUSTERONTRACK_H
6#define MUONRIOONTRACK_RPCCLUSTERONTRACK_H
7
8// Base classes
11// needed classes
13#include "AthLinks/ElementLink.h"
14
16
18
19
20namespace MuonGM
21{
22 class RpcReadoutElement;
23}
24
25namespace Trk
26{
27 class ITrkEventCnvTool;
28}
29
30namespace Muon
31{
32
35{
36
37public:
38
40 friend class ::RpcClusterOnTrackCnv_p1;
41
45
46
56 const RpcPrepData* RIO,
57 Trk::LocalParameters&& locpos,
58 Amg::MatrixX&& locerr,
59 double positionAlongStrip,
60 float time=0.0
61 );
62
63 // Alternate constructor that doesn't dereference the RIO link.
66 Trk::LocalParameters&& locpos,
67 Amg::MatrixX&& locerr,
68 const Identifier& id,
69 const MuonGM::RpcReadoutElement* detEl,
70 double positionAlongStrip,
71 float time);
72
74 virtual ~RpcClusterOnTrack();
75
77 virtual RpcClusterOnTrack* clone() const override final;
78
80 virtual const RpcPrepData* prepRawData() const override final;
82
84 virtual const MuonGM::RpcReadoutElement* detectorElement() const override final;
85
88 virtual const Trk::Surface& associatedSurface() const override final;
89
91 float time() const;
92
94 virtual MsgStream& dump( MsgStream& stream) const override final;
95
97 virtual std::ostream& dump( std::ostream& stream) const override final;
98
99
100private:
104 virtual void setValues(const Trk::TrkDetElementBase*,
105 const Trk::PrepRawData*) override final;
106
109
111 const MuonGM::RpcReadoutElement* m_detEl;
112
114 float m_time;
115};
116
118// Inline methods:
120
121
123{
124 return new RpcClusterOnTrack(*this);
125}
126
128{
129 if (m_rio.isValid()) return m_rio.cachedElement();
130 else return 0;
131}
132
137
139{
140 return m_detEl;
141}
142
144{
145 // FIXME! This will crash if detectorElement() returns 0! EJWM
146 return detectorElement()->surface(identify());
147}
148
150 const Trk::PrepRawData* /*rio*/)
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}
158
159inline float RpcClusterOnTrack::time() const
160{
161 return m_time;
162}
163
164}
165
166#endif // MUONRIOONTRACK_MUONCLUSTERONTRACK_H
ElementLink< Muon::RpcPrepDataContainer > ElementLinkToIDC_RPC_Container
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
virtual double positionAlongStrip() const
MuonClusterOnTrack()
Pool constructor.
ElementLinkToIDC_RPC_Container m_rio
PrepRawData object assoicated with this measurement.
float m_time
The time in ns.
virtual const RpcPrepData * prepRawData() const override final
Returns the RpcPrepData - is a TRT_DriftCircle in this scope.
virtual const MuonGM::RpcReadoutElement * detectorElement() const override final
Returns the detector element, assoicated with the PRD of this class.
RpcClusterOnTrack(const RpcClusterOnTrack &)
virtual ~RpcClusterOnTrack()
Destructor.
RpcClusterOnTrack & operator=(const RpcClusterOnTrack &)
virtual RpcClusterOnTrack * clone() const override final
Clone this ROT.
float time() const
Return the time (ns)
virtual const Trk::Surface & associatedSurface() const override final
Returns the surface on which this measurement was taken.
virtual void setValues(const Trk::TrkDetElementBase *, const Trk::PrepRawData *) override final
Sets the DetElement and Trk::PrepRawData pointers after reading from disk.
const MuonGM::RpcReadoutElement * m_detEl
The detector element, assoicated with this measurement.
const ElementLinkToIDC_RPC_Container & prepRawDataLink() const
Class to represent RPC measurements.
Definition RpcPrepData.h:35
Identifier identify() const
return the identifier -extends MeasurementBase
Abstract Base Class for tracking surfaces.
This is the base class for all tracking detector elements with read-out relevant information.
STL class.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
-event-from-file
STL namespace.
#define private