ATLAS Offline Software
MdtPrepData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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
12 #ifndef MUONPREPDATA_MDTPREPDATA_H
13 #define MUONPREPDATA_MDTPREPDATA_H
14 
15 // Base classes
23 
25 
26 namespace Muon
27 {
28 
29  class MdtPrepDataContainerCnv_p1;
30 
33 {
34 
36  // Public methods:
38 public:
39 
40  friend class ::MdtPrepDataContainerCnv;
42 
43 
45  MdtPrepData(const MdtPrepData &);
46  MdtPrepData(MdtPrepData &&) noexcept;
47  MdtPrepData &operator=(const MdtPrepData &);
48  MdtPrepData &operator=(MdtPrepData &&) noexcept;
49 
62  const Amg::MatrixX& errDriftRadius,
63  const MuonGM::MdtReadoutElement* detEl,
64  const int tdc,
65  const int adc,
67 
69  virtual ~MdtPrepData();
70 
74 
77  virtual const MuonGM::MdtReadoutElement* detectorElement() const override;
78 
80  virtual bool type(Trk::PrepRawDataType type) const override {
82  }
85  unsigned int dimension() const {
86  return localCovariance().rows();
87  }
88 
90  int tdc() const;
91 
93  int adc() const;
94 
97 
99  virtual IdentifierHash collectionHash() const;
100 
102  virtual MsgStream& dump( MsgStream& stream) const override;
103 
105  virtual std::ostream& dump( std::ostream& stream) const override;
106 
107 private:
110 
112  int m_tdc{0};
113 
115  int m_adc{0};
116 
119 
120 protected :
121 
125 
126 };
127 
129 // Inline methods:
131 
132 // return globalPosition:
134  if (!m_globalPosition) {
135  m_globalPosition.set(std::make_unique<Amg::Vector3D>(m_detEl->surface(identify()).center()));
136  }
137  return *m_globalPosition;
138 }
139 
140 
142  return m_detEl;
143 }
144 
145 inline int MdtPrepData::tdc() const { return m_tdc; }
146 inline int MdtPrepData::adc() const { return m_adc; }
149  return getHashAndIndex().collHash();
150 }
151 
152 }
153 
154 #endif // MUONPREPDATA_MDTPREPDATA_H
155 
156 
Muon::MdtPrepData::m_adc
int m_adc
ADC value - typical ADC spectra can go from 0 up to 250.
Definition: MdtPrepData.h:115
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:27
Muon::MdtPrepDataContainerCnv_p1
Definition: MdtPrepDataContainerCnv_p1.h:27
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:80
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Muon::MdtDriftCircleStatus
MdtDriftCircleStatus
Enum to represent the 'status' of Mdt measurements e.g.
Definition: MdtDriftCircleStatus.h:25
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:109
MdtPrepDataContainerCnv
Create derived converter to customize the saving of identifiable container.
Definition: MdtPrepDataContainerCnv.h:27
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
Muon::MdtPrepData::adc
int adc() const
Returns the ADC (typically range is 0 to 250)
Definition: MdtPrepData.h:146
Muon::MdtPrepData::m_tdc
int m_tdc
TDC value - typical TDC spectra can go from 0 up to 2500.
Definition: MdtPrepData.h:112
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
PrepRawData.h
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
Muon::MdtPrepData::MdtPrepData
MdtPrepData()
GeoPrimitives.h
Muon::MdtPrepData::dimension
unsigned int dimension() const
Returns the dimension of the MdtPrepData.
Definition: MdtPrepData.h:85
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
Muon::MdtPrepData::m_status
MdtDriftCircleStatus m_status
enum to hold 'status' of measurement
Definition: MdtPrepData.h:118
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:53
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:133
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:145
IdentifierHash.h
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:33
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:124
Muon::MdtPrepData::collectionHash
virtual IdentifierHash collectionHash() const
Returns the IdentifierHash corresponding to the Mdt tube which was hit.
Definition: MdtPrepData.h:148
Muon::MdtPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Definition: MdtPrepData.cxx:87
MuonGM::MdtReadoutElement::surface
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:891
Muon::MdtStatusUnDefined
@ MdtStatusUnDefined
Undefined.
Definition: MdtDriftCircleStatus.h:43
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
Muon::MdtPrepData::status
MdtDriftCircleStatus status() const
Returns the status of the measurement.
Definition: MdtPrepData.h:147
Muon::MdtPrepData::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
Definition: MdtPrepData.h:141
IdentContIndex::collHash
unsigned short collHash() const
Accessor to hash, obj index and combined index.
Definition: IdentContIndex.h:85
MdtDriftCircleStatus.h
Identifier
Definition: IdentifierFieldParser.cxx:14