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) 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) const;
123 
124  // Computes global position and errors for SCT cluster.
125  // Called by SCT Clustering tools
126  //
127  // Input parameters
128  // - the cluster Identifier
129  // - the position in local reference frame
130  // - the list of identifiers of the Raw Data Objects belonging to the cluster
131  // - the width of the cluster
132  // - the module the cluster belongs to
133  // - the error strategy, currently
134  // 0: Cluster Width/sqrt(12.)
135  // 1: Set to a different values for one and two-strip clusters (def.)
136 
137  SCT_Cluster sctCluster(const Identifier& clusterID,
138  const Amg::Vector2D& localPos,
139  std::vector<Identifier>&& rdoList,
140  const SiWidth& width,
141  const InDetDD::SiDetectorElement* element,
142  int errorStrategy) const;
143 
144 private:
145 
146  template <typename ClusterType, typename IdentifierVec, typename ToTList>
147  ClusterType makePixelCluster(const Identifier& clusterID,
148  const Amg::Vector2D& localPos,
149  IdentifierVec&& rdoList,
150  const int lvl1a,
151  ToTList&& totList,
152  const SiWidth& width,
153  const InDetDD::SiDetectorElement* element,
154  bool ganged,
155  int errorStrategy,
156  const PixelID& pixelID,
157  bool split,
158  double splitProb1,
159  double splitProb2,
160  const PixelChargeCalibCondData *calibData,
161  const PixelCalib::PixelOfflineCalibData *offlineCalibData,
162  xAOD::PixelCluster* cluster = nullptr) const;
163 
165  {this, "PixelReadoutManager", "PixelReadoutManager", "Pixel readout manager" };
166 
167  ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool
168  {this, "PixelLorentzAngleTool", "SiLorentzAngleTool/PixelLorentzAngleTool", "Tool to retreive Lorentz angle of Pixel"};
169 
170  ToolHandle<ISiLorentzAngleTool> m_sctLorentzAngleTool
171  {this, "SCTLorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retreive Lorentz angle of SCT"};
172 
174 
175  // Parametrization of the Pixel errors
176  // now moved in PixelConditionsData, except for CTB parametrization
177 
178  double getPixelCTBPhiError(int layer, int phi, int PhiClusterSize) const;
179 
180 };
181 
182 }
183 
184 #endif // INDETRIOMAKER_CLUSTERMAKERTOOL_H
PixelCluster
Definition: Trigger/TrigAccel/TrigCudaFitter/src/PixelCluster.h:7
PixelOfflineCalibData.h
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
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
Definition: ClusterMakerTool.cxx:416
ISiLorentzAngleTool.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, xAOD::PixelCluster *cluster=nullptr) const
Definition: ClusterMakerTool.cxx:198
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:7
GeoPrimitives.h
InDet::ClusterMakerTool::m_pixelReadout
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
Definition: ClusterMakerTool.h:165
InDet::ClusterMakerTool::initialize
StatusCode initialize()
Definition: ClusterMakerTool.cxx:152
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
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
Definition: ClusterMakerTool.cxx:451
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:503
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:582
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:168
PixelID
Definition: PixelID.h:67
InDet::ClusterMakerTool::m_sctLorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_sctLorentzAngleTool
Definition: ClusterMakerTool.h:171
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:173
ServiceHandle
Definition: ClusterMakerTool.h:37
InDet::ClusterMakerTool::interfaceID
static const InterfaceID & interfaceID()
Definition: ClusterMakerTool.h:68