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*/
5
10#include <TrkSurfaces/Surface.h>
11
13
14#include <algorithm>
15#include <array>
16#include <cassert>
17#include <cstdint>
18#include <limits>
19#include <optional>
20#include <stdexcept>
21
22using CLHEP::micrometer;
23
24namespace {
25
26 template <typename T1, typename T2>
27 T1 check_integer_cast(T2 a) {
28 assert( std::in_range<T1>(a) );
29 return static_cast<T1>(a);
30 }
32 inline bool isFEI3(const InDetDD::PixelModuleDesign& design) {
34 }
36 template <typename IndexType>
37 inline std::optional<std::array<std::int16_t,2> >
38 getGangedCoordinates(const std::array<IndexType,2> &coordinates,
39 const InDetDD::PixelModuleDesign& design)
40 {
41 // If the pixel is ganged, returns a new identifier for it
42 InDetDD::SiCellId cellId(check_integer_cast<int>(coordinates[0]),check_integer_cast<int>(coordinates[1]));
43 InDetDD::SiReadoutCellId readoutId = design.readoutIdOfCell(cellId);
44 if ( design.numberOfConnectedCells( readoutId ) > 1 ) {
45 InDetDD::SiCellId gangedCellId = design.connectedCell( readoutId, 1 );
46 return std::array<std::int16_t,2>{ static_cast<std::int16_t>(gangedCellId.phiIndex()),
47 static_cast<std::int16_t>(gangedCellId.etaIndex())};
48 }
49 return std::nullopt;
50 }
51
52 // PixelRDO_Container
53 std::array<std::int16_t,2>
54 makeCellCoordinates(const std::array<InDetDD::PixelDiodeTree::CellIndexType,2> &diode_idx) {
55 return std::array<std::int16_t,2>{
56 check_integer_cast<std::int16_t>(diode_idx[0]),
57 check_integer_cast<std::int16_t>(diode_idx[1])};
58 }
59 // PixelRDO_Container
60 const std::array<InDetDD::PixelDiodeTree::CellIndexType,2> &
61 makeDiodeIdx(const std::array<InDetDD::PixelDiodeTree::CellIndexType,2> &diode_idx) {
62 return diode_idx;
63 }
64
65 // PhaseIIPixelRawDataContainer
66 std::array<std::int16_t,2>
67 makeCellCoordinates(const std::array<std::int16_t,2> &diode_idx) {
68 return diode_idx;
69 }
70 // PhaseIIPixelRawDataContainer
71 std::array<InDetDD::PixelDiodeTree::CellIndexType,2>
72 makeDiodeIdx(const std::array<std::int16_t,2> &diode_idx) {
73 return std::array<InDetDD::PixelDiodeTree::CellIndexType,2>{
74 check_integer_cast<InDetDD::PixelDiodeTree::CellIndexType>(diode_idx[0]),
75 check_integer_cast<InDetDD::PixelDiodeTree::CellIndexType>(diode_idx[1])};
76 }
77
78}
80namespace ActsTrk {
81
82template <typename T_RDOContainer>
85 ATH_MSG_DEBUG("Initializing " << this->name() << " ...");
86
91
92 ATH_CHECK(this->m_pixelLorentzAngleTool.retrieve());
93
94 ATH_CHECK(this->m_chargeDataKey.initialize(not m_chargeDataKey.empty()));
95
96 ATH_MSG_INFO(" Charge Data Key:" << m_chargeDataKey);
97 ATH_MSG_INFO(" ID Helper Name:" << m_idHelperName);
98
99 ATH_CHECK( this->detStore()->retrieve(m_pixelID, m_idHelperName) );
100
101 ATH_MSG_DEBUG(this->name() << " successfully initialized");
102 return StatusCode::SUCCESS;
103}
104
105template <typename T_RDOContainer>
107 const std::string& type, const std::string& name, const IInterface* parent)
108 : base_class(type,name,parent)
109{}
110
111
112template <typename T_RDOContainer>
113template <bool GANGED>
114std::pair<unsigned int, unsigned int>
116 const std::vector<IdentifierHash> &listOfIds,
117 const InDetDD::SiDetectorElementCollection &detector_elements) const {
119 const InDetDD::SiDetectorElementCollection &detector_elements,
120 const PixelID* pixelID)
121 -> unsigned int
122 {
123 unsigned int n_hits = RDOs.size();
124 if constexpr(GANGED) {
125 assert(detector_elements.at(RDOs.identifyHash()));
126 assert(dynamic_cast<const InDetDD::PixelModuleDesign *>(&detector_elements.at(RDOs.identifyHash())->design()) != nullptr);
127 const InDetDD::PixelModuleDesign &design = static_cast<const InDetDD::PixelModuleDesign &>(detector_elements.at(RDOs.identifyHash())->design());
128 if (isFEI3(design)) {
129 for(RDOAdapter<T_RDOContainer> rdo : RDOs) {
130 if (rdo.isGanged(design, *pixelID)) {
131 ++n_hits;
132 }
133 }
134 }
135 }
136 return n_hits;
137 };
138 unsigned int n_hits=0u;
139 if (listOfIds.empty()) {
141 assert( RDOs.isValid());
142 n_hits += getNHits(*RDOs, detector_elements, m_pixelID);
143 }
144 }
145 else {
146 for (const IdentifierHash& id : listOfIds) {
147 if (not id.is_valid()) continue;
148 std::optional<RDOCollectionAdapter<T_RDOContainer> > RDOs = RDOCollectionAdapter<T_RDOContainer>::make(rdo_collection,id);
149 if (RDOs.has_value()) {
150 n_hits += getNHits(*(RDOs.value()), detector_elements, m_pixelID);
151 }
152 }
153 }
154 // the total number of hits is the best estimate of the maximum number of clusters.
155 // @TODO could apply a factor for the number clusters or only if the number of hits
156 // are above a certain threshold to reduce memory consumption though impact
157 // is likely small.
158 return {n_hits,n_hits};
159}
160
161template <typename T_RDOContainer>
162std::pair<unsigned int, unsigned int>
163PixelClusteringToolImpl<T_RDOContainer>::countCells(const T_RDOContainer& rdo_collection,
164 const std::vector<IdentifierHash> &listOfIds,
165 const InDetDD::SiDetectorElementCollection &detector_elements) const {
166 if (m_isITk || !m_checkGanged ) {
167 return countCellsImpl<false>(rdo_collection,listOfIds, detector_elements);
168 }
169 else {
170 return countCellsImpl<true>(rdo_collection,listOfIds, detector_elements);
171 }
172}
173
174template <typename T_RDOContainer>
175StatusCode
178 const InDetDD::SiDetectorElement& element,
179 const InDetDD::PixelModuleDesign& design,
181 const PixelChargeCalibCondData *calibData,
183 const double lorentzShift,
184 xAOD::PixelCluster::ClusterVars& clusterVars) const
185{
186
187 Amg::Vector2D pos_acc(0,0);
188 float tot_acc = 0.f;
189
190 InDetDD::PixelDiodeTree::CellIndexType rowmax = std::numeric_limits<InDetDD::PixelDiodeTree::CellIndexType>::min();
191 InDetDD::PixelDiodeTree::CellIndexType colmax = std::numeric_limits<InDetDD::PixelDiodeTree::CellIndexType>::min();
192 InDetDD::PixelDiodeTree::CellIndexType rowmin = std::numeric_limits<InDetDD::PixelDiodeTree::CellIndexType>::max();
193 InDetDD::PixelDiodeTree::CellIndexType colmin = std::numeric_limits<InDetDD::PixelDiodeTree::CellIndexType>::max();
198
199 // We temporary comment this since it is not used
200 // bool hasGanged = false;
201 unsigned int n_rdos = clusterVars.rdoList.getBeginIndex(icluster);
202 assert( clusterVars.totList.getBeginIndex(icluster)==n_rdos );
203 assert( calibData==nullptr || clusterVars.chargeList.getBeginIndex(icluster)==n_rdos );
204
205 IdentifierHash idHash = element.identifyHash();
206 assert( idHash == cluster.identifyHash());
207 Identifier module_id = element.identify();
208 std::optional<Identifier::value_type> first_rdo_id;
209 int cluster_lvl1min = std::numeric_limits<int>::max();
210
212 for (CellProxy cellProxy : cluster) {
213
214 //Construct the identifier class
215
216 // We temporary comment this since it is not used
217 // TODO: Check how the ganged info is used in legacy
218 // if (multiChip) {
219 // hasGanged = hasGanged ||
220 // m_pixelRDOTool->isGanged(id, element).has_value();
221 // }
222 assert(cellProxy.srcIndex() < rdos.size());
223
224 RDOAdapter<T_RDOContainer> rdo(rdos[cellProxy.srcIndex()]);
225 if constexpr(std::is_same_v<T_RDOContainer, PhaseIIPixelRawDataContainer>) {
226 assert( rdo.index() >= rdos.beginIndex() && rdo.index() < rdos.endIndex() );
227 }
228
229 Identifier rdo_id = rdo.computeIdentifier(*m_pixelID,module_id, cellProxy);
230 if (!first_rdo_id.has_value()) {
231 first_rdo_id=rdo_id.get_compact();
232 }
233
234 assert(rdo.getLVL1A()>=0 && rdo.getLVL1A() < std::numeric_limits<uint8_t>::max());
235 cluster_lvl1min = std::min(cluster_lvl1min, static_cast<int>(rdo.getLVL1A()) );
236
237 const int tot = rdo.getToT();
238 float charge = tot;
239
240 std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
241 = InDetDD::PixelDiodeTree::makeCellIndex(cellProxy.coordinates()[0],
242 cellProxy.coordinates()[1]);
244
245 if (calibData) {
246 // Retrieving the calibration only depends on FE and not per cell (can be further optimized)
247 // Single FE modules could have an optimized getCharge function where the calib constants are cached
248 std::uint32_t feValue = design.getFE(si_param);
249 auto diode_type = design.getDiodeType(si_param);
250 if (m_isITk){
251 // @TODO only check in makeClusters or check at all ?
253 ATH_MSG_ERROR("Chip type is not recognized!");
254 return StatusCode::FAILURE;
255 }
256
257 charge = calibData->getCharge(diode_type,
258 calibStrategy,
259 idHash,
260 feValue,
261 tot);
262 } else {
263 charge = calibData->getCharge(diode_type,
264 idHash,
265 feValue,
266 tot);
267
268 // These numbers are taken from the Cluster Maker Tool
269 if (design.getReadoutTechnology() != InDetDD::PixelReadoutTechnology::RD53 && (idHash < 12 or idHash > 2035)) {
270 charge = tot/8.0*(8000.0-1200.0)+1200.0;
271 }
272 }
273 clusterVars.chargeList.setValue(n_rdos,charge);
274 }
275 clusterVars.rdoList.setValue(n_rdos,rdo_id.get_compact());
276 clusterVars.totList.setValue(n_rdos,tot);
277 ++n_rdos;
278
279 const InDetDD::PixelDiodeTree::CellIndexType &row = diode_idx[0];
280 const InDetDD::PixelDiodeTree::CellIndexType &col = diode_idx[1];
281 if (row>rowmax) {
282 rowmax=row;
283 rowmax_diode = si_param;
284 }
285 if (row<rowmin) {
286 rowmin=row;
287 rowmin_diode = si_param;
288 }
289 if (col>colmax) {
290 colmax=col;
291 colmax_diode = si_param;
292 }
293 if (col<colmin) {
294 colmin=col;
295 colmin_diode = si_param;
296 }
297
298 // We compute the digital position as a sum of all RDO positions
299 // all with the same weight of 1
300 // We do not compute a charge-weighted center of gravity here (by default) since
301 // we observe it to be worse than the digital position
302 // ToT-weighted center of gravity must not be used
303 if (m_useWeightedPos) {
304 pos_acc += charge * si_param.position();
305 tot_acc += charge;
306 } else {
307 pos_acc += si_param.position();
308 tot_acc += 1;
309 }
310
311 }
312 assert(n_rdos>0); // clusters must not be empty
313 if (tot_acc > 0)
314 pos_acc /= tot_acc;
315
316
317 const int colWidth = colmax - colmin + 1;
318 const int rowWidth = rowmax - rowmin + 1;
319
320 double etaWidth = colmax_diode.xEtaMax() - colmin_diode.xEtaMin(); // design.widthFromColumnRange(colmin, colmax);
321 double phiWidth = rowmax_diode.xPhiMax() - rowmin_diode.xPhiMin(); // design.widthFromColumnRange(colmin, colmax);
322
323 // ask for Lorentz correction, get global position
324 const Amg::Vector2D localPos = pos_acc;
325 Amg::Vector2D locpos(localPos[Trk::locX]+lorentzShift, localPos[Trk::locY]);
326 // find global position of element
327 const Amg::Transform3D& T = element.surface().transform();
328 double Ax[3] = {T(0,0),T(1,0),T(2,0)};
329 double Ay[3] = {T(0,1),T(1,1),T(2,1)};
330 double R [3] = {T(0,3),T(1,3),T(2,3)};
331
332 const Amg::Vector2D& M = locpos;
333 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]);
334
335 // Compute error matrix
336 float width0, width1;
337 if (m_broadErrors) {
338 // Use cluster width
339 width0 = phiWidth;
340 width1 = etaWidth;
341 } else {
342 // Use average pixel width
343 width0 = phiWidth / rowWidth;
344 width1 = etaWidth / colWidth;
345 }
346
347 // Actually create the cluster (i.e. fill the values)
348
349 Eigen::Matrix<float,2,1> localPosition(locpos.x(), locpos.y());
350 Eigen::Matrix<float,2,2> localCovariance = Eigen::Matrix<float,2,2>::Zero();
351 localCovariance(0, 0) = width0 * width0 / 12.0f;
352 localCovariance(1, 1) = width1 * width1 / 12.0f;
353
354 clusterVars.identifierHash[icluster] = idHash;
355 xAOD::VectorMap<2>(clusterVars.localPositionDim2[icluster].data()) = localPosition;
356 xAOD::MatrixMap<2>(clusterVars.localCovarianceDim2[icluster].data()) = localCovariance;
357 assert( first_rdo_id.has_value());
358 clusterVars.identifier[icluster] = *first_rdo_id;
359 clusterVars.rdoList.updateEndIndex(icluster,n_rdos);
360 xAOD::VectorMap<3>(clusterVars.globalPosition[icluster].data()) = globalPos.cast<float>();
361 clusterVars.totList.updateEndIndex(icluster,n_rdos);
362 clusterVars.chargeList.updateEndIndex(icluster, (calibData ? n_rdos : 0u));
363 clusterVars.lvl1a[icluster] = cluster_lvl1min;
364 clusterVars.channelsInPhi[icluster] = rowWidth;
365 clusterVars.channelsInEta[icluster] = colWidth;
366 clusterVars.widthInEta[icluster] = etaWidth;
367
368 return StatusCode::SUCCESS;
369}
370
371template <typename T_RDOContainer>
372StatusCode
373PixelClusteringToolImpl<T_RDOContainer>::clusterize([[maybe_unused]] const EventContext& ctx,
375 const InDet::SiDetectorElementStatus& pixelDetElStatus,
376 const InDetDD::SiDetectorElement& element,
378{
379 IdentifierHash idHash = RDOs.identifyHash();
380 typename IClusteringToolType::CellContainer::ModuleRangeGuard rangeGuard(cellContainer.startNewModule(idHash));
381 if ( pixelDetElStatus.isGood(idHash) ) {
382 // Retrieve the cells from the detector element
383 std::span<typename IClusteringToolType::CellContainer::Cell>
384 cellRange = unpackRDOs(RDOs, pixelDetElStatus, element, cellContainer);
385
386 static constexpr unsigned int SORT_BY_LOCAL_X=0u;
387 namespace CL=Acts::InPlaceClusterization;
388 CL::clusterize<SORT_BY_LOCAL_X, std::uint16_t>(cellRange,
389 CL::defaultConnectionHelper<CL::EConnectionType::CommonEdgeOrCorner>(cellRange));
390 // set the cell range per cluster
392 [&cellContainer](std::span<typename IClusteringToolType::CellContainer::Cell> &/*the_range*/,
393 unsigned int idx_begin,
394 unsigned int idx_end) {
395 cellContainer.registerNewCluster(idx_begin,idx_end);
396 });
397 }
398 // must add a range for every call otherwise the cell container and
399 // the list of processed modules get out of sync.
400 cellContainer.registerClustersForNewModule(rangeGuard.range());
401
402 return StatusCode::SUCCESS;
403}
404
405
406template <typename T_RDOContainer>
408 [[maybe_unused]] std::size_t nClusterRDOs) const
409{
410 return std::any (xAOD::PixelCluster::ClusterVars (cont, nClusterRDOs));
411}
412
413
414template <typename T_RDOContainer>
415StatusCode
417 const EventContext& ctx,
418 const T_RDOContainer &rdoContainer,
420 unsigned int imodule,
421 const InDetDD::SiDetectorElement& element,
422 unsigned int icluster,
423 [[maybe_unused]] xAOD::PixelClusterContainer& cont,
424 std::any& cache) const
425{
426 // Retrieve the calibration data
427 const PixelChargeCalibCondData *calibData = nullptr;
428 if (not m_chargeDataKey.empty()) {
430 calibData = calibDataHandle.cptr();
431
432 if (!calibData) {
433 ATH_MSG_ERROR("PixelChargeCalibCondData requested but couldn't be retrieved from " << m_chargeDataKey.key());
434 return StatusCode::FAILURE;
435 }
436 }
437
438 // Get the element design
439 const InDetDD::PixelModuleDesign& design =
440 static_cast<const InDetDD::PixelModuleDesign&>(element.design());
441
442 // Get the calibration strategy for this module.
443 // Default to RD53 if the calibData is not available. That is fine because it won't be used anyway
444 auto calibrationStrategy = calibData ? calibData->getCalibrationStrategy(element.identifyHash()) : PixelChargeCalibCondData::CalibrationStrategy::RD53;
445
446 IdentifierHash idHash = element.identifyHash();
447 double lorentzShift = m_pixelLorentzAngleTool->getLorentzShift(idHash, ctx);
448
449 auto* clusterVars = std::any_cast<xAOD::PixelCluster::ClusterVars> (&cache);
450 if (!clusterVars) throw std::bad_any_cast();
451
452 std::optional<RDOCollectionAdapter<T_RDOContainer> > rdos_optional(RDOCollectionAdapter<T_RDOContainer>::make(rdoContainer,idHash));
453 if (!rdos_optional.has_value()) return StatusCode::FAILURE;
454 const RDOCollectionAdapter<T_RDOContainer> &rdos(*rdos_optional);
455
459 CellContainerProxy cellContainerProxy(&cellContainer);
460 ModuleProxy moduleProxy(cellContainerProxy[imodule]);
461
462 for (ClusterProxy clusterProxy: moduleProxy) {
463 ATH_CHECK(makeCluster(icluster++,
464 clusterProxy,
465 element,
466 design,
467 *rdos,
468 calibData,
469 calibrationStrategy,
470 lorentzShift,
471 *clusterVars));
472 }
473
474 return StatusCode::SUCCESS;
475}
476
477template <typename T_RDOContainer>
478std::span<typename ActsTrk::RDOContainerTraits<T_RDOContainer>::IClusteringToolType::CellContainer::Cell>
481 const InDet::SiDetectorElementStatus& pixelDetElStatus,
482 const InDetDD::SiDetectorElement& element,
484{
485 // Get the element design
486 const InDetDD::PixelModuleDesign& design =
487 static_cast<const InDetDD::PixelModuleDesign&>(element.design());
488
489 bool check_ganged = !m_isITk && m_checkGanged && isFEI3(design);
490
491 typename IClusteringToolType::CellContainer::ModuleRangeGuard rangeGuard(cellContainer, RDOs.identifyHash() );
492 unsigned int rdo_i=0;
493 for (RDOAdapter<T_RDOContainer> rdo : RDOs) {
494 auto coordinates=rdo.coordinates(*m_pixelID);
495 InDetDD::PixelDiodeTree::DiodeProxy si_param ( design.diodeProxyFromIdx(makeDiodeIdx(coordinates)));
496 std::uint32_t fe = design.getFE(si_param);
497
498 // check if good RDO
499 // the pixel RDO tool here says always good if m_useModuleMap is false
500 if (pixelDetElStatus.isChipGood(rangeGuard.identifyHash(), fe)) {
501 cellContainer.emplace_back_cell(makeCellCoordinates(coordinates), rdo_i);
502
503 if ( check_ganged ) {
504 std::optional<std::array<std::int16_t,2> > gangedCoordinates = getGangedCoordinates(coordinates, design);
505 if (gangedCoordinates.has_value()) {
506 cellContainer.emplace_back_cell(*gangedCoordinates, rdo_i);
507 }
508 }
509 }
510 ++rdo_i;
511 }
512
513 return rangeGuard.moduleCellSpan();
514}
515
518} // 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
extends< AthAlgTool, typename ActsTrk::RDOContainerTraits< T_RDOContainer >::IClusteringToolType >::base_class base_class
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
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
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