ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
InDet::PixelClusterOnTrackTool Class Referencefinal

#include <PixelClusterOnTrackTool.h>

Inheritance diagram for InDet::PixelClusterOnTrackTool:
Collaboration diagram for InDet::PixelClusterOnTrackTool:

Public Member Functions

 PixelClusterOnTrackTool (const std::string &, const std::string &, const IInterface *)
 AlgTool constructor. More...
 
virtual ~PixelClusterOnTrackTool ()
 
virtual StatusCode initialize () override
 AlgTool initialisation. More...
 
virtual StatusCode finalize () override
 AlgTool termination. More...
 
virtual InDet::PixelClusterOnTrackcorrect (const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx=Gaudi::Hive::currentContext()) const override
 produces a PixelClusterOnTrack (object factory!). More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 The AlgTool InterfaceID. More...
 

Protected Member Functions

void correctBow (const Identifier &, Amg::Vector2D &locpos, const double tanphi, const double taneta, const EventContext &ctx) const
 
InDet::PixelClusterOnTrackcorrectDefault (const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx) const
 The correct method produces a PixelClusterOnTrack using the measured PixelCluster and the track prediction. More...
 
InDet::PixelClusterOnTrackcorrectNN (const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx) const
 
bool getErrorsDefaultAmbi (const InDet::PixelCluster *, const Trk::TrackParameters &, Amg::Vector2D &, Amg::MatrixX &) const
 
bool getErrorsTIDE_Ambi (const InDet::PixelCluster *, const Trk::TrackParameters &, Amg::Vector2D &, Amg::MatrixX &) const
 
InDet::PixelClusterOnTrackcorrect (const Trk::PrepRawData &, const Trk::TrackParameters &, const InDet::PixelClusterStrategy) const
 
const Trk::ClusterSplitProbabilityContainer::ProbabilityInfogetClusterSplittingProbability (const InDet::PixelCluster *pix) const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadCondHandleKey< PixelDistortionDatam_distortionKey {this, "PixelDistortionData", "PixelDistortionData", "Output readout distortion data"}
 
ToolHandle< ISiLorentzAngleToolm_lorentzAngleTool {this, "LorentzAngleTool", "SiLorentzAngleTool", "Tool to retrieve Lorentz angle"}
 
SG::ReadCondHandleKey< PixelCalib::PixelOfflineCalibDatam_clusterErrorKey {this, "PixelOfflineCalibData", "PixelOfflineCalibData", "Output key of pixel cluster"}
 
SG::ReadCondHandleKey< RIO_OnTrackErrorScalingm_pixelErrorScalingKey {this,"PixelErrorScalingKey", "/Indet/TrkErrorScalingPixel", "Key for pixel error scaling conditions data."}
 
BooleanProperty m_disableDistortions
 toolhandle for central error scaling flag storing if errors need scaling or should be kept nominal More...
 
IntegerProperty m_positionStrategy
 
std::atomic_int m_errorStrategy {2}
 
IntegerProperty m_errorStrategyProperty {this, "ErrorStrategy", 2, "Which calibration of cluster position errors"}
 
const PixelIDm_pixelid = nullptr
 Flag controlling how module distortions are taken into account: More...
 
BooleanProperty m_applyNNcorrectionProperty {this, "applyNNcorrection", false}
 Enable NN based calibration (do only if NN calibration is applied) More...
 
bool m_applyNNcorrection = false
 
BooleanProperty m_NNIBLcorrection {this, "NNIBLcorrection", false}
 
bool m_IBLAbsent = true
 
ToolHandle< NnClusterizationFactorym_NnClusterizationFactory
 NN clusterizationi factory for NN based positions and errors. More...
 
ServiceHandle< IIBLParameterSvcm_IBLParameterSvc {this, "IBLParameterSvc", "IBLParameterSvc"}
 
BooleanProperty m_doNotRecalibrateNN {this, "doNotRecalibrateNN", false}
 
BooleanProperty m_noNNandBroadErrors {this, "noNNandBroadErrors", false}
 
BooleanProperty m_usingTIDE_Ambi {this, "RunningTIDE_Ambi", false}
 Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run) More...
 
SG::ReadHandleKey< InDet::PixelGangedClusterAmbiguitiesm_splitClusterMapKey {this, "SplitClusterAmbiguityMap", ""}
 
SG::ReadHandleKey< Trk::ClusterSplitProbabilityContainerm_clusterSplitProbContainer {this, "ClusterSplitProbabilityName", "",""}
 
double m_calphi [s_nbinphi] {}
 
double m_caleta [s_nbineta][3] {}
 
double m_calerrphi [s_nbinphi][3] {}
 
double m_calerreta [s_nbineta][3] {}
 
double m_phix [s_nbinphi+1] {}
 
double m_etax [s_nbineta+1] {}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static constexpr int s_nbinphi =9
 
static constexpr int s_nbineta =6
 

Detailed Description

Definition at line 61 of file PixelClusterOnTrackTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ PixelClusterOnTrackTool()

InDet::PixelClusterOnTrackTool::PixelClusterOnTrackTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

AlgTool constructor.

Definition at line 57 of file PixelClusterOnTrackTool.cxx.

58  :
59  ::AthAlgTool(t, n, p) {
60  declareInterface<IRIO_OnTrackCreator>(this);
61 }

◆ ~PixelClusterOnTrackTool()

InDet::PixelClusterOnTrackTool::~PixelClusterOnTrackTool ( )
virtualdefault

Member Function Documentation

◆ correct() [1/2]

InDet::PixelClusterOnTrack * InDet::PixelClusterOnTrackTool::correct ( const Trk::PrepRawData rio,
const Trk::TrackParameters trackPar,
const EventContext &  ctx = Gaudi::Hive::currentContext() 
) const
overridevirtual

produces a PixelClusterOnTrack (object factory!).

Depending on job options it changes the pixel cluster position and error according to the parameters (in particular, the angle) of the intersecting track.

Implements Trk::IRIO_OnTrackCreator.

Definition at line 140 of file PixelClusterOnTrackTool.cxx.

141  {
142 
143  const auto *element= dynamic_cast<const InDetDD::SiDetectorElement *>(rio.detectorElement());
144  if ((not m_applyNNcorrection) or (element and element->isBlayer() and (not m_NNIBLcorrection) and (not m_IBLAbsent))){
145  return correctDefault(rio, trackPar, ctx);
146  }else {
147  if (m_errorStrategy == 0 || m_errorStrategy == 1) {
148  // version from Giacinto
149  if (m_noNNandBroadErrors) {
150  return nullptr;
151  }
152  // if we try broad errors, get Pixel Cluster to test if it is split
153  const InDet::PixelCluster *pix = nullptr;
155  pix = static_cast<const InDet::PixelCluster *>(&rio);
156  }
157  if (!pix) {
158  return nullptr;
159  }
161  if (splitProb.isSplit()) {
162  return correctNN(rio, trackPar, ctx);
163  } else {
164  return correctDefault(rio, trackPar, ctx);
165  }
166  } else {
167  return correctNN(rio, trackPar, ctx);
168  }
169  }
170 }

◆ correct() [2/2]

InDet::PixelClusterOnTrack * InDet::PixelClusterOnTrackTool::correct ( const Trk::PrepRawData rio,
const Trk::TrackParameters trackPar,
const InDet::PixelClusterStrategy  strategy 
) const
protected

Definition at line 525 of file PixelClusterOnTrackTool.cxx.

527  {
528  int initial_errorStrategy;
530 
531  switch (strategy) {
532  case InDet::PIXELCLUSTER_OUTLIER: // if cluster is outlier, increase errors
534  initial_errorStrategy = m_errorStrategy;
535  m_errorStrategy = 0; // error as size of cluster /sqrt(12)
536  newROT = correct(rio, trackPar);
537  m_errorStrategy = initial_errorStrategy;
538  return newROT;
539 
540  default:
541  return correct(rio, trackPar);
542  }
543 }

