ATLAS Offline Software
PixelClusteringTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 
18 
19 namespace InDet {
20 
21 // Helper functions for use with ACTS clusterization
22 // Put these in the InDet namespace so that ACTS can find them
23 // via ADL.
24 //
26 {
27  return cell.ROW;
28 }
29 
31 {
32  return cell.COL;
33 }
34 
36 {
37  return cell.NCL;
38 }
39 
40 
41 } // namespace InDet
42 
43 
44 namespace ActsTrk {
45 
46 
47 class PixelClusteringTool : public extends<AthAlgTool,IPixelClusteringTool> {
48 public:
49 
51  using CellCollection = std::vector<Cell>;
52 
53 
54 
55 
56  struct Cluster {
57  std::vector<Identifier> ids;
58  std::vector<int> tots;
60  };
61 
62  using ClusterCollection = std::vector<Cluster>;
63 
64  PixelClusteringTool(const std::string& type,
65  const std::string& name,
66  const IInterface* parent);
67 
68  virtual StatusCode
70  const PixelID& pixelID,
71  const EventContext& ctx,
72  xAOD::PixelClusterContainer& container) const override;
73 
74  virtual StatusCode initialize() override;
75 
76 private:
77  // N.B. the cluster is added to the container
78  StatusCode makeCluster(const EventContext& ctx,
79  const PixelClusteringTool::Cluster &cluster,
80  const PixelID& pixelID,
81  const InDetDD::SiDetectorElement* element,
82  xAOD::PixelCluster& container) const;
83 
84 private:
85  ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout {this, "PixelReadoutManager", "ITkPixelReadoutManager",
86  "Pixel readout manager" };
87 
88  ToolHandle< InDet::PixelRDOTool > m_pixelRDOTool {this, "PixelRDOTool", "", "The Pixel RDO tool"};
89  ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool {this, "PixelLorentzAngleTool", "", "Tool to retreive Lorentz angle of Pixel"};
90 
91  SG::ReadCondHandleKey<PixelChargeCalibCondData> m_chargeDataKey {this, "PixelChargeCalibCondData", "ITkPixelChargeCalibCondData",
92  "Pixel charge calibration data"};
93 
94  Gaudi::Property<bool> m_addCorners {this, "AddCorners", true};
95  Gaudi::Property<bool> m_useWeightedPos {this, "UseWeightedPosition", true};
96  Gaudi::Property<bool> m_broadErrors {this, "UseBroadErrors", false};
97 };
98 
99 } // namespace ActsTrk
100 
101 #endif // ACTS_PIXEL_CLUSTERING_TOOL_H
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
ActsTrk::PixelClusteringTool::m_broadErrors
Gaudi::Property< bool > m_broadErrors
Definition: PixelClusteringTool.h:96
ActsTrk::PixelClusteringTool::Cluster::tots
std::vector< int > tots
Definition: PixelClusteringTool.h:58
IPixelClusteringTool.h
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
max
#define max(a, b)
Definition: cfImp.cxx:41
ActsTrk::PixelClusteringTool::m_pixelLorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool
Definition: PixelClusteringTool.h:89
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
ActsTrk::PixelClusteringTool
Definition: PixelClusteringTool.h:47
ISiLorentzAngleTool.h
ActsTrk::PixelClusteringTool::m_useWeightedPos
Gaudi::Property< bool > m_useWeightedPos
Definition: PixelClusteringTool.h:95
ActsTrk::PixelClusteringTool::m_addCorners
Gaudi::Property< bool > m_addCorners
Definition: PixelClusteringTool.h:94
ActsTrk::PixelClusteringTool::m_chargeDataKey
SG::ReadCondHandleKey< PixelChargeCalibCondData > m_chargeDataKey
Definition: PixelClusteringTool.h:91
ActsTrk::PixelClusteringTool::PixelClusteringTool
PixelClusteringTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PixelClusteringTool.cxx:43
ActsTrk::PixelClusteringTool::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: PixelClusteringTool.h:85
InDet::getCellColumn
int getCellColumn(const InDet::UnpackedPixelRDO &cell)
Definition: PixelClusteringTool.h:30
PixelRDORawData.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ActsTrk::PixelClusteringTool::initialize
virtual StatusCode initialize() override
Definition: PixelClusteringTool.cxx:30
PixelClusterContainer.h
InDetRawDataCollection
Definition: InDetRawDataCollection.h:31
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
IPixelReadoutManager.h
ActsTrk::PixelClusteringTool::clusterize
virtual StatusCode clusterize(const InDetRawDataCollection< PixelRDORawData > &RDOs, const PixelID &pixelID, const EventContext &ctx, xAOD::PixelClusterContainer &container) const override
Definition: PixelClusteringTool.cxx:224
ActsTrk::PixelClusteringTool::Cluster
Definition: PixelClusteringTool.h:56
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ActsTrk::PixelClusteringTool::Cluster::lvl1min
int lvl1min
Definition: PixelClusteringTool.h:59
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SG::ReadCondHandleKey< PixelChargeCalibCondData >
xAOD::PixelCluster_v1
Definition: PixelCluster_v1.h:17
ActsTrk::PixelClusteringTool::ClusterCollection
std::vector< Cluster > ClusterCollection
Definition: PixelClusteringTool.h:62
InDet::UnpackedPixelRDO
Definition: PixelRDOTool.h:31
InDet::getCellRow
int getCellRow(const InDet::UnpackedPixelRDO &cell)
Definition: PixelClusteringTool.h:25
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ActsTrk::PixelClusteringTool::m_pixelRDOTool
ToolHandle< InDet::PixelRDOTool > m_pixelRDOTool
Definition: PixelClusteringTool.h:88
InDet::getCellLabel
int & getCellLabel(InDet::UnpackedPixelRDO &cell)
Definition: PixelClusteringTool.h:35
InDetRawDataCollection.h
ActsTrk::PixelClusteringTool::makeCluster
StatusCode makeCluster(const EventContext &ctx, const PixelClusteringTool::Cluster &cluster, const PixelID &pixelID, const InDetDD::SiDetectorElement *element, xAOD::PixelCluster &container) const
Definition: PixelClusteringTool.cxx:49
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:34
ActsTrk::PixelClusteringTool::Cluster::ids
std::vector< Identifier > ids
Definition: PixelClusteringTool.h:57
PixelID
Definition: PixelID.h:67
PixelChargeCalibCondData.h
ActsTrk::PixelClusteringTool::CellCollection
std::vector< Cell > CellCollection
Definition: PixelClusteringTool.h:51
ServiceHandle< InDetDD::IPixelReadoutManager >
PixelRDOTool.h