ATLAS Offline Software
Loading...
Searching...
No Matches
MMPrepData.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONPREPRAWDATA_MMPREPDATA_H
6#define MUONPREPRAWDATA_MMPREPDATA_H
7
8// Base classes
10#include "TrkSurfaces/Surface.h"
13
14#include <vector>
15
16
17namespace Muon {
18
19
20
22 class MMPrepData final: public MuonCluster {
23
25 // Public methods:
27 public:
28
29 MMPrepData() = default;
30 MMPrepData(const MMPrepData &) = delete;
31 MMPrepData &operator=(const MMPrepData &) = delete;
32 MMPrepData(MMPrepData &&) noexcept = default;
33 MMPrepData &operator=(MMPrepData &&) noexcept = default;
34
35
44
48 Amg::Vector2D&& locpos,
50 Amg::MatrixX&& locErrMat,
51 const MuonGM::MMReadoutElement* detEl,
52 const short int time,
53 const int charge,
54 const float driftDist,
55 std::vector<uint16_t>&& stripNumbers,
56 std::vector<short int>&& stripTimes,
57 std::vector<int>&& stripCharges );
58
62 Amg::Vector2D&& locpos,
64 Amg::MatrixX&& locErrMat,
65 const MuonGM::MMReadoutElement* detEl,
66 const short int time,
67 const int charge,
68 const float driftDist );
69
73 Amg::Vector2D&& locpos,
75 Amg::MatrixX&& locErrMat,
76 const MuonGM::MMReadoutElement* detEl,
77 const short int time,
78 const int charge );
79
82 Amg::Vector2D&& locpos,
84 Amg::MatrixX&& locErrMat,
85 const MuonGM::MMReadoutElement* detEl);
86
88 virtual ~MMPrepData() = default;
89
91 void setMicroTPC(float angle, float chisqProb);
92
94 void setDriftDist(std::vector<float>&& driftDist,
95 std::vector<AmgVector(2)>&& driftDistErrors);
96
97 // setter functions for the EventTPConverters
98 void setDriftDist(std::vector<float>&& driftDist,
101
103 virtual const Amg::Vector3D& globalPosition() const override final;
104
107 virtual const MuonGM::MMReadoutElement* detectorElement() const override final;
108
110 virtual Trk::PrepRawDataType prdType() const override {
112 }
113
114
116 short int time() const;
117
119 int charge() const;
120
122 float driftDist() const;
123
125 float angle() const;
126
128 float chisqProb() const;
129
131 const std::vector<uint16_t>& stripNumbers() const;
132
134 const std::vector<short int>& stripTimes() const;
135
137 const std::vector<int>& stripCharges() const;
138
140 const std::vector<float>& stripDriftDist() const;
141
143 const std::vector<AmgVector(2)>& stripDriftErrors() const;
144
145 // getter functions for the EventTPConverters
146 std::vector<float> stripDriftErrors_0_0() const;
147 std::vector<float> stripDriftErrors_1_1() const;
148
150 virtual MsgStream& dump( MsgStream& stream) const override final;
151
153 virtual std::ostream& dump( std::ostream& stream) const override final;
154
155
163
164 enum class Quality: uint8_t{
166 };
167
168 Quality quality() const { return m_quality; }
169 void setQuality(const Quality q) { m_quality = q; }
170
171
172 Author author() const;
173 void setAuthor(Author author);
174
175 private:
176
179
182 short int m_time{0};
183
186 int m_charge{0};
187
189 float m_driftDist{0.f};
190
192 float m_angle{0.f};
193 float m_chisqProb{0.f};
194
196 std::vector<uint16_t> m_stripNumbers{};
197 std::vector<short int> m_stripTimes{};
198 std::vector<int> m_stripCharges{};
199 std::vector<float> m_stripDriftDist{};
200 std::vector<AmgVector(2)> m_stripDriftErrors{};
203
204 };
205
207 {
208 return m_detEl;
209 }
210 // return globalPosition:
212 {
213 if (!m_globalPosition) {
214 m_globalPosition.set(std::make_unique<Amg::Vector3D>(
215 m_detEl->surface(identify())
217 }
219 return *m_globalPosition;
220 }
221
222 inline short int MMPrepData::time() const
223 {
224 return m_time;
225 }
226
227 inline int MMPrepData::charge() const
228 {
229 return m_charge;
230 }
231
232 inline float MMPrepData::driftDist() const
233 {
234 return m_driftDist;
235 }
236
237 inline float MMPrepData::angle() const
238 {
239 return m_angle;
240 }
241
242 inline float MMPrepData::chisqProb() const
243 {
244 return m_chisqProb;
245 }
246
247 inline const std::vector<uint16_t>& MMPrepData::stripNumbers() const
248 {
249 return m_stripNumbers;
250 }
251
252 inline const std::vector<short int>& MMPrepData::stripTimes() const
253 {
254 return m_stripTimes;
255 }
256
257 inline const std::vector<int>& MMPrepData::stripCharges() const
258 {
259 return m_stripCharges;
260 }
261
262 inline const std::vector<float>& MMPrepData::stripDriftDist() const
263 {
264 return m_stripDriftDist;
265 }
266
267 inline const std::vector<AmgVector(2)>& MMPrepData::stripDriftErrors() const
268 {
269 return m_stripDriftErrors;
270 }
271
273 return m_author;
274 }
275
276}
277
278#endif // MUONPREPRAWDATA_MMREPDATA_H
279
#define AmgVector(rows)
Eigen::Matrix< double, 3, 1 > Vector3D
This is a "hash" representation of an Identifier.
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
const std::vector< AmgVector(2)> & stripDriftErrors() const
returns the list of drift distances
Definition MMPrepData.h:267
std::vector< float > m_stripDriftDist
Definition MMPrepData.h:199
Author author() const
Definition MMPrepData.h:272
std::vector< float > stripDriftErrors_0_0() const
const std::vector< uint16_t > & stripNumbers() const
returns the list of strip numbers
Definition MMPrepData.h:247
Quality quality() const
Definition MMPrepData.h:168
const std::vector< short int > & stripTimes() const
returns the list of times
Definition MMPrepData.h:252
short int m_time
measured time
Definition MMPrepData.h:182
float angle() const
Returns the microTPC angle.
Definition MMPrepData.h:237
float driftDist() const
Returns the Drift Distance.
Definition MMPrepData.h:232
float m_angle
@angle and chisquare from micro-TPC fit
Definition MMPrepData.h:192
int m_charge
measured charge
Definition MMPrepData.h:186
virtual const MuonGM::MMReadoutElement * detectorElement() const override final
Returns the detector element corresponding to this PRD.
Definition MMPrepData.h:206
virtual Trk::PrepRawDataType prdType() const override
Interface method returning the prdType.
Definition MMPrepData.h:110
short int time() const
Returns the time (in ns)
Definition MMPrepData.h:222
const std::vector< float > & stripDriftDist() const
returns the list of drift distances
Definition MMPrepData.h:262
std::vector< int > m_stripCharges
Definition MMPrepData.h:198
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global position.
Definition MMPrepData.h:211
MMPrepData(const MMPrepData &)=delete
MMPrepData()=default
const std::vector< int > & stripCharges() const
returns the list of charges
Definition MMPrepData.h:257
MMPrepData(MMPrepData &&) noexcept=default
int charge() const
Returns the AD.
Definition MMPrepData.h:227
std::vector< AmgVector(2)> m_stripDriftErrors
Definition MMPrepData.h:200
void setQuality(const Quality q)
Definition MMPrepData.h:169
MMPrepData & operator=(const MMPrepData &)=delete
void setAuthor(Author author)
float chisqProb() const
Returns the microTPC chisq Prob.
Definition MMPrepData.h:242
void setDriftDist(std::vector< float > &&driftDist, std::vector< AmgVector(2)> &&driftDistErrors)
set drift distances and uncertainties
std::vector< float > stripDriftErrors_1_1() const
float m_driftDist
drift distance
Definition MMPrepData.h:189
std::vector< uint16_t > m_stripNumbers
@list of strip numbers, time and charge, of the strips associated to the PRD
Definition MMPrepData.h:196
std::vector< short int > m_stripTimes
Definition MMPrepData.h:197
void setMicroTPC(float angle, float chisqProb)
set microTPC parameters
const MuonGM::MMReadoutElement * m_detEl
Cached pointer to the detector element - should never be zero.
Definition MMPrepData.h:178
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
Global position of measurement.
class thrown in the event of an variable not being defined.
Definition PrepRawData.h:59
const Amg::Vector2D & localPosition() const
return the local position reference
Identifier identify() const
return the identifier
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
-event-from-file
STL namespace.