ATLAS Offline Software
Loading...
Searching...
No Matches
ClusterMakerTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5//***************************************************************************
6//
7// Implementation for ClusterMaker
8//
9//****************************************************************************
10
11#include "CLHEP/Units/SystemOfUnits.h"
12#include "CLHEP/Matrix/SymMatrix.h"
13#include "GaudiKernel/ToolHandle.h"
14#include "GaudiKernel/ServiceHandle.h"
22
25
27
28#include <memory>
29
31using CLHEP::micrometer;
32
33namespace {
34
35inline double square(const double x){
36 return x*x;
37}
38constexpr double ONE_TWELFTH = 1./12.;
39
40// Some methods below can be parameterized on the pixel cluster type,
41// The following functions allow using a function parameter for common
42// operations.
43// [ Omegax = TOT1/(TOT1+TOT2), where TOT1 and TOT2 are the sum of the
44// charges of the first and last row of the cluster respectively
45// Omegay: similar definition with columns rather than rows ]
46InDet::PixelCluster newInDetpixelCluster(const Identifier& RDOId,
47 const Amg::Vector2D& locpos,
48 const Amg::Vector3D& globpos,
49 std::vector<Identifier>&& rdoList,
50 const int lvl1a,
51 std::vector<int>&& totList,
52 std::vector<float>&& chargeList,
53 const InDet::SiWidth& width,
54 const InDetDD::SiDetectorElement* detEl,
55 Amg::MatrixX&& locErrMat,
56 const float omegax,
57 const float omegay,
58 bool split,
59 float splitProb1,
60 float splitProb2)
61{
62 return InDet::PixelCluster(RDOId,
63 locpos,
64 globpos,
65 std::move(rdoList),
66 lvl1a,
67 std::move(totList),
68 std::move(chargeList),
69 width,
70 detEl,
71 std::move(locErrMat),
72 omegax,
73 omegay,
74 split,
75 splitProb1,
76 splitProb2);
77}
78
79// Function-like class to add an xAOD::PixelCluster to an
80// xAOD::PixelClusterContainer. This is needed because the
81// PixelCluster object needs an aux store for the setMeasurement call
82// to not crash
83class AddNewxAODpixelCluster {
84public:
85 explicit AddNewxAODpixelCluster(xAOD::PixelCluster& cluster)
86 : m_cluster(&cluster) {}
87
88 xAOD::PixelCluster* operator()(const Identifier& /*RDOId*/,
89 const Amg::Vector2D& locpos,
90 const Amg::Vector3D& globpos,
91 const std::vector<Identifier>& rdoList,
92 const int lvl1a,
93 const std::vector<int>& totList,
94 const std::vector<float>& chargeList,
95 const InDet::SiWidth& width,
96 const InDetDD::SiDetectorElement* detEl,
97 const Amg::MatrixX& locErrMat,
98 bool /*split*/,
99 float /*splitProb1*/,
100 float /*splitProb2*/) {
101 IdentifierHash idHash = detEl->identifyHash();
102
103 Eigen::Matrix<float,2,1> localPosition(locpos.x(), locpos.y());
104 Eigen::Matrix<float,2,2> localCovariance = Eigen::Matrix<float,2,2>::Zero();
105 localCovariance(0, 0) = locErrMat(0, 0);
106 localCovariance(1, 1) = locErrMat(1, 1);
107
108 m_cluster->setMeasurement<2>(idHash, localPosition, localCovariance);
109 m_cluster->setRDOlist(rdoList);
110 m_cluster->globalPosition() = globpos.cast<float>();
111 m_cluster->setToTlist(totList);
112 m_cluster->setChargelist(chargeList);
113 m_cluster->setLVL1A(lvl1a);
114 m_cluster->setChannelsInPhiEta(width.colRow()[0], width.colRow()[1]);
115 m_cluster->setWidthInEta(static_cast<float>(width.widthPhiRZ()[1]));
116
117 return m_cluster;
118 }
119
120private:
121 xAOD::PixelCluster *m_cluster;
122};
123
124
125}
126
127
128namespace InDet {
129
130// using namespace Trk;
131
132// Constructor with parameters:
134 const std::string& n,
135 const IInterface* p) :
136 AthAlgTool(t,n,p)
137{
138 declareInterface<ClusterMakerTool>(this);
139}
140
141//================ Initialisation =============================================
142
144 // Code entered here will be executed once at program start.
145
146 ATH_MSG_DEBUG ( name() << " initialize()" );
147
148 if (not m_pixelLorentzAngleTool.empty()) {
150 } else {
151 m_pixelLorentzAngleTool.disable();
152 }
153 if (not m_sctLorentzAngleTool.empty()) {
155 } else {
156 m_sctLorentzAngleTool.disable();
157 }
158
159
160 return StatusCode::SUCCESS;
161}
162
163
164// Compute the pixel cluster global position, and the error associated
165// to the position.
166// Called by the pixel clustering tools
167//
168// Input parameters
169// - the cluster Identifier
170// - the position in local reference frame
171// - the list of identifiers of the Raw Data Objects belonging to the cluster
172// - the width of the cluster
173// - the module the cluster belongs to
174// - wheter the cluster contains ganged pixels
175// - the error strategy, currently
176// 0: cluster width/sqrt(12.)
177// 1: pixel pitch/sqrt(12.)
178// 2: parametrized as a function ofpseudorapidity and cluster size
179// (default)
180// 10: CTB parametrization (as a function of module and cluster size)
181// no magnetic field
182// - const reference to a PixelID helper class
183
184template <typename ClusterType, typename IdentifierVec, typename ToTList>
186 const Identifier& clusterID,
187 const Amg::Vector2D& localPos,
188 IdentifierVec&& rdoList,
189 const int lvl1a,
190 ToTList&& totList,
191 const SiWidth& width,
192 const InDetDD::SiDetectorElement* element,
193 bool ganged,
194 int errorStrategy,
195 const PixelID& pixelID,
196 bool split,
197 double splitProb1,
198 double splitProb2,
199 const PixelChargeCalibCondData *calibData,
200 const PixelOfflineCalibData *offlineCalibData,
201 const EventContext& ctx,
202 xAOD::PixelCluster* cluster) const{
203
204 ATH_MSG_VERBOSE("ClusterMakerTool called, number ");
205 if ( errorStrategy==2 && m_forceErrorStrategy1B ) errorStrategy=1;
206
207 // Fill vector of charges and compute charge balance
208 const InDetDD::PixelModuleDesign* design = (dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design()));
209 if (not design){
210 throw std::runtime_error( "Dynamic cast failed for design in ClusterMakerTool.cxx");
211 }
212 int rowMin = design->rows();
213 int rowMax = 0;
214 int colMin = design->columns();
215 int colMax = 0;
216 float qRowMin = 0; float qRowMax = 0;
217 float qColMin = 0; float qColMax = 0;
218 std::vector<float> chargeList;
219 int nRDO=rdoList.size();
220 if (calibData) {
221 chargeList.reserve(nRDO);
222 IdentifierHash moduleHash = element->identifyHash(); // wafer hash
223 for (int i=0; i<nRDO; i++) {
224 Identifier pixid=rdoList[i];
225 int ToT=totList[i];
226
227 float charge = ToT;
228 assert( element->identifyHash() == pixelID.wafer_hash(pixelID.wafer_id(pixid)));
229 std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
231 pixelID.eta_index(pixid));
232 InDetDD::PixelDiodeTree::DiodeProxy si_param ( design->diodeProxyFromIdx(diode_idx));
233 std::uint32_t feValue = design->getFE(si_param);
234 auto diode_type = design->getDiodeType(si_param);
236 && design->numberOfConnectedCells( design->readoutIdOfCell(InDetDD::SiCellId(diode_idx[0],diode_idx[1])))>1) {
238 }
239
240 charge = calibData->getCharge(diode_type, moduleHash, feValue, ToT);
241 if (design->getReadoutTechnology() != InDetDD::PixelReadoutTechnology::RD53 && (moduleHash<12 || moduleHash>2035)) {
242 charge = ToT/8.0*(8000.0-1200.0)+1200.0;
243 }
244 chargeList.push_back(charge);
245 }
246 }
247
248 for (int i=0; i<nRDO; i++) {
249 Identifier pixid=rdoList[i];
250 int ToT=totList[i];
251
252 float charge = ToT;
253 if (calibData) { charge=chargeList[i]; }
254
255 // std::cout << "tot, charge = " << ToT << " " << charge << std::endl;
256 int row = pixelID.phi_index(pixid);
257 int col = pixelID.eta_index(pixid);
258 if (row == rowMin) qRowMin += charge;
259 if (row < rowMin){
260 rowMin = row;
261 qRowMin = charge;
262 }
263
264 if (row == rowMax) qRowMax += charge;
265 if (row > rowMax){
266 rowMax = row;
267 qRowMax = charge;
268 }
269 if (col == colMin) qColMin += charge;
270 if (col < colMin){
271 colMin = col;
272 qColMin = charge;
273 }
274
275 if (col == colMax) qColMax += charge;
276 if (col > colMax){
277 colMax = col;
278 qColMax = charge;
279 }
280 }
281
282 Identifier newClusterID = pixelID.pixel_id(pixelID.wafer_id(clusterID),rowMin,colMin);
283 // Compute omega for charge interpolation correction (if required)
284 // Two pixels may have charge=0 (very rarely, hopefully)
285 float omegax = -1;
286 float omegay = -1;
287 if(qRowMin+qRowMax > 0) omegax = qRowMax/float(qRowMin+qRowMax);
288 if(qColMin+qColMax > 0) omegay = qColMax/float(qColMin+qColMax);
289
290 ATH_MSG_VERBOSE("omega = " << omegax << " " << omegay);
291
292// ask for Lorentz correction, get global position
293 double shift = m_pixelLorentzAngleTool->getLorentzShift(element->identifyHash(), ctx);
294 Amg::Vector2D locpos(localPos[Trk::locX]+shift, localPos[Trk::locY]);
295// find global position of element
296 const Amg::Transform3D& T = element->surface().transform();
297 double Ax[3] = {T(0,0),T(1,0),T(2,0)};
298 double Ay[3] = {T(0,1),T(1,1),T(2,1)};
299 double R [3] = {T(0,3),T(1,3),T(2,3)};
300
301 const Amg::Vector2D& M = locpos;
302 Amg::Vector3D globalPos(M[0]*Ax[0]+M[1]*Ay[0]+R[0],M[0]*Ax[1]+M[1]*Ay[1]+R[1],M[0]*Ax[2]+M[1]*Ay[2]+R[2]);
303
304 // error matrix
305 const Amg::Vector2D& colRow = width.colRow();// made ref to avoid
306 // unnecessary copy EJWM
307 auto errorMatrix = Amg::MatrixX(2,2);
308 errorMatrix.setIdentity();
309
310 // switches are more readable **OPT**
311 // actually they're slower as well (so I'm told) so perhaps
312 // this should be re-written at some point EJWM
313 double eta = std::abs(globalPos.eta());
314 double zPitch = width.z()/colRow.y();
315
316 const AtlasDetectorID* aid = element->getIdHelper();
317
319 throw std::runtime_error( "Wrong helper type in ClusterMakerTool.cxx.");
320 }
321 const PixelID* pid = static_cast<const PixelID*>(aid);
322 int layer = pid->layer_disk(clusterID);
323 int phimod = pid->phi_module(clusterID);
324 switch (errorStrategy){
325 case 0:
326 errorMatrix.fillSymmetric(0,0,square(width.phiR())*ONE_TWELFTH);
327 errorMatrix.fillSymmetric(1,1,square(width.z())*ONE_TWELFTH);
328 break;
329 case 1:
330 errorMatrix.fillSymmetric(0,0,square(width.phiR()/colRow.x())*ONE_TWELFTH);
331 errorMatrix.fillSymmetric(1,1,square(width.z()/colRow.y())*ONE_TWELFTH);
332 break;
333 case 2:
334 // use parameterization only if the cluster does not
335 // contain long pixels or ganged pixels
336 // Also require calibration service is available....
337 if (!ganged && zPitch>399*micrometer && zPitch<401*micrometer) {
338 if (offlineCalibData) {
339 if (element->isBarrel()) {
340 int ibin = offlineCalibData->getPixelClusterErrorData()->getBarrelBin(eta,int(colRow.y()),int(colRow.x()));
341 double phiError = offlineCalibData->getPixelClusterErrorData()->getPixelBarrelPhiError(ibin);
342 double etaError = offlineCalibData->getPixelClusterErrorData()->getPixelBarrelEtaError(ibin);
343 errorMatrix.fillSymmetric(0,0,pow(phiError,2));
344 errorMatrix.fillSymmetric(1,1,pow(etaError,2));
345 }
346 else {
347 int ibin = offlineCalibData->getPixelClusterErrorData()->getEndcapBin(int(colRow.y()),int(colRow.x()));
348 double phiError = offlineCalibData->getPixelClusterErrorData()->getPixelEndcapPhiError(ibin);
349 double etaError = offlineCalibData->getPixelClusterErrorData()->getPixelEndcapRError(ibin);
350 errorMatrix.fillSymmetric(0,0,square(phiError));
351 errorMatrix.fillSymmetric(1,1,square(etaError));
352 }
353 }
354 }else{// cluster with ganged and/or long pixels
355 errorMatrix.fillSymmetric(0,0,square(width.phiR()/colRow.x())*ONE_TWELFTH);
356 errorMatrix.fillSymmetric(1,1,square(zPitch)*ONE_TWELFTH);
357 }
358 break;
359
360 case 10:
361 errorMatrix.fillSymmetric(0,0,square( getPixelCTBPhiError(layer,phimod,int(colRow.x()))));
362 errorMatrix.fillSymmetric(1,1,square(width.z()/colRow.y())*ONE_TWELFTH);
363 break;
364
365 default:
366 errorMatrix.fillSymmetric(0,0,square(width.phiR()/colRow.x())*ONE_TWELFTH);
367 errorMatrix.fillSymmetric(1,1,square(width.z()/colRow.y())*ONE_TWELFTH);
368 break;
369 }
370
371 //1) We want to move always for the Trk::PixelCluster
372 //2) We forward the rdoList and chargeList that could have be passed
373 // different ways.
374 //
375 static_assert(std::is_same_v<ClusterType, PixelCluster> ||
376 std::is_same_v<std::remove_pointer_t<ClusterType>,
378 "Not an InDet::PixelCluster or xAOD::PixelCluster");
379 if constexpr (std::is_same<ClusterType, InDet::PixelCluster>::value) {
380 return newInDetpixelCluster(newClusterID, locpos,
381 globalPos,
382 std::forward<IdentifierVec>(rdoList),
383 lvl1a,
384 std::forward<ToTList>(totList),
385 std::move(chargeList),
386 width,
387 element,
388 std::move(errorMatrix),
389 omegax,
390 omegay,
391 split,
392 splitProb1,
393 splitProb2);
394 } else{
395 return AddNewxAODpixelCluster(*cluster)(newClusterID,
396 locpos,
397 globalPos,
398 std::forward<IdentifierVec>(rdoList),
399 lvl1a,
400 std::forward<ToTList>(totList),
401 chargeList,
402 width,
403 element,
404 errorMatrix,
405 split,
406 splitProb1,
407 splitProb2);
408 }
409}
410
412 const Identifier& clusterID,
413 const Amg::Vector2D& localPos,
414 std::vector<Identifier>&& rdoList,
415 const int lvl1a,
416 std::vector<int>&& totList,
417 const SiWidth& width,
418 const InDetDD::SiDetectorElement* element,
419 bool ganged,
420 int errorStrategy,
421 const PixelID& pixelID,
422 bool split,
423 double splitProb1,
424 double splitProb2,
425 const PixelChargeCalibCondData *calibData,
426 const PixelOfflineCalibData *offlineCalibData,
427 const EventContext& ctx) const
428{
430 clusterID,
431 localPos,
432 std::move(rdoList),
433 lvl1a,
434 std::move(totList),
435 width,
436 element,
437 ganged,
438 errorStrategy,
439 pixelID,
440 split,
441 splitProb1,
442 splitProb2,
443 calibData,
444 offlineCalibData,
445 ctx);
446}
447
449 xAOD::PixelCluster& cluster,
450 const Amg::Vector2D& localPos,
451 const std::vector<Identifier>& rdoList,
452 const int lvl1a,
453 const std::vector<int>& totList,
454 const SiWidth& width,
455 const InDetDD::SiDetectorElement* element,
456 bool ganged,
457 int errorStrategy,
458 const PixelID& pixelID,
459 bool split,
460 double splitProb1,
461 double splitProb2,
462 const PixelChargeCalibCondData *calibData,
463 const PixelOfflineCalibData *offlineCalibData,
464 const EventContext& ctx) const
465{
467 Identifier(),
468 localPos,
469 rdoList,
470 lvl1a,
471 totList,
472 width,
473 element,
474 ganged,
475 errorStrategy,
476 pixelID,
477 split,
478 splitProb1,
479 splitProb2,
480 calibData,
481 offlineCalibData,
482 ctx,
483 &cluster);
484}
485
486// Computes global position and errors for SCT cluster.
487// Called by SCT Clustering tools
488//
489// Input parameters
490// - the cluster Identifier
491// - the position in local reference frame
492// - the list of identifiers of the Raw Data Objects belonging to the cluster
493// - the width of the cluster
494// - the module the cluster belongs to
495// - the error strategy, currently
496// 0: Cluster Width/sqrt(12.)
497// 1: Set to a different values for one and two-strip clusters (def.)
498// The scale factors were derived by the study reported on 25th September 2006.
499// https://indico.cern.ch/event/430391/contributions/1066157/attachments/929942/1317007/SCTSoft_25Sept06_clusters.pdf
500
503 const Amg::Vector2D& localPos,
504 std::vector<Identifier>&& rdoList,
505 const SiWidth& width,
506 const InDetDD::SiDetectorElement* element,
507 int errorStrategy) const
508{
509
510 double shift =
511 m_sctLorentzAngleTool->getLorentzShift(element->identifyHash(), Gaudi::Hive::currentContext());
512 Amg::Vector2D locpos(localPos[Trk::locX] + shift, localPos[Trk::locY]);
513
514 // error matrix
515 const Amg::Vector2D& colRow = width.colRow(); // made ref to avoid
516 // unnecessary copy EJWM
517
518 auto errorMatrix = Amg::MatrixX(2,2);
519 errorMatrix.setIdentity();
520
521 // switches are more readable **OPT**
522 // actually they're slower as well (so I'm told) so perhaps
523 // this should be re-written at some point EJWM
524
525 switch (errorStrategy){
526 case 0:
527 errorMatrix.fillSymmetric(0,0,square(width.phiR())*ONE_TWELFTH);
528 errorMatrix.fillSymmetric(1,1,square(width.z())*ONE_TWELFTH);
529 break;
530 case 1:
531 // mat(1,1) = pow(width.phiR()/colRow.x(),2)/12;
532 // single strip - resolution close to pitch/sqrt(12)
533 // two-strip hits: better resolution, approx. 40% lower
534 if(colRow.x() == 1){
535 errorMatrix.fillSymmetric(0,0,square(1.05*width.phiR())*ONE_TWELFTH);
536 }
537 else if(colRow.x() == 2){
538 errorMatrix.fillSymmetric(0,0,square(0.27*width.phiR())*ONE_TWELFTH);
539 }
540 else{
541 errorMatrix.fillSymmetric(0,0,square(width.phiR())*ONE_TWELFTH);
542 }
543 errorMatrix.fillSymmetric(1,1,square(width.z()/colRow.y())*ONE_TWELFTH);
544 break;
545 default:
546 // single strip - resolution close to pitch/sqrt(12)
547 // two-strip hits: better resolution, approx. 40% lower
548 if(colRow.x() == 1){
549 errorMatrix.fillSymmetric(0,0,square(width.phiR())*ONE_TWELFTH);
550 }
551 else if(colRow.x() == 2){
552 errorMatrix.fillSymmetric(0,0,square(0.27*width.phiR())*ONE_TWELFTH);
553 }
554 else{
555 errorMatrix.fillSymmetric(0,0,square(width.phiR())*ONE_TWELFTH);
556 }
557 errorMatrix.fillSymmetric(1,1,square(width.z()/colRow.y())*ONE_TWELFTH);
558 break;
559 }
560
561 auto designShape = element->design().shape();
562 // rotation for endcap SCT
563 if(designShape == InDetDD::Trapezoid || designShape == InDetDD::Annulus) {
564 double sn = element->sinStereoLocal(localPos);
565 double sn2 = sn*sn;
566 double cs2 = 1.-sn2;
567 double w = element->phiPitch(localPos)/element->phiPitch();
568 double v0 = (errorMatrix)(0,0)*w*w;
569 double v1 = (errorMatrix)(1,1);
570 errorMatrix.fillSymmetric(0,0,cs2*v0+sn2*v1);
571 errorMatrix.fillSymmetric(0,1,sn*sqrt(cs2)*(v0-v1));
572 errorMatrix.fillSymmetric(1,1,sn2*v0+cs2*v1);
573 } //else if (designShape == InDetDD::PolarAnnulus) {// Polar rotation for endcap}
574
575 return SCT_Cluster(clusterID, locpos, std::move(rdoList), width, element, std::move(errorMatrix));
576
577}
578
579//---------------------------------------------------------------------------
580// CTB parameterization, B field off
582 int phiClusterSize) const{
583
584 double sigmaL0Phi1[3] = { 8.2*micrometer, 9.7*micrometer, 14.6*micrometer};
585 double sigmaL1Phi1[3] = {14.6*micrometer, 9.3*micrometer, 14.6*micrometer};
586 double sigmaL2Phi1[3] = {14.6*micrometer, 8.6*micrometer, 14.6*micrometer};
587 double sigmaL0Phi0[3] = {14.6*micrometer, 13.4*micrometer, 13.0*micrometer};
588 double sigmaL1Phi0[3] = {14.6*micrometer, 8.5*micrometer, 11.0*micrometer};
589 double sigmaL2Phi0[3] = {14.6*micrometer, 11.6*micrometer, 9.3*micrometer};
590
591 if(phiClusterSize > 3) return 14.6*micrometer;
592
593 if(layer == 0 && phi == 0) return sigmaL0Phi0[phiClusterSize-1];
594 if(layer == 1 && phi == 0) return sigmaL1Phi0[phiClusterSize-1];
595 if(layer == 2 && phi == 0) return sigmaL2Phi0[phiClusterSize-1];
596 if(layer == 0 && phi == 1) return sigmaL0Phi1[phiClusterSize-1];
597 if(layer == 1 && phi == 1) return sigmaL1Phi1[phiClusterSize-1];
598 if(layer == 2 && phi == 1) return sigmaL2Phi1[phiClusterSize-1];
599
600 // shouldn't really happen...
601 ATH_MSG_WARNING("Unexpected layer and phi numbers: layer = "
602 << layer << " and phi = " << phi);
603 return 14.6*micrometer;
604
605}
606
607}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
double charge(const T &p)
Definition AtlasPID.h:997
This is an Identifier helper class for the Pixel subdetector.
void operator()(T1)
const double width
#define x
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
virtual HelperType helper() const
Type of helper, defaulted to 'Unimplemented'.
This is a "hash" representation of an Identifier.
virtual DetectorShape shape() const
Shape of element.
static constexpr std::array< PixelDiodeTree::CellIndexType, 2 > makeCellIndex(T local_x_idx, T local_y_idx)
Create a 2D cell index from the indices in local-x (phi, row) and local-y (eta, column) direction.
Class used to describe the design of a module (diode segmentation and readout scheme).
virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const
readout id -> id of connected diodes
PixelReadoutTechnology getReadoutTechnology() const
int columns() const
Number of cell columns per module:
PixelDiodeTree::DiodeProxy diodeProxyFromIdx(const std::array< PixelDiodeTree::IndexType, 2 > &idx) const
int rows() const
Number of cell rows per module:
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const
diode id -> readout id
static InDetDD::PixelDiodeType getDiodeType(const PixelDiodeTree::DiodeProxy &diode_proxy)
static unsigned int getFE(const PixelDiodeTree::DiodeProxy &diode_proxy)
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
Class to hold geometrical description of a silicon detector element.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
double phiPitch() const
Pitch (inline methods).
double sinStereoLocal(const Amg::Vector2D &localPos) const
Angle of strip in local frame with respect to the etaAxis.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline).
Trk::Surface & surface()
Element Surface.
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
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
ToolHandle< ISiLorentzAngleTool > m_sctLorentzAngleTool
ClusterMakerTool(const std::string &type, const std::string &name, const IInterface *parent)
double getPixelCTBPhiError(int layer, int phi, int PhiClusterSize) const
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
ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool
SCT_Cluster sctCluster(const Identifier &clusterID, const Amg::Vector2D &localPos, std::vector< Identifier > &&rdoList, const SiWidth &width, const InDetDD::SiDetectorElement *element, int errorStrategy) const
int getBarrelBin(double eta, int etaClusterSize, int phiClusterSize) const
int getEndcapBin(int etaClusterSize, int phiClusterSize) const
PixelClusterErrorData * getPixelClusterErrorData()
float getCharge(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE, float ToT) const
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:69
int eta_index(const Identifier &id) const
Definition PixelID.h:640
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition PixelID.h:355
Identifier pixel_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
Definition PixelID.h:423
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition PixelID.h:378
int phi_index(const Identifier &id) const
Definition PixelID.h:634
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:179
constexpr double ONE_TWELFTH
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Primary Vertex Finder.
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
Helper class to access parameters of a diode.