ATLAS Offline Software
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 
20 namespace MuonGM
21 {
22  class RpcReadoutElement;
23 }
24 
25 namespace Trk
26 {
27  class ITrkEventCnvTool;
28 }
29 
30 namespace Muon
31 {
32 
35 {
36 
37 public:
38 
39  friend class Trk::ITrkEventCnvTool;
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 
100 private:
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 
134 {
135  return m_rio;
136 }
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 
159 inline float RpcClusterOnTrack::time() const
160 {
161  return m_time;
162 }
163 
164 }
165 
166 #endif // MUONRIOONTRACK_MUONCLUSTERONTRACK_H
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::LocalParameters
Definition: LocalParameters.h:98
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
RpcClusterOnTrackCnv_p1
Definition: RpcClusterOnTrackCnv_p1.h:30
Muon::RpcClusterOnTrack::operator=
RpcClusterOnTrack & operator=(const RpcClusterOnTrack &)
Definition: RpcClusterOnTrack.cxx:75
ElementLinkToIDC_RPC_Container
ElementLink< Muon::RpcPrepDataContainer > ElementLinkToIDC_RPC_Container
Definition: RpcClusterOnTrack.h:15
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
MuonGM::RpcReadoutElement
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:55
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
Muon::RpcClusterOnTrack::associatedSurface
virtual const Trk::Surface & associatedSurface() const override final
Returns the surface on which this measurement was taken.
Definition: RpcClusterOnTrack.h:143
RpcPrepDataContainer.h
Muon::RpcClusterOnTrack
Class to represent calibrated clusters formed from RPC strips.
Definition: RpcClusterOnTrack.h:35
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Muon::RpcClusterOnTrack::m_time
float m_time
The time in ns.
Definition: RpcClusterOnTrack.h:114
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::RpcClusterOnTrack::setValues
virtual void setValues(const Trk::TrkDetElementBase *, const Trk::PrepRawData *) override final
Sets the DetElement and Trk::PrepRawData pointers after reading from disk.
Definition: RpcClusterOnTrack.h:149
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
Muon::RpcClusterOnTrack::RpcClusterOnTrack
RpcClusterOnTrack(const RpcClusterOnTrack &)
Muon::RpcClusterOnTrack::m_rio
ElementLinkToIDC_RPC_Container m_rio
PrepRawData object assoicated with this measurement.
Definition: RpcClusterOnTrack.h:108
Muon::RpcPrepData
Class to represent RPC measurements.
Definition: RpcPrepData.h:35
Muon::RpcClusterOnTrack::clone
virtual RpcClusterOnTrack * clone() const override final
Clone this ROT.
Definition: RpcClusterOnTrack.h:122
Trk::ITrkEventCnvTool
Definition: ITrkEventCnvTool.h:31
Trk::PrepRawData
Definition: PrepRawData.h:62
Muon::RpcClusterOnTrack::prepRawData
virtual const RpcPrepData * prepRawData() const override final
Returns the RpcPrepData - is a TRT_DriftCircle in this scope.
Definition: RpcClusterOnTrack.h:127
Muon::RpcClusterOnTrack::RpcClusterOnTrack
RpcClusterOnTrack()
Definition: RpcClusterOnTrack.cxx:22
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Muon::RpcClusterOnTrack::time
float time() const
Return the time (ns)
Definition: RpcClusterOnTrack.h:159
Muon::RpcClusterOnTrack::prepRawDataLink
const ElementLinkToIDC_RPC_Container & prepRawDataLink() const
Definition: RpcClusterOnTrack.h:133
Muon::RpcClusterOnTrack::dump
virtual MsgStream & dump(MsgStream &stream) const override final
Dumps information about the PRD.
Definition: RpcClusterOnTrack.cxx:87
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
Muon::MuonClusterOnTrack::positionAlongStrip
virtual double positionAlongStrip() const
Definition: MuonClusterOnTrack.h:68
MuonClusterOnTrack.h
RpcPrepData.h
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Muon::RpcClusterOnTrack::~RpcClusterOnTrack
virtual ~RpcClusterOnTrack()
Destructor.
Definition: RpcClusterOnTrack.cxx:69
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
Identifier
Definition: IdentifierFieldParser.cxx:14