ATLAS Offline Software
TgcClusterOnTrack.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //
6 // TgcClusterOnTrack.h
7 // Header file for class TgcClusterOnTrackOnTrack
8 //
9 // (c) ATLAS Detector software
10 //
11 // /** Class to implement Cluster On Track for Si */
12 //
13 // Version 1.0 06/07/2004 Ketevi A. Assamagan
14 // adapted from Veronique Boisvert
15 //
16 
17 #ifndef MUONRIOONTRACK_TGCCLUSTERONTRACK_H
18 #define MUONRIOONTRACK_TGCCLUSTERONTRACK_H
19 
20 // Base classes
23 // needed classes
25 #include "AthLinks/ElementLink.h"
26 
28 
29 namespace MuonGM
30 {
31  class TgcReadoutElement;
32 }
33 
34 namespace Trk
35 {
36  class ITrkEventCnvTool;
37 }
38 
39 namespace Muon
40 {
41 
42 class MuonEventCnvTool;
43 
46 {
47 
48 public:
49  friend class Trk::ITrkEventCnvTool;
50  friend class Muon::MuonEventCnvTool;
51 
55 
56 
66  const TgcPrepData* RIO,
67  Trk::LocalParameters&& locpos,
68  Amg::MatrixX&& locerr,
69  double positionAlongStrip
70  );
71 
72  // Alternate constructor that doesn't dereference the RIO link.
75  Trk::LocalParameters&& locpos,
76  Amg::MatrixX&& locerr,
77  const Identifier& id,
78  const MuonGM::TgcReadoutElement* detEl,
79  double positionAlongStrip
80  );
81 
83  virtual ~TgcClusterOnTrack();
84 
86  virtual TgcClusterOnTrack* clone() const ;
87 
89  virtual const TgcPrepData* prepRawData() const;
91 
93  virtual const MuonGM::TgcReadoutElement* detectorElement() const;
94 
97  virtual const Trk::Surface& associatedSurface() const;
98 
100  virtual MsgStream& dump( MsgStream& stream) const;
101 
103  virtual std::ostream& dump( std::ostream& stream) const;
104 
105 private:
109  virtual void setValues(const Trk::TrkDetElementBase*, const Trk::PrepRawData*);
110 
113 
116 
117 };
118 
120 // Inline methods:
122 
123 
125 {
126  return new TgcClusterOnTrack(*this);
127 }
128 
130 {
131  if (m_rio.isValid()) return m_rio.cachedElement();
132  else return 0;
133 }
134 
136 {
137  return m_rio;
138 }
139 
141 {
142  return m_detEl;
143 }
144 
146 {
147  assert(0!=detectorElement());
148  return detectorElement()->surface(identify());
149 }
150 
152  const Trk::PrepRawData* /*rio*/)
153 {
154  // m_rio = dynamic_cast<const TgcPrepData*>(rio);
155  //assert(0!=m_rio);
156  m_detEl = dynamic_cast<const MuonGM::TgcReadoutElement*>(detEl);
157  assert(0!=m_detEl);
158 }
159 
160 }
161 
162 #endif // MUONRIOONTRACK_MUONCLUSTERONTRACK_H
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:29
Muon::TgcClusterOnTrack::setValues
virtual void setValues(const Trk::TrkDetElementBase *, const Trk::PrepRawData *)
Sets the DetElement and Trk::PrepRawData pointers after reading from disk.
Definition: TgcClusterOnTrack.h:151
Muon::TgcClusterOnTrack::operator=
TgcClusterOnTrack & operator=(const TgcClusterOnTrack &)
Definition: TgcClusterOnTrack.cxx:65
Muon::TgcClusterOnTrack::~TgcClusterOnTrack
virtual ~TgcClusterOnTrack()
Destructor.
Definition: TgcClusterOnTrack.cxx:59
Muon::TgcClusterOnTrack::TgcClusterOnTrack
TgcClusterOnTrack()
Definition: TgcClusterOnTrack.cxx:22
Muon::TgcClusterOnTrack::dump
virtual MsgStream & dump(MsgStream &stream) const
Dumps information about the PRD.
Definition: TgcClusterOnTrack.cxx:76
Muon::TgcClusterOnTrack
Class to represent calibrated clusters formed from TGC strips.
Definition: TgcClusterOnTrack.h:46
Muon::TgcClusterOnTrack::detectorElement
virtual const MuonGM::TgcReadoutElement * detectorElement() const
Returns the detector element, assoicated with the PRD of this class.
Definition: TgcClusterOnTrack.h:140
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
TgcPrepData.h
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::MuonEventCnvTool
Tool used in the persisency convertors to help rebuild EDM objects.
Definition: MuonEventCnvTool.h:30
Muon::TgcClusterOnTrack::m_rio
ElementLinkToIDC_TGC_Container m_rio
PrepRawData object assoicated with this measurement.
Definition: TgcClusterOnTrack.h:112
Muon::TgcClusterOnTrack::prepRawData
virtual const TgcPrepData * prepRawData() const
Returns the TgcPrepData - is a TRT_DriftCircle in this scope.
Definition: TgcClusterOnTrack.h:129
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
TgcPrepDataContainer.h
MuonGM::TgcReadoutElement
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:42
Trk::ITrkEventCnvTool
Definition: ITrkEventCnvTool.h:31
ElementLinkToIDC_TGC_Container
ElementLink< Muon::TgcPrepDataContainer > ElementLinkToIDC_TGC_Container
Definition: TgcClusterOnTrack.h:27
Muon::TgcClusterOnTrack::m_detEl
const MuonGM::TgcReadoutElement * m_detEl
The detector element, assoicated with this measurement.
Definition: TgcClusterOnTrack.h:115
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Muon::TgcClusterOnTrack::clone
virtual TgcClusterOnTrack * clone() const
Clone this ROT.
Definition: TgcClusterOnTrack.h:124
Muon::TgcClusterOnTrack::TgcClusterOnTrack
TgcClusterOnTrack(const TgcClusterOnTrack &)
Muon::TgcPrepData
Class to represent TGC measurements.
Definition: TgcPrepData.h:32
Trk::RIO_OnTrack::identify
virtual Identifier identify() const final
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:155
Muon::TgcClusterOnTrack::associatedSurface
virtual const Trk::Surface & associatedSurface() const
Returns the surface on which this measurement was taken.
Definition: TgcClusterOnTrack.h:145
Muon::MuonClusterOnTrack::positionAlongStrip
virtual double positionAlongStrip() const
Definition: MuonClusterOnTrack.h:68
MuonClusterOnTrack.h
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
Muon::TgcClusterOnTrack::prepRawDataLink
const ElementLinkToIDC_TGC_Container & prepRawDataLink() const
Definition: TgcClusterOnTrack.h:135