ATLAS Offline Software
CscClusterOnTrack.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 //
6 // CscClusterOnTrack.h
7 // Header file for class CscClusterOnTrackOnTrack
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_CSCCLUSTERONTRACK_H
18 #define MUONRIOONTRACK_CSCCLUSTERONTRACK_H
19 
20 // Base classes
25 // needed classes
26 
28 #include "AthLinks/ElementLink.h"
29 
31 
32 namespace MuonGM
33 {
34 class CscReadoutElement;
35 }
36 
37 namespace Trk
38 {
39  class ITrkEventCnvTool;
40 }
41 
42 namespace Muon
43 {
44 
47 {
48 
49 public:
50  friend class Trk::ITrkEventCnvTool;
51 
55 
56 
68  const CscPrepData* RIO,
69  Trk::LocalParameters&& locpos,
70  Amg::MatrixX&& locerr,
71  double positionAlongStrip,
74  float time=9999.0
75  );
76 
77  // Alternate constructor that doesn't dereference the RIO link.
80  Trk::LocalParameters&& locpos,
81  Amg::MatrixX&& locerr,
82  const Identifier& id,
83  const MuonGM::CscReadoutElement* detEL,
84  double positionAlongStrip,
87  float time=9999.0
88  );
89 
91  virtual ~CscClusterOnTrack();
92 
94  virtual CscClusterOnTrack* clone() const override final;
95 
97  virtual const CscPrepData* prepRawData() const override final;
99 
101  virtual const MuonGM::CscReadoutElement* detectorElement() const override final;
102 
105  virtual const Trk::Surface& associatedSurface() const override final;
106 
109 
112 
114  float time() const;
115 
117  virtual MsgStream& dump( MsgStream& stream) const override final;
118 
120  virtual std::ostream& dump( std::ostream& stream) const override final;
121 
122 private:
126  virtual void setValues(const Trk::TrkDetElementBase*,
127  const Trk::PrepRawData*) override final;
128 
131 
133  const MuonGM::CscReadoutElement* m_detEl;
134 
137 
140 
141  float m_time;
142 };
143 
145 // Inline methods:
147 
148 
150 {
151  return new CscClusterOnTrack(*this);
152 }
153 
155 {
156  if (m_rio.isValid()) return m_rio.cachedElement();
157  //std::cout<<"CscClusterOnTrack::WARNING invalid PRD"<<std::endl;
158  return 0;
159 }
160 
161 inline const ElementLinkToIDC_CSC_Container&
163 {
164  return m_rio;
165 }
166 
168 {
169  return m_detEl;
170 }
171 
173 {
174  // FIXME! This will crash if detectorElement() returns 0! EJWM
175  return detectorElement()->surface(identify());
176 }
177 
179 {
180  return m_status;
181 }
182 
184 {
185  return m_timeStatus;
186 }
187 
188 inline float CscClusterOnTrack::time() const
189 {
190  return m_time;
191 }
192 
194  const Trk::PrepRawData* /*rio*/)
195  {
196  // TODO should check this works EJWM
197  //m_rio = dynamic_cast<const CscPrepData*>(rio);
198  //assert(0!=m_rio);
199  m_detEl = dynamic_cast<const MuonGM::CscReadoutElement*>(detEl);
200  assert(0!=m_detEl);
201  }
202 }
203 
204 #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:27
Muon::CscClusterOnTrack::m_timeStatus
CscTimeStatus m_timeStatus
cluster time measurement status
Definition: CscClusterOnTrack.h:139
Muon::CscClusterOnTrack::CscClusterOnTrack
CscClusterOnTrack(const CscClusterOnTrack &)
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
Muon::CscClusterOnTrack::operator=
CscClusterOnTrack & operator=(const CscClusterOnTrack &)
Definition: CscClusterOnTrack.cxx:78
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
MuonGM::CscReadoutElement
Definition: CscReadoutElement.h:56
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
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::CscClusterOnTrack::detectorElement
virtual const MuonGM::CscReadoutElement * detectorElement() const override final
Returns the detector element, associated with the PRD of this class.
Definition: CscClusterOnTrack.h:167
Muon::CscClusterOnTrack::timeStatus
CscTimeStatus timeStatus() const
Returns Csc time measurement status flag.
Definition: CscClusterOnTrack.h:183
CscPrepData.h
Muon::CscClusterOnTrack::prepRawDataLink
const ElementLinkToIDC_CSC_Container & prepRawDataLink() const
Definition: CscClusterOnTrack.h:162
Muon::CscClusterOnTrack::m_detEl
const MuonGM::CscReadoutElement * m_detEl
The detector element, associated with this measurement.
Definition: CscClusterOnTrack.h:133
CscTimeStatus.h
Muon::CscPrepData
Class representing clusters from the CSC.
Definition: CscPrepData.h:39
Muon::CscClusterOnTrack::clone
virtual CscClusterOnTrack * clone() const override final
Clone this ROT.
Definition: CscClusterOnTrack.h:149
Muon::CscClusterOnTrack::CscClusterOnTrack
CscClusterOnTrack()
Definition: CscClusterOnTrack.cxx:22
Trk::ITrkEventCnvTool
Definition: ITrkEventCnvTool.h:31
Muon::CscClusterOnTrack::m_rio
ElementLinkToIDC_CSC_Container m_rio
PrepRawData object assoicated with this measurement.
Definition: CscClusterOnTrack.h:130
ElementLinkToIDC_CSC_Container
ElementLink< Muon::CscPrepDataContainer > ElementLinkToIDC_CSC_Container
Definition: CscClusterOnTrack.h:30
Muon::CscClusterOnTrack::dump
virtual MsgStream & dump(MsgStream &stream) const override final
Dumps information about the PRD.
Definition: CscClusterOnTrack.cxx:92
CscClusterStatus.h
Muon::CscClusterOnTrack::time
float time() const
Return the time(ns)
Definition: CscClusterOnTrack.h:188
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
CscPrepDataContainer.h
Muon::CscClusterOnTrack::~CscClusterOnTrack
virtual ~CscClusterOnTrack()
Destructor.
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Muon::CscClusterOnTrack::m_status
CscClusterStatus m_status
cluster position measurement status
Definition: CscClusterOnTrack.h:136
Muon::CscClusterOnTrack::prepRawData
virtual const CscPrepData * prepRawData() const override final
Returns the CscPrepData - is a CscPrepData in this scope.
Definition: CscClusterOnTrack.h:154
Muon::CscClusterOnTrack::setValues
virtual void setValues(const Trk::TrkDetElementBase *, const Trk::PrepRawData *) override final
this method is only used by the custom convertors.
Definition: CscClusterOnTrack.h:193
Muon::CscClusterOnTrack::m_time
float m_time
Definition: CscClusterOnTrack.h:141
Muon::CscClusterOnTrack
Class to represent the calibrated clusters created from CSC strips.
Definition: CscClusterOnTrack.h:47
Muon::CscTimeStatusUndefined
@ CscTimeStatusUndefined
Time is not assessed indicating potential bug.
Definition: CscTimeStatus.h:39
Muon::CscClusterOnTrack::associatedSurface
virtual const Trk::Surface & associatedSurface() const override final
Returns the surface on which this measurement was taken.
Definition: CscClusterOnTrack.h:172
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
Muon::CscClusterOnTrack::status
CscClusterStatus status() const
Returns Csc position measurement status flag.
Definition: CscClusterOnTrack.h:178
Muon::MuonClusterOnTrack::positionAlongStrip
virtual double positionAlongStrip() const
Definition: MuonClusterOnTrack.h:68
MuonClusterOnTrack.h
Muon::CscClusterStatus
CscClusterStatus
Enum to represent the cluster status - see the specific enum values for more details.
Definition: CscClusterStatus.h:23
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
Muon::CscTimeStatus
CscTimeStatus
Enum to represent the cluster time measurement status - see the specific enum values for more details...
Definition: CscTimeStatus.h:24
Identifier
Definition: IdentifierFieldParser.cxx:14