35 {
36
39
40 std::unique_ptr<HGTD_ClusterCollection> cluster_collection =
41 std::make_unique<HGTD_ClusterCollection>(id_hash);
42
43 if(dataItemsPool){
45 }
46
47 cluster_collection->setIdentifier(identifier);
48 cluster_collection->reserve(rdo_coll.
size());
49
50 const InDetDD::HGTD_DetectorElement* element =
52
53 for (const auto *const rdo : rdo_coll) {
54
55 Identifier rdo_id = rdo->identify();
57
58
60 const InDetDD::HGTD_ModuleDesign& det_design = element->
design();
61 InDetDD::SiLocalPosition si_pos =
64 ATH_MSG_DEBUG(
"Local position: x=" << loc_pos.x() <<
" y=" << loc_pos.y());
65
66
67 std::vector<Identifier> rdo_list = {rdo_id};
68
69
70
71
72
73
74
75 int col_width = 1;
76 int row_width = 1;
77
78
79
80 double eta_width = 1.3;
81 double phi_width = 1.3;
82 ATH_MSG_DEBUG(
"eta_width=" << eta_width <<
" phi_width=" << phi_width);
83
86
87
88 float time_of_arrival = rdo->getTOA();
89
90
91
92 std::vector<int> time_over_threshold = {static_cast<int>(rdo->getTOT())};
93
95 if (dataItemsPool) {
96
97
99 } else {
100
102 }
104 rdo_id,
105 loc_pos,
106 std::move(rdo_list),
107 si_width,
108 element,
109 time_of_arrival,
110 std::move(time_over_threshold));
111
113 cluster_collection->size());
114
115 cluster_collection->push_back(cluster);
116 }
117 return cluster_collection;
118}
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
size_type size() const noexcept
Returns the number of elements in the collection.
const Identifier & identify() const
const IdentifierHash & identifierHash() const
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.
double xPhi() const
position along phi direction:
double xEta() const
position along eta direction:
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
Eigen::Matrix< double, 2, 1 > Vector2D
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts