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
13
14#include "TrkSurfaces/Surface.h"
15
16#include <stdexcept>
17
18namespace ActsTrk {
19
21{
22 ATH_MSG_DEBUG("Initializing.");
23
24 ATH_CHECK(m_hostMR.retrieve());
25 ATH_CHECK(m_copy.retrieve());
26
27 ATH_CHECK(m_inputMeasKey.initialize());
30
31 ATH_CHECK(m_outputPixelKey.initialize());
35 ATH_CHECK(m_outputStripKey.initialize());
36
38 ATH_CHECK(detStore()->retrieve(m_stripID, "SCT_ID"));
39 ATH_CHECK(detStore()->retrieve(m_pixelManager, "ITkPixel"));
40 ATH_CHECK(detStore()->retrieve(m_stripManager, "ITkStrip"));
41
43
44 ATH_MSG_DEBUG("Successfully initialized");
45 return StatusCode::SUCCESS;
46}
47
49std::pair<int, int> countPixelStrip(
50 const traccc::edm::measurement_collection::const_device& measurements) {
51 int n_pixels = 0;
52 int n_strips = 0;
53 for (std::size_t i = 0; i < measurements.size(); ++i) {
54 if (measurements.at(i).dimensions() == 2u) {
55 ++n_pixels;
56 } else {
57 ++n_strips;
58 }
59 }
60 return {n_pixels, n_strips};
61}
62
63// Allocate `n` clusters from the pool into a view container + aux store.
64template <typename ClusterT, typename AuxContainerT,
65 typename ContainerT = DataVector<ClusterT>>
66 std::pair<std::unique_ptr<ContainerT>, std::unique_ptr<AuxContainerT>>
67 makeOutputContainer(const EventContext& ctx, int n) {
68
70
71 auto cont = std::make_unique<ContainerT>(SG::VIEW_ELEMENTS,
73 auto aux = std::make_unique<AuxContainerT>();
74
75 pool.reserve(n);
76 cont->push_new(n, [&pool]() { return pool.nextElementPtr(); });
77 aux->resize(cont->size());
78 cont->setStore(aux.get());
79
80 return {std::move(cont), std::move(aux)};
81}
82
83template <typename MEAS>
84void fillStripCluster(const MEAS& meas, const Identifier& athenaId,
85 const SCT_ID* stripID,
86 const InDetDD::SCT_DetectorManager* stripManager,
87 xAOD::StripCluster& xaod_scl,
88 std::size_t combinedIndex) {
89 const IdentifierHash stripHash = stripID->wafer_hash(athenaId);
91 stripManager->getDetectorElement(stripHash);
92
93 Eigen::Matrix<float, 1, 1> localPosition = Eigen::Matrix<float, 1, 1>::Zero();
94 Eigen::Matrix<float, 1, 1> localCovariance =
95 Eigen::Matrix<float, 1, 1>::Zero();
96
97 if (pDE->isBarrel()) {
98 localPosition(0, 0) = meas.local_position()[0];
99 localCovariance(0, 0) = meas.local_variance()[0];
100 } else {
101 localPosition(0, 0) = meas.local_position()[1];
102 localCovariance(0, 0) = meas.local_variance()[1];
103 }
104
105 const Identifier hitId(athenaId.get_compact() + combinedIndex);
106
107 xaod_scl.setMeasurement<1>(stripHash, localPosition, localCovariance);
108 xaod_scl.setIdentifierHash(stripHash);
109 xaod_scl.setIdentifier(hitId.get_compact());
110}
111
112template <typename MEAS>
113void fillPixelCluster(const MEAS& meas, const Identifier& athenaId,
114 const PixelID* pixelID,
115 const InDetDD::PixelDetectorManager* pixelManager,
116 xAOD::PixelCluster& xaod_pcl,
117 std::size_t combinedIndex) {
118 const IdentifierHash pixHash = pixelID->wafer_hash(athenaId);
119 const InDetDD::SiDetectorElement* pDE =
120 pixelManager->getDetectorElement(pixHash);
121
122 const Amg::Vector2D localPos(meas.local_position()[0],
123 meas.local_position()[1]);
124 const Amg::Vector3D gp = pDE->globalPosition(localPos);
125
126 Eigen::Matrix<float, 2, 1> localPosition(localPos.x(), localPos.y());
127 Eigen::Matrix<float, 2, 2> localCovariance =
128 Eigen::Matrix<float, 2, 2>::Zero();
129 localCovariance(0, 0) = meas.local_variance()[0];
130 localCovariance(1, 1) = meas.local_variance()[1];
131
132 const Identifier hitId(athenaId.get_compact() + combinedIndex);
133
134 xaod_pcl.setIdentifierHash(pixHash);
135 xaod_pcl.setMeasurement<2>(pixHash, localPosition, localCovariance);
136 xaod_pcl.globalPosition() = Eigen::Matrix<float, 3, 1>(gp.x(), gp.y(), gp.z());
137 xaod_pcl.setIdentifier(hitId.get_compact());
138 xaod_pcl.setWidthInEta(meas.diameter());
139}
140
141StatusCode TracccMeasurementConverterAlg::execute(const EventContext& ctx) const
142{
143 // ---- Retrieve measurements (always needed) ----
144 auto measurements = SG::makeHandle(m_inputMeasKey, ctx);
145 ATH_CHECK(measurements.isValid());
146
147 auto copy = m_copy->copy(ctx);
148
149 traccc::edm::measurement_collection::buffer traccc_measurements_buffer{
150 copy->get_size(*measurements), m_hostMR->mr()};
151 copy->setup(traccc_measurements_buffer)->ignore();
152 (*copy)(*measurements, traccc_measurements_buffer)->wait();
153
154 traccc::edm::measurement_collection::const_device traccc_measurements(
155 traccc_measurements_buffer);
156
157 // ---- Optionally retrieve clusters and cells ----
158 std::optional<traccc::edm::silicon_cluster_collection::buffer> traccc_clusters_buffer;
159 std::optional<traccc::edm::silicon_cell_collection::buffer> traccc_cells_buffer;
160 std::optional<traccc::edm::silicon_cluster_collection::const_device> traccc_clusters;
161 std::optional<traccc::edm::silicon_cell_collection::const_device> traccc_cells;
162
163 // ---- Create mapping from traccc measurement index to pixel spacepoint index ----
164 // for pixel the index maps to cluster container or spacepoint containe
165 // because every pixel measurement makes one spacepoint
166 std::vector<unsigned int> measToPixelSP(traccc_measurements.size(),
167 std::numeric_limits<unsigned int>::max());
168
169 // ---- Create mapping from traccc measurement index to strip cluster index ----
170 // every strip measurement does not map to one strip spacepoint therefore this map
171 // is only valid between traccc measurements and strip clusters
172 // The reason why we have two maps is that during traccc track conversion
173 // we need to figure out if a track state is coming from pixel or strip
174 // since we don't want to copy/write to SG the measurements twice
175 // we can figure this out by creating two maps at conversion,
176 // then if the meas index is not in pixel map, has to be a strip meas
177 std::vector<unsigned int> measToStripCl(traccc_measurements.size(),
178 std::numeric_limits<unsigned int>::max());
180 ATH_MSG_DEBUG("Read " << traccc_measurements.size() << " traccc measurements from " << m_inputMeasKey.key());
181 ATH_MSG_DEBUG("Read traccc clusters from '"
182 << m_inputClusterKey.key()
183 << "' and will convert them with associated cells.");
184
186 m_inputClusterKey, ctx};
187 ATH_CHECK(clusters.isValid());
189 m_inputCellsKey, ctx};
190 ATH_CHECK(cells.isValid());
191
192 traccc_clusters_buffer.emplace(copy->get_sizes(*clusters), m_hostMR->mr());
193 copy->setup(*traccc_clusters_buffer)->wait();
194 (*copy)(*clusters, *traccc_clusters_buffer)->wait();
195
196 traccc_cells_buffer.emplace(copy->get_size(*cells), m_hostMR->mr());
197 copy->setup(*traccc_cells_buffer)->wait();
198 (*copy)(*cells, *traccc_cells_buffer)->wait();
199
200 traccc_clusters.emplace(*traccc_clusters_buffer);
201 ATH_MSG_DEBUG("Copied " << traccc_clusters->size() << " clusters.");
202
203 traccc_cells.emplace(*traccc_cells_buffer);
204 ATH_MSG_DEBUG("Copied " << traccc_cells->size() << " cells.");
205 } else {
206 ATH_MSG_DEBUG("Read traccc measurements from '"
207 << m_inputMeasKey.key()
208 << "' and will convert them without associated cells.");
209 }
210
211 // ---- Count pixel vs strip ----
212 const auto [n_pixels, n_strips] = countPixelStrip(traccc_measurements);
213
214 // ---- Create output containers ----
215 auto [pixel_cont, pixel_aux] =
217 auto [pixel_spacepoint_cont, pixel_spacepoint_aux] =
219 auto [strip_cont, strip_aux] =
221
222 // ---- Convert ----
223 auto pixItr = pixel_cont->begin();
224 auto spItr = pixel_spacepoint_cont->begin();
225 auto stripItr = strip_cont->begin();
226
227 std::size_t pixel_idx = 0;
228 std::size_t strip_idx = 0;
229
230 for (std::size_t i = 0; i < traccc_measurements.size(); ++i) {
231 const auto& meas = traccc_measurements.at(i);
232 const uint64_t detrayId = meas.surface_link().value();
233 auto athenaIdOpt = m_idMapping->detrayToAthena(detrayId);
234 if (!athenaIdOpt.has_value()) {
235 ATH_MSG_FATAL("No Athena module found for detray id " << detrayId << " — skipping measurement.");
236 return StatusCode::FAILURE;
237 }
238 const Identifier athenaId = *athenaIdOpt;
239
240 // ---- Pixel ----
241 if (meas.dimensions() == 2u) {
242 xAOD::PixelCluster* xaod_pcl = *pixItr;
243 xAOD::SpacePoint* xaod_sp = *spItr;
244 ++spItr;
245 ++pixItr;
246
247 // once seeding will come into play, we will need to keep track of the
248 // mapping between traccc and xAOD clusters. The reason for this is:
249 // 1. the traccc measurements are all in one collection, and the
250 // xAOD clusters are in two separate collections (pixel and strip)
251 // 2. the traccc spacepoints are not not created in the same order as the traccc measurements
252 measToPixelSP[i] = pixel_idx;
253
254 const IdentifierHash Pixel_ModuleHash =
255 m_pixelID->wafer_hash(athenaId);
256 const InDetDD::SiDetectorElement* pDE =
257 m_pixelManager->getDetectorElement(Pixel_ModuleHash);
258 const InDetDD::PixelModuleDesign* design(
259 dynamic_cast<const InDetDD::PixelModuleDesign*>(
260 &pDE->design()));
261 if(design == nullptr){
262 ATH_MSG_FATAL("Could not retrieve module design for pixel module hash " << Pixel_ModuleHash);
263 return StatusCode::FAILURE;
264 }
265
266 fillPixelCluster(meas, athenaId, m_pixelID, m_pixelManager, *xaod_pcl,
267 pixel_idx + strip_idx);
268
270 const auto cluster = traccc_clusters->at(meas.cluster_index());
271
272 std::vector<Identifier> rdoList;
273 rdoList.reserve(cluster.cell_indices().size());
274 int phiIndicesMax = -1;
275 int etaIndicesMax = -1;
276 int phiIndicesMin = std::numeric_limits<int>::max();
277 int etaIndicesMin = std::numeric_limits<int>::max();
278
279 for (const unsigned int cell_idx : cluster.cell_indices()) {
280 const auto& cell = traccc_cells->at(cell_idx);
281
282 int const phiIndex = cell.channel0();
283 int const etaIndex = cell.channel1();
284
285 phiIndicesMax = std::max(phiIndicesMax, phiIndex);
286 etaIndicesMax = std::max(etaIndicesMax, etaIndex);
287 phiIndicesMin = std::min(phiIndicesMin, phiIndex);
288 etaIndicesMin = std::min(etaIndicesMin, etaIndex);
289
290 Identifier const hit_id =
291 m_pixelID->pixel_id(athenaId, phiIndex, etaIndex);
292 rdoList.push_back(hit_id);
293 }
294
295 double const colWidth = static_cast<double>((etaIndicesMax - etaIndicesMin) + 1);
296 double const rowWidth = static_cast<double>((phiIndicesMax - phiIndicesMin) + 1);
297 double const etaWidth =
298 design->widthFromColumnRange(etaIndicesMin, etaIndicesMax);
299 double const phiWidth = design->widthFromRowRange(phiIndicesMin, phiIndicesMax);
300
301 InDet::SiWidth siWidth(Amg::Vector2D(rowWidth, colWidth),
302 Amg::Vector2D(phiWidth, etaWidth));
303
304 float width0 = phiWidth / rowWidth;
305 float width1 = etaWidth / colWidth;
306 Eigen::Matrix<float, 2, 2> localCovariance =
307 Eigen::Matrix<float, 2, 2>::Zero();
308 localCovariance(0, 0) = width0 * width0 / 12.0f;
309 localCovariance(1, 1) = width1 * width1 / 12.0f;
310
311 Eigen::Matrix<float, 2, 1> localPosition(meas.local_position()[0], meas.local_position()[1]);
312 xaod_pcl->setMeasurement<2>(Pixel_ModuleHash, localPosition,
313 localCovariance);
314
315 std::sort(rdoList.begin(), rdoList.end());
316 xaod_pcl->setIdentifier(rdoList.front().get_compact());
317 xaod_pcl->setRDOlist(std::move(rdoList));
318 xaod_pcl->setChannelsInPhiEta(siWidth.colRow()[0],
319 siWidth.colRow()[1]);
320 float width_phiRZ = static_cast<float>(siWidth.widthPhiRZ()[1]);
321 xaod_pcl->setWidthInEta(width_phiRZ);
322
323 }
324
325 // Using width to scale the cluster covariance for space points.
326 // Read width back from the cluster so that this works with and without cells
327 // only works if 'diameter' strategy is set to channel1 in traccc
328 const float width_phiRZ = xaod_pcl->widthInEta();
329 float covTerm = width_phiRZ * width_phiRZ * (1/12.0f);
330
331 const float localVarEta = xaod_pcl->localCovariance<2>()(1, 1);
332 if( covTerm < localVarEta )
333 covTerm = localVarEta;
334
335 const Amg::Transform3D& Tp = pDE->surface().transform();
336 float const cov_z =
337 6.f * covTerm *
338 static_cast<float>(Tp(0, 2) * Tp(0, 2) + Tp(1, 2) * Tp(1, 2));
339 float const cov_r = 6.f * covTerm *
340 static_cast<float>(Tp(2, 2) * Tp(2, 2));
341 xaod_sp->setSpacePoint(xaod_pcl->identifierHash(),
342 xaod_pcl->globalPosition(), cov_r, cov_z,
343 {xaod_pcl});
344 ++pixel_idx;
345
346 // ---- Strip ----
347 } else {
348 xAOD::StripCluster* xaod_scl = *stripItr;
349 ++stripItr;
350
351 // see comment above for pixel clusters, the same applies here
352 // when we eventually have strip spacepoints
353
354 const IdentifierHash Strip_ModuleHash =
355 m_stripID->wafer_hash(athenaId);
356 const InDetDD::SiDetectorElement* pDE =
357 m_stripManager->getDetectorElement(Strip_ModuleHash);
358
359 fillStripCluster(meas, athenaId, m_stripID, m_stripManager, *xaod_scl,
360 pixel_idx + strip_idx);
361
363 const auto cluster = traccc_clusters->at(meas.cluster_index());
364
365 std::vector<Identifier> rdoList;
366 rdoList.reserve(cluster.cell_indices().size());
367 int phiIndicesMax = -1;
368 int phiIndicesMin = std::numeric_limits<int>::max();
369
370 for (const unsigned int cell_idx : cluster.cell_indices()) {
371 const auto& cell = traccc_cells->at(cell_idx);
372
373 // (m_stripID->barrel_ec(athenaId) != 0) <=> endcap strip
374 // => we are working with polar coordinates (r,phi)
375 // and we have to swap the indices
376 int const phiIndex = (m_stripID->barrel_ec(athenaId) != 0)
377 ? cell.channel1()
378 : cell.channel0();
379
380 phiIndicesMax = std::max(phiIndicesMax, phiIndex);
381 phiIndicesMin = std::min(phiIndicesMin, phiIndex);
382 Identifier const hit_id =
383 m_stripID->strip_id(athenaId, int(phiIndex));
384 rdoList.push_back(hit_id);
385 }
386
387 std::sort(rdoList.begin(), rdoList.end());
388 const int firstStrip = m_stripID->strip(rdoList.front());
389 const int lastStrip = m_stripID->strip(rdoList.back());
390
391 const InDetDD::SCT_ModuleSideDesign* design;
392 if (pDE->isBarrel()) {
393 design = (static_cast<const InDetDD::SCT_ModuleSideDesign*>(
394 &pDE->design()));
395 } else {
396 design = (static_cast<const InDetDD::StripStereoAnnulusDesign*>(
397 &pDE->design()));
398 }
399
400 const int row = m_stripID->row(rdoList.front());
401 const int firstStrip1D = design->strip1Dim(firstStrip, row);
402 const int lastStrip1D = design->strip1Dim(lastStrip, row);
403 const InDetDD::SiCellId cell1(firstStrip1D);
404 const InDetDD::SiCellId cell2(lastStrip1D);
405 const InDetDD::SiLocalPosition firstStripPos(
406 pDE->rawLocalPositionOfCell(cell1));
407 const InDetDD::SiLocalPosition lastStripPos(
408 pDE->rawLocalPositionOfCell(cell2));
409 const InDetDD::SiLocalPosition centre(
410 (firstStripPos + lastStripPos) * 0.5);
411 const std::pair<InDetDD::SiLocalPosition, InDetDD::SiLocalPosition>
412 ends(design->endsOfStrip(centre));
413 const double stripLength(
414 std::abs(ends.first.xEta() - ends.second.xEta()));
415 const double width =
416 design->stripPitch() * (lastStrip - firstStrip + 1);
417
418 double const phiWidth = static_cast<double>((phiIndicesMax - phiIndicesMin) + 1);
419 InDet::SiWidth siWidth(Amg::Vector2D(phiWidth, 1),
420 Amg::Vector2D(width, stripLength));
421
422 xaod_scl->setIdentifier(rdoList.front().get_compact());
423 xaod_scl->setRDOlist(std::move(rdoList));
424 xaod_scl->setChannelsInPhi(siWidth.colRow()[0]);
425
426 }
427 measToStripCl[i] = strip_idx;
428 ++strip_idx;
429 }
430 }
431
432 ATH_MSG_DEBUG("Converted " << pixel_idx << " pixel clusters, " << strip_idx
433 << " strip clusters");
434
435 m_nMeas += traccc_measurements.size();
436 m_nPix += pixel_idx;
437 m_nStrip += strip_idx;
438
439 // ---- Write outputs ----
441 ctx};
442 ATH_CHECK(pixelHandle.record(std::move(pixel_cont), std::move(pixel_aux)));
443
445 ctx};
446 ATH_CHECK(spacePointHandle.record(std::move(pixel_spacepoint_cont), std::move(pixel_spacepoint_aux)));
447
449 ATH_CHECK(measToPixelSPHandle.record(std::make_unique<std::vector<unsigned int>>(std::move(measToPixelSP))));
450
452 ATH_CHECK(measToStripClHandle.record(std::make_unique<std::vector<unsigned int>>(std::move(measToStripCl))));
453
455 ctx};
456 ATH_CHECK(stripHandle.record(std::move(strip_cont), std::move(strip_aux)));
457
458 ATH_MSG_DEBUG("Wrote clusters to " << m_outputPixelKey.key() << " and " << m_outputStripKey.key());
459
460 return StatusCode::SUCCESS;
461}
462
464{
465 ATH_MSG_DEBUG("Finalizing.");
466
467 ATH_MSG_INFO("Received total number of measurements = " << m_nMeas
468 << ", of which pixel clusters = " << m_nPix
469 << " and strip clusters = " << m_nStrip);
470
471 ATH_MSG_DEBUG("Successfully finalized");
472 return StatusCode::SUCCESS;
473}
474
475} // namespace ActsTrk
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_INFO(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:818
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.
float widthInEta() const
Returns the width of the cluster in phi (x) and eta (y) directions, respectively.
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.
ConstMatrixMap< N > localCovariance() const
Returns the 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.
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.