ATLAS Offline Software
Loading...
Searching...
No Matches
TracccMeasurementConverterAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
5
8
12
13#include "TrkSurfaces/Surface.h"
14
15#include <stdexcept>
16
17namespace ActsTrk {
18
20{
21 ATH_MSG_DEBUG("Initializing.");
22
23 ATH_CHECK(m_hostMR.retrieve());
24 ATH_CHECK(m_copy.retrieve());
25
26 ATH_CHECK(m_inputMeasKey.initialize());
29
30 ATH_CHECK(m_outputPixelKey.initialize());
34 ATH_CHECK(m_outputStripKey.initialize());
35
37 ATH_CHECK(detStore()->retrieve(m_stripID, "SCT_ID"));
38 ATH_CHECK(detStore()->retrieve(m_pixelManager, "ITkPixel"));
39 ATH_CHECK(detStore()->retrieve(m_stripManager, "ITkStrip"));
40
42
43 ATH_MSG_DEBUG("Successfully initialized");
44 return StatusCode::SUCCESS;
45}
46
48std::pair<int, int> countPixelStrip(
49 const traccc::edm::measurement_collection::const_device& measurements) {
50 int n_pixels = 0;
51 int n_strips = 0;
52 for (std::size_t i = 0; i < measurements.size(); ++i) {
53 if (measurements.at(i).dimensions() == 2u) {
54 ++n_pixels;
55 } else {
56 ++n_strips;
57 }
58 }
59 return {n_pixels, n_strips};
60}
61
62// Allocate `n` clusters from the pool into a view container + aux store.
63template <typename ClusterT, typename AuxContainerT,
64 typename ContainerT = DataVector<ClusterT>>
65 std::pair<std::unique_ptr<ContainerT>, std::unique_ptr<AuxContainerT>>
66 makeOutputContainer(const EventContext& ctx, int n) {
67
69
70 auto cont = std::make_unique<ContainerT>(SG::VIEW_ELEMENTS,
72 auto aux = std::make_unique<AuxContainerT>();
73
74 pool.reserve(n);
75 cont->push_new(n, [&pool]() { return pool.nextElementPtr(); });
76 aux->resize(cont->size());
77 cont->setStore(aux.get());
78
79 return {std::move(cont), std::move(aux)};
80}
81
82template <typename MEAS>
83void fillStripCluster(const MEAS& meas, const Identifier& athenaId,
84 const SCT_ID* stripID,
85 const InDetDD::SCT_DetectorManager* stripManager,
86 xAOD::StripCluster& xaod_scl,
87 std::size_t combinedIndex) {
88 const IdentifierHash stripHash = stripID->wafer_hash(athenaId);
90 stripManager->getDetectorElement(stripHash);
91
92 Eigen::Matrix<float, 1, 1> localPosition = Eigen::Matrix<float, 1, 1>::Zero();
93 Eigen::Matrix<float, 1, 1> localCovariance =
94 Eigen::Matrix<float, 1, 1>::Zero();
95
96 if (pDE->isBarrel()) {
97 localPosition(0, 0) = meas.local_position()[0];
98 localCovariance(0, 0) = meas.local_variance()[0];
99 } else {
100 localPosition(0, 0) = meas.local_position()[1];
101 localCovariance(0, 0) = meas.local_variance()[1];
102 }
103
104 const Identifier hitId(athenaId.get_compact() + combinedIndex);
105
106 xaod_scl.setMeasurement<1>(stripHash, localPosition, localCovariance);
107 xaod_scl.setIdentifierHash(stripHash);
108 xaod_scl.setIdentifier(hitId.get_compact());
109}
110
111template <typename MEAS>
112void fillPixelCluster(const MEAS& meas, const Identifier& athenaId,
113 const PixelID* pixelID,
114 const InDetDD::PixelDetectorManager* pixelManager,
115 xAOD::PixelCluster& xaod_pcl,
116 std::size_t combinedIndex) {
117 const IdentifierHash pixHash = pixelID->wafer_hash(athenaId);
118 const InDetDD::SiDetectorElement* pDE =
119 pixelManager->getDetectorElement(pixHash);
120
121 const Amg::Vector2D localPos(meas.local_position()[0],
122 meas.local_position()[1]);
123 const Amg::Vector3D gp = pDE->globalPosition(localPos);
124
125 Eigen::Matrix<float, 2, 1> localPosition(localPos.x(), localPos.y());
126 Eigen::Matrix<float, 2, 2> localCovariance =
127 Eigen::Matrix<float, 2, 2>::Zero();
128 localCovariance(0, 0) = meas.local_variance()[0];
129 localCovariance(1, 1) = meas.local_variance()[1];
130
131 const Identifier hitId(athenaId.get_compact() + combinedIndex);
132
133 xaod_pcl.setIdentifierHash(pixHash);
134 xaod_pcl.setMeasurement<2>(pixHash, localPosition, localCovariance);
135 xaod_pcl.globalPosition() = Eigen::Matrix<float, 3, 1>(gp.x(), gp.y(), gp.z());
136 xaod_pcl.setIdentifier(hitId.get_compact());
137 xaod_pcl.setWidthInEta(meas.diameter());
138}
139
140StatusCode TracccMeasurementConverterAlg::execute(const EventContext& ctx) const
141{
142 // ---- Retrieve measurements (always needed) ----
143 auto measurements = SG::makeHandle(m_inputMeasKey, ctx);
144 ATH_CHECK(measurements.isValid());
145
146 auto copy = m_copy->copy(ctx);
147
148 traccc::edm::measurement_collection::buffer traccc_measurements_buffer{
149 copy->get_size(*measurements), m_hostMR->mr()};
150 copy->setup(traccc_measurements_buffer)->ignore();
151 (*copy)(*measurements, traccc_measurements_buffer)->wait();
152
153 traccc::edm::measurement_collection::const_device traccc_measurements(
154 traccc_measurements_buffer);
155
156 // ---- Optionally retrieve clusters and cells ----
157 std::optional<traccc::edm::silicon_cluster_collection::buffer> traccc_clusters_buffer;
158 std::optional<traccc::edm::silicon_cell_collection::buffer> traccc_cells_buffer;
159 std::optional<traccc::edm::silicon_cluster_collection::const_device> traccc_clusters;
160 std::optional<traccc::edm::silicon_cell_collection::const_device> traccc_cells;
161
162 // ---- Create mapping from traccc measurement index to pixel spacepoint index ----
163 // for pixel the index maps to cluster container or spacepoint containe
164 // because every pixel measurement makes one spacepoint
165 std::vector<unsigned int> measToPixelSP(traccc_measurements.size(),
166 std::numeric_limits<unsigned int>::max());
167
168 // ---- Create mapping from traccc measurement index to strip cluster index ----
169 // every strip measurement does not map to one strip spacepoint therefore this map
170 // is only valid between traccc measurements and strip clusters
171 // The reason why we have two maps is that during traccc track conversion
172 // we need to figure out if a track state is coming from pixel or strip
173 // since we don't want to copy/write to SG the measurements twice
174 // we can figure this out by creating two maps at conversion,
175 // then if the meas index is not in pixel map, has to be a strip meas
176 std::vector<unsigned int> measToStripCl(traccc_measurements.size(),
177 std::numeric_limits<unsigned int>::max());
179 ATH_MSG_DEBUG("Read " << traccc_measurements.size() << " traccc measurements from " << m_inputMeasKey.key());
180 ATH_MSG_DEBUG("Read traccc clusters from '"
181 << m_inputClusterKey.key()
182 << "' and will convert them with associated cells.");
183
185 m_inputClusterKey, ctx};
186 ATH_CHECK(clusters.isValid());
188 m_inputCellsKey, ctx};
189 ATH_CHECK(cells.isValid());
190
191 traccc_clusters_buffer.emplace(copy->get_sizes(*clusters), m_hostMR->mr());
192 copy->setup(*traccc_clusters_buffer)->wait();
193 (*copy)(*clusters, *traccc_clusters_buffer)->wait();
194
195 traccc_cells_buffer.emplace(copy->get_size(*cells), m_hostMR->mr());
196 copy->setup(*traccc_cells_buffer)->wait();
197 (*copy)(*cells, *traccc_cells_buffer)->wait();
198
199 traccc_clusters.emplace(*traccc_clusters_buffer);
200 ATH_MSG_DEBUG("Copied " << traccc_clusters->size() << " clusters.");
201
202 traccc_cells.emplace(*traccc_cells_buffer);
203 ATH_MSG_DEBUG("Copied " << traccc_cells->size() << " cells.");
204 } else {
205 ATH_MSG_DEBUG("Read traccc measurements from '"
206 << m_inputMeasKey.key()
207 << "' and will convert them without associated cells.");
208 }
209
210 // ---- Count pixel vs strip ----
211 const auto [n_pixels, n_strips] = countPixelStrip(traccc_measurements);
212
213 // ---- Create output containers ----
214 auto [pixel_cont, pixel_aux] =
216 auto [pixel_spacepoint_cont, pixel_spacepoint_aux] =
218 auto [strip_cont, strip_aux] =
220
221 // ---- Convert ----
222 auto pixItr = pixel_cont->begin();
223 auto spItr = pixel_spacepoint_cont->begin();
224 auto stripItr = strip_cont->begin();
225
226 std::size_t pixel_idx = 0;
227 std::size_t strip_idx = 0;
228
229 for (std::size_t i = 0; i < traccc_measurements.size(); ++i) {
230 const auto& meas = traccc_measurements.at(i);
231 const uint64_t detrayId = meas.surface_link().value();
232 auto athenaIdOpt = m_idMapping->detrayToAthena(detrayId);
233 if (!athenaIdOpt.has_value()) {
234 ATH_MSG_FATAL("No Athena module found for detray id " << detrayId << " — skipping measurement.");
235 return StatusCode::FAILURE;
236 }
237 const Identifier athenaId = *athenaIdOpt;
238
239 // ---- Pixel ----
240 if (meas.dimensions() == 2u) {
241 xAOD::PixelCluster* xaod_pcl = *pixItr;
242 xAOD::SpacePoint* xaod_sp = *spItr;
243 ++spItr;
244 ++pixItr;
245
246 // once seeding will come into play, we will need to keep track of the
247 // mapping between traccc and xAOD clusters. The reason for this is:
248 // 1. the traccc measurements are all in one collection, and the
249 // xAOD clusters are in two separate collections (pixel and strip)
250 // 2. the traccc spacepoints are not not created in the same order as the traccc measurements
251 measToPixelSP[i] = pixel_idx;
252
253 const IdentifierHash Pixel_ModuleHash =
254 m_pixelID->wafer_hash(athenaId);
255 const InDetDD::SiDetectorElement* pDE =
256 m_pixelManager->getDetectorElement(Pixel_ModuleHash);
257 const InDetDD::PixelModuleDesign* design(
258 dynamic_cast<const InDetDD::PixelModuleDesign*>(
259 &pDE->design()));
260 if(design == nullptr){
261 ATH_MSG_FATAL("Could not retrieve module design for pixel module hash " << Pixel_ModuleHash);
262 return StatusCode::FAILURE;
263 }
264
265 fillPixelCluster(meas, athenaId, m_pixelID, m_pixelManager, *xaod_pcl,
266 pixel_idx + strip_idx);
267
269 const auto cluster = traccc_clusters->at(meas.cluster_index());
270
271 std::vector<Identifier> rdoList;
272 rdoList.reserve(cluster.cell_indices().size());
273 int phiIndicesMax = -1;
274 int etaIndicesMax = -1;
275 int phiIndicesMin = std::numeric_limits<int>::max();
276 int etaIndicesMin = std::numeric_limits<int>::max();
277
278 for (const unsigned int cell_idx : cluster.cell_indices()) {
279 const auto& cell = traccc_cells->at(cell_idx);
280
281 int const phiIndex = cell.channel0();
282 int const etaIndex = cell.channel1();
283
284 phiIndicesMax = std::max(phiIndicesMax, phiIndex);
285 etaIndicesMax = std::max(etaIndicesMax, etaIndex);
286 phiIndicesMin = std::min(phiIndicesMin, phiIndex);
287 etaIndicesMin = std::min(etaIndicesMin, etaIndex);
288
289 Identifier const hit_id =
290 m_pixelID->pixel_id(athenaId, phiIndex, etaIndex);
291 rdoList.push_back(hit_id);
292 }
293
294 double const colWidth = static_cast<double>((etaIndicesMax - etaIndicesMin) + 1);
295 double const rowWidth = static_cast<double>((phiIndicesMax - phiIndicesMin) + 1);
296 double const etaWidth =
297 design->widthFromColumnRange(etaIndicesMin, etaIndicesMax);
298 double const phiWidth = design->widthFromRowRange(phiIndicesMin, phiIndicesMax);
299
300 InDet::SiWidth siWidth(Amg::Vector2D(rowWidth, colWidth),
301 Amg::Vector2D(phiWidth, etaWidth));
302
303 float width0 = phiWidth / rowWidth;
304 float width1 = etaWidth / colWidth;
305 Eigen::Matrix<float, 2, 2> localCovariance =
306 Eigen::Matrix<float, 2, 2>::Zero();
307 localCovariance(0, 0) = width0 * width0 / 12.0f;
308 localCovariance(1, 1) = width1 * width1 / 12.0f;
309
310 Eigen::Matrix<float, 2, 1> localPosition(meas.local_position()[0], meas.local_position()[1]);
311 xaod_pcl->setMeasurement<2>(Pixel_ModuleHash, localPosition,
312 localCovariance);
313
314 std::sort(rdoList.begin(), rdoList.end());
315 xaod_pcl->setIdentifier(rdoList.front().get_compact());
316 xaod_pcl->setRDOlist(std::move(rdoList));
317 xaod_pcl->setChannelsInPhiEta(siWidth.colRow()[0],
318 siWidth.colRow()[1]);
319 float width_phiRZ = static_cast<float>(siWidth.widthPhiRZ()[1]);
320 xaod_pcl->setWidthInEta(width_phiRZ);
321
322 const Amg::Transform3D& Tp = pDE->surface().transform();
323 float const cov_z =
324 6.f * localCovariance(1, 1) *
325 static_cast<float>(Tp(0, 2) * Tp(0, 2) + Tp(1, 2) * Tp(1, 2));
326 float const cov_r = 6.f * localCovariance(1, 1) *
327 static_cast<float>(Tp(2, 2) * Tp(2, 2));
328 xaod_sp->setSpacePoint(xaod_pcl->identifierHash(),
329 xaod_pcl->globalPosition(), cov_r, cov_z,
330 {xaod_pcl});
331
332 }
333 ++pixel_idx;
334
335 // ---- Strip ----
336 } else {
337 xAOD::StripCluster* xaod_scl = *stripItr;
338 ++stripItr;
339
340 // see comment above for pixel clusters, the same applies here
341 // when we eventually have strip spacepoints
342
343 const IdentifierHash Strip_ModuleHash =
344 m_stripID->wafer_hash(athenaId);
345 const InDetDD::SiDetectorElement* pDE =
346 m_stripManager->getDetectorElement(Strip_ModuleHash);
347
348 fillStripCluster(meas, athenaId, m_stripID, m_stripManager, *xaod_scl,
349 pixel_idx + strip_idx);
350
352 const auto cluster = traccc_clusters->at(meas.cluster_index());
353
354 std::vector<Identifier> rdoList;
355 rdoList.reserve(cluster.cell_indices().size());
356 int phiIndicesMax = -1;
357 int phiIndicesMin = std::numeric_limits<int>::max();
358
359 for (const unsigned int cell_idx : cluster.cell_indices()) {
360 const auto& cell = traccc_cells->at(cell_idx);
361
362 // (m_stripID->barrel_ec(athenaId) != 0) <=> endcap strip
363 // => we are working with polar coordinates (r,phi)
364 // and we have to swap the indices
365 int const phiIndex = (m_stripID->barrel_ec(athenaId) != 0)
366 ? cell.channel1()
367 : cell.channel0();
368
369 phiIndicesMax = std::max(phiIndicesMax, phiIndex);
370 phiIndicesMin = std::min(phiIndicesMin, phiIndex);
371 Identifier const hit_id =
372 m_stripID->strip_id(athenaId, int(phiIndex));
373 rdoList.push_back(hit_id);
374 }
375
376 std::sort(rdoList.begin(), rdoList.end());
377 const int firstStrip = m_stripID->strip(rdoList.front());
378 const int lastStrip = m_stripID->strip(rdoList.back());
379
380 const InDetDD::SCT_ModuleSideDesign* design;
381 if (pDE->isBarrel()) {
382 design = (static_cast<const InDetDD::SCT_ModuleSideDesign*>(
383 &pDE->design()));
384 } else {
385 design = (static_cast<const InDetDD::StripStereoAnnulusDesign*>(
386 &pDE->design()));
387 }
388
389 const int row = m_stripID->row(rdoList.front());
390 const int firstStrip1D = design->strip1Dim(firstStrip, row);
391 const int lastStrip1D = design->strip1Dim(lastStrip, row);
392 const InDetDD::SiCellId cell1(firstStrip1D);
393 const InDetDD::SiCellId cell2(lastStrip1D);
394 const InDetDD::SiLocalPosition firstStripPos(
395 pDE->rawLocalPositionOfCell(cell1));
396 const InDetDD::SiLocalPosition lastStripPos(
397 pDE->rawLocalPositionOfCell(cell2));
398 const InDetDD::SiLocalPosition centre(
399 (firstStripPos + lastStripPos) * 0.5);
400 const std::pair<InDetDD::SiLocalPosition, InDetDD::SiLocalPosition>
401 ends(design->endsOfStrip(centre));
402 const double stripLength(
403 std::abs(ends.first.xEta() - ends.second.xEta()));
404 const double width =
405 design->stripPitch() * (lastStrip - firstStrip + 1);
406
407 double const phiWidth = static_cast<double>((phiIndicesMax - phiIndicesMin) + 1);
408 InDet::SiWidth siWidth(Amg::Vector2D(phiWidth, 1),
409 Amg::Vector2D(width, stripLength));
410
411 xaod_scl->setIdentifier(rdoList.front().get_compact());
412 xaod_scl->setRDOlist(std::move(rdoList));
413 xaod_scl->setChannelsInPhi(siWidth.colRow()[0]);
414
415 }
416 measToStripCl[i] = strip_idx;
417 ++strip_idx;
418 }
419 }
420
421 ATH_MSG_DEBUG("Converted " << pixel_idx << " pixel clusters, " << strip_idx
422 << " strip clusters");
423
424 m_nMeas += traccc_measurements.size();
425 m_nPix += pixel_idx;
426 m_nStrip += strip_idx;
427
428 // ---- Write outputs ----
430 ctx};
431 ATH_CHECK(pixelHandle.record(std::move(pixel_cont), std::move(pixel_aux)));
432
434 ctx};
435 ATH_CHECK(spacePointHandle.record(std::move(pixel_spacepoint_cont), std::move(pixel_spacepoint_aux)));
436
438 ATH_CHECK(measToPixelSPHandle.record(std::make_unique<std::vector<unsigned int>>(std::move(measToPixelSP))));
439
441 ATH_CHECK(measToStripClHandle.record(std::make_unique<std::vector<unsigned int>>(std::move(measToStripCl))));
442
444 ctx};
445 ATH_CHECK(stripHandle.record(std::move(strip_cont), std::move(strip_aux)));
446
447 ATH_MSG_DEBUG("Wrote clusters to " << m_outputPixelKey.key() << " and " << m_outputStripKey.key());
448
449 return StatusCode::SUCCESS;
450}
451
453{
454 ATH_MSG_DEBUG("Finalizing.");
455
456 ATH_MSG_DEBUG("Received total number of measurements = " << m_nMeas
457 << ", of which pixel clusters = " << m_nPix
458 << " and strip clusters = " << m_nStrip);
459
460 ATH_MSG_DEBUG("Successfully finalized");
461 return StatusCode::SUCCESS;
462}
463
464} // namespace ActsTrk
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_FATAL(x,...)
static Double_t Tp(Double_t *t, Double_t *par)
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
const double width
Gaudi::Property< std::string > m_geoIdMappingObjectName
SG::ReadHandleKey< traccc::edm::measurement_collection::buffer > m_inputMeasKey
SG::WriteHandleKey< xAOD::StripClusterContainer > m_outputStripKey
SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToStripClKey
virtual StatusCode finalize() override
Function finalizing the algorthm.
SG::ReadHandleKey< traccc::edm::silicon_cell_collection::buffer > m_inputCellsKey
SG::ReadHandleKey< traccc::edm::silicon_cluster_collection::buffer > m_inputClusterKey
ToolHandle< AthDevice::IMemoryResourceTool > m_hostMR
std::atomic< int > m_nPix
The object counters for debug prints in finalize method {.
const PixelID * m_pixelID
Conversion helpers (to retrieve module design, hash, etc.) {.
SG::WriteHandleKey< std::vector< unsigned int > > m_outputMeasToPixelSPKey
SG::WriteHandleKey< xAOD::PixelClusterContainer > m_outputPixelKey
SG::WriteHandleKey< xAOD::SpacePointContainer > m_outputPixelSpacePointsKey
virtual StatusCode initialize() override
Function initializing the algorithm.
const InDetDD::SCT_DetectorManager * m_stripManager
const InDetDD::PixelDetectorManager * m_pixelManager
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
const ServiceHandle< StoreGateSvc > & detStore() const
a typed memory pool that saves time spent allocation small object.
Definition DataPool.h:63
Derived DataVector<T>.
Definition DataVector.h:795
This is a "hash" representation of an Identifier.
value_type get_compact() const
Get the compact id.
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Class used to describe the design of a module (diode segmentation and readout scheme).
double widthFromRowRange(const int rowMin, const int rowMax) const
Method to calculate phi width from a row range.
double widthFromColumnRange(const int colMin, const int colMax) const
Method to calculate eta width from a column range.
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
Base class for the SCT module side design, extended by the Forward and Barrel module design.
virtual double stripPitch(const SiLocalPosition &chargePos) const =0
give the strip pitch (dependence on position needed for forward)
virtual int strip1Dim(int strip, int row) const override
only relevant for SCT.
virtual std::pair< SiLocalPosition, SiLocalPosition > endsOfStrip(const SiLocalPosition &position) const override=0
give the ends of strips
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
Class to hold geometrical description of a silicon detector element.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
Class to represent a position in the natural frame of a silicon sensor, for Pixel and SCT For Pixel: ...
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
Trk::Surface & surface()
Element Surface.
const Amg::Vector2D & widthPhiRZ() const
Definition SiWidth.h:121
const Amg::Vector2D & colRow() const
Definition SiWidth.h:115
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:69
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition PixelID.h:378
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
Definition SCT_ID.h:487
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
void setChannelsInPhiEta(int channelsInPhi, int channelsInEta)
Sets the dimensions of the cluster in numbers of channels in phi (x) and eta (y) directions.
ConstVectorMap< 3 > globalPosition() const
Returns the global position of the pixel cluster.
void setRDOlist(const std::vector< Identifier > &rdolist)
Sets the list of identifiers of the channels building the cluster.
void setWidthInEta(float widthInEta)
Sets the width of the cluster in eta (y) direction.
void setSpacePoint(DetectorIDHashType idHash, const Eigen::Matrix< float, 3, 1 > &globPos, float cov_r, float cov_z, std::vector< const xAOD::UncalibratedMeasurement * > &&measurementIndexes)
void setRDOlist(const std::vector< Identifier > &rdolist)
Sets the list of identifiers of the channels building the cluster.
void setChannelsInPhi(int channelsInPhi)
Sets the dimensions of the cluster in numbers of channels in phi (x).
void setMeasurement(const DetectorIDHashType idHash, MeasVector< N > locPos, MeasMatrix< N > locCov)
Sets IdentifierHash, local position and local covariance of the measurement.
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash).
void setIdentifierHash(const DetectorIDHashType idHash)
Sets the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash).
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...
void fillPixelCluster(const MEAS &meas, const Identifier &athenaId, const PixelID *pixelID, const InDetDD::PixelDetectorManager *pixelManager, xAOD::PixelCluster &xaod_pcl, std::size_t combinedIndex)
void fillStripCluster(const MEAS &meas, const Identifier &athenaId, const SCT_ID *stripID, const InDetDD::SCT_DetectorManager *stripManager, xAOD::StripCluster &xaod_scl, std::size_t combinedIndex)
std::pair< std::unique_ptr< ContainerT >, std::unique_ptr< AuxContainerT > > makeOutputContainer(const EventContext &ctx, int n)
std::pair< int, int > countPixelStrip(const traccc::edm::measurement_collection::const_device &measurements)
Count the number of measurements 2D (pixel) vs 1D (strip).
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
@ ALWAYS_TRACK_INDICES
Always track indices, regardless of the setting of the ownership policy.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Framework include files.
Definition libname.h:15
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.