ATLAS Offline Software
Loading...
Searching...
No Matches
StripClusteringTool.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_STRIP_CLUSTERING_TOOL_H
6#define ACTSTRK_DATAPREPARATION_STRIP_CLUSTERING_TOOL_H
7
8#include <optional>
9#include <vector>
10
11#include <Acts/Clusterization/Clusterization.hpp>
12
25
26namespace ActsTrk {
28
29class StripClusteringTool : public extends<AthAlgTool, IStripClusteringTool> {
30public:
32 using StripID = SCT_ID;
33
34 StripClusteringTool(const std::string& type,
35 const std::string& name,
36 const IInterface* parent);
37
38 virtual StatusCode initialize() override;
39
40 virtual std::pair<unsigned int, unsigned int>
41 countCells(const RDOContainer& rdo_collection,
42 const std::vector<IdentifierHash> &listOfIds,
43 const InDetDD::SiDetectorElementCollection &detector_elements) const override;
44
45 virtual StatusCode
46 clusterize(const EventContext& ctx,
47 const RawDataCollection& RDOs,
48 const InDet::SiDetectorElementStatus& stripDetElStatus,
49 const InDetDD::SiDetectorElement& element,
50 IStripClusteringTool::CellContainer &cellContainer) const override;
51
53 std::size_t nClusterRDOs) const override;
54
55 virtual StatusCode
56 makeClusters(const EventContext& ctx,
57 const RDOContainer &rdo_container,
58 const IStripClusteringTool::CellContainer& cellContainer,
59 unsigned int module_i,
60 const InDetDD::SiDetectorElement& element,
61 unsigned int icluster,
63 std::any& vars) const override;
64
65private:
68
69 std::span<IStripClusteringTool::CellContainer::Cell>
70 unpackRDOs(const RawDataCollection& RDOs,
71 const InDet::SiDetectorElementStatus& stripDetElStatus,
72 const InDetDD::SiDetectorElement& element,
73 IStripClusteringTool::CellContainer &cellContainer) const;
74
75 bool passTiming(const std::bitset<3>& timePattern) const;
76
77 StatusCode decodeTimeBins();
78
79 static bool isBadStrip(const InDet::SiDetectorElementStatus *sctDetElStatus,
80 IdentifierHash waferHash,
81 std::int16_t strip);
82
83 StatusCode makeCluster(size_t icluster,
85 const ClusterProxy &cluster_proxy,
86 const InDetDD::SiDetectorElement& element,
87 const InDetDD::SiDetectorDesign& design,
88 const double lorentzShift,
89 Eigen::Matrix<float,1,1>& localCov,
90 StripAuxDataCache &auxDataCache) const;
91
92 StringProperty m_timeBinStr{this, "timeBins", ""};
93
94 ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool {this, "LorentzAngleTool", "",
95 "Tool to retreive Lorentz angle of Si detector module"
96 };
97
98 // TODO this one should be removed?
100 "SiDetectorElementStatus for strip"};
101
102 Gaudi::Property<bool> m_checkBadModules {this, "checkBadModules", true,
103 "Check bad modules using the conditions summary tool"};
104
105 Gaudi::Property<unsigned int> m_maxFiredStrips {this, "maxFiredStrips", 384u,
106 "Threshold of number of fired strips per wafer. 0 disables the per-wafer cut."};
107
108 SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection",
109 "SiDetectorElementCollection key for strip"};
110
111 Gaudi::Property<bool> m_isITk {this, "isITk", true,
112 "True if running in ITk"};
113
114 Gaudi::Property<unsigned int> m_errorStrategy{this, "errorStrategy", 0, "Use different error strategies for the strip clusters"};
115
116 int m_timeBinBits[3]{-1, -1, -1};
117
118
119 const StripID* m_stripID {nullptr};
120};
121
122} // namespace ActsTrk
123
124#endif
This is an Identifier helper class for the SCT subdetector.
Gaudi::Property< bool > m_isITk
static bool isBadStrip(const InDet::SiDetectorElementStatus *sctDetElStatus, IdentifierHash waferHash, std::int16_t strip)
Gaudi::Property< unsigned int > m_maxFiredStrips
Gaudi::Property< bool > m_checkBadModules
bool passTiming(const std::bitset< 3 > &timePattern) const
virtual std::pair< unsigned int, unsigned int > countCells(const RDOContainer &rdo_collection, const std::vector< IdentifierHash > &listOfIds, const InDetDD::SiDetectorElementCollection &detector_elements) const override
virtual std::any createEventDataCache(xAOD::StripClusterContainer &cont, std::size_t nClusterRDOs) const override
virtual StatusCode initialize() override
virtual StatusCode makeClusters(const EventContext &ctx, const RDOContainer &rdo_container, const IStripClusteringTool::CellContainer &cellContainer, unsigned int module_i, const InDetDD::SiDetectorElement &element, unsigned int icluster, xAOD::StripClusterContainer &cont, std::any &vars) const override
StripClusteringTool(const std::string &type, const std::string &name, const IInterface *parent)
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
virtual StatusCode clusterize(const EventContext &ctx, const RawDataCollection &RDOs, const InDet::SiDetectorElementStatus &stripDetElStatus, const InDetDD::SiDetectorElement &element, IStripClusteringTool::CellContainer &cellContainer) const override
StatusCode makeCluster(size_t icluster, xAOD::StripCluster &cl, const ClusterProxy &cluster_proxy, const InDetDD::SiDetectorElement &element, const InDetDD::SiDetectorDesign &design, const double lorentzShift, Eigen::Matrix< float, 1, 1 > &localCov, StripAuxDataCache &auxDataCache) const
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
Gaudi::Property< unsigned int > m_errorStrategy
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_stripDetElStatus
InPlaceClusterization::ClusterProxy< const IStripClusteringTool::CellContainer > ClusterProxy
std::span< IStripClusteringTool::CellContainer::Cell > unpackRDOs(const RawDataCollection &RDOs, const InDet::SiDetectorElementStatus &stripDetElStatus, const InDetDD::SiDetectorElement &element, IStripClusteringTool::CellContainer &cellContainer) const
IStripClusteringTool::CellContainer::Cell Cell
This is a "hash" representation of an Identifier.
Base class for the detector design classes for Pixel and SCT.
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 SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a ReadHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
StripClusterContainer_v1 StripClusterContainer
Define the version of the strip cluster container.
CellTmpl< coordinates_t, NDIM, index_t > Cell