7#include "Acts/Clusterization/TimedClusterization.hpp"
23 cl.ids.push_back(cell.ID);
24 cl.tots.push_back(cell.TOT);
25 cl.times.push_back(cell.TOA);
32 const std::string& name,
33 const IInterface* parent)
34 : base_class(
type, name, parent)
47 return StatusCode::SUCCESS;
51 const RawDataCollection& RDOs,
56 cells.reserve(RDOs.size());
59 cells.emplace_back(-1,
67 ATH_MSG_DEBUG(
"Clustering on " << RDOs.size() <<
" RDOs using time information");
68 Acts::Ccl::ClusteringData
data;
70 Acts::Ccl::createClusters<CellCollection, ClusterCollection, 2>
72 ATH_MSG_DEBUG(
" \\_ " << clusters.size() <<
" clusters reconstructed");
75 std::size_t previousSizeContainer =
container.size();
76 std::vector<xAOD::HGTDCluster*> toAdd;
77 toAdd.reserve(clusters.size());
78 for (std::size_t i(0), n(clusters.size()); i < n; ++i)
82 for (std::size_t i(0); i<clusters.size(); ++i) {
87 return StatusCode::SUCCESS;
94 if (cluster.
ids.empty())
return StatusCode::SUCCESS;
99 for (
size_t i = 0; i < cluster.
ids.size(); i++) {
107 tot_time += cluster.
times[i];
110 pos_acc /= cluster.
ids.size();
111 tot_time /= cluster.
ids.size();
114 Eigen::Matrix<float, 3, 1> loc_pos(pos_acc.
xPhi(), pos_acc.
xEta(), tot_time);
115 Eigen::Matrix<float, 3, 3> cov_matrix= Eigen::Matrix<float, 3, 3>::Zero();
117 constexpr float xWidth = 1.3;
118 constexpr float yWidth = 1.3;
119 cov_matrix(0,0) = xWidth * xWidth / 12 / cluster.
ids.size();
120 cov_matrix(1,1) = yWidth * yWidth / 12 / cluster.
ids.size();
121 constexpr float time_of_arrival_err = 0.035;
122 cov_matrix(2,2) = time_of_arrival_err * time_of_arrival_err / cluster.
ids.size();
132 return StatusCode::SUCCESS;
141 cells.reserve(RDOs.
size());
148 ATH_MSG_DEBUG(
"Recovered Time of Arrival: " << time_of_flight);
150 cells.emplace_back(-1,
158 ATH_MSG_DEBUG(
"Clustering on " << RDOs.
size() <<
" RDOs using time information");
159 Acts::Ccl::ClusteringData
data;
161 Acts::Ccl::createClusters<CellCollection, ClusterCollection, 2>
163 ATH_MSG_DEBUG(
" \\_ " << clusters.size() <<
" clusters reconstructed");
166 std::size_t previousSizeContainer =
container.size();
167 std::vector<xAOD::HGTDCluster*> toAdd;
168 toAdd.reserve(clusters.size());
169 for (std::size_t i(0), n(clusters.size()); i < n; ++i)
173 for (std::size_t i(0); i<clusters.size(); ++i) {
178 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
char data[hepevt_bytes_allocation_ATLAS]
size_type size() const noexcept
Returns the number of elements in the collection.
This is a "hash" representation of an Identifier.
Class to hold geometrical description of an HGTD detector element.
SiCellId cellIdFromIdentifier(const Identifier &identifier) const override final
SiCellId from Identifier.
const HGTD_ModuleDesign & design() const override final
access to the local description:
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const
readout or diode id -> position.
Identifier for the strip or pixel cell.
Class to represent a position in the natural frame of a silicon sensor, for Pixel and SCT For Pixel: ...
double xPhi() const
position along phi direction:
double xEta() const
position along eta direction:
void setToTlist(const std::vector< int > &tots)
Sets the list of ToT of the channels building the cluster.
void setRDOlist(const std::vector< Identifier > &rdolist)
Sets the list of identifiers of the channels building the cluster.
void setMeasurement(const DetectorIDHashType idHash, MeasVector< N > locPos, MeasMatrix< N > locCov)
Sets IdentifierHash, local position and local covariance of the measurement.
void setIdentifier(const DetectorIdentType measId)
Sets the full Identifier of the measurement.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
static int getCellColumn(const Hgtd::UnpackedHgtdRDO &cell)
static int getCellRow(const Hgtd::UnpackedHgtdRDO &cell)
static void clusterAddCell(ActsTrk::HgtdTimedClusteringTool::Cluster &cl, const ActsTrk::HgtdTimedClusteringTool::Cell &cell)
static double getCellTime(const Hgtd::UnpackedHgtdRDO &cell)
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.