ATLAS Offline Software
HGTD_Cluster.h
Go to the documentation of this file.
1 
23 #ifndef HGTD_PREPRAWDATA_HGTD_CLUSTER_H
24 #define HGTD_PREPRAWDATA_HGTD_CLUSTER_H
25 
30 #include "TrkSurfaces/Surface.h"
31 #include "CxxUtils/CachedValue.h"
32 #include <memory>
33 #include <numeric>
34 
36 
37 public:
38  HGTD_Cluster();
39  HGTD_Cluster(const HGTD_Cluster&) = default;
40  HGTD_Cluster& operator=(const HGTD_Cluster&) = default;
41  HGTD_Cluster(HGTD_Cluster&&) = default;
43  virtual ~HGTD_Cluster() = default;
44 
45  // Constructor
46  HGTD_Cluster(const Identifier& rdo_id,
47  const Amg::Vector2D& loc_pos,
48  std::vector<Identifier>&& rdo_list,
49  const InDet::SiWidth& width,
51  Amg::MatrixX&& loc_err_matx,
52  const float time_of_arrival,
53  const float time_of_arrival_err,
54  std::vector<int>&& time_over_threshold);
55 
56 
57  // return width class reference
58  virtual const InDet::SiWidth& width() const;
59 
60  // return global position reference
61  virtual const Amg::Vector3D& globalPosition() const;
62 
63  virtual const InDetDD::SolidStateDetectorElementBase* detectorElement() const override;
64 
66  virtual Trk::PrepRawDataType prdType() const override;
67  // return time of arrival
68  virtual float time() const;
69 
70  // return the resolution of the time of arrival
71  virtual float timeResolution() const;
72 
73  // return time over threshold list
74  virtual const std::vector<int>& totList() const;
75 
76 private:
77  InDet::SiWidth m_width; // col, row, and width in mm
78 
80 
82 
83  float m_time{};
85  std::vector<int> m_time_over_threshold;
86 };
87 
89 // Inline methods:
90 
91 inline const InDet::SiWidth& HGTD_Cluster::width() const { return m_width; }
92 
94  if (!m_det_el) {
96  }
97  if (!m_glob_pos.isValid()) {
98  m_glob_pos.set (m_det_el->surface(identify()).localToGlobal(localPosition()));
99  }
100  return *m_glob_pos.ptr();
101 }
102 
105  return m_det_el;
106 }
107 
110 {
112 }
113 
114 inline float HGTD_Cluster::time() const { return m_time; }
115 
116 inline float HGTD_Cluster::timeResolution() const { return m_time_resolution; }
117 
118 inline const std::vector<int>& HGTD_Cluster::totList() const {
119  return m_time_over_threshold;
120 }
121 
122 #endif // HGTD_PREPRAWDATA_HGTD_CLUSTER_H
HGTD_Cluster::HGTD_Cluster
HGTD_Cluster()
Definition: HGTD_Cluster.cxx:33
SiWidth.h
Trk::PrepRawDataType
PrepRawDataType
Definition: PrepRawData.h:39
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
HGTD_Cluster::m_width
InDet::SiWidth m_width
Definition: HGTD_Cluster.h:77
Surface.h
InDetDD::SolidStateDetectorElementBase
Definition: SolidStateDetectorElementBase.h:132
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
HGTD_Cluster::m_time_resolution
float m_time_resolution
Definition: HGTD_Cluster.h:84
HGTD_Cluster::operator=
HGTD_Cluster & operator=(const HGTD_Cluster &)=default
HGTD_Cluster::HGTD_Cluster
HGTD_Cluster(HGTD_Cluster &&)=default
InDetDD::SolidStateDetectorElementBase::surface
Trk::Surface & surface()
Element Surface.
HGTD_Cluster::m_glob_pos
CxxUtils::CachedValue< Amg::Vector3D > m_glob_pos
Definition: HGTD_Cluster.h:79
HGTD_Cluster::globalPosition
virtual const Amg::Vector3D & globalPosition() const
Definition: HGTD_Cluster.h:93
HGTD_Cluster::width
virtual const InDet::SiWidth & width() const
Definition: HGTD_Cluster.h:91
PrepRawData.h
HGTD_Cluster
Definition: HGTD_Cluster.h:35
HGTD_Cluster::m_time
float m_time
Definition: HGTD_Cluster.h:83
HGTD_Cluster::prdType
virtual Trk::PrepRawDataType prdType() const override
Interface method checking the type.
Definition: HGTD_Cluster.h:109
HGTD_Cluster::HGTD_Cluster
HGTD_Cluster(const HGTD_Cluster &)=default
HGTD_DetectorElement.h
CxxUtils::CachedValue< Amg::Vector3D >
HGTD_Cluster::timeResolution
virtual float timeResolution() const
Definition: HGTD_Cluster.h:116
columnar::final
CM final
Definition: ColumnAccessor.h:106
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
CachedValue.h
Cached value with atomic update.
IdentifierHash.h
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
HGTD_Cluster::m_det_el
const InDetDD::SolidStateDetectorElementBase * m_det_el
Definition: HGTD_Cluster.h:81
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
HGTD_Cluster::operator=
HGTD_Cluster & operator=(HGTD_Cluster &&)=default
HGTD_Cluster::~HGTD_Cluster
virtual ~HGTD_Cluster()=default
HGTD_Cluster::totList
virtual const std::vector< int > & totList() const
Definition: HGTD_Cluster.h:118
InDet::SiWidth
Definition: SiWidth.h:25
HGTD_Cluster::detectorElement
virtual const InDetDD::SolidStateDetectorElementBase * detectorElement() const override
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
Definition: HGTD_Cluster.h:104
HGTD_Cluster::m_time_over_threshold
std::vector< int > m_time_over_threshold
Definition: HGTD_Cluster.h:85
Trk::PrepRawDataType::HGTD_Cluster
@ HGTD_Cluster
HGTD_Cluster::time
virtual float time() const
Definition: HGTD_Cluster.h:114
Trk::PrepRawDataUndefinedVariable
class thrown in the event of an variable not being defined.
Definition: PrepRawData.h:59
Identifier
Definition: IdentifierFieldParser.cxx:14