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 
35 class HGTD_Cluster final: public Trk::PrepRawData {
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 bool type(Trk::PrepRawDataType type) const override;
67 
68  // return time of arrival
69  virtual float time() const;
70 
71  // return the resolution of the time of arrival
72  virtual float timeResolution() const;
73 
74  // return time over threshold list
75  virtual const std::vector<int>& totList() const;
76 
77 private:
78  InDet::SiWidth m_width; // col, row, and width in mm
79 
81 
83 
84  float m_time{};
86  std::vector<int> m_time_over_threshold;
87 };
88 
90 // Inline methods:
91 
92 inline const InDet::SiWidth& HGTD_Cluster::width() const { return m_width; }
93 
95  if (!m_det_el) {
97  }
98  if (!m_glob_pos.isValid()) {
99  m_glob_pos.set (m_det_el->surface(identify()).localToGlobal(localPosition()));
100  }
101  return *m_glob_pos.ptr();
102 }
103 
106  return m_det_el;
107 }
108 
109 inline bool
111 {
113 }
114 
115 inline float HGTD_Cluster::time() const { return m_time; }
116 
117 inline float HGTD_Cluster::timeResolution() const { return m_time_resolution; }
118 
119 inline const std::vector<int>& HGTD_Cluster::totList() const {
120  return m_time_over_threshold;
121 }
122 
123 #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:29
HGTD_Cluster::m_width
InDet::SiWidth m_width
Definition: HGTD_Cluster.h:78
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:85
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:80
HGTD_Cluster::globalPosition
virtual const Amg::Vector3D & globalPosition() const
Definition: HGTD_Cluster.h:94
HGTD_Cluster::width
virtual const InDet::SiWidth & width() const
Definition: HGTD_Cluster.h:92
PrepRawData.h
HGTD_Cluster
Definition: HGTD_Cluster.h:35
HGTD_Cluster::m_time
float m_time
Definition: HGTD_Cluster.h:84
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:117
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
HGTD_Cluster::type
virtual bool type(Trk::PrepRawDataType type) const override
Interface method checking the type.
Definition: HGTD_Cluster.h:110
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:82
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
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
HGTD_Cluster::totList
virtual const std::vector< int > & totList() const
Definition: HGTD_Cluster.h:119
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:105
HGTD_Cluster::m_time_over_threshold
std::vector< int > m_time_over_threshold
Definition: HGTD_Cluster.h:86
Trk::PrepRawDataType::HGTD_Cluster
@ HGTD_Cluster
HGTD_Cluster::time
virtual float time() const
Definition: HGTD_Cluster.h:115
Trk::PrepRawDataUndefinedVariable
class thrown in the event of an variable not being defined.
Definition: PrepRawData.h:59