ATLAS Offline Software
Loading...
Searching...
No Matches
PixelClusteringTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Tell clang not to allow spurious FPEs.
8
10
15#include <TrkSurfaces/Surface.h>
17
19
20#include <algorithm>
21#include <array>
22#include <cassert>
23#include <cstdint>
24#include <limits>
25#include <optional>
26#include <stdexcept>
27
28using CLHEP::micrometer;
29
30namespace {
32 template <typename T1, typename T2>
33 T1 check_integer_cast(T2 a) {
34 assert( std::in_range<T1>(a) );
35 return static_cast<T1>(a);
36 }
37
38 inline bool isFEI3(const InDetDD::PixelModuleDesign& design) {
40 }
41
42 template <typename IndexType>
43 inline std::optional<std::array<std::int16_t,2> >
44 getGangedCoordinates(const std::array<IndexType,2> &coordinates,
45 const InDetDD::PixelModuleDesign& design)
46 {
47 // If the pixel is ganged, returns a new identifier for it
48 InDetDD::SiCellId cellId(check_integer_cast<int>(coordinates[0]),check_integer_cast<int>(coordinates[1]));
49 InDetDD::SiReadoutCellId readoutId = design.readoutIdOfCell(cellId);
50 if ( design.numberOfConnectedCells( readoutId ) > 1 ) {
51 InDetDD::SiCellId gangedCellId = design.connectedCell( readoutId, 1 );
52 return std::array<std::int16_t,2>{ static_cast<std::int16_t>(gangedCellId.phiIndex()),
53 static_cast<std::int16_t>(gangedCellId.etaIndex())};
54 }
55 return std::nullopt;
56 }
57
58 // PixelRDO_Container
59 std::array<std::int16_t,2>
60 makeCellCoordinates(const std::array<InDetDD::PixelDiodeTree::CellIndexType,2> &diode_idx) {
61 return std::array<std::int16_t,2>{
62 check_integer_cast<std::int16_t>(diode_idx[0]),
63 check_integer_cast<std::int16_t>(diode_idx[1])};
64 }
65 // PixelRDO_Container
66 const std::array<InDetDD::PixelDiodeTree::CellIndexType,2> &
67 makeDiodeIdx(const std::array<InDetDD::PixelDiodeTree::CellIndexType,2> &diode_idx) {
68 return diode_idx;
69 }
70
71 // PhaseIIPixelRawDataContainer
72 std::array<std::int16_t,2>
73 makeCellCoordinates(const std::array<std::int16_t,2> &diode_idx) {
74 return diode_idx;
75 }
76 // PhaseIIPixelRawDataContainer
77 std::array<InDetDD::PixelDiodeTree::CellIndexType,2>
78 makeDiodeIdx(const std::array<std::int16_t,2> &diode_idx) {
79 return std::array<InDetDD::PixelDiodeTree::CellIndexType,2>{
80 check_integer_cast<InDetDD::PixelDiodeTree::CellIndexType>(diode_idx[0]),
81 check_integer_cast<InDetDD::PixelDiodeTree::CellIndexType>(diode_idx[1])};
82 }
83
85
86namespace ActsTrk {
87
88template <typename T_RDOContainer>
90{
91 ATH_MSG_DEBUG("Initializing " << this->name() << " ...");
92
97
98 ATH_CHECK(this->m_pixelLorentzAngleTool.retrieve());
99
100 ATH_CHECK(this->m_chargeDataKey.initialize(not m_chargeDataKey.empty()));
101
102 ATH_MSG_INFO(" Charge Data Key:" << m_chargeDataKey);
103 ATH_MSG_INFO(" ID Helper Name:" << m_idHelperName);
104
105 ATH_CHECK( this->detStore()->retrieve(m_pixelID, m_idHelperName) );
106
107 ATH_MSG_DEBUG(this->name() << " successfully initialized");
108 return StatusCode::SUCCESS;
109}
110
111template <typename T_RDOContainer>
113 const std::string& type, const std::string& name, const IInterface* parent)
114 : base_class(type,name,parent)
115{}
116
117
118template <typename T_RDOContainer>
119template <bool GANGED>
120std::pair<unsigned int, unsigned int>
122 const std::vector<IdentifierHash> &listOfIds,
123 const InDetDD::SiDetectorElementCollection &detector_elements) const {
125 const InDetDD::SiDetectorElementCollection &detector_elements,
126 const PixelID* pixelID)
127 -> unsigned int
128 {
129 unsigned int n_hits = RDOs.size();
130 if constexpr(GANGED) {
131 assert(detector_elements.at(RDOs.identifyHash()));
132 assert(dynamic_cast<const InDetDD::PixelModuleDesign *>(&detector_elements.at(RDOs.identifyHash())->design()) != nullptr);
133 const InDetDD::PixelModuleDesign &design = static_cast<const InDetDD::PixelModuleDesign &>(detector_elements.at(RDOs.identifyHash())->design());
134 if (isFEI3(design)) {
135 for(RDOAdapter<T_RDOContainer> rdo : RDOs) {
136 if (rdo.isGanged(design, *pixelID)) {
137 ++n_hits;
138 }
139 }
140 }
141 }
142 return n_hits;
143 };
144 unsigned int n_hits=0u;
145 if (listOfIds.empty()) {
147 assert( RDOs.isValid());
148 n_hits += getNHits(*RDOs, detector_elements, m_pixelID);
149 }
150 }
151 else {
152 for (const IdentifierHash& id : listOfIds) {
153 if (not id.is_valid()) continue;
154 std::optional<RDOCollectionAdapter<T_RDOContainer> > RDOs = RDOCollectionAdapter<T_RDOContainer>::make(rdo_collection,id);
155 if (RDOs.has_value()) {
156 n_hits += getNHits(*(RDOs.value()), detector_elements, m_pixelID);
157 }
158 }
159 }
160 // the total number of hits is the best estimate of the maximum number of clusters.
161 // @TODO could apply a factor for the number clusters or only if the number of hits
162 // are above a certain threshold to reduce memory consumption though impact
163 // is likely small.
164 return {n_hits,n_hits};
165}
166
167template <typename T_RDOContainer>
168std::pair<unsigned int, unsigned int>
169PixelClusteringToolImpl<T_RDOContainer>::countCells(const T_RDOContainer& rdo_collection,
170 const std::vector<IdentifierHash> &listOfIds,
171 const InDetDD::SiDetectorElementCollection &detector_elements) const {
172 if (m_isITk || !m_checkGanged ) {
173 return countCellsImpl<false>(rdo_collection,listOfIds, detector_elements);
174 }
175 else {
176 return countCellsImpl<true>(rdo_collection,listOfIds, detector_elements);
177 }
178}
179
180template <typename T_RDOContainer>
181StatusCode
184 const InDetDD::SiDetectorElement& element,
185 const InDetDD::PixelModuleDesign& design,
187 const PixelChargeCalibCondData *calibData,
189 const double lorentzShift,
190 xAOD::PixelCluster::ClusterVars& clusterVars) const
191{
192 Amg::Vector2D pos_acc(0,0);
193 float tot_acc = 0.f;
194
195 InDetDD::PixelDiodeTree::CellIndexType rowmax = std::numeric_limits<InDetDD::PixelDiodeTree::CellIndexType>::min();
196 InDetDD::PixelDiodeTree::CellIndexType colmax = std::numeric_limits<InDetDD::PixelDiodeTree::CellIndexType>::min();
197 InDetDD::PixelDiodeTree::CellIndexType rowmin = std::numeric_limits<InDetDD::PixelDiodeTree::CellIndexType>::max();
198 InDetDD::PixelDiodeTree::CellIndexType colmin = std::numeric_limits<InDetDD::PixelDiodeTree::CellIndexType>::max();
203
204 // We temporary comment this since it is not used
205 // bool hasGanged = false;
206 unsigned int n_rdos = clusterVars.rdoList.getBeginIndex(icluster);
207 assert( clusterVars.totList.getBeginIndex(icluster)==n_rdos );
208 assert( calibData==nullptr || clusterVars.chargeList.getBeginIndex(icluster)==n_rdos );
209
210 IdentifierHash idHash = element.identifyHash();
211 assert( idHash == cluster.identifyHash());
212 Identifier module_id = element.identify();
213 std::optional<Identifier::value_type> first_rdo_id;
214 int cluster_lvl1min = std::numeric_limits<int>::max();
215 float totalCharge = 0.f;
216
218 for (CellProxy cellProxy : cluster) {
219
220 //Construct the identifier class
221
222 // We temporary comment this since it is not used
223 // TODO: Check how the ganged info is used in legacy
224 // if (multiChip) {
225 // hasGanged = hasGanged ||
226 // m_pixelRDOTool->isGanged(id, element).has_value();
227 // }
228 assert(cellProxy.srcIndex() < rdos.size());
229
230 RDOAdapter<T_RDOContainer> rdo(rdos[cellProxy.srcIndex()]);
231 if constexpr(std::is_same_v<T_RDOContainer, PhaseIIPixelRawDataContainer>) {
232 assert( rdo.index() >= rdos.beginIndex() && rdo.index() < rdos.endIndex() );
233 }
234
235 Identifier rdo_id = rdo.computeIdentifier(*m_pixelID,module_id, cellProxy);
236 if (!first_rdo_id.has_value()) {
237 first_rdo_id=rdo_id.get_compact();
238 }
239
240 assert(rdo.getLVL1A()>=0 && rdo.getLVL1A() < std::numeric_limits<uint8_t>::max());
241 cluster_lvl1min = std::min(cluster_lvl1min, static_cast<int>(rdo.getLVL1A()) );
242
243 const int tot = rdo.getToT();
244 float charge = tot;
245
246 std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
247 = InDetDD::PixelDiodeTree::makeCellIndex(cellProxy.coordinates()[0],
248 cellProxy.coordinates()[1]);
250
251 if (calibData) {
252 // Retrieving the calibration only depends on FE and not per cell (can be further optimized)
253 // Single FE modules could have an optimized getCharge function where the calib constants are cached
254 std::uint32_t feValue = design.getFE(si_param);
255 auto diode_type = design.getDiodeType(si_param);
256 if (m_isITk){
257 // @TODO only check in makeClusters or check at all ?
259 ATH_MSG_ERROR("Chip type is not recognized!");
260 return StatusCode::FAILURE;
261 }
262
263 charge = calibData->getCharge(diode_type,
264 calibStrategy,
265 idHash,
266 feValue,
267 tot);
268 } else {
269 charge = calibData->getCharge(diode_type,
270 idHash,
271 feValue,
272 tot);
273
274 // These numbers are taken from the Cluster Maker Tool
275 if (design.getReadoutTechnology() != InDetDD::PixelReadoutTechnology::RD53 && (idHash < 12 or idHash > 2035)) {
276 charge = tot/8.0*(8000.0-1200.0)+1200.0;
277 }
278 }
279 clusterVars.chargeList.setValue(n_rdos,charge);
280 }
281 clusterVars.rdoList.setValue(n_rdos,rdo_id.get_compact());
282 clusterVars.totList.setValue(n_rdos,tot);
283 totalCharge += charge;
284 ++n_rdos;
285
286 const InDetDD::PixelDiodeTree::CellIndexType &row = diode_idx[0];
287 const InDetDD::PixelDiodeTree::CellIndexType &col = diode_idx[1];
288 if (row>rowmax) {
289 rowmax=row;
290 rowmax_diode = si_param;
291 }
292 if (row<rowmin) {
293 rowmin=row;
294 rowmin_diode = si_param;
295 }
296 if (col>colmax) {
297 colmax=col;
298 colmax_diode = si_param;
299 }
300 if (col<colmin) {
301 colmin=col;
302 colmin_diode = si_param;
303 }
304
305 // We compute the digital position as a sum of all RDO positions
306 // all with the same weight of 1
307 // We do not compute a charge-weighted center of gravity here (by default) since
308 // we observe it to be worse than the digital position
309 // ToT-weighted center of gravity must not be used
310 if (m_useWeightedPos) {
311 pos_acc += charge * si_param.position();
312 tot_acc += charge;
313 } else {
314 pos_acc += si_param.position();
315 tot_acc += 1;
316 }
317
318 } // loop on cluster's cells
319 assert(n_rdos>0); // clusters must not be empty
320 if (tot_acc > 0)
321 pos_acc /= tot_acc;
322
323
324 const int colWidth = colmax - colmin + 1;
325 const int rowWidth = rowmax - rowmin + 1;
326
327 double etaWidth = colmax_diode.xEtaMax() - colmin_diode.xEtaMin(); // design.widthFromColumnRange(colmin, colmax);
328 double phiWidth = rowmax_diode.xPhiMax() - rowmin_diode.xPhiMin(); // design.widthFromColumnRange(colmin, colmax);
329
330 // ask for Lorentz correction, get global position
331 const Amg::Vector2D localPos = pos_acc;
332 Amg::Vector2D locpos(localPos[Trk::locX]+lorentzShift, localPos[Trk::locY]);
333 // find global position of element
334 const Amg::Transform3D& T = element.surface().transform();
335 double Ax[3] = {T(0,0),T(1,0),T(2,0)};
336 double Ay[3] = {T(0,1),T(1,1),T(2,1)};
337 double R [3] = {T(0,3),T(1,3),T(2,3)};
338
339 const Amg::Vector2D& M = locpos;
340 Amg::Vector3D globalPos(M[0]*Ax[0]+M[1]*Ay[0]+R[0],M[0]*Ax[1]+M[1]*Ay[1]+R[1],M[0]*Ax[2]+M[1]*Ay[2]+R[2]);
341
342 // Compute error matrix
343 float width0, width1;
344 if (m_broadErrors) {
345 // Use cluster width
346 width0 = phiWidth;
347 width1 = etaWidth;
348 } else {
349 // Use average pixel width
350 width0 = phiWidth / rowWidth;
351 width1 = etaWidth / colWidth;
352 }
353
354 // Actually create the cluster (i.e. fill the values)
355
356 Eigen::Matrix<float,2,1> localPosition(locpos.x(), locpos.y());
357 Eigen::Matrix<float,2,2> localCovariance = Eigen::Matrix<float,2,2>::Zero();
358 localCovariance(0, 0) = width0 * width0 / 12.0f;
359 localCovariance(1, 1) = width1 * width1 / 12.0f;
360
361 clusterVars.identifierHash[icluster] = idHash;
362 xAOD::VectorMap<2>(clusterVars.localPositionDim2[icluster].data()) = localPosition;
363 xAOD::MatrixMap<2>(clusterVars.localCovarianceDim2[icluster].data()) = localCovariance;
364 assert( first_rdo_id.has_value());
365 clusterVars.identifier[icluster] = *first_rdo_id;
366 clusterVars.rdoList.updateEndIndex(icluster,n_rdos);
367 xAOD::VectorMap<3>(clusterVars.globalPosition[icluster].data()) = globalPos.cast<float>();
368 clusterVars.totList.updateEndIndex(icluster,n_rdos);
369 clusterVars.chargeList.updateEndIndex(icluster, (calibData ? n_rdos : 0u));
370 clusterVars.totalCharge[icluster] = totalCharge;
371 clusterVars.lvl1a[icluster] = cluster_lvl1min;
372 clusterVars.channelsInPhi[icluster] = rowWidth;
373 clusterVars.channelsInEta[icluster] = colWidth;
374 clusterVars.widthInEta[icluster] = etaWidth;
375
376 return StatusCode::SUCCESS;
377}
378
379template <typename T_RDOContainer>
380StatusCode
381PixelClusteringToolImpl<T_RDOContainer>::clusterize([[maybe_unused]] const EventContext& ctx,
383 const InDet::SiDetectorElementStatus& pixelDetElStatus,
384 const InDetDD::SiDetectorElement& element,
386{
387 IdentifierHash idHash = RDOs.identifyHash();
388 typename IClusteringToolType::CellContainer::ModuleRangeGuard rangeGuard(cellContainer.startNewModule(idHash));
389 if ( pixelDetElStatus.isGood(idHash) ) {
390 // Retrieve the cells from the detector element
391 std::span<typename IClusteringToolType::CellContainer::Cell>
392 cellRange = unpackRDOs(RDOs, pixelDetElStatus, element, cellContainer);
393
394 static constexpr unsigned int SORT_BY_LOCAL_X=0u;
395 namespace CL=Acts::InPlaceClusterization;
396 CL::clusterize<SORT_BY_LOCAL_X, std::uint16_t>(cellRange,
397 CL::defaultConnectionHelper<CL::EConnectionType::CommonEdgeOrCorner>(cellRange));
398 // set the cell range per cluster
400 [&cellContainer](std::span<typename IClusteringToolType::CellContainer::Cell> &/*the_range*/,
401 unsigned int idx_begin,
402 unsigned int idx_end) {
403 cellContainer.registerNewCluster(idx_begin,idx_end);
404 });
405 }
406 // must add a range for every call otherwise the cell container and
407 // the list of processed modules get out of sync.
408 cellContainer.registerClustersForNewModule(rangeGuard.range());
409
410 return StatusCode::SUCCESS;
411}
412
413
414template <typename T_RDOContainer>
416 [[maybe_unused]] std::size_t nClusterRDOs) const
417{
418 return std::any (xAOD::PixelCluster::ClusterVars (cont, nClusterRDOs));
419}
420
421
422template <typename T_RDOContainer>
423StatusCode
425 const EventContext& ctx,
426 const T_RDOContainer &rdoContainer,
428 unsigned int imodule,
429 const InDetDD::SiDetectorElement& element,
430 unsigned int icluster,
431 [[maybe_unused]] xAOD::PixelClusterContainer& cont,
432 std::any& cache) const
433{
434 // Retrieve the calibration data
435 const PixelChargeCalibCondData *calibData = nullptr;
436 if (not m_chargeDataKey.empty()) {
438 calibData = calibDataHandle.cptr();
439
440 if (!calibData) {
441 ATH_MSG_ERROR("PixelChargeCalibCondData requested but couldn't be retrieved from " << m_chargeDataKey.key());
442 return StatusCode::FAILURE;
443 }
444 }
445
446 // Get the element design
447 const InDetDD::PixelModuleDesign& design =
448 static_cast<const InDetDD::PixelModuleDesign&>(element.design());
449
450 // Get the calibration strategy for this module.
451 // Default to RD53 if the calibData is not available. That is fine because it won't be used anyway
452 auto calibrationStrategy = calibData ? calibData->getCalibrationStrategy(element.identifyHash()) : PixelChargeCalibCondData::CalibrationStrategy::RD53;
453
454 IdentifierHash idHash = element.identifyHash();
455 double lorentzShift = m_pixelLorentzAngleTool->getLorentzShift(idHash, ctx);
456
457 auto* clusterVars = std::any_cast<xAOD::PixelCluster::ClusterVars> (&cache);
458 if (!clusterVars) throw std::bad_any_cast();
459
460 std::optional<RDOCollectionAdapter<T_RDOContainer> > rdos_optional(RDOCollectionAdapter<T_RDOContainer>::make(rdoContainer,idHash));
461 if (!rdos_optional.has_value()) return StatusCode::FAILURE;
462 const RDOCollectionAdapter<T_RDOContainer> &rdos(*rdos_optional);
463
467 CellContainerProxy cellContainerProxy(&cellContainer);
468 ModuleProxy moduleProxy(cellContainerProxy[imodule]);
469
470 for (ClusterProxy clusterProxy: moduleProxy) {
471 ATH_CHECK(makeCluster(icluster++,
472 clusterProxy,
473 element,
474 design,
475 *rdos,
476 calibData,
477 calibrationStrategy,
478 lorentzShift,
479 *clusterVars));
480 }
481
482 return StatusCode::SUCCESS;
483}
484
485template <typename T_RDOContainer>
486std::span<typename ActsTrk::RDOContainerTraits<T_RDOContainer>::IClusteringToolType::CellContainer::Cell>
489 const InDet::SiDetectorElementStatus& pixelDetElStatus,
490 const InDetDD::SiDetectorElement& element,
492{
493 // Get the element design
494 const InDetDD::PixelModuleDesign& design =
495 static_cast<const InDetDD::PixelModuleDesign&>(element.design());
496
497 bool check_ganged = !m_isITk && m_checkGanged && isFEI3(design);
498
499 typename IClusteringToolType::CellContainer::ModuleRangeGuard rangeGuard(cellContainer, RDOs.identifyHash() );
500 unsigned int rdo_i=0;
501 for (RDOAdapter<T_RDOContainer> rdo : RDOs) {
502 auto coordinates=rdo.coordinates(*m_pixelID);
503 InDetDD::PixelDiodeTree::DiodeProxy si_param ( design.diodeProxyFromIdx(makeDiodeIdx(coordinates)));
504 std::uint32_t fe = design.getFE(si_param);
505
506 // check if good RDO
507 // the pixel RDO tool here says always good if m_useModuleMap is false
508 if (pixelDetElStatus.isChipGood(rangeGuard.identifyHash(), fe)) {
509 cellContainer.emplace_back_cell(makeCellCoordinates(coordinates), rdo_i);
510
511 if ( check_ganged ) {
512 std::optional<std::array<std::int16_t,2> > gangedCoordinates = getGangedCoordinates(coordinates, design);
513 if (gangedCoordinates.has_value()) {
514 cellContainer.emplace_back_cell(*gangedCoordinates, rdo_i);
515 }
516 }
517 }
518 ++rdo_i;
519 }
520
521 return rangeGuard.moduleCellSpan();
522}
523
526} // namespace ActsTrk
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
double charge(const T &p)
Definition AtlasPID.h:997
static Double_t a
virtual std::pair< unsigned int, unsigned int > countCells(const T_RDOContainer &rdo_collection, const std::vector< IdentifierHash > &listOfIds, const InDetDD::SiDetectorElementCollection &detector_elements) const override
std::pair< unsigned int, unsigned int > countCellsImpl(const T_RDOContainer &rdo_collection, const std::vector< IdentifierHash > &listOfIds, const InDetDD::SiDetectorElementCollection &detector_elements) const
InPlaceClusterization::ClusterProxy< const typename IClusteringToolType::CellContainer > ClusterProxy
virtual StatusCode initialize() override
Gaudi::Property< bool > m_broadErrors
extends< AthAlgTool, typename ActsTrk::RDOContainerTraits< T_RDOContainer >::IClusteringToolType >::base_class base_class
Gaudi::Property< bool > m_useWeightedPos
StatusCode makeCluster(size_t icluster, const PixelClusteringToolImpl::ClusterProxy &cluster, const InDetDD::SiDetectorElement &element, const InDetDD::PixelModuleDesign &design, const ActsTrk::RDOContainerTraits< T_RDOContainer >::PerModuleRDOs &RDOs, const PixelChargeCalibCondData *calibData, const PixelChargeCalibCondData::CalibrationStrategy calibStrategy, const double lorentz_shift, xAOD::PixelCluster::ClusterVars &clusterVars) const
ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool
virtual StatusCode clusterize(const EventContext &ctx, const ActsTrk::RDOContainerTraits< T_RDOContainer >::PerModuleRDOs &RDOs, const InDet::SiDetectorElementStatus &pixelDetElStatus, const InDetDD::SiDetectorElement &element, typename IClusteringToolType::CellContainer &cellContainer) const override
Gaudi::Property< bool > m_checkGanged
Gaudi::Property< std::string > m_idHelperName
virtual StatusCode makeClusters(const EventContext &ctx, const T_RDOContainer &rdo_container, const typename IClusteringToolType::CellContainer &cellContainer, unsigned int module_i, const InDetDD::SiDetectorElement &element, unsigned int icluster, xAOD::PixelClusterContainer &cont, std::any &vars) const override
PixelClusteringToolImpl(const std::string &type, const std::string &name, const IInterface *parent)
SG::ReadCondHandleKey< PixelChargeCalibCondData > m_chargeDataKey
std::span< typename IClusteringToolType::CellContainer::Cell > unpackRDOs(const ActsTrk::RDOContainerTraits< T_RDOContainer >::PerModuleRDOs &RDOs, const InDet::SiDetectorElementStatus &pixelDetElStatus, const InDetDD::SiDetectorElement &element, typename IClusteringToolType::CellContainer &cellContainer) const
virtual std::any createEventDataCache(xAOD::PixelClusterContainer &cont, std::size_t nClusterRDOs) const override
static const T_RDOContainer & range(const T_RDOContainer &rdo_container)
static std::optional< RDOCollectionAdapter > make(const T_RDOContainer &rdo_container, const IdentifierHash &id_hash)
const T * at(size_type n) const
Access an element, as an rvalue.
This is a "hash" representation of an Identifier.
value_type get_compact() const
Get the compact id.
static constexpr std::array< PixelDiodeTree::CellIndexType, 2 > makeCellIndex(T local_x_idx, T local_y_idx)
Create a 2D cell index from the indices in local-x (phi, row) and local-y (eta, column) direction.
Class used to describe the design of a module (diode segmentation and readout scheme).
PixelDiodeTree::DiodeProxyWithPosition diodeProxyFromIdxCachePosition(const std::array< PixelDiodeTree::IndexType, 2 > &idx) const
virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const
readout id -> id of connected diodes
PixelReadoutTechnology getReadoutTechnology() const
PixelDiodeTree::DiodeProxy diodeProxyFromIdx(const std::array< PixelDiodeTree::IndexType, 2 > &idx) const
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const
diode id -> readout id
static InDetDD::PixelDiodeType getDiodeType(const PixelDiodeTree::DiodeProxy &diode_proxy)
virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const
readout id -> id of connected diodes.
static unsigned int getFE(const PixelDiodeTree::DiodeProxy &diode_proxy)
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
int phiIndex() const
Get phi index. Equivalent to strip().
Definition SiCellId.h:122
int etaIndex() const
Get eta index.
Definition SiCellId.h:114
Class to hold the SiDetectorElement objects to be put in the detector store.
Class to hold geometrical description of a silicon detector element.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
Identifier for the strip or pixel readout cell.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
virtual Identifier identify() const override final
identifier of this detector element (inline)
Trk::Surface & surface()
Element Surface.
bool isChipGood(IdentifierHash hash, unsigned int chip) const
bool isGood(IdentifierHash hash) const
CalibrationStrategy getCalibrationStrategy(unsigned int moduleHash) const
float getCharge(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE, float ToT) const
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:69
const_pointer_type cptr()
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
void updateEndIndex(unsigned int obj_i, unsigned int elm_i)
unsigned int getBeginIndex(unsigned int obj_i) const
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
void for_each_cluster(cell_collection_t &cells, func_t func)
call the given function for each cluster of a label sorted cell collection.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.
Eigen::Map< MeasVector< N > > VectorMap
Eigen::Map< MeasMatrix< N > > MatrixMap
typename T_RDO_Container::base_value_type PerModuleRDOs
A diode proxy which caches the position of a diode.
double xPhiMax() const
for backward compatibility, return the position of the lower edge of the diode in local-y(phi,...
double xEtaMin() const
for backward compatibility, return the position of the lower edge of the diode in local-y(eta,...
double xPhiMin() const
for backward compatibility, return the position of the lower edge of the diode in local-x(phi,...
const Vector2D & position() const
get the cached position of this diode
double xEtaMax() const
for backward compatibility, return the position of the upper edge of the diode in local-y(eta,...
Helper class to access parameters of a diode.
xAOD::xAODInDetMeasurement::Utilities::JaggedVecEltCache< float > chargeList
xAOD::xAODInDetMeasurement::Utilities::JaggedVecEltCache< int > totList
xAOD::xAODInDetMeasurement::Utilities::JaggedVecEltCache< Identifier::value_type > rdoList
Tell the compiler to optimize assuming that FP may trap.
#define CXXUTILS_TRAPPING_FP
Definition trapping_fp.h:24