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
21#include <string>
22
23
24namespace ActsTrk {
25
26template <typename T_RDOContainer>
27class PixelClusteringToolImpl : public extends<AthAlgTool,typename ActsTrk::RDOContainerTraits<T_RDOContainer>::IClusteringToolType> {
28public:
30 using base_class =extends<AthAlgTool,typename ActsTrk::RDOContainerTraits<T_RDOContainer>::IClusteringToolType>::base_class;
31 PixelClusteringToolImpl(const std::string& type,
32 const std::string& name,
33 const IInterface* parent);
34
35 virtual StatusCode initialize() override;
36
37 virtual std::pair<unsigned int, unsigned int>
38 countCells(const T_RDOContainer& rdo_collection,
39 const std::vector<IdentifierHash> &listOfIds,
40 const InDetDD::SiDetectorElementCollection &detector_elements) const override;
41
42 virtual StatusCode
43 clusterize(const EventContext& ctx,
45 const InDet::SiDetectorElementStatus& pixelDetElStatus,
46 const InDetDD::SiDetectorElement& element,
47 typename IClusteringToolType::CellContainer &cellContainer) const override;
48
50 std::size_t nClusterRDOs) const override;
51
52 virtual StatusCode
53 makeClusters(const EventContext& ctx,
54 const T_RDOContainer &rdo_container,
55 const typename IClusteringToolType::CellContainer& cellContainer,
56 unsigned int module_i,
57 const InDetDD::SiDetectorElement& element,
58 unsigned int icluster,
60 std::any& vars) const override;
61
62private:
63 // Template to count cells i.e. RDOs in the rdo_collection
64 // @tparam GANGED true if the pixel detector can contain ganged pixel otherwise false.
65 // @param rdo_collection the pixel RDO collection.
66 // @param listOfIds a list of id hashes to be considered or empty to consider all.
67 // @param detector_elements the list of all detector elements of the pixel detector.
68 // RDOs of ganged pixels will be counted as two.
69 template <bool GANGED>
70 std::pair<unsigned int, unsigned int>
71 countCellsImpl(const T_RDOContainer& rdo_collection,
72 const std::vector<IdentifierHash> &listOfIds,
73 const InDetDD::SiDetectorElementCollection &detector_elements) const;
74
76 using Cell = typename IClusteringToolType::CellContainer::Cell;
77
78 std::span<typename IClusteringToolType::CellContainer::Cell>
80 const InDet::SiDetectorElementStatus& pixelDetElStatus,
81 const InDetDD::SiDetectorElement& element,
82 typename IClusteringToolType::CellContainer &cellContainer) const;
83
84 StatusCode makeCluster(size_t icluster,
86 const InDetDD::SiDetectorElement& element,
87 const InDetDD::PixelModuleDesign& design,
89 const PixelChargeCalibCondData *calibData,
91 const double lorentz_shift,
92 xAOD::PixelCluster::ClusterVars& clusterVars) const;
93
94 ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool {this, "PixelLorentzAngleTool", "", "Tool to retreive Lorentz angle of Pixel"};
95
97 "Pixel charge calibration data"};
98 Gaudi::Property<std::string> m_idHelperName {this, "IDHelperName", "PixelID",
99 "Pixel-like ID helper name to retrieve from DetectorStore"};
100
101 Gaudi::Property<bool> m_addCorners {this, "AddCorners", true};
102 Gaudi::Property<bool> m_useWeightedPos {this, "UseWeightedPosition", false};
103 Gaudi::Property<bool> m_broadErrors {this, "UseBroadErrors", false};
104 Gaudi::Property<bool> m_checkGanged {this, "CheckGanged", false};
105 Gaudi::Property<bool> m_isITk {this, "isITk", true, "True if running in ITk"};
106 const PixelID* m_pixelID {nullptr};
107};
108
109// to have simple component names
114// to have simple component names
119
120} // namespace ActsTrk
121
122#endif // ACTS_PIXEL_CLUSTERING_TOOL_H
PhaseII::PixelRawDataTypeTraits< PhaseII::AccessPolicy::Mutable >::ContainerCollection PhaseIIPixelRawDataContainer
This is an Identifier helper class for the Pixel subdetector.
InDetRawDataContainer< InDetRawDataCollection< PixelRDORawData > > PixelRDO_Container
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
typename ActsTrk::RDOContainerTraits< T_RDOContainer >::IClusteringToolType IClusteringToolType
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
typename IClusteringToolType::CellContainer::Cell Cell
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
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.
typename T_RDO_Container::base_value_type PerModuleRDOs