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