ATLAS Offline Software
MMClusterOnTrack.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONRIOONTRACK_MMCLUSTERONTRACK_H
6 #define MUONRIOONTRACK_MMCLUSTERONTRACK_H
7 
8 // Base classes
11 // needed classes
13 #include "AthLinks/ElementLink.h"
14 
16 
17 namespace Trk
18 {
19  class ITrkEventCnvTool;
20 }
21 
22 namespace Muon
23 {
24 
26  class MMClusterOnTrack final: public MuonClusterOnTrack {
27 
28  public:
29  friend class Trk::ITrkEventCnvTool;
30 
31  MMClusterOnTrack() = default;
32  MMClusterOnTrack(const MMClusterOnTrack &) = default;
36 
37 
46  MMClusterOnTrack(const MMPrepData* RIO,
47  Trk::LocalParameters&& locpos,
48  Amg::MatrixX&& locerr,
49  double positionAlongStrip,
50  std::vector<float>&& stripDriftDists,
51  std::vector<Amg::MatrixX>&& stripDriftDistErrors);
52 
53  // Alternate constructor that doesn't dereference the RIO link.
55  Trk::LocalParameters&& locpos,
56  Amg::MatrixX&& locerr,
57  const Identifier& id,
58  const MuonGM::MMReadoutElement* detEl,
59  double positionAlongStrip,
60  std::vector<float>&& stripDriftDists,
61  std::vector<Amg::MatrixX>&& stripDriftDistErrors);
62 
64  virtual ~MMClusterOnTrack() = default;
65 
67  virtual MMClusterOnTrack* clone() const ;
68 
70  virtual const MMPrepData* prepRawData() const;
71  inline const ElementLinkToIDC_MM_Container& prepRawDataLink() const;
72 
74  virtual const MuonGM::MMReadoutElement* detectorElement() const;
75 
78  virtual const Trk::Surface& associatedSurface() const;
79 
80  const std::vector<float>& stripDriftDists() const;
81  const std::vector<Amg::MatrixX>& stripDriftDistErrors() const;
82 
84  virtual MsgStream& dump( MsgStream& stream) const;
85 
87  virtual std::ostream& dump( std::ostream& stream) const;
88 
89  enum Author{
94  };
95  void setAuthor(Author a);
96 
97  Author author() const;
98 
99  private:
103  virtual void setValues(const Trk::TrkDetElementBase*, const Trk::PrepRawData*);
106 
109 
110  std::vector<float> m_stripDriftDists{};
111  std::vector<Amg::MatrixX> m_stripDriftDistErrors{};
112  Author m_author{Author::unKnownAuthor};
113  };
114 
116  // Inline methods:
118 
120  m_author = a;
121  }
124  {
125  return new MMClusterOnTrack(*this);
126  }
127 
129  {
130  if (m_rio.isValid()) return m_rio.cachedElement();
131  else return nullptr;
132  }
133 
135  {
136  return m_rio;
137  }
138 
140  {
141  return m_detEl;
142  }
143 
145  {
146  assert(0!=detectorElement());
147  return detectorElement()->surface(identify());
148  }
149 
150  inline const std::vector<float>& MMClusterOnTrack::stripDriftDists() const
151  {
152  return m_stripDriftDists;
153  }
154 
155  inline const std::vector<Amg::MatrixX>& MMClusterOnTrack::stripDriftDistErrors() const
156  {
157  return m_stripDriftDistErrors;
158  }
159 
160 
162  const Trk::PrepRawData* /*rio*/)
163  {
164  // m_rio = dynamic_cast<const MMPrepData*>(rio);
165  //assert(0!=m_rio);
166  m_detEl = dynamic_cast<const MuonGM::MMReadoutElement*>(detEl);
167  assert(0!=m_detEl);
168  }
169 
170 } // namespace Muon
171 
172 #endif
Muon::MMClusterOnTrack::m_stripDriftDistErrors
std::vector< Amg::MatrixX > m_stripDriftDistErrors
Definition: MMClusterOnTrack.h:111
Trk::LocalParameters
Definition: LocalParameters.h:98
Muon::MMClusterOnTrack::prepRawDataLink
const ElementLinkToIDC_MM_Container & prepRawDataLink() const
Definition: MMClusterOnTrack.h:134
Muon::MMPrepData
Class to represent MM measurements.
Definition: MMPrepData.h:22
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Muon::MMClusterOnTrack::operator=
MMClusterOnTrack & operator=(const MMClusterOnTrack &)=default
Muon::MMClusterOnTrack::author
Author author() const
Definition: MMClusterOnTrack.h:122
Muon::MMClusterOnTrack::stripDriftDistErrors
const std::vector< Amg::MatrixX > & stripDriftDistErrors() const
Definition: MMClusterOnTrack.h:155
Muon::MMClusterOnTrack::MMClusterOnTrack
MMClusterOnTrack(MMClusterOnTrack &&)=default
Muon::MMClusterOnTrack::SimpleClusterBuilder
@ SimpleClusterBuilder
Definition: MMClusterOnTrack.h:91
Muon::MMClusterOnTrack::prepRawData
virtual const MMPrepData * prepRawData() const
Returns the MMPrepData - is a TRT_DriftCircle in this scope.
Definition: MMClusterOnTrack.h:128
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
MMPrepDataContainer.h
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
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::MMClusterOnTrack::setValues
virtual void setValues(const Trk::TrkDetElementBase *, const Trk::PrepRawData *)
Sets the DetElement and Trk::PrepRawData pointers after reading from disk.
Definition: MMClusterOnTrack.h:161
Muon::MMClusterOnTrack::stripDriftDists
const std::vector< float > & stripDriftDists() const
Definition: MMClusterOnTrack.h:150
ElementLinkToIDC_MM_Container
ElementLink< Muon::MMPrepDataContainer > ElementLinkToIDC_MM_Container
Definition: MMClusterOnTrack.h:15
Muon::MMClusterOnTrack::associatedSurface
virtual const Trk::Surface & associatedSurface() const
Returns the surface on which this measurement was taken.
Definition: MMClusterOnTrack.h:144
Muon::MMClusterOnTrack::uTPCClusterBuilder
@ uTPCClusterBuilder
Definition: MMClusterOnTrack.h:93
Muon::MMClusterOnTrack::ClusterTimeProjectionClusterBuilder
@ ClusterTimeProjectionClusterBuilder
Definition: MMClusterOnTrack.h:92
Muon::MMClusterOnTrack::~MMClusterOnTrack
virtual ~MMClusterOnTrack()=default
Destructor.
Muon::MMClusterOnTrack::MMClusterOnTrack
MMClusterOnTrack()=default
MMPrepData.h
Muon::MMClusterOnTrack::m_detEl
const MuonGM::MMReadoutElement * m_detEl
The detector element, assoicated with this measurement.
Definition: MMClusterOnTrack.h:108
Trk::ITrkEventCnvTool
Definition: ITrkEventCnvTool.h:31
Muon::MMClusterOnTrack::unKnownAuthor
@ unKnownAuthor
Definition: MMClusterOnTrack.h:90
Muon::MMClusterOnTrack::MMClusterOnTrack
MMClusterOnTrack(const MMClusterOnTrack &)=default
Trk::PrepRawData
Definition: PrepRawData.h:62
Muon::MMClusterOnTrack
Class to represent calibrated clusters formed from TGC strips.
Definition: MMClusterOnTrack.h:26
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Muon::MMClusterOnTrack::m_rio
ElementLinkToIDC_MM_Container m_rio
PrepRawData object assoicated with this measurement.
Definition: MMClusterOnTrack.h:105
a
TList * a
Definition: liststreamerinfos.cxx:10
Muon::MMClusterOnTrack::clone
virtual MMClusterOnTrack * clone() const
Clone this ROT.
Definition: MMClusterOnTrack.h:123
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
MuonGM::MMReadoutElement
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Definition: MMReadoutElement.h:25
Muon::MMClusterOnTrack::m_stripDriftDists
std::vector< float > m_stripDriftDists
Definition: MMClusterOnTrack.h:110
Muon::MuonClusterOnTrack::positionAlongStrip
virtual double positionAlongStrip() const
Definition: MuonClusterOnTrack.h:68
Muon::MMClusterOnTrack::m_author
Author m_author
Definition: MMClusterOnTrack.h:112
Muon::MMClusterOnTrack::operator=
MMClusterOnTrack & operator=(MMClusterOnTrack &&)=default
MuonClusterOnTrack.h
Muon::MMClusterOnTrack::Author
Author
Definition: MMClusterOnTrack.h:89
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Muon::MMClusterOnTrack::detectorElement
virtual const MuonGM::MMReadoutElement * detectorElement() const
Returns the detector element, assoicated with the PRD of this class.
Definition: MMClusterOnTrack.h:139
Muon::MMClusterOnTrack::dump
virtual MsgStream & dump(MsgStream &stream) const
Dumps information about the PRD.
Definition: MMClusterOnTrack.cxx:45
Muon::MMClusterOnTrack::setAuthor
void setAuthor(Author a)
Definition: MMClusterOnTrack.h:119
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
Identifier
Definition: IdentifierFieldParser.cxx:14