ATLAS Offline Software
HgtdTimedClusteringTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ACTSTRK_DATAPREPARATION_HGTD_TIMEDCLUSTERING_TOOL_H
6 #define ACTSTRK_DATAPREPARATION_HGTD_TIMEDCLUSTERING_TOOL_H
7 
10 
13 
14 #include "Acts/Definitions/Units.hpp"
15 
16 namespace Hgtd {
17  struct UnpackedHgtdRDO {
18  UnpackedHgtdRDO(int ncl, int row, int col, float toa, int tot, Identifier id)
19  : NCL(ncl), ROW(row), COL(col), TOA(toa), TOT(tot), ID(id)
20  {};
21 
22  int NCL{0};
23  int ROW{0};
24  int COL{0};
25  float TOA{0.f};
26  int TOT{0};
28  };
29 }
30 
31 namespace ActsTrk {
32 
34  public extends<AthAlgTool, IHGTDClusteringTool> {
35 public:
36  struct Cluster {
37  std::vector<Identifier> ids;
38  std::vector<int> tots;
39  std::vector<double> times;
40  };
41 
43  using CellCollection = std::vector<Cell>;
44  using ClusterCollection = std::vector<Cluster>;
45 
46 public:
47  HgtdTimedClusteringTool(const std::string& type,
48  const std::string& name,
49  const IInterface* parent);
50 
51  virtual StatusCode initialize() override;
52  virtual StatusCode clusterize(const EventContext& ctx,
53  const RawDataCollection& RDOs,
54  ClusterContainer& container) const override;
55 
56 private:
57  // N.B. the cluster is added to the container
58  StatusCode makeCluster(const EventContext& ctx,
59  const typename HgtdTimedClusteringTool::Cluster &cluster,
60  xAOD::HGTDCluster& xaodcluster) const;
61 
62 
63 private:
65  const HGTD_ID* m_hgtd_id{nullptr};
66 
67  Gaudi::Property<double> m_timeTollerance {this, "TimeTollerance", 0.035 * Acts::UnitConstants::ns};
68  Gaudi::Property<bool> m_addCorners {this, "AddCorners", true};
69 };
70 
71 }
72 
73 #endif
74 
ActsTrk::HgtdTimedClusteringTool::m_hgtd_id
const HGTD_ID * m_hgtd_id
Definition: HgtdTimedClusteringTool.h:65
query_example.row
row
Definition: query_example.py:24
ActsTrk::HgtdTimedClusteringTool::HgtdTimedClusteringTool
HgtdTimedClusteringTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: HgtdTimedClusteringTool.cxx:34
Hgtd::UnpackedHgtdRDO::UnpackedHgtdRDO
UnpackedHgtdRDO(int ncl, int row, int col, float toa, int tot, Identifier id)
Definition: HgtdTimedClusteringTool.h:18
ActsTrk::HgtdTimedClusteringTool::Cluster::tots
std::vector< int > tots
Definition: HgtdTimedClusteringTool.h:38
ActsTrk::HgtdTimedClusteringTool::clusterize
virtual StatusCode clusterize(const EventContext &ctx, const RawDataCollection &RDOs, ClusterContainer &container) const override
Definition: HgtdTimedClusteringTool.cxx:52
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
ActsTrk::HgtdTimedClusteringTool::Cluster
Definition: HgtdTimedClusteringTool.h:36
ActsTrk::HgtdTimedClusteringTool::m_addCorners
Gaudi::Property< bool > m_addCorners
Definition: HgtdTimedClusteringTool.h:68
ActsTrk::HgtdTimedClusteringTool::m_hgtd_det_mgr
const HGTD_DetectorManager * m_hgtd_det_mgr
Definition: HgtdTimedClusteringTool.h:64
xAOD::HGTDCluster_v1
Definition: HGTDCluster_v1.h:23
Hgtd
Definition: HgtdTimedClusteringTool.cxx:10
HGTD_DetectorManager.h
ActsTrk::HgtdTimedClusteringTool::initialize
virtual StatusCode initialize() override
Definition: HgtdTimedClusteringTool.cxx:40
Hgtd::UnpackedHgtdRDO::TOA
float TOA
Definition: HgtdTimedClusteringTool.h:25
IHGTDClusteringTool.h
ActsTrk::HgtdTimedClusteringTool::ClusterCollection
std::vector< Cluster > ClusterCollection
Definition: HgtdTimedClusteringTool.h:44
ActsTrk::HgtdTimedClusteringTool::CellCollection
std::vector< Cell > CellCollection
Definition: HgtdTimedClusteringTool.h:43
ActsTrk::HgtdTimedClusteringTool::m_timeTollerance
Gaudi::Property< double > m_timeTollerance
Definition: HgtdTimedClusteringTool.h:67
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ActsTrk::HgtdTimedClusteringTool::Cluster::ids
std::vector< Identifier > ids
Definition: HgtdTimedClusteringTool.h:37
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Hgtd::UnpackedHgtdRDO::COL
int COL
Definition: HgtdTimedClusteringTool.h:24
HGTD_ID
Definition: HGTD_ID.h:47
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
HGTD_ID.h
ActsTrk::HgtdTimedClusteringTool::makeCluster
StatusCode makeCluster(const EventContext &ctx, const typename HgtdTimedClusteringTool::Cluster &cluster, xAOD::HGTDCluster &xaodcluster) const
Definition: HgtdTimedClusteringTool.cxx:91
query_example.col
col
Definition: query_example.py:7
ActsTrk::HgtdTimedClusteringTool
Definition: HgtdTimedClusteringTool.h:34
Hgtd::UnpackedHgtdRDO::NCL
int NCL
Definition: HgtdTimedClusteringTool.h:22
Hgtd::UnpackedHgtdRDO
Definition: HgtdTimedClusteringTool.h:17
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ActsTrk::HgtdTimedClusteringTool::Cluster::times
std::vector< double > times
Definition: HgtdTimedClusteringTool.h:39
Hgtd::UnpackedHgtdRDO::ROW
int ROW
Definition: HgtdTimedClusteringTool.h:23
HGTD_DetectorManager
Definition: HGTD_DetectorManager.h:33
Hgtd::UnpackedHgtdRDO::TOT
int TOT
Definition: HgtdTimedClusteringTool.h:26
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:54
Identifier
Definition: IdentifierFieldParser.cxx:14