◆ correctBow()

void InDet::PixelClusterOnTrackTool::correctBow ( const Identifier id,
Amg::Vector2D locpos,
const double  tanphi,
const double  taneta,
const EventContext &  ctx 
) const
protected

Definition at line 516 of file PixelClusterOnTrackTool.cxx.

517  {
518  Amg::Vector3D dir(tan(phi), tan(theta), 1.);
519  Amg::Vector2D newpos = SG::ReadCondHandle<PixelDistortionData>(m_distortionKey, ctx)->correctReconstruction(m_pixelid->wafer_hash(id), localpos, dir);
520 
521  localpos = newpos;
522 }

◆ correctDefault()

InDet::PixelClusterOnTrack * InDet::PixelClusterOnTrackTool::correctDefault ( const Trk::PrepRawData rio,
const Trk::TrackParameters trackPar,
const EventContext &  ctx 
) const
protected

The correct method produces a PixelClusterOnTrack using the measured PixelCluster and the track prediction.

Definition at line 178 of file PixelClusterOnTrackTool.cxx.

179  {
180  using CLHEP::micrometer;
181 
182  const double TOPHAT_SIGMA = 1. / std::sqrt(12.);
183 
184  const InDet::PixelCluster *pix = nullptr;
186  pix = static_cast<const InDet::PixelCluster *>(&rio);
187  }
188  else{
189  return nullptr;
190  }
191 
192  ATH_MSG_VERBOSE("Correct called with Error strategy " << m_errorStrategy);
193 
194  // PixelClusterOnTrack production
195  //
196  Trk::LocalParameters locpar;
197  Amg::Vector3D glob(pix->globalPosition());
198 
199 
200  // Get pointer to detector element
201  const InDetDD::SiDetectorElement *element = pix->detectorElement();
202  if (!element) {
203  return nullptr;
204  }
205  bool blayer = element->isBlayer();
206  IdentifierHash iH = element->identifyHash();
207 
208  double errphi = -1;
209  double erreta = -1;
210 
211  if (pix->rdoList().empty()) {
212  ATH_MSG_WARNING("Pixel RDO-list size is 0, check integrity of pixel clusters! stop ROT creation.");
213  return nullptr;
214  } else {
215  const InDetDD::PixelModuleDesign *design =
216  dynamic_cast<const InDetDD::PixelModuleDesign *>(&element->design());
217 
218  // get candidate track angle in module local frame
219  const Amg::Vector3D& my_track = trackPar.momentum();
220  const Amg::Vector3D& my_normal = element->normal();
221  const Amg::Vector3D& my_phiax = element->phiAxis();
222  const Amg::Vector3D& my_etaax = element->etaAxis();
223  float trkphicomp = my_track.dot(my_phiax);
224  float trketacomp = my_track.dot(my_etaax);
225  float trknormcomp = my_track.dot(my_normal);
226  double bowphi = std::atan2(trkphicomp, trknormcomp);
227  double boweta = std::atan2(trketacomp, trknormcomp);
228  float etatrack = trackPar.eta();
229 
230  float tanl = m_lorentzAngleTool->getTanLorentzAngle(iH, ctx);
231  int readoutside = element->design().readoutSide();
232 
233  // map the angles of inward-going tracks onto [-PI/2, PI/2]
234  if (bowphi > M_PI *0.5) {
235  bowphi -= M_PI;
236  }
237  if (bowphi < -M_PI *0.5) {
238  bowphi += M_PI;
239  }
240  // finally, subtract the Lorentz angle effect
241  // the readoutside term is needed because of a bug in old
242  // geometry versions (CSC-01-* and CSC-02-*)
243  double angle = std::atan(std::tan(bowphi) - readoutside * tanl);
244 
245  // try to understand...
246  const Identifier element_id = element->identify();
247  int PixEtaModule = m_pixelid->eta_module(element_id);
248  int PixPhiModule = m_pixelid->phi_module(element_id);
249  double PixTrkPt = trackPar.pT();
250  double PixTrkEta = trackPar.eta();
251  ATH_MSG_VERBOSE("tanl = " << tanl << " readout side is " << readoutside <<
252  " module " << PixEtaModule << " " << PixPhiModule <<
253  " track pt, eta = " << PixTrkPt << " " << PixTrkEta <<
254  " track momentum phi, norm = " << trkphicomp << " " <<
255  trknormcomp << " bowphi = " << bowphi << " angle = " << angle);
256 
257  float omegaphi = pix->omegax();
258  float omegaeta = pix->omegay();
259  double localphi = -9999.;
260  double localeta = -9999.;
261 
262  const std::vector<Identifier> & rdos = pix->rdoList();
263  InDetDD::SiLocalPosition meanpos(0, 0, 0);
264  int rowmin = 9999;
265  int rowmax = -9999;
266  int colmin = 9999;
267  int colmax = -9999;
268  for (const auto & rId:rdos) {
269  const int row = m_pixelid->phi_index(rId);
270  const int col = m_pixelid->eta_index(rId);
271  rowmin = std::min(rowmin, row);
272  rowmax = std::max(rowmax,row);
273  colmin = std::min(colmin, col);
274  colmax = std::max(colmax, col);
275  meanpos += design->positionFromColumnRow(col, row);
276  }
277  meanpos = meanpos / rdos.size();
279  design->positionFromColumnRow(colmin, rowmin);
281  design->positionFromColumnRow(colmax, rowmin);
283  design->positionFromColumnRow(colmin, rowmax);
285  design->positionFromColumnRow(colmax, rowmax);
286 
287  InDetDD::SiLocalPosition centroid = 0.25 * (pos1 + pos2 + pos3 + pos4);
288  double shift = m_lorentzAngleTool->getLorentzShift(iH, ctx);
289  int nrows = rowmax - rowmin + 1;
290  int ncol = colmax - colmin + 1;
291  double ang = 999.;
292 
293  // TOT interpolation for collision data
294  // Force IBL to use digital clustering and broad errors.
296  if (m_positionStrategy > 0 && omegaphi > -0.5 && omegaeta > -0.5) {
297  localphi = centroid.xPhi() + shift;
298  localeta = centroid.xEta();
299  // barrel
300  if (element->isBarrel()) {
301  ang = 180 * angle * M_1_PI; //M_1_PI in cmath, = 1/pi
302  double delta = 0.;
303  if (m_IBLAbsent || !blayer) {
304  delta = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaXbarrel(nrows, ang, 1);
305  } else { // special calibration for IBL
306  if (angle < m_phix[0] || angle > m_phix[s_nbinphi] || nrows != 2) {
307  delta = 0.;
308  }else {
309  int bin = -1;
310  while (angle > m_phix[bin + 1]) {
311  bin++;
312  }
313  if ((bin >= 0)and(bin < s_nbinphi)) {
314  delta = m_calphi[bin];
315  } else {
316  ATH_MSG_ERROR("bin out of range in line " << __LINE__ << " of PixelClusterOnTrackTool.cxx.");
317  }
318  }
319 
320  if (offlineCalibData->getPixelChargeInterpolationParameters()->getVersion()<-1) {
321  delta = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaXbarrel(nrows, ang, 0);
322  }
323  }
324  localphi += delta * (omegaphi - 0.5);
325  // settle the sign/pi periodicity issues
326  double thetaloc = -999.;
327  if (boweta > -0.5 * M_PI && boweta < M_PI / 2.) { //M_PI_2 in cmath
328  thetaloc = M_PI_2 - boweta;
329  }else if (boweta > M_PI_2 && boweta < M_PI) {
330  thetaloc = 1.5 * M_PI - boweta;
331  } else { // 3rd quadrant
332  thetaloc = -M_PI_2 - boweta;
333  }
334  double etaloc = -1 * log(tan(thetaloc * 0.5));
335  if (m_IBLAbsent || !blayer) {
336  delta = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaYbarrel(ncol, etaloc, 1);
337  } else { // special calibration for IBL
338  etaloc = std::abs(etaloc);
339  if (etaloc < m_etax[0] || etaloc > m_etax[s_nbineta]) {
340  delta = 0.;
341  } else {
342  int bin = -1;
343  while (etaloc > m_etax[bin + 1]) {
344  bin++;
345  }
346  if ((bin >= 0)and(bin < s_nbineta)) {
347  if (ncol == bin) {
348  delta = m_caleta[bin][0];
349  } else if (ncol == bin + 1) {
350  delta = m_caleta[bin][1];
351  } else if (ncol == bin + 2) {
352  delta = m_caleta[bin][2];
353  } else {
354  delta = 0.;
355  }
356  } else {// bin out of range of array indices
357  ATH_MSG_ERROR("bin out of range in line " << __LINE__ << " of PixelClusterOnTrackTool.cxx.");
358  }
359  }
360  if (offlineCalibData->getPixelChargeInterpolationParameters()->getVersion()<-1) {
361  delta = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaYbarrel(ncol, std::abs(etaloc), 0);
362  }
363  }
364  localeta += delta * (omegaeta - 0.5);
365  }else {
366  // collision endcap data
367  if (m_positionStrategy == 1) {
368  double deltax = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaXendcap();
369  double deltay = offlineCalibData->getPixelChargeInterpolationParameters()->getDeltaYendcap();
370  localphi += deltax * (omegaphi - 0.5);
371  localeta += deltay * (omegaeta - 0.5);
372  }
373  // SR1 cosmics endcap data
374  // some parametrization dependent on track angle
375  // would be better here
376  else if (m_positionStrategy == 20) {
377  double deltax = 35 * micrometer;
378  double deltay = 35 * micrometer;
379  localphi += deltax * (omegaphi - 0.5);
380  localeta += deltay * (omegaeta - 0.5);
381  }
382  }
383  }
384 // digital
385  else {
386  localphi = meanpos.xPhi() + shift;
387  localeta = meanpos.xEta();
388  }
389 
390  const InDet::SiWidth& width = pix->width();
391 
392  // Error strategies
393 
394  // For very shallow tracks the cluster can easily break as
395  // the average charge per pixel is of the order of the threshold
396  // In this case, an error equal to the geometrical projection
397  // of the track path in silicon onto the module surface seems
398  // appropriate
399  if (std::abs(angle) > 1) {
400  errphi = 250 * micrometer * std::tan(std::abs(angle)) * TOPHAT_SIGMA;
401  erreta = width.z() > 250 * micrometer * std::tan(std::abs(boweta)) ?
402  width.z() * TOPHAT_SIGMA : 250 * micrometer * std::tan(std::abs(boweta)) * TOPHAT_SIGMA;
403  ATH_MSG_VERBOSE("Shallow track with tanl = " << tanl << " bowphi = " <<
404  bowphi << " angle = " << angle << " width.z = " << width.z() <<
405  " errphi = " << errphi << " erreta = " << erreta);
406  }else if (m_errorStrategy == 0) {
407  errphi = width.phiR() * TOPHAT_SIGMA;
408  erreta = width.z() * TOPHAT_SIGMA;
409  }else if (m_errorStrategy == 1) {
410  errphi = (width.phiR() / nrows) * TOPHAT_SIGMA;
411  erreta = (width.z() / ncol) * TOPHAT_SIGMA;
412  }else if (m_errorStrategy == 2) {
413  if (element->isBarrel()) {
414  if (m_IBLAbsent || !blayer) {
415  int ibin = offlineCalibData->getPixelClusterOnTrackErrorData()->getBarrelBinPhi(ang, nrows);
416  errphi = offlineCalibData->getPixelClusterOnTrackErrorData()->getPixelBarrelPhiError(ibin);
417  } else { // special calibration for IBL
418  if (angle < m_phix[0] || angle > m_phix[s_nbinphi]) {
419  errphi = width.phiR() * TOPHAT_SIGMA;
420  } else {
421  int bin = -1;// cannot be used as array index, which will happen if angle<m_phix[bin+1]
422  while (angle > m_phix[bin + 1]) {
423  bin++;
424  }
425  if ((bin >= 0)and(bin < s_nbinphi)) {
426  if (nrows == 1) {
427  errphi = m_calerrphi[bin][0];
428  } else if (nrows == 2) {
429  errphi = m_calerrphi[bin][1];
430  } else {
431  errphi = m_calerrphi[bin][2];
432  }
433  } else {
434  ATH_MSG_ERROR("bin out of range in line " << __LINE__ << " of PixelClusterOnTrackTool.cxx.");
435  }
436  }
437  }
438 
439  if (m_IBLAbsent || !blayer) {
440  int ibin = offlineCalibData->getPixelClusterOnTrackErrorData()->getBarrelBinEta(std::abs(etatrack), ncol, nrows);
441  erreta = offlineCalibData->getPixelClusterOnTrackErrorData()->getPixelBarrelEtaError(ibin);
442  } else { // special calibration for IBL
443  double etaloc = std::abs(etatrack);
444  if (etaloc < m_etax[0] || etaloc > m_etax[s_nbineta]) {
445  erreta = width.z() * TOPHAT_SIGMA;
446  } else {
447  int bin = 0;
448  while (bin < s_nbineta && etaloc > m_etax[bin + 1]) {
449  ++bin;
450  }
451  if (bin >= s_nbineta) {
452  ATH_MSG_ERROR("bin out of range in line " << __LINE__ << " of PixelClusterOnTrackTool.cxx.");
453  } else {
454  if (ncol == bin) {
455  erreta = m_calerreta[bin][0];
456  } else if (ncol == bin + 1) {
457  erreta = m_calerreta[bin][1];
458  } else if (ncol == bin + 2) {
459  erreta = m_calerreta[bin][2];
460  } else {
461  erreta = width.z() * TOPHAT_SIGMA;
462  }
463  }
464  }
465  }
466  }else {
467  int ibin = offlineCalibData->getPixelClusterErrorData()->getEndcapBin(ncol, nrows);
468  errphi = offlineCalibData->getPixelClusterErrorData()->getPixelEndcapPhiError(ibin);
469  erreta = offlineCalibData->getPixelClusterErrorData()->getPixelEndcapRError(ibin);
470  }
471  if (errphi > erreta) {
472  erreta = width.z() * TOPHAT_SIGMA;
473  }
474  }
475 
476  Amg::Vector2D locpos = Amg::Vector2D(localphi, localeta);
477  if (element->isBarrel() && !m_disableDistortions) {
478  correctBow(element->identify(), locpos, bowphi, boweta,ctx);
479  }
480 
481 
482  locpar = Trk::LocalParameters(locpos);
483  centroid = InDetDD::SiLocalPosition(localeta, localphi, 0.);
484  glob = element->globalPosition(centroid);
485  }
486 
487  // Error matrix production
488 
489  Amg::MatrixX cov = pix->localCovariance();
490 
491  // corrected phi error
492  if (errphi > 0) {
493  cov(0, 0) = errphi * errphi;
494  }
495  if (erreta > 0) {
496  cov(1, 1) = erreta * erreta;
497  }
498 
499  ATH_MSG_VERBOSE(" errphi = " << errphi << " erreta = " << erreta);
500 
501  // create new copy of error matrix
502  if (!m_pixelErrorScalingKey.key().empty()) {
504  cov = Trk::ErrorScalingCast<PixelRIO_OnTrackErrorScaling>(*error_scaling)
505  ->getScaledCovariance(std::move(cov), *m_pixelid,
506  element->identify());
507  }
508  bool isbroad = m_errorStrategy == 0;
509  return new InDet::PixelClusterOnTrack(pix,
510  std::move(locpar),
511  std::move(cov), iH,
512  glob, pix->gangedPixel(), isbroad);
513 }

