ATLAS Offline Software
MdtPrepData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // MdtPrepData.h
7 // Header file for class MdtPrepData
9 // (c) ATLAS Detector software
11 // Class to implement DriftCircle for Muons
13 // Version 1.0 03/30/2005 Ketevi A. Assamagan
15 
16 #ifndef MUONPREPDATA_MDTPREPDATA_H
17 #define MUONPREPDATA_MDTPREPDATA_H
18 
19 // Base classes
27 
29 
30 namespace Muon
31 {
32 
33  class MdtPrepDataContainerCnv_p1;
34 
37 {
38 
40  // Public methods:
42 public:
43 
44  friend class ::MdtPrepDataContainerCnv;
46 
47 
48  MdtPrepData();
49  MdtPrepData(const MdtPrepData &);
50  MdtPrepData(MdtPrepData &&) noexcept;
51  MdtPrepData &operator=(const MdtPrepData &);
52  MdtPrepData &operator=(MdtPrepData &&) noexcept;
53 
65  const Identifier &id,
68  const Amg::MatrixX& errDriftRadius,
69  const MuonGM::MdtReadoutElement* detEl,
70  const int tdc,
71  const int adc,
73  );
74 
76  const Identifier &id,
79  Amg::MatrixX&& errDriftRadius,
80  std::vector<Identifier>&& rdoList,
81  const MuonGM::MdtReadoutElement* detEl,
82  const int tdc,
83  const int adc,
85  );
86 
88  virtual ~MdtPrepData();
89 
93 
96  virtual const MuonGM::MdtReadoutElement* detectorElement() const override;
97 
99  virtual bool type(Trk::PrepRawDataType type) const override
100  {
102  }
103 
105  int tdc() const;
106 
108  int adc() const;
109 
112 
114  virtual IdentifierHash collectionHash() const;
115 
117  virtual MsgStream& dump( MsgStream& stream) const override;
118 
120  virtual std::ostream& dump( std::ostream& stream) const override;
121 
122 private:
123 
126 
128  int m_tdc;
129 
131  int m_adc;
132 
135 
136 protected :
137 
141 
142 };
143 
145 // Inline methods:
147 
148 // return globalPosition:
150 {
151  if (not m_globalPosition) m_globalPosition.set(std::make_unique<const Amg::Vector3D>(m_detEl->surface(identify()).center()));
152  return *m_globalPosition;
153 }
154 
155 
157 {
158  return m_detEl;
159 }
160 
161 inline int MdtPrepData::tdc() const
162 {
163  return m_tdc;
164 }
165 
166 inline int MdtPrepData::adc() const
167 {
168  return m_adc;
169 }
170 
172 {
173  return m_status;
174 }
175 
177 {
178  return getHashAndIndex().collHash();
179 }
180 
181 }
182 
183 #endif // MUONPREPDATA_MDTPREPDATA_H
184 
185 
Muon::MdtPrepData::m_adc
int m_adc
ADC value - typical ADC spectra can go from 0 up to 250.
Definition: MdtPrepData.h:131
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
MdtReadoutElement.h
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
Trk::PrepRawDataType
PrepRawDataType
Definition: PrepRawData.h:39
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
Muon::MdtPrepDataContainerCnv_p1
Definition: MdtPrepDataContainerCnv_p1.h:28
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
CxxUtils::CachedUniquePtrT
Cached pointer with atomic update.
Definition: CachedUniquePtr.h:54
Muon::MdtPrepData::type
virtual bool type(Trk::PrepRawDataType type) const override
Interface method checking the type.
Definition: MdtPrepData.h:99
Muon::MdtDriftCircleStatus
MdtDriftCircleStatus
Enum to represent the 'status' of Mdt measurements e.g.
Definition: MdtDriftCircleStatus.h:25
Trk::PrepRawData::rdoList
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
Muon::MdtPrepData::m_detEl
const MuonGM::MdtReadoutElement * m_detEl
Cached pointer to detector element (not deleted in destructor, not written to disk)
Definition: MdtPrepData.h:125
MdtPrepDataContainerCnv
Create derived converter to customize the saving of identifiable container.
Definition: MdtPrepDataContainerCnv.h:27
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::MdtPrepData::adc
int adc() const
Returns the ADC (typically range is 0 to 250)
Definition: MdtPrepData.h:166
Muon::MdtPrepData::m_tdc
int m_tdc
TDC value - typical TDC spectra can go from 0 up to 2500.
Definition: MdtPrepData.h:128
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
PrepRawData.h
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
Muon::MdtPrepData::MdtPrepData
MdtPrepData()
Definition: MdtPrepData.cxx:76
GeoPrimitives.h
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:50
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
vector
Definition: MultiHisto.h:13
Muon::MdtPrepData::m_status
MdtDriftCircleStatus m_status
enum to hold 'status' of measurement
Definition: MdtPrepData.h:134
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:59
CachedUniquePtr.h
Cached unique_ptr with atomic update.
Muon::MdtPrepData::globalPosition
virtual const Amg::Vector3D & globalPosition() const
Returns the global position of the CENTER of the drift tube (i.e.
Definition: MdtPrepData.h:149
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
Muon::MdtPrepData::tdc
int tdc() const
Returns the TDC (typically range is 0 to 2500).
Definition: MdtPrepData.h:161
IdentifierHash.h
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:37
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::PrepRawData::getHashAndIndex
const IdentContIndex & getHashAndIndex() const
Muon::MdtPrepData::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
Global position of measurement.
Definition: MdtPrepData.h:140
Muon::MdtPrepData::collectionHash
virtual IdentifierHash collectionHash() const
Returns the IdentifierHash corresponding to the Mdt tube which was hit.
Definition: MdtPrepData.h:176
Muon::MdtPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Definition: MdtPrepData.cxx:139
MuonGM::MdtReadoutElement::surface
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:875
IdentifierHash
Definition: IdentifierHash.h:38
Muon::MdtPrepData::status
MdtDriftCircleStatus status() const
Returns the status of the measurement.
Definition: MdtPrepData.h:171
Muon::MdtPrepData::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
Definition: MdtPrepData.h:156
IdentContIndex::collHash
unsigned short collHash() const
Accessor to hash, obj index and combined index.
Definition: IdentContIndex.h:85
MdtDriftCircleStatus.h