ATLAS Offline Software
Loading...
Searching...
No Matches
PixelClusteringTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSTRK_DATAPREPARATION_PIXEL_CLUSTERING_TOOL_H
6#define ACTSTRK_DATAPREPARATION_PIXEL_CLUSTERING_TOOL_H
7
8
20#include <string>
21
22
23namespace ActsTrk {
24
25class PixelClusteringTool : public extends<AthAlgTool,IPixelClusteringTool> {
26public:
27 PixelClusteringTool(const std::string& type,
28 const std::string& name,
29 const IInterface* parent);
30
31 virtual StatusCode initialize() override;
32
33 virtual std::pair<unsigned int, unsigned int>
34 countCells(const RDOContainer& rdo_collection,
35 const std::vector<IdentifierHash> &listOfIds,
36 const InDetDD::SiDetectorElementCollection &detector_elements) const override;
37
38 virtual StatusCode
39 clusterize(const EventContext& ctx,
40 const RawDataCollection& RDOs,
41 const InDet::SiDetectorElementStatus& pixelDetElStatus,
42 const InDetDD::SiDetectorElement& element,
43 IPixelClusteringTool::CellContainer &cellContainer) const override;
44
46 std::size_t nClusterRDOs) const override;
47
48 virtual StatusCode
49 makeClusters(const EventContext& ctx,
50 const RDOContainer &rdo_container,
51 const IPixelClusteringTool::CellContainer& cellContainer,
52 unsigned int module_i,
53 const InDetDD::SiDetectorElement& element,
54 unsigned int icluster,
56 std::any& vars) const override;
57
58private:
59 // Template to count cells i.e. RDOs in the rdo_collection
60 // @tparam GANGED true if the pixel detector can contain ganged pixel otherwise false.
61 // @param rdo_collection the pixel RDO collection.
62 // @param listOfIds a list of id hashes to be considered or empty to consider all.
63 // @param detector_elements the list of all detector elements of the pixel detector.
64 // RDOs of ganged pixels will be counted as two.
65 template <bool GANGED>
66 std::pair<unsigned int, unsigned int>
67 countCellsImpl(const RDOContainer& rdo_collection,
68 const std::vector<IdentifierHash> &listOfIds,
69 const InDetDD::SiDetectorElementCollection &detector_elements) const;
70
73
74 std::span<IPixelClusteringTool::CellContainer::Cell>
75 unpackRDOs(const RawDataCollection& RDOs,
76 const InDet::SiDetectorElementStatus& pixelDetElStatus,
77 const InDetDD::SiDetectorElement& element,
78 IPixelClusteringTool::CellContainer &cellContainer) const;
79
80 StatusCode makeCluster(size_t icluster,
82 const InDetDD::SiDetectorElement& element,
83 const InDetDD::PixelModuleDesign& design,
85 const PixelChargeCalibCondData *calibData,
87 const double lorentz_shift,
88 xAOD::PixelCluster::ClusterVars& clusterVars) const;
89
90 ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool {this, "PixelLorentzAngleTool", "", "Tool to retreive Lorentz angle of Pixel"};
91
93 "Pixel charge calibration data"};
94 Gaudi::Property<std::string> m_idHelperName {this, "IDHelperName", "PixelID",
95 "Pixel-like ID helper name to retrieve from DetectorStore"};
96
97 Gaudi::Property<bool> m_addCorners {this, "AddCorners", true};
98 Gaudi::Property<bool> m_useWeightedPos {this, "UseWeightedPosition", false};
99 Gaudi::Property<bool> m_broadErrors {this, "UseBroadErrors", false};
100 Gaudi::Property<bool> m_checkGanged {this, "CheckGanged", false};
101 Gaudi::Property<bool> m_isITk {this, "isITk", true, "True if running in ITk"};
102 const PixelID* m_pixelID {nullptr};
103};
104
105} // namespace ActsTrk
106
107#endif // ACTS_PIXEL_CLUSTERING_TOOL_H
This is an Identifier helper class for the Pixel subdetector.
PixelClusteringTool(const std::string &type, const std::string &name, const IInterface *parent)
StatusCode makeCluster(size_t icluster, const PixelClusteringTool::ClusterProxy &cluster, const InDetDD::SiDetectorElement &element, const InDetDD::PixelModuleDesign &design, const InDetRawDataCollection< PixelRDORawData > &rdos, const PixelChargeCalibCondData *calibData, const PixelChargeCalibCondData::CalibrationStrategy calibStrategy, const double lorentz_shift, xAOD::PixelCluster::ClusterVars &clusterVars) const
InPlaceClusterization::ClusterProxy< const IPixelClusteringTool::CellContainer > ClusterProxy
Gaudi::Property< bool > m_broadErrors
SG::ReadCondHandleKey< PixelChargeCalibCondData > m_chargeDataKey
IPixelClusteringTool::CellContainer::Cell Cell
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_idHelperName
Gaudi::Property< bool > m_checkGanged
virtual std::any createEventDataCache(xAOD::PixelClusterContainer &cont, std::size_t nClusterRDOs) const override
virtual StatusCode clusterize(const EventContext &ctx, const RawDataCollection &RDOs, const InDet::SiDetectorElementStatus &pixelDetElStatus, const InDetDD::SiDetectorElement &element, IPixelClusteringTool::CellContainer &cellContainer) const override
virtual std::pair< unsigned int, unsigned int > countCells(const RDOContainer &rdo_collection, const std::vector< IdentifierHash > &listOfIds, const InDetDD::SiDetectorElementCollection &detector_elements) const override
std::pair< unsigned int, unsigned int > countCellsImpl(const RDOContainer &rdo_collection, const std::vector< IdentifierHash > &listOfIds, const InDetDD::SiDetectorElementCollection &detector_elements) const
Gaudi::Property< bool > m_addCorners
ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool
Gaudi::Property< bool > m_isITk
std::span< IPixelClusteringTool::CellContainer::Cell > unpackRDOs(const RawDataCollection &RDOs, const InDet::SiDetectorElementStatus &pixelDetElStatus, const InDetDD::SiDetectorElement &element, IPixelClusteringTool::CellContainer &cellContainer) const
Gaudi::Property< bool > m_useWeightedPos
virtual StatusCode makeClusters(const EventContext &ctx, const RDOContainer &rdo_container, const IPixelClusteringTool::CellContainer &cellContainer, unsigned int module_i, const InDetDD::SiDetectorElement &element, unsigned int icluster, xAOD::PixelClusterContainer &cont, std::any &vars) const override
Class used to describe the design of a module (diode segmentation and readout scheme).
Class to hold the SiDetectorElement objects to be put in the detector store.
Class to hold geometrical description of a silicon detector element.
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:69
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.
CellTmpl< coordinates_t, NDIM, index_t > Cell