◆ correctNN()

InDet::PixelClusterOnTrack * InDet::PixelClusterOnTrackTool::correctNN ( const Trk::PrepRawData rio,
const Trk::TrackParameters trackPar,
const EventContext &  ctx 
) const
protected

Definition at line 547 of file PixelClusterOnTrackTool.cxx.

550  {
551 
552  const InDet::PixelCluster *pixelPrepCluster = nullptr;
554  pixelPrepCluster = static_cast<const InDet::PixelCluster *>(&rio);
555  }
556 
557  if (pixelPrepCluster == nullptr) {
558  ATH_MSG_WARNING("This is not a pixel cluster, return 0.");
559  return nullptr;
560  }
561 
562  const InDetDD::SiDetectorElement *element = pixelPrepCluster->detectorElement();
563  if (!element) {
564  ATH_MSG_WARNING("Cannot access detector element. Aborting cluster correction...");
565  return nullptr;
566  }
567 
568  IdentifierHash iH = element->identifyHash();
569 
570  if (m_doNotRecalibrateNN) {
571  Amg::Vector3D glob(pixelPrepCluster->globalPosition());
572 
573  const Amg::Vector3D& my_track = trackPar.momentum();
574  const Amg::Vector3D& my_normal = element->normal();
575  const Amg::Vector3D& my_phiax = element->phiAxis();
576  const Amg::Vector3D& my_etaax = element->etaAxis();
577  float trkphicomp = my_track.dot(my_phiax);
578  float trketacomp = my_track.dot(my_etaax);
579  float trknormcomp = my_track.dot(my_normal);
580  double bowphi = std::atan2(trkphicomp, trknormcomp);
581  double boweta = std::atan2(trketacomp, trknormcomp);
582 
583  Amg::Vector2D locpos = pixelPrepCluster->localPosition();
584  if (element->isBarrel() && !m_disableDistortions) {
585  correctBow(element->identify(), locpos, bowphi, boweta,ctx);
586  }
587 
589  Amg::MatrixX cov = pixelPrepCluster->localCovariance();
590 
591  return new InDet::PixelClusterOnTrack(pixelPrepCluster, std::move(locpar), std::move(cov), iH, glob,
592  pixelPrepCluster->gangedPixel(), false);
593  }
594 
595 
596 
597  Amg::Vector2D finalposition;
598  Amg::MatrixX finalerrormatrix;
599 
600  if (m_usingTIDE_Ambi) {
601  if (!getErrorsTIDE_Ambi(pixelPrepCluster, trackPar, finalposition, finalerrormatrix)) {
602  return correctDefault(rio, trackPar, ctx);
603  }
604  }else {
605  if (!getErrorsDefaultAmbi(pixelPrepCluster, trackPar, finalposition, finalerrormatrix)) {
606  return correctDefault(rio, trackPar, ctx);
607  }
608  }
609 
610  ATH_MSG_DEBUG( " Old position x: " << pixelPrepCluster->localPosition()[0]
611  << " +/- " << std::sqrt(pixelPrepCluster->localCovariance()(0, 0))
612  << " y: " << pixelPrepCluster->localPosition()[1]
613  << " +/- " << std::sqrt(pixelPrepCluster->localCovariance()(1, 1)) <<"\n"
614  << " Final position x: " << finalposition[0]
615  << " +/- " << std::sqrt(finalerrormatrix(0, 0))
616  << " y: " << finalposition[1] << " +/- "
617  <<std::sqrt(finalerrormatrix(1, 1)) );
618 
619  const Amg::Vector3D& my_track = trackPar.momentum();
620  Amg::Vector3D my_normal = element->normal();
621  Amg::Vector3D my_phiax = element->phiAxis();
622  Amg::Vector3D my_etaax = element->etaAxis();
623  float trkphicomp = my_track.dot(my_phiax);
624  float trketacomp = my_track.dot(my_etaax);
625  float trknormcomp = my_track.dot(my_normal);
626  double bowphi = std::atan2(trkphicomp, trknormcomp);
627  double boweta = std::atan2(trketacomp, trknormcomp);
628 
629  if (element->isBarrel() && !m_disableDistortions) {
630  correctBow(element->identify(), finalposition, bowphi, boweta,ctx);
631  }
632 
633  Amg::MatrixX cov = finalerrormatrix;
634  // create new copy of error matrix
635  if (!m_pixelErrorScalingKey.key().empty()) {
638  cov = Trk::ErrorScalingCast<PixelRIO_OnTrackErrorScaling>(*error_scaling)
639  ->getScaledCovariance(std::move(cov), *m_pixelid,
640  element->identify());
641  }
642 
644  finalposition[0],
645  0);
646  Trk::LocalParameters locpar = Trk::LocalParameters(finalposition);
647 
648  const Amg::Vector3D &glob = element->globalPosition(centroid);
649 
650 
651  return new InDet::PixelClusterOnTrack(pixelPrepCluster, std::move(locpar),
652  std::move(cov), iH,
653  glob,
654  pixelPrepCluster->gangedPixel(),
655  false);
656 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode InDet::PixelClusterOnTrackTool::finalize ( )
overridevirtual

AlgTool termination.

Definition at line 130 of file PixelClusterOnTrackTool.cxx.

130  {
131 return StatusCode::SUCCESS;
132 }

◆ getClusterSplittingProbability()

const Trk::ClusterSplitProbabilityContainer::ProbabilityInfo& InDet::PixelClusterOnTrackTool::getClusterSplittingProbability ( const InDet::PixelCluster pix) const
inlineprotected

Definition at line 113 of file PixelClusterOnTrackTool.h.

113  {
115 
117  if (!splitProbContainer.isValid()) {
118  ATH_MSG_FATAL("Failed to get cluster splitting probability container " << m_clusterSplitProbContainer);
119  }
120  return splitProbContainer->splitProbability(pix);
121  }

◆ getErrorsDefaultAmbi()

bool InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi ( const InDet::PixelCluster pixelPrepCluster,
const Trk::TrackParameters trackPar,
Amg::Vector2D finalposition,
Amg::MatrixX finalerrormatrix 
) const
protected

Definition at line 659 of file PixelClusterOnTrackTool.cxx.

662  {
663  std::vector<Amg::Vector2D> vectorOfPositions;
664  int numberOfSubclusters = 1;
665  vectorOfPositions.push_back(pixelPrepCluster->localPosition());
666 
667  if (m_applyNNcorrection){
669  InDet::PixelGangedClusterAmbiguities::const_iterator mapBegin = splitClusterMap->begin();
670  InDet::PixelGangedClusterAmbiguities::const_iterator mapEnd = splitClusterMap->end();
671  for (InDet::PixelGangedClusterAmbiguities::const_iterator mapIter = mapBegin; mapIter != mapEnd; ++mapIter) {
672  const SiCluster *first = (*mapIter).first;
673  const SiCluster *second = (*mapIter).second;
674  if (first == pixelPrepCluster && second != pixelPrepCluster) {
675  ATH_MSG_DEBUG("Found additional split cluster in ambiguity map (+=1).");
676  numberOfSubclusters += 1;
677  const SiCluster *otherOne = second;
678  const InDet::PixelCluster *pixelAddCluster = nullptr;
679  if (otherOne->type(Trk::PrepRawDataType::PixelCluster)) {
680  pixelAddCluster = static_cast<const InDet::PixelCluster *>(otherOne);
681  }
682  if (pixelAddCluster == nullptr) {
683  ATH_MSG_WARNING("Pixel ambiguity map has empty pixel cluster. Please DEBUG!");
684  continue;
685  }
686  vectorOfPositions.push_back(pixelAddCluster->localPosition());
687 
688  ATH_MSG_DEBUG( "Found one more pixel cluster. Position x: "
689  << pixelAddCluster->localPosition()[0] << "y: " << pixelAddCluster->localPosition()[1]);
690  }// find relevant element of map
691  }// iterate over map
692  }
693 
694  // now you have numberOfSubclusters and the vectorOfPositions (Amg::Vector2D)
695 
696  if (trackPar.surfaceType() != Trk::SurfaceType::Plane ||
697  trackPar.type() != Trk::AtaSurface) {
699  "Parameters are not at a plane ! Aborting cluster correction... ");
700  return false;
701  }
702 
703  std::vector<Amg::Vector2D> allLocalPositions;
704  std::vector<Amg::MatrixX> allErrorMatrix;
705  allLocalPositions =
706  m_NnClusterizationFactory->estimatePositions(*pixelPrepCluster,
707  trackPar.associatedSurface(),
708  trackPar,
709  allErrorMatrix,
710  numberOfSubclusters);
711 
712  if (allLocalPositions.empty()) {
713  ATH_MSG_DEBUG( " Cluster cannot be treated by NN. Giving back to default clusterization " );
714 
715  return false;
716  }
717 
718  if (allLocalPositions.size() != size_t(numberOfSubclusters)) {
719  ATH_MSG_WARNING( "Returned position vector size " << allLocalPositions.size() <<
720  " not according to expected number of subclusters: " << numberOfSubclusters << ". Abort cluster correction..." );
721  return false;
722  }
723 
724 
725  // GP: now the not so nice part of matching the new result with the old one...
726  // Takes the error into account to improve the matching
727 
728  if (numberOfSubclusters == 1) {
729  finalposition = allLocalPositions[0];
730  finalerrormatrix = allErrorMatrix[0];
731  }
732 
733  else if (numberOfSubclusters == 2) {
734  double distancesq1 =
735  square(vectorOfPositions[0][0] - allLocalPositions[0][0]) / allErrorMatrix[0](0, 0) +
736  square(vectorOfPositions[1][0] - allLocalPositions[1][0]) / allErrorMatrix[1](0, 0) +
737  square(vectorOfPositions[0][1] - allLocalPositions[0][1]) / allErrorMatrix[0](1, 1) +
738  square(vectorOfPositions[1][1] - allLocalPositions[1][1]) / allErrorMatrix[1](1, 1);
739 
740  double distancesq2 =
741  square(vectorOfPositions[1][0] - allLocalPositions[0][0]) / allErrorMatrix[0](0, 0) +
742  square(vectorOfPositions[0][0] - allLocalPositions[1][0]) / allErrorMatrix[1](0, 0) +
743  square(vectorOfPositions[1][1] - allLocalPositions[0][1]) / allErrorMatrix[0](1, 1) +
744  square(vectorOfPositions[0][1] - allLocalPositions[1][1]) / allErrorMatrix[1](1, 1);
745 
747  " Old pix (1) x: " << vectorOfPositions[0][0] << " y: " << vectorOfPositions[0][1] << "\n"
748  << " Old pix (2) x: " << vectorOfPositions[1][0] << " y: " << vectorOfPositions[1][1] << "\n"
749  << " Pix (1) x: " << allLocalPositions[0][0] << " +/- " << std::sqrt(allErrorMatrix[0](0, 0))
750  << " y: " << allLocalPositions[0][1] << " +/- " << std::sqrt(allErrorMatrix[0](1, 1)) <<"\n"
751  << " Pix (2) x: " << allLocalPositions[1][0] << " +/- " << std::sqrt(allErrorMatrix[1](0, 0))
752  << " y: " << allLocalPositions[1][1] << " +/- " << std::sqrt(allErrorMatrix[1](1, 1)) << "\n"
753  << " Old (1) new (1) dist: " << std::sqrt(distancesq1) << " Old (1) new (2) " << std::sqrt(distancesq2) );
754 
755 
756  if (distancesq1 < distancesq2) {
757  finalposition = allLocalPositions[0];
758  finalerrormatrix = allErrorMatrix[0];
759  }else {
760  finalposition = allLocalPositions[1];
761  finalerrormatrix = allErrorMatrix[1];
762  }
763  }
764 
765 
766  else if (numberOfSubclusters == 3) {
767  double distances[6];
768 
769  distances[0] = distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 0, 1, 2);
770  distances[1] = distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 0, 2, 1);
771  distances[2] = distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 1, 0, 2);
772  distances[3] = distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 1, 2, 0);
773  distances[4] = distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 2, 0, 1);
774  distances[5] = distance(vectorOfPositions, allLocalPositions, allErrorMatrix, 2, 1, 0);
775 
776  int smallestDistanceIndex = -10;
777  double minDistance = 1e10;
778 
779  for (int i = 0; i < 6; i++) {
780  ATH_MSG_VERBOSE(" distance n.: " << i << " distance is: " << distances[i]);
781 
782  if (distances[i] < minDistance) {
783  minDistance = distances[i];
784  smallestDistanceIndex = i;
785  }
786  }
787 
788  ATH_MSG_DEBUG(" The minimum distance is : " << minDistance << " for index: " << smallestDistanceIndex);
789 
790  if (smallestDistanceIndex == 0 || smallestDistanceIndex == 1) {
791  finalposition = allLocalPositions[0];
792  finalerrormatrix = allErrorMatrix[0];
793  }
794  if (smallestDistanceIndex == 2 || smallestDistanceIndex == 4) {
795  finalposition = allLocalPositions[1];
796  finalerrormatrix = allErrorMatrix[1];
797  }
798  if (smallestDistanceIndex == 3 || smallestDistanceIndex == 5) {
799  finalposition = allLocalPositions[2];
800  finalerrormatrix = allErrorMatrix[2];
801  }
802  }
803  return true;
804 }

◆ getErrorsTIDE_Ambi()

bool InDet::PixelClusterOnTrackTool::getErrorsTIDE_Ambi ( const InDet::PixelCluster pixelPrepCluster,
const Trk::TrackParameters trackPar,
Amg::Vector2D finalposition,
Amg::MatrixX finalerrormatrix 
) const
protected

Definition at line 807 of file PixelClusterOnTrackTool.cxx.

810  {
812  std::vector<Amg::Vector2D> vectorOfPositions;
813  int numberOfSubclusters = 1;
816  numberOfSubclusters = 1 + splitClusterMap->count(pixelPrepCluster);
817 
818  if (splitClusterMap->count(pixelPrepCluster) == 0 && splitProb.isSplit()) {
819  numberOfSubclusters = 2;
820  }
821  if (splitClusterMap->count(pixelPrepCluster) != 0 && !splitProb.isSplit()) {
822  numberOfSubclusters = 1;
823  }
824  }
825 
826  // now you have numberOfSubclusters and the vectorOfPositions (Amg::Vector2D)
827  if (trackPar.surfaceType() != Trk::SurfaceType::Plane ||
828  trackPar.type() != Trk::AtaSurface) {
829  ATH_MSG_WARNING("Parameters are not at a plane surface ! Aborting cluster "
830  "correction... ");
831  return false;
832  }
833 
834  std::vector<Amg::Vector2D> allLocalPositions;
835  std::vector<Amg::MatrixX> allErrorMatrix;
836  allLocalPositions = m_NnClusterizationFactory->estimatePositions(
837  *pixelPrepCluster,
838  trackPar.associatedSurface(),
839  trackPar,
840  allErrorMatrix,
841  numberOfSubclusters);
842 
843  if (allLocalPositions.empty()) {
845  " Cluster cannot be treated by NN. Giving back to default clusterization, too big: " <<
846  splitProb.isTooBigToBeSplit());
847  return false;
848  }
849 
850  if (allLocalPositions.size() != size_t(numberOfSubclusters)) {
852  "Returned position vector size " << allLocalPositions.size() << " not according to expected number of subclusters: " << numberOfSubclusters <<
853  ". Abort cluster correction...");
854  return false;
855  }
856 
857  // AKM: now the not so nice part find the best match position option
858  // Takes the error into account to scale the importance of the measurement
859 
860  if (numberOfSubclusters == 1) {
861  finalposition = allLocalPositions[0];
862  finalerrormatrix = allErrorMatrix[0];
863  return true;
864  }
865 
866  // Get the track parameters local position
867  const Amg::Vector2D localpos = trackPar.localPosition();
868  // Use the track parameters cov to weight distcances
869  Amg::Vector2D localerr(0.01, 0.05);
870  if (trackPar.covariance()) {
871  localerr = Amg::Vector2D(std::sqrt((*trackPar.covariance())(0, 0)), std::sqrt((*trackPar.covariance())(1, 1)));
872  }
873 
874  double minDistance(1e300);
875  int index(0);
876 
877  for (unsigned int i(0); i < allLocalPositions.size(); ++i) {
878  double distance =
879  square(localpos[0] - allLocalPositions[i][0]) / localerr[0]
880  + square(localpos[1] - allLocalPositions[i][1]) / localerr[1];
881 
882  if (distance < minDistance) {
883  index = i;
884  minDistance = distance;
885  }
886  }
887 
888  finalposition = allLocalPositions[index];
889  finalerrormatrix = allErrorMatrix[index];
890  return true;
891 }

◆ initialize()

StatusCode InDet::PixelClusterOnTrackTool::initialize ( )
overridevirtual

AlgTool initialisation.

UGLY!

Definition at line 74 of file PixelClusterOnTrackTool.cxx.

74  {
75 
76  ATH_MSG_DEBUG(name() << " initialize()");
77 
79  ATH_MSG_DEBUG("Error strategy is" << m_errorStrategy);
80 
81  if (m_IBLParameterSvc.retrieve().isFailure()) {
82  ATH_MSG_WARNING("Could not retrieve IBLParameterSvc");
83  } else {
84  m_IBLParameterSvc->setBoolParameters(m_applyNNcorrectionProperty.value(), "doPixelClusterSplitting");
85  m_IBLParameterSvc->setBoolParameters(m_IBLAbsent, "IBLAbsent");
86  }
88 
91 
92  // get the error scaling tool
94  if (!m_pixelErrorScalingKey.key().empty()) ATH_MSG_DEBUG("Detected need for scaling Pixel errors.");
95 
96  // get the module distortions tool
98  if (m_disableDistortions) ATH_MSG_DEBUG("No PixelDistortions will be simulated.");
99 
100  ATH_CHECK (detStore()->retrieve(m_pixelid, "PixelID"));
101 
104  ATH_CHECK(m_NnClusterizationFactory.retrieve( DisableTool{!m_applyNNcorrection} ));
105 
106  // Include IBL calibration constants
107  //Moved to initialize to remove statics and prevent repitition
108 
109  constexpr double phimin=-0.27, phimax=0.27;
110  for (int i=0; i<=s_nbinphi; i++) m_phix[i]=phimin+i*(phimax-phimin)/s_nbinphi;
111  constexpr double etacen[s_nbineta]={-0.,1.,1.55,1.9,2.15,2.35};
112  m_etax[0]=0.; m_etax[s_nbineta]=2.7;
113  for (int i=0; i<s_nbineta-1; i++) m_etax[i+1]=(etacen[i]+etacen[i+1])/2.;
114 
116 #include "IBL_calibration.h"
118 
119  ATH_CHECK(m_lorentzAngleTool.retrieve());
120  return StatusCode::SUCCESS;
121 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& Trk::IRIO_OnTrackCreator::interfaceID ( )
inlinestaticinherited

The AlgTool InterfaceID.

Definition at line 42 of file IRIO_OnTrackCreator.h.

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_applyNNcorrection

bool InDet::PixelClusterOnTrackTool::m_applyNNcorrection = false
private

Definition at line 168 of file PixelClusterOnTrackTool.h.

◆ m_applyNNcorrectionProperty

BooleanProperty InDet::PixelClusterOnTrackTool::m_applyNNcorrectionProperty {this, "applyNNcorrection", false}
private

Enable NN based calibration (do only if NN calibration is applied)

Definition at line 167 of file PixelClusterOnTrackTool.h.

◆ m_calerreta

double InDet::PixelClusterOnTrackTool::m_calerreta[s_nbineta][3] {}
private

Definition at line 195 of file PixelClusterOnTrackTool.h.

◆ m_calerrphi

double InDet::PixelClusterOnTrackTool::m_calerrphi[s_nbinphi][3] {}
private

Definition at line 194 of file PixelClusterOnTrackTool.h.

◆ m_caleta

double InDet::PixelClusterOnTrackTool::m_caleta[s_nbineta][3] {}
private

Definition at line 193 of file PixelClusterOnTrackTool.h.

◆ m_calphi

double InDet::PixelClusterOnTrackTool::m_calphi[s_nbinphi] {}
private

Definition at line 192 of file PixelClusterOnTrackTool.h.

◆ m_clusterErrorKey

SG::ReadCondHandleKey<PixelCalib::PixelOfflineCalibData> InDet::PixelClusterOnTrackTool::m_clusterErrorKey {this, "PixelOfflineCalibData", "PixelOfflineCalibData", "Output key of pixel cluster"}
private

Definition at line 135 of file PixelClusterOnTrackTool.h.

◆ m_clusterSplitProbContainer

SG::ReadHandleKey<Trk::ClusterSplitProbabilityContainer> InDet::PixelClusterOnTrackTool::m_clusterSplitProbContainer {this, "ClusterSplitProbabilityName", "",""}
private

Definition at line 186 of file PixelClusterOnTrackTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_disableDistortions

BooleanProperty InDet::PixelClusterOnTrackTool::m_disableDistortions
private
Initial value:
{this, "DisableDistortions", false,
"Disable simulation of module distortions"}

toolhandle for central error scaling flag storing if errors need scaling or should be kept nominal

Definition at line 142 of file PixelClusterOnTrackTool.h.

◆ m_distortionKey

SG::ReadCondHandleKey<PixelDistortionData> InDet::PixelClusterOnTrackTool::m_distortionKey {this, "PixelDistortionData", "PixelDistortionData", "Output readout distortion data"}
private

Definition at line 129 of file PixelClusterOnTrackTool.h.

◆ m_doNotRecalibrateNN

BooleanProperty InDet::PixelClusterOnTrackTool::m_doNotRecalibrateNN {this, "doNotRecalibrateNN", false}
private

Definition at line 179 of file PixelClusterOnTrackTool.h.

◆ m_errorStrategy

std::atomic_int InDet::PixelClusterOnTrackTool::m_errorStrategy {2}
mutableprivate

Definition at line 146 of file PixelClusterOnTrackTool.h.

◆ m_errorStrategyProperty

IntegerProperty InDet::PixelClusterOnTrackTool::m_errorStrategyProperty {this, "ErrorStrategy", 2, "Which calibration of cluster position errors"}
private

Definition at line 147 of file PixelClusterOnTrackTool.h.

◆ m_etax

double InDet::PixelClusterOnTrackTool::m_etax[s_nbineta+1] {}
private

Definition at line 197 of file PixelClusterOnTrackTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_IBLAbsent

bool InDet::PixelClusterOnTrackTool::m_IBLAbsent = true
private

Definition at line 170 of file PixelClusterOnTrackTool.h.

◆ m_IBLParameterSvc

ServiceHandle<IIBLParameterSvc> InDet::PixelClusterOnTrackTool::m_IBLParameterSvc {this, "IBLParameterSvc", "IBLParameterSvc"}
private

Definition at line 176 of file PixelClusterOnTrackTool.h.

◆ m_lorentzAngleTool

ToolHandle<ISiLorentzAngleTool> InDet::PixelClusterOnTrackTool::m_lorentzAngleTool {this, "LorentzAngleTool", "SiLorentzAngleTool", "Tool to retrieve Lorentz angle"}
private

Definition at line 132 of file PixelClusterOnTrackTool.h.

◆ m_NnClusterizationFactory

ToolHandle<NnClusterizationFactory> InDet::PixelClusterOnTrackTool::m_NnClusterizationFactory
private
Initial value:
{this, "NnClusterizationFactory",
"InDet::NnClusterizationFactory/NnClusterizationFactory"}

NN clusterizationi factory for NN based positions and errors.

Definition at line 173 of file PixelClusterOnTrackTool.h.

◆ m_NNIBLcorrection

BooleanProperty InDet::PixelClusterOnTrackTool::m_NNIBLcorrection {this, "NNIBLcorrection", false}
private

Definition at line 169 of file PixelClusterOnTrackTool.h.

◆ m_noNNandBroadErrors

BooleanProperty InDet::PixelClusterOnTrackTool::m_noNNandBroadErrors {this, "noNNandBroadErrors", false}
private

Definition at line 180 of file PixelClusterOnTrackTool.h.

◆ m_phix

double InDet::PixelClusterOnTrackTool::m_phix[s_nbinphi+1] {}
private

Definition at line 196 of file PixelClusterOnTrackTool.h.

◆ m_pixelErrorScalingKey

SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> InDet::PixelClusterOnTrackTool::m_pixelErrorScalingKey {this,"PixelErrorScalingKey", "/Indet/TrkErrorScalingPixel", "Key for pixel error scaling conditions data."}
private

Definition at line 137 of file PixelClusterOnTrackTool.h.

◆ m_pixelid

const PixelID* InDet::PixelClusterOnTrackTool::m_pixelid = nullptr
private

Flag controlling how module distortions are taken into account:

case 0 --—> No distorsions implemented;

case 1 --—> Set curvature (in 1/meter) and twist (in radiant) equal for all modules;

case 2 --—> Read curvatures and twists from textfile containing Survey data;

case 3 --—> Set curvature and twist from Gaussian random generator with mean and RMS coming from Survey data;

case 4 --—> Read curvatures and twists from database (not ready yet); identifier-helper

Definition at line 164 of file PixelClusterOnTrackTool.h.

◆ m_positionStrategy

IntegerProperty InDet::PixelClusterOnTrackTool::m_positionStrategy
private
Initial value:
{this, "PositionStrategy", 1,
"Which calibration of cluster positions"}

Definition at line 144 of file PixelClusterOnTrackTool.h.

◆ m_splitClusterMapKey

SG::ReadHandleKey<InDet::PixelGangedClusterAmbiguities> InDet::PixelClusterOnTrackTool::m_splitClusterMapKey {this, "SplitClusterAmbiguityMap", ""}
private

Definition at line 183 of file PixelClusterOnTrackTool.h.

◆ m_usingTIDE_Ambi

BooleanProperty InDet::PixelClusterOnTrackTool::m_usingTIDE_Ambi {this, "RunningTIDE_Ambi", false}
private

Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run)

Definition at line 182 of file PixelClusterOnTrackTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ s_nbineta

constexpr int InDet::PixelClusterOnTrackTool::s_nbineta =6
staticconstexprprivate

Definition at line 191 of file PixelClusterOnTrackTool.h.

◆ s_nbinphi

constexpr int InDet::PixelClusterOnTrackTool::s_nbinphi =9
staticconstexprprivate

Definition at line 190 of file PixelClusterOnTrackTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::strategy
strategy
Definition: L2CombinedMuon_v1.cxx:107
query_example.row
row
Definition: query_example.py:24
Trk::LocalParameters
Definition: LocalParameters.h:98
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
InDet::PixelClusterOnTrackTool::m_doNotRecalibrateNN
BooleanProperty m_doNotRecalibrateNN
Definition: PixelClusterOnTrackTool.h:179
InDet::PixelClusterOnTrackTool::m_splitClusterMapKey
SG::ReadHandleKey< InDet::PixelGangedClusterAmbiguities > m_splitClusterMapKey
Definition: PixelClusterOnTrackTool.h:184
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:658
InDet::PixelClusterOnTrackTool::m_clusterSplitProbContainer
SG::ReadHandleKey< Trk::ClusterSplitProbabilityContainer > m_clusterSplitProbContainer
Definition: PixelClusterOnTrackTool.h:187
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
InDet::PixelClusterOnTrackTool::m_clusterErrorKey
SG::ReadCondHandleKey< PixelCalib::PixelOfflineCalibData > m_clusterErrorKey
Definition: PixelClusterOnTrackTool.h:136
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:48
Trk::ClusterSplitProbabilityContainer::ProbabilityInfo::isSplit
bool isSplit() const
Definition: ClusterSplitProbabilityContainer.h:27
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
Trk::ParametersBase::associatedSurface
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
Trk::ClusterSplitProbabilityContainer::ProbabilityInfo
Definition: ClusterSplitProbabilityContainer.h:22
InDet::PixelClusterOnTrackTool::m_calphi
double m_calphi[s_nbinphi]
Definition: PixelClusterOnTrackTool.h:192
InDet::PixelClusterOnTrackTool::m_NnClusterizationFactory
ToolHandle< NnClusterizationFactory > m_NnClusterizationFactory
NN clusterizationi factory for NN based positions and errors.
Definition: PixelClusterOnTrackTool.h:174
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
InDet::PixelClusterOnTrackTool::m_phix
double m_phix[s_nbinphi+1]
Definition: PixelClusterOnTrackTool.h:196
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
InDetDD::SolidStateDetectorElementBase::etaAxis
const Amg::Vector3D & etaAxis() const
Definition: SolidStateDetectorElementBase.cxx:88
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Trk::ParametersBase::surfaceType
constexpr virtual SurfaceType surfaceType() const override=0
Returns the Surface Type enum for the surface used to define the derived class.
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
SiCluster
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SiCluster.h:9
M_PI
#define M_PI
Definition: ActiveFraction.h:11
bin
Definition: BinsDiffFromStripMedian.h:43
InDet::PixelClusterOnTrackTool::m_distortionKey
SG::ReadCondHandleKey< PixelDistortionData > m_distortionKey
Definition: PixelClusterOnTrackTool.h:130
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
InDet::PixelClusterOnTrackTool::m_disableDistortions
BooleanProperty m_disableDistortions
toolhandle for central error scaling flag storing if errors need scaling or should be kept nominal
Definition: PixelClusterOnTrackTool.h:142
InDetDD::DetectorDesign::readoutSide
int readoutSide() const
ReadoutSide.
Definition: DetectorDesign.h:291
Trk::PrepRawData::type
virtual bool type(PrepRawDataType type) const =0
Interface method checking the type.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
InDetDD::SolidStateDetectorElementBase::identifyHash
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
InDet::PixelClusterOnTrackTool::m_pixelErrorScalingKey
SG::ReadCondHandleKey< RIO_OnTrackErrorScaling > m_pixelErrorScalingKey
Definition: PixelClusterOnTrackTool.h:138
InDet::PixelClusterOnTrackTool::m_errorStrategy
std::atomic_int m_errorStrategy
Definition: PixelClusterOnTrackTool.h:146
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
InDetDD::SiLocalPosition
Definition: SiLocalPosition.h:31
InDetDD::PixelModuleDesign::positionFromColumnRow
SiLocalPosition positionFromColumnRow(const int column, const int row) const
Given row and column index of a diode, return position of diode center ALTERNATIVE/PREFERED way is to...
Definition: PixelModuleDesign.cxx:242
InDet::PixelClusterOnTrackTool::m_IBLParameterSvc
ServiceHandle< IIBLParameterSvc > m_IBLParameterSvc
Definition: PixelClusterOnTrackTool.h:177
InDet::PixelClusterOnTrackTool::s_nbinphi
static constexpr int s_nbinphi
Definition: PixelClusterOnTrackTool.h:190
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
PixelID::wafer_hash
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition: PixelID.h:387
AthCommonDataStore
Definition: AthCommonDataStore.h:52
InDet::PixelClusterOnTrackTool::m_lorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
Definition: PixelClusterOnTrackTool.h:133
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
InDet::PixelClusterOnTrackTool::m_IBLAbsent
bool m_IBLAbsent
Definition: PixelClusterOnTrackTool.h:170
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
angle
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Definition: TRTDetectorFactory_Full.cxx:73
InDet::PixelClusterOnTrackTool::m_errorStrategyProperty
IntegerProperty m_errorStrategyProperty
Definition: PixelClusterOnTrackTool.h:148
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDet::PIXELCLUSTER_SHARED
@ PIXELCLUSTER_SHARED
Definition: PixelClusterOnTrackTool.h:57
InDet::PixelClusterOnTrackTool::m_usingTIDE_Ambi
BooleanProperty m_usingTIDE_Ambi
Enable different treatment of cluster errors based on NN information (do only if TIDE ambi is run)
Definition: PixelClusterOnTrackTool.h:182
InDet::PixelClusterOnTrackTool::m_caleta
double m_caleta[s_nbineta][3]
Definition: PixelClusterOnTrackTool.h:193
InDet::PixelClusterOnTrackTool::getClusterSplittingProbability
const Trk::ClusterSplitProbabilityContainer::ProbabilityInfo & getClusterSplittingProbability(const InDet::PixelCluster *pix) const
Definition: PixelClusterOnTrackTool.h:113
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
InDetDD::SiDetectorElement::isBlayer
bool isBlayer() const
Definition: SiDetectorElement.cxx:53
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
InDet::PixelClusterOnTrackTool::m_NNIBLcorrection
BooleanProperty m_NNIBLcorrection
Definition: PixelClusterOnTrackTool.h:169
python.SystemOfUnits.micrometer
int micrometer
Definition: SystemOfUnits.py:71
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
Trk::ParametersBase::type
constexpr virtual ParametersType type() const override=0
Return the ParametersType enum.
InDetDD::SolidStateDetectorElementBase::normal
virtual const Amg::Vector3D & normal() const override final
Get reconstruction local normal axes in global frame.
InDet::SiCluster::detectorElement
virtual const InDetDD::SiDetectorElement * detectorElement() const override final
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
InDet::PixelClusterOnTrackTool::m_applyNNcorrectionProperty
BooleanProperty m_applyNNcorrectionProperty
Enable NN based calibration (do only if NN calibration is applied)
Definition: PixelClusterOnTrackTool.h:167
beamspotman.dir
string dir
Definition: beamspotman.py:623
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::ParametersCommon::localPosition
Amg::Vector2D localPosition() const
Access method for the local coordinates, local parameter definitions differ for each surface type.
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
Trk::ParametersBase::pT
double pT() const
Access method for transverse momentum.
InDet::PIXELCLUSTER_OUTLIER
@ PIXELCLUSTER_OUTLIER
Definition: PixelClusterOnTrackTool.h:56
InDet::SiCluster::gangedPixel
bool gangedPixel() const
return the flag of this cluster containing a gangedPixel
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
InDet::PixelClusterOnTrackTool::m_calerrphi
double m_calerrphi[s_nbinphi][3]
Definition: PixelClusterOnTrackTool.h:194
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::PrepRawDataType::PixelCluster
@ PixelCluster
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
IBL_calibration.h
query_example.col
col
Definition: query_example.py:7
Trk::ClusterSplitProbabilityContainer::ProbabilityInfo::isTooBigToBeSplit
bool isTooBigToBeSplit() const
Definition: ClusterSplitProbabilityContainer.h:26
InDet::PixelCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:49
Trk::AtaSurface
@ AtaSurface
Definition: ParametersCommon.h:29
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
InDet::SiCluster::globalPosition
const Amg::Vector3D & globalPosition() const
return global position reference
DeMoScan.index
string index
Definition: DeMoScan.py:364
InDet::PixelClusterOnTrackTool::correctBow
void correctBow(const Identifier &, Amg::Vector2D &locpos, const double tanphi, const double taneta, const EventContext &ctx) const
Definition: PixelClusterOnTrackTool.cxx:516
a
TList * a
Definition: liststreamerinfos.cxx:10
InDet::PixelClusterOnTrackTool::getErrorsTIDE_Ambi
bool getErrorsTIDE_Ambi(const InDet::PixelCluster *, const Trk::TrackParameters &, Amg::Vector2D &, Amg::MatrixX &) const
Definition: PixelClusterOnTrackTool.cxx:807
h
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
InDet::PixelClusterOnTrack
Definition: PixelClusterOnTrack.h:51
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
InDetDD::SolidStateDetectorElementBase::globalPosition
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
InDet::PixelClusterOnTrackTool::correctNN
InDet::PixelClusterOnTrack * correctNN(const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx) const
Definition: PixelClusterOnTrackTool.cxx:548
InDetDD::SolidStateDetectorElementBase::phiAxis
const Amg::Vector3D & phiAxis() const
Definition: SolidStateDetectorElementBase.cxx:74
DeMoScan.first
bool first
Definition: DeMoScan.py:536
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
InDet::PixelClusterOnTrackTool::correct
virtual InDet::PixelClusterOnTrack * correct(const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx=Gaudi::Hive::currentContext()) const override
produces a PixelClusterOnTrack (object factory!).
Definition: PixelClusterOnTrackTool.cxx:141
InDet::SiWidth
Definition: SiWidth.h:25
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Trk::ParametersBase::eta
double eta() const
Access method for pseudorapidity - from momentum.
Trk::SurfaceType::Plane
@ Plane
InDet::PixelClusterOnTrackTool::m_calerreta
double m_calerreta[s_nbineta][3]
Definition: PixelClusterOnTrackTool.h:195
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
InDet::PixelClusterOnTrackTool::s_nbineta
static constexpr int s_nbineta
Definition: PixelClusterOnTrackTool.h:191
InDet::PixelClusterOnTrackTool::m_applyNNcorrection
bool m_applyNNcorrection
Definition: PixelClusterOnTrackTool.h:168
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
InDet::PixelClusterOnTrackTool::m_pixelid
const PixelID * m_pixelid
Flag controlling how module distortions are taken into account:
Definition: PixelClusterOnTrackTool.h:164
pix
Definition: PixelMapping.cxx:16
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
InDet::PixelClusterOnTrackTool::getErrorsDefaultAmbi
bool getErrorsDefaultAmbi(const InDet::PixelCluster *, const Trk::TrackParameters &, Amg::Vector2D &, Amg::MatrixX &) const
Definition: PixelClusterOnTrackTool.cxx:659
InDet::PixelClusterOnTrackTool::correctDefault
InDet::PixelClusterOnTrack * correctDefault(const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx) const
The correct method produces a PixelClusterOnTrack using the measured PixelCluster and the track predi...
Definition: PixelClusterOnTrackTool.cxx:179
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
InDet::PixelClusterOnTrackTool::m_etax
double m_etax[s_nbineta+1]
Definition: PixelClusterOnTrackTool.h:197
InDet::PixelClusterOnTrackTool::m_positionStrategy
IntegerProperty m_positionStrategy
Definition: PixelClusterOnTrackTool.h:144
Trk::ClusterSplitProbabilityContainer::getNoSplitProbability
static const ProbabilityInfo & getNoSplitProbability()
Definition: ClusterSplitProbabilityContainer.h:33
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
InDet::PixelClusterOnTrackTool::m_noNNandBroadErrors
BooleanProperty m_noNNandBroadErrors
Definition: PixelClusterOnTrackTool.h:180
NSWL1::centroid
Vertex centroid(const Polygon &p)
Definition: GeoUtils.cxx:59
fitman.k
k
Definition: fitman.py:528
Trk::PrepRawData::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
Identifier
Definition: IdentifierFieldParser.cxx:14