ATLAS Offline Software
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 
17 namespace 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 
46  MMPrepData( const Identifier& RDOId,
47  const IdentifierHash &idDE,
48  Amg::Vector2D&& locpos,
49  std::vector<Identifier>&& rdoList,
50  Amg::MatrixX&& locErrMat,
51  const MuonGM::MMReadoutElement* detEl,
52  const short int time,
53  const int charge,
54  const float driftDist,
56  std::vector<short int>&& stripTimes,
57  std::vector<int>&& stripCharges );
58 
60  MMPrepData( const Identifier& RDOId,
61  const IdentifierHash &idDE,
62  Amg::Vector2D&& locpos,
63  std::vector<Identifier>&& rdoList,
64  Amg::MatrixX&& locErrMat,
65  const MuonGM::MMReadoutElement* detEl,
66  const short int time,
67  const int charge,
68  const float driftDist );
69 
71  MMPrepData( const Identifier& RDOId,
72  const IdentifierHash &idDE,
73  Amg::Vector2D&& locpos,
74  std::vector<Identifier>&& rdoList,
75  Amg::MatrixX&& locErrMat,
76  const MuonGM::MMReadoutElement* detEl,
77  const short int time,
78  const int charge );
79 
80  MMPrepData( const Identifier& RDOId,
81  const IdentifierHash &idDE,
82  Amg::Vector2D&& locpos,
83  std::vector<Identifier>&& rdoList,
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,
99  std::vector<float>&& stripDriftErrors_0_0,
100  std::vector<float>&& stripDriftErrors_1_1);
101 
103  virtual const Amg::Vector3D& globalPosition() const override final;
104 
107  virtual const MuonGM::MMReadoutElement* detectorElement() const override final;
108 
110  virtual bool type(Trk::PrepRawDataType type) const override final
111  {
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 
156  enum class Author: short{
157  RDOTOPRDConverter = -1,
162  };
163 
164  enum class Quality: uint8_t{
165  unKnown = 0,
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>(
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 
Muon::MMPrepData::m_angle
float m_angle
@angle and chisquare from micro-TPC fit
Definition: MMPrepData.h:192
MuonCluster.h
Muon::MMPrepData::MMPrepData
MMPrepData()=default
Muon::MMPrepData::driftDist
float driftDist() const
Returns the Drift Distance.
Definition: MMPrepData.h:232
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
Muon::MMPrepData
Class to represent MM measurements.
Definition: MMPrepData.h:22
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
xAOD::short
short
Definition: Vertex_v1.cxx:165
Muon::MMPrepData::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global position.
Definition: MMPrepData.h:211
Trk::PrepRawDataType::MMPrepData
@ MMPrepData
Muon::MMPrepData::Quality::unKnown
@ unKnown
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
Surface.h
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
NswClusteringUtils.h
Trk::PrepRawData::rdoList
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
Muon::MMPrepData::setQuality
void setQuality(const Quality q)
Definition: MMPrepData.h:169
Muon::MMPrepData::setDriftDist
void setDriftDist(std::vector< float > &&driftDist, std::vector< AmgVector(2)> &&driftDistErrors)
set drift distances and uncertainties
Definition: MMPrepData.cxx:78
Muon::MMPrepData::m_charge
int m_charge
measured charge
Definition: MMPrepData.h:186
Muon::MMPrepData::Author::uTPCClusterBuilder
@ uTPCClusterBuilder
Muon::MMPrepData::quality
Quality quality() const
Definition: MMPrepData.h:168
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
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::MMPrepData::m_quality
Quality m_quality
Definition: MMPrepData.h:202
Muon::MMPrepData::stripDriftErrors_0_0
std::vector< float > stripDriftErrors_0_0() const
Definition: MMPrepData.cxx:116
Muon::MMPrepData::stripDriftErrors
const std::vector< AmgVector(2)> & stripDriftErrors() const
returns the list of drift distances
Definition: MMPrepData.h:267
Muon::MMPrepData::m_author
Author m_author
Definition: MMPrepData.h:201
Muon::MMPrepData::angle
float angle() const
Returns the microTPC angle.
Definition: MMPrepData.h:237
Muon::MMPrepData::m_chisqProb
float m_chisqProb
Definition: MMPrepData.h:193
Muon::MMPrepData::m_stripDriftErrors
std::vector< AmgVector(2)> m_stripDriftErrors
Definition: MMPrepData.h:200
MMReadoutElement.h
Muon::MMPrepData::operator=
MMPrepData & operator=(const MMPrepData &)=delete
Muon::MMPrepData::stripCharges
const std::vector< int > & stripCharges() const
returns the list of charges
Definition: MMPrepData.h:257
Muon::MMPrepData::detectorElement
virtual const MuonGM::MMReadoutElement * detectorElement() const override final
Returns the detector element corresponding to this PRD.
Definition: MMPrepData.h:206
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
vector
Definition: MultiHisto.h:13
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
Muon::MMPrepData::Author::nAuthorsPRD
@ nAuthorsPRD
Muon::MMPrepData::Author::RDOTOPRDConverter
@ RDOTOPRDConverter
Muon::MMPrepData::stripNumbers
const std::vector< uint16_t > & stripNumbers() const
returns the list of strip numbers
Definition: MMPrepData.h:247
Muon::MMPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override final
Dumps information about the PRD.
Definition: MMPrepData.cxx:102
Muon::MMPrepData::MMPrepData
MMPrepData(const MMPrepData &)=delete
Muon::MMPrepData::stripTimes
const std::vector< short int > & stripTimes() const
returns the list of times
Definition: MMPrepData.h:252
Muon::MMPrepData::type
virtual bool type(Trk::PrepRawDataType type) const override final
Interface method checking the type.
Definition: MMPrepData.h:110
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Muon::MMPrepData::m_stripDriftDist
std::vector< float > m_stripDriftDist
Definition: MMPrepData.h:199
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Muon::MMPrepData::setMicroTPC
void setMicroTPC(float angle, float chisqProb)
set microTPC parameters
Definition: MMPrepData.cxx:72
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
Muon::MMPrepData::stripDriftErrors_1_1
std::vector< float > stripDriftErrors_1_1() const
Definition: MMPrepData.cxx:125
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Muon::MMPrepData::time
short int time() const
Returns the time (in ns)
Definition: MMPrepData.h:222
Muon::MMPrepData::m_detEl
const MuonGM::MMReadoutElement * m_detEl
Cached pointer to the detector element - should never be zero.
Definition: MMPrepData.h:178
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::MMPrepData::MMPrepData
MMPrepData(MMPrepData &&) noexcept=default
Muon::MMPrepData::Author::ClusterTimeProjectionClusterBuilder
@ ClusterTimeProjectionClusterBuilder
Muon::MMPrepData::Author
Author
Definition: MMPrepData.h:156
Muon::MMPrepData::Quality
Quality
Definition: MMPrepData.h:164
Muon::MMPrepData::m_stripTimes
std::vector< short int > m_stripTimes
Definition: MMPrepData.h:197
Muon::MuonCluster::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
Global position of measurement.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:96
Muon::MMPrepData::Author::SimpleClusterBuilder
@ SimpleClusterBuilder
MuonGM::MMReadoutElement
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Definition: MMReadoutElement.h:23
extractSporadic.q
list q
Definition: extractSporadic.py:98
Muon::MMPrepData::m_stripNumbers
std::vector< uint16_t > m_stripNumbers
@list of strip numbers, time and charge, of the strips associated to the PRD
Definition: MMPrepData.h:196
Muon::MuonCluster
Class representing clusters in the muon system.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:37
Muon::MMPrepData::author
Author author() const
Definition: MMPrepData.h:272
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
Muon::MMPrepData::m_driftDist
float m_driftDist
drift distance
Definition: MMPrepData.h:189
IdentifierHash
Definition: IdentifierHash.h:38
Muon::MMPrepData::setAuthor
void setAuthor(Author author)
Definition: MMPrepData.cxx:96
Muon::MMPrepData::m_time
short int m_time
measured time
Definition: MMPrepData.h:182
Muon::MMPrepData::stripDriftDist
const std::vector< float > & stripDriftDist() const
returns the list of drift distances
Definition: MMPrepData.h:262
Muon::MMPrepData::charge
int charge() const
Returns the AD.
Definition: MMPrepData.h:227
Muon::MMPrepData::m_stripCharges
std::vector< int > m_stripCharges
Definition: MMPrepData.h:198
Trk::Surface::localToGlobal
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.
Muon::MMPrepData::chisqProb
float chisqProb() const
Returns the microTPC chisq Prob.
Definition: MMPrepData.h:242
Trk::PrepRawDataUndefinedVariable
class thrown in the event of an variable not being defined.
Definition: PrepRawData.h:59