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
22
23namespace ActsTrk {
24
25
26class StripClusteringTool : public extends<AthAlgTool, IStripClusteringTool> {
27public:
29 using StripID = SCT_ID;
30
31 StripClusteringTool(const std::string& type,
32 const std::string& name,
33 const IInterface* parent);
34
35 virtual StatusCode initialize() override;
36
37 virtual StatusCode
38 clusterize(const EventContext& ctx,
40 const InDet::SiDetectorElementStatus& stripDetElStatus,
41 const InDetDD::SiDetectorElement& element,
42 Acts::Ccl::ClusteringData& data,
43 std::vector<typename IStripClusteringTool::ClusterCollection>& collection) const override;
44
45 virtual std::any makeVars (SG::AuxVectorData& /*cont*/) const override
46 { return std::any(); }
47
48 virtual StatusCode
49 makeClusters(const EventContext& ctx,
51 const InDetDD::SiDetectorElement& element,
52 size_t icluster,
53 std::any& vars,
54 typename ClusterContainer::iterator itrContainer) const override;
55
56private:
57 std::optional<std::pair<typename IStripClusteringTool::CellCollection, bool>>
58 unpackRDOs(const EventContext& ctx,
59 const RawDataCollection& RDOs,
60 const InDet::SiDetectorElementStatus& stripDetElStatus,
61 const InDetDD::SiDetectorElement& element) const;
62
63 bool passTiming(const std::bitset<3>& timePattern) const;
64
65 StatusCode decodeTimeBins();
66
67 bool isBadStrip(const EventContext& ctx,
68 const InDet::SiDetectorElementStatus *sctDetElStatus,
69 const StripID& idHelper,
70 IdentifierHash waferHash,
71 Identifier stripId) const;
72
73 // N.B. the cluster is added to the container
74 StatusCode makeCluster(StripClusteringTool::Cluster &cluster,
75 double LorentzShift,
76 Eigen::Matrix<float,1,1>& localCov,
77 const StripID& stripID,
78 const InDetDD::SiDetectorElement& element,
79 const InDetDD::SiDetectorDesign& design,
80 xAOD::StripCluster& container) const;
81
82 StringProperty m_timeBinStr{this, "timeBins", ""};
83
84 ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool {this, "LorentzAngleTool", "",
85 "Tool to retreive Lorentz angle of Si detector module"
86 };
87
88 // TODO this one should be removed?
90 "SiDetectorElementStatus for strip"};
91
92 ToolHandle<IInDetConditionsTool> m_conditionsTool {this, "conditionsTool", "",
93 "Conditions summary tool"};
94
95 Gaudi::Property<bool> m_checkBadModules {this, "checkBadModules", true,
96 "Check bad modules using the conditions summary tool"};
97
98 Gaudi::Property<unsigned int> m_maxFiredStrips {this, "maxFiredStrips", 384u,
99 "Threshold of number of fired strips per wafer. 0 disables the per-wafer cut."};
100
101 SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection",
102 "SiDetectorElementCollection key for strip"};
103
104 Gaudi::Property<bool> m_isITk {this, "isITk", true,
105 "True if running in ITk"};
106
107 Gaudi::Property<unsigned int> m_errorStrategy{this, "errorStrategy", 0, "Use different error strategies for the strip clusters"};
108
109 int m_timeBinBits[3]{-1, -1, -1};
110
111
112 const StripID* m_stripID {nullptr};
113};
114
115} // namespace ActsTrk
116
117#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
This is an Identifier helper class for the SCT subdetector.
std::vector< Cluster > ClusterCollection
Gaudi::Property< bool > m_isITk
ToolHandle< IInDetConditionsTool > m_conditionsTool
Gaudi::Property< unsigned int > m_maxFiredStrips
Gaudi::Property< bool > m_checkBadModules
bool passTiming(const std::bitset< 3 > &timePattern) const
virtual StatusCode initialize() override
bool isBadStrip(const EventContext &ctx, const InDet::SiDetectorElementStatus *sctDetElStatus, const StripID &idHelper, IdentifierHash waferHash, Identifier stripId) const
StripClusteringTool(const std::string &type, const std::string &name, const IInterface *parent)
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
virtual StatusCode makeClusters(const EventContext &ctx, typename IStripClusteringTool::ClusterCollection &cluster, const InDetDD::SiDetectorElement &element, size_t icluster, std::any &vars, typename ClusterContainer::iterator itrContainer) const override
StatusCode makeCluster(StripClusteringTool::Cluster &cluster, double LorentzShift, Eigen::Matrix< float, 1, 1 > &localCov, const StripID &stripID, const InDetDD::SiDetectorElement &element, const InDetDD::SiDetectorDesign &design, xAOD::StripCluster &container) const
virtual StatusCode clusterize(const EventContext &ctx, const InDetRawDataCollection< StripRDORawData > &RDOs, const InDet::SiDetectorElementStatus &stripDetElStatus, const InDetDD::SiDetectorElement &element, Acts::Ccl::ClusteringData &data, std::vector< typename IStripClusteringTool::ClusterCollection > &collection) const override
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
Gaudi::Property< unsigned int > m_errorStrategy
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_stripDetElStatus
std::optional< std::pair< typename IStripClusteringTool::CellCollection, bool > > unpackRDOs(const EventContext &ctx, const RawDataCollection &RDOs, const InDet::SiDetectorElementStatus &stripDetElStatus, const InDetDD::SiDetectorElement &element) const
virtual std::any makeVars(SG::AuxVectorData &) const override
This is a "hash" representation of an Identifier.
Base class for the detector design classes for Pixel and SCT.
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
Manage lookup of vectors of auxiliary data.
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.