ATLAS Offline Software
ClusterMakerTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 //ClusterMaker.h
8 // (c) ATLAS Detector software
10 // Fill the global position fields of the PrepRawData
12 //
14 // First version 04/08/2003 Tommaso Lari
15 //
17 
18 #ifndef INDETRIOMAKER_CLUSTERMAKERTOOL_H
19 #define INDETRIOMAKER_CLUSTERMAKERTOOL_H
20 
22 
31 
32 #include "GaudiKernel/ToolHandle.h"
33 
34 #include <atomic>
35 #include <vector>
36 
37 template <class T> class ServiceHandle;
38 class Identifier;
39 class StatusCode;
40 
41 namespace InDetDD {
42  class SiDetectorElement;
43 }
44 
45 
46 class PixelID;
47 
48 namespace InDet {
49 
50 static const InterfaceID IID_ClusterMakerTool("InDet::ClusterMakerTool", 1, 0);
51 
52 class PixelCluster;
53 class SCT_Cluster;
54 class SiWidth;
55 
56 class ClusterMakerTool : public AthAlgTool {
57 
59  // Public methods:
61 public:
62 
63  ClusterMakerTool(const std::string &type,
64  const std::string &name,
65  const IInterface *parent);
66  ~ClusterMakerTool() = default;
67 
68  static const InterfaceID& interfaceID() { return IID_ClusterMakerTool; };
69 
71 
72 
73  // Compute the pixel cluster global position, and the error associated
74  // to the position.
75  // Called by the pixel clustering tools
76  //
77  // Input parameters
78  // - the cluster Identifier
79  // - the position in local reference frame
80  // - the list of identifiers of the Raw Data Objects belonging to the cluster
81  // - the width of the cluster
82  // - the module the cluster belongs to
83  // - wheter the cluster contains ganged pixels
84  // - the error strategy, currently
85  // 0: cluster width/sqrt(12.)
86  // 1: pixel pitch/sqrt(12.)
87  // 2: parametrized as a function ofpseudorapidity and cluster size
88  // (default)
89  // 10: CTB parametrization (as a function of module and cluster size)
90  // no magnetic field
91  // - const reference to a PixelID helper class
92  PixelCluster pixelCluster(const Identifier& clusterID,
93  const Amg::Vector2D& localPos,
94  std::vector<Identifier>&& rdoList,
95  const int lvl1a,
96  std::vector<int>&& totList,
97  const SiWidth& width,
98  const InDetDD::SiDetectorElement* element,
99  bool ganged,
100  int errorStrategy,
101  const PixelID& pixelID,
102  bool split,
103  double splitProb1,
104  double splitProb2,
105  const PixelChargeCalibCondData *calibData,
106  const PixelCalib::PixelOfflineCalibData *offlineCalibData,
107  const EventContext& ctx) const;
108 
110  const Amg::Vector2D& localPos,
111  const std::vector<Identifier>& rdoList,
112  const int lvl1a,
113  const std::vector<int>& totList,
114  const SiWidth& width,
115  const InDetDD::SiDetectorElement* element,
116  bool ganged,
117  int errorStrategy,
118  const PixelID& pixelID,
119  bool split,
120  double splitProb1,
121  double splitProb2,
122  const PixelChargeCalibCondData *calibData,
123  const PixelCalib::PixelOfflineCalibData *offlineCalibData,
124  const EventContext& ctx) const;
125 
126  // Computes global position and errors for SCT cluster.
127  // Called by SCT Clustering tools
128  //
129  // Input parameters
130  // - the cluster Identifier
131  // - the position in local reference frame
132  // - the list of identifiers of the Raw Data Objects belonging to the cluster
133  // - the width of the cluster
134  // - the module the cluster belongs to
135  // - the error strategy, currently
136  // 0: Cluster Width/sqrt(12.)
137  // 1: Set to a different values for one and two-strip clusters (def.)
138 
139  SCT_Cluster sctCluster(const Identifier& clusterID,
140  const Amg::Vector2D& localPos,
141  std::vector<Identifier>&& rdoList,
142  const SiWidth& width,
143  const InDetDD::SiDetectorElement* element,
144  int errorStrategy) const;
145 
146 private:
147 
148  template <typename ClusterType, typename IdentifierVec, typename ToTList>
149  ClusterType makePixelCluster(const Identifier& clusterID,
150  const Amg::Vector2D& localPos,
151  IdentifierVec&& rdoList,
152  const int lvl1a,
153  ToTList&& totList,
154  const SiWidth& width,
155  const InDetDD::SiDetectorElement* element,
156  bool ganged,
157  int errorStrategy,
158  const PixelID& pixelID,
159  bool split,
160  double splitProb1,
161  double splitProb2,
162  const PixelChargeCalibCondData *calibData,
163  const PixelCalib::PixelOfflineCalibData *offlineCalibData,
164  const EventContext& ctx,
165  xAOD::PixelCluster* cluster = nullptr) const;
166 
168  {this, "PixelReadoutManager", "PixelReadoutManager", "Pixel readout manager" };
169 
170  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool
171  {this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
172 
173  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool
174  {this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};
175 
177 
178  // Parametrization of the Pixel errors
179  // now moved in PixelConditionsData, except for CTB parametrization
180 
181  double getPixelCTBPhiError(int layer, int phi, int PhiClusterSize) const;
182 
183 };
184 
185 }
186 
187 #endif // INDETRIOMAKER_CLUSTERMAKERTOOL_H
InDet::ClusterMakerTool::xAODpixelCluster
xAOD::PixelCluster * xAODpixelCluster(xAOD::PixelCluster &cluster, const Amg::Vector2D &localPos, const std::vector< Identifier > &rdoList, const int lvl1a, const std::vector< int > &totList, const SiWidth &width, const InDetDD::SiDetectorElement *element, bool ganged, int errorStrategy, const PixelID &pixelID, bool split, double splitProb1, double splitProb2, const PixelChargeCalibCondData *calibData, const PixelCalib::PixelOfflineCalibData *offlineCalibData, const EventContext &ctx) const
Definition: ClusterMakerTool.cxx:454
PixelCluster
Definition: Trigger/TrigAccel/TrigCudaFitter/src/PixelCluster.h:8
PixelOfflineCalibData.h
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
ISiLorentzAngleTool.h
InDet::ClusterMakerTool::ClusterMakerTool
ClusterMakerTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: ClusterMakerTool.cxx:142
SCT_Cluster
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SCT_Cluster.h:8
InDet::ClusterMakerTool::pixelCluster
PixelCluster pixelCluster(const Identifier &clusterID, const Amg::Vector2D &localPos, std::vector< Identifier > &&rdoList, const int lvl1a, std::vector< int > &&totList, const SiWidth &width, const InDetDD::SiDetectorElement *element, bool ganged, int errorStrategy, const PixelID &pixelID, bool split, double splitProb1, double splitProb2, const PixelChargeCalibCondData *calibData, const PixelCalib::PixelOfflineCalibData *offlineCalibData, const EventContext &ctx) const
Definition: ClusterMakerTool.cxx:417
GeoPrimitives.h
InDet::ClusterMakerTool::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: ClusterMakerTool.h:168
InDet::ClusterMakerTool::initialize
StatusCode initialize()
Definition: ClusterMakerTool.cxx:152
PixelCalib::PixelOfflineCalibData
Definition: PixelOfflineCalibData.h:31
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
PixelChargeCalibCondData
Definition: PixelChargeCalibCondData.h:24
PixelClusterContainer.h
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PixelCluster.h
InDet::SCT_Cluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h:34
IPixelReadoutManager.h
ReadCondHandleKey.h
InDet::ClusterMakerTool::makePixelCluster
ClusterType makePixelCluster(const Identifier &clusterID, const Amg::Vector2D &localPos, IdentifierVec &&rdoList, const int lvl1a, ToTList &&totList, const SiWidth &width, const InDetDD::SiDetectorElement *element, bool ganged, int errorStrategy, const PixelID &pixelID, bool split, double splitProb1, double splitProb2, const PixelChargeCalibCondData *calibData, const PixelCalib::PixelOfflineCalibData *offlineCalibData, const EventContext &ctx, xAOD::PixelCluster *cluster=nullptr) const
Definition: ClusterMakerTool.cxx:198
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDet::ClusterMakerTool::sctCluster
SCT_Cluster sctCluster(const Identifier &clusterID, const Amg::Vector2D &localPos, std::vector< Identifier > &&rdoList, const SiWidth &width, const InDetDD::SiDetectorElement *element, int errorStrategy) const
Definition: ClusterMakerTool.cxx:508
InDet::ClusterMakerTool::~ClusterMakerTool
~ClusterMakerTool()=default
InDet::PixelCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:49
InDet::ClusterMakerTool::getPixelCTBPhiError
double getPixelCTBPhiError(int layer, int phi, int PhiClusterSize) const
Definition: ClusterMakerTool.cxx:587
xAOD::PixelCluster_v1
Definition: PixelCluster_v1.h:17
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
InDet::SiWidth
Definition: SiWidth.h:25
AthAlgTool
Definition: AthAlgTool.h:26
InDet::ClusterMakerTool::m_pixelLorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool
Definition: ClusterMakerTool.h:171
PixelID
Definition: PixelID.h:67
InDet::ClusterMakerTool::m_sctLorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_sctLorentzAngleTool
Definition: ClusterMakerTool.h:174
PixelChargeCalibCondData.h
InDet::ClusterMakerTool
Definition: ClusterMakerTool.h:56
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
InDet::ClusterMakerTool::m_forceErrorStrategy1B
bool m_forceErrorStrategy1B
Definition: ClusterMakerTool.h:176
ServiceHandle
Definition: ClusterMakerTool.h:37
InDet::ClusterMakerTool::interfaceID
static const InterfaceID & interfaceID()
Definition: ClusterMakerTool.h:68
Identifier
Definition: IdentifierFieldParser.cxx:14