ATLAS Offline Software
PrepRawData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PrepRawData.h, (c) ATLAS Detector software
8 
9 #ifndef TRKPREPRAWDATA_PREPRAWDATA_H
10 #define TRKPREPRAWDATA_PREPRAWDATA_H
11 
12 #include "Identifier/Identifier.h"
13 //
15 
16 // Eigen ATLAS helpers
20 //
21 #include <atomic>
22 #include <iostream>
23 #include <memory>
24 #include <vector>
25 
26 class MsgStream;
27 class PrepRawDataCnv_p1;
28 
29 namespace Muon {
30 class RpcPrepDataContainerCnv_p1;
31 }
32 
33 namespace Trk {
34 
35 /* The various kind of PrepRawData
36  * to avoid dynamic_cast via using the type method
37  */
38 enum class PrepRawDataType
39 {
40  SiCluster,
49  MMPrepData,
53 };
54 
55 class TrkDetElementBase;
56 
59 {};
60 
61 class PrepRawData : public Trk::ObjectCounter<Trk::PrepRawData>
62 {
64  // Public methods:
66 public:
68  PrepRawData();
69  PrepRawData(const PrepRawData&) = default;
72  PrepRawData& operator=(PrepRawData&&) noexcept = default;
73  virtual ~PrepRawData() = default;
74 
85  const Amg::Vector2D& locpos,
87  const Amg::MatrixX& locerr);
88 
92  const Amg::Vector2D& locpos,
93  std::vector<Identifier>&& rdoList,
94  Amg::MatrixX&& locerr);
95 
105  PrepRawData(const Identifier& clusId,
106  const Amg::Vector2D& locpos,
107  const Amg::MatrixX& locerr);
108 
109  PrepRawData(const Identifier& clusId,
110  const Amg::Vector2D& locpos,
111  Amg::MatrixX&& locerr);
112 
115 
118 
121 
126 
131 
133  virtual bool type(PrepRawDataType type) const = 0;
134 
136  virtual MsgStream& dump(MsgStream& stream) const;
140  virtual std::ostream& dump(std::ostream& stream) const;
141 
143  void setHashAndIndex(unsigned short collHash, unsigned short objIndex);
145 
146 private:
147  friend class ::PrepRawDataCnv_p1;
148  friend class Muon::RpcPrepDataContainerCnv_p1;
149 
153  // Need to force proper alignment; otherwise cling gets it wrong.
154  alignas(16) Amg::Vector2D m_localPos{};
156  std::vector<Identifier> m_rdoList{};
159 
163 };
164 
165 MsgStream&
166 operator<<(MsgStream& stream, const PrepRawData& prd);
167 std::ostream&
168 operator<<(std::ostream& stream, const PrepRawData& prd);
169 }
170 
172 #endif // TRKPREPRAWDATA_PREPRAWDATA_H
173 
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
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
Trk::PrepRawDataType::TgcPrepData
@ TgcPrepData
Trk::PrepRawDataType::MMPrepData
@ MMPrepData
Trk::PrepRawData::PrepRawData
PrepRawData(const PrepRawData &)=default
Trk::PrepRawDataType::CscStripPrepData
@ CscStripPrepData
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::PrepRawData::dump
virtual MsgStream & dump(MsgStream &stream) const
dump information about the PRD object.
Definition: PrepRawData.cxx:79
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
TrkObjectCounter.h
Trk::PrepRawData::m_localCovariance
Amg::MatrixX m_localCovariance
See derived classes for definition of ErrorMatrix.
Definition: PrepRawData.h:158
Trk::PrepRawData::rdoList
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
IdentContIndex
Identifiable container index to a contained object.
Definition: IdentContIndex.h:23
Trk::PrepRawData::type
virtual bool type(PrepRawDataType type) const =0
Interface method checking the type.
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
Trk::PrepRawData::m_clusId
Identifier m_clusId
PrepRawData ID, not const because of DataPool.
Definition: PrepRawData.h:151
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Trk::PrepRawDataType::RpcPrepData
@ RpcPrepData
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
PrepRawDataCnv_p1
Definition: PrepRawDataCnv_p1.h:26
Trk::ObjectCounter
Helper to enable counting number of instantiations in debug builds.
Definition: TrkObjectCounter.h:18
Trk::PrepRawDataType::CscPrepData
@ CscPrepData
GeoPrimitives.h
Trk::PrepRawData::hasLocalCovariance
bool hasLocalCovariance() const
returns localCovariance().size()!=0
Trk::PrepRawDataType::PlanarCluster
@ PlanarCluster
Trk::PrepRawData::PrepRawData
PrepRawData(PrepRawData &&) noexcept=default
PrepRawData.icc
Trk::PrepRawData::setHashAndIndex
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
vector
Definition: MultiHisto.h:13
Trk::PrepRawData::m_rdoList
std::vector< Identifier > m_rdoList
Stores the identifiers of the RDOs.
Definition: PrepRawData.h:156
Trk::PrepRawDataType::SiCluster
@ SiCluster
Trk::PrepRawData::PrepRawData
PrepRawData()
public because of DataPool
Definition: PrepRawData.cxx:68
Trk::PrepRawDataType::TRT_DriftCircle
@ TRT_DriftCircle
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
IdentContIndex.h
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Trk::PrepRawDataType::PixelCluster
@ PixelCluster
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Trk::PrepRawData::m_localPos
Amg::Vector2D m_localPos
see derived classes for definition of meaning of LocalPosition
Definition: PrepRawData.h:154
Trk::PrepRawDataType::sTgcPrepData
@ sTgcPrepData
Trk::PrepRawData::getHashAndIndex
const IdentContIndex & getHashAndIndex() const
Trk::PrepRawData::m_indexAndHash
IdentContIndex m_indexAndHash
Stores its own position (index) in collection plus the hash id for the collection (needed for the EL ...
Definition: PrepRawData.h:162
Trk::PrepRawDataType::SCT_Cluster
@ SCT_Cluster
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
Trk::PrepRawDataType::HGTD_Cluster
@ HGTD_Cluster
Trk::PrepRawDataUndefinedVariable
class thrown in the event of an variable not being defined.
Definition: PrepRawData.h:59
Trk::PrepRawData::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
Identifier
Definition: IdentifierFieldParser.cxx:14