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 
30 
31 #include "GaudiKernel/ToolHandle.h"
32 
33 #include <atomic>
34 #include <vector>
35 
36 template <class T> class ServiceHandle;
37 class Identifier;
38 class StatusCode;
39 
40 namespace InDetDD {
41  class SiDetectorElement;
42 }
43 
44 
45 class PixelID;
46 
47 namespace InDet {
48 
49 static const InterfaceID IID_ClusterMakerTool("InDet::ClusterMakerTool", 1, 0);
50 
51 class PixelCluster;
52 class SCT_Cluster;
53 class SiWidth;
54 
55 class ClusterMakerTool : public AthAlgTool {
56 
58  // Public methods:
60 public:
61 
62  ClusterMakerTool(const std::string &type,
63  const std::string &name,
64  const IInterface *parent);
65  ~ClusterMakerTool() = default;
66 
67  static const InterfaceID& interfaceID() { return IID_ClusterMakerTool; };
68 
70 
71 
72  // Compute the pixel cluster global position, and the error associated
73  // to the position.
74  // Called by the pixel clustering tools
75  //
76  // Input parameters
77  // - the cluster Identifier
78  // - the position in local reference frame
79  // - the list of identifiers of the Raw Data Objects belonging to the cluster
80  // - the width of the cluster
81  // - the module the cluster belongs to
82  // - wheter the cluster contains ganged pixels
83  // - the error strategy, currently
84  // 0: cluster width/sqrt(12.)
85  // 1: pixel pitch/sqrt(12.)
86  // 2: parametrized as a function ofpseudorapidity and cluster size
87  // (default)
88  // 10: CTB parametrization (as a function of module and cluster size)
89  // no magnetic field
90  // - const reference to a PixelID helper class
91  PixelCluster pixelCluster(const Identifier& clusterID,
92  const Amg::Vector2D& localPos,
93  std::vector<Identifier>&& rdoList,
94  const int lvl1a,
95  std::vector<int>&& totList,
96  const SiWidth& width,
97  const InDetDD::SiDetectorElement* element,
98  bool ganged,
99  int errorStrategy,
100  const PixelID& pixelID,
101  bool split,
102  double splitProb1,
103  double splitProb2,
104  const PixelChargeCalibCondData *calibData,
105  const PixelCalib::PixelOfflineCalibData *offlineCalibData,
106  const EventContext& ctx) const;
107 
109  const Amg::Vector2D& localPos,
110  const std::vector<Identifier>& rdoList,
111  const int lvl1a,
112  const std::vector<int>& totList,
113  const SiWidth& width,
114  const InDetDD::SiDetectorElement* element,
115  bool ganged,
116  int errorStrategy,
117  const PixelID& pixelID,
118  bool split,
119  double splitProb1,
120  double splitProb2,
121  const PixelChargeCalibCondData *calibData,
122  const PixelCalib::PixelOfflineCalibData *offlineCalibData,
123  const EventContext& ctx) const;
124 
125  // Computes global position and errors for SCT cluster.
126  // Called by SCT Clustering tools
127  //
128  // Input parameters
129  // - the cluster Identifier
130  // - the position in local reference frame
131  // - the list of identifiers of the Raw Data Objects belonging to the cluster
132  // - the width of the cluster
133  // - the module the cluster belongs to
134  // - the error strategy, currently
135  // 0: Cluster Width/sqrt(12.)
136  // 1: Set to a different values for one and two-strip clusters (def.)
137 
138  SCT_Cluster sctCluster(const Identifier& clusterID,
139  const Amg::Vector2D& localPos,
140  std::vector<Identifier>&& rdoList,
141  const SiWidth& width,
142  const InDetDD::SiDetectorElement* element,
143  int errorStrategy) const;
144 
145 private:
146 
147  template <typename ClusterType, typename IdentifierVec, typename ToTList>
148  ClusterType makePixelCluster(const Identifier& clusterID,
149  const Amg::Vector2D& localPos,
150  IdentifierVec&& rdoList,
151  const int lvl1a,
152  ToTList&& totList,
153  const SiWidth& width,
154  const InDetDD::SiDetectorElement* element,
155  bool ganged,
156  int errorStrategy,
157  const PixelID& pixelID,
158  bool split,
159  double splitProb1,
160  double splitProb2,
161  const PixelChargeCalibCondData *calibData,
162  const PixelCalib::PixelOfflineCalibData *offlineCalibData,
163  const EventContext& ctx,
164  xAOD::PixelCluster* cluster = nullptr) const;
165 
166  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool
167  {this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
168 
169  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool
170  {this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};
171 
173 
174  // Parametrization of the Pixel errors
175  // now moved in PixelConditionsData, except for CTB parametrization
176 
177  double getPixelCTBPhiError(int layer, int phi, int PhiClusterSize) const;
178 
179 };
180 
181 }
182 
183 #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
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
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:139
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
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::initialize
StatusCode initialize()
Definition: ClusterMakerTool.cxx:149
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
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:191
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
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
InDet::SiWidth
Definition: SiWidth.h:25
AthAlgTool
Definition: AthAlgTool.h:26
InDet::ClusterMakerTool::m_pixelLorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool
Definition: ClusterMakerTool.h:167
PixelID
Definition: PixelID.h:67
InDet::ClusterMakerTool::m_sctLorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_sctLorentzAngleTool
Definition: ClusterMakerTool.h:170
PixelChargeCalibCondData.h
InDet::ClusterMakerTool
Definition: ClusterMakerTool.h:55
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
InDet::ClusterMakerTool::m_forceErrorStrategy1B
bool m_forceErrorStrategy1B
Definition: ClusterMakerTool.h:172
ServiceHandle
Definition: ClusterMakerTool.h:36
InDet::ClusterMakerTool::interfaceID
static const InterfaceID & interfaceID()
Definition: ClusterMakerTool.h:67
Identifier
Definition: IdentifierFieldParser.cxx:14