ATLAS Offline Software
Loading...
Searching...
No Matches
StripClusteringTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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 StatusCode
46 makeClusters(const EventContext& ctx,
48 const InDetDD::SiDetectorElement& element,
49 typename ClusterContainer::iterator itrContainer) const override;
50
51private:
52 std::optional<std::pair<typename IStripClusteringTool::CellCollection, bool>>
53 unpackRDOs(const EventContext& ctx,
54 const RawDataCollection& RDOs,
55 const InDet::SiDetectorElementStatus& stripDetElStatus,
56 const InDetDD::SiDetectorElement& element) const;
57
58 bool passTiming(const std::bitset<3>& timePattern) const;
59
60 StatusCode decodeTimeBins();
61
62 bool isBadStrip(const EventContext& ctx,
63 const InDet::SiDetectorElementStatus *sctDetElStatus,
64 const StripID& idHelper,
65 IdentifierHash waferHash,
66 Identifier stripId) const;
67
68 // N.B. the cluster is added to the container
69 StatusCode makeCluster(StripClusteringTool::Cluster &cluster,
70 double LorentzShift,
71 Eigen::Matrix<float,1,1>& localCov,
72 const StripID& stripID,
73 const InDetDD::SiDetectorElement& element,
74 const InDetDD::SiDetectorDesign& design,
76
77 StringProperty m_timeBinStr{this, "timeBins", ""};
78
79 ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool {this, "LorentzAngleTool", "",
80 "Tool to retreive Lorentz angle of Si detector module"
81 };
82
83 // TODO this one should be removed?
85 "SiDetectorElementStatus for strip"};
86
87 ToolHandle<IInDetConditionsTool> m_conditionsTool {this, "conditionsTool", "",
88 "Conditions summary tool"};
89
90 Gaudi::Property<bool> m_checkBadModules {this, "checkBadModules", true,
91 "Check bad modules using the conditions summary tool"};
92
93 Gaudi::Property<unsigned int> m_maxFiredStrips {this, "maxFiredStrips", 384u,
94 "Threshold of number of fired strips per wafer. 0 disables the per-wafer cut."};
95
96 SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection",
97 "SiDetectorElementCollection key for strip"};
98
99 Gaudi::Property<bool> m_isITk {this, "isITk", true,
100 "True if running in ITk"};
101
102 Gaudi::Property<unsigned int> m_errorStrategy{this, "errorStrategy", 0, "Use different error strategies for the strip clusters"};
103
104 int m_timeBinBits[3]{-1, -1, -1};
105
106
107 const StripID* m_stripID {nullptr};
108};
109
110} // namespace ActsTrk
111
112#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
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
virtual StatusCode makeClusters(const EventContext &ctx, typename IStripClusteringTool::ClusterCollection &cluster, const InDetDD::SiDetectorElement &element, typename ClusterContainer::iterator itrContainer) const override
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
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
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.