ATLAS Offline Software
InDetPhysHitDecoratorAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #include "safeDecorator.h"
12 #include "TrkParameters/TrackParameters.h" // Contains typedef to Trk::CurvilinearParameters
19 // for the identifiers
22 #include "InDetIdentifier/SCT_ID.h"
23 #include "InDetIdentifier/TRT_ID.h"
25 //
26 #include <tuple>
27 #include <limits>
28 
29 
30 InDetPhysHitDecoratorAlg::InDetPhysHitDecoratorAlg(const std::string& name, ISvcLocator* pSvcLocator) :
31  AthReentrantAlgorithm(name,pSvcLocator),
32  m_holeSearchTool("InDet::InDetTrackHoleSearchTool"),
33  m_updatorHandle("Trk::KalmanUpdator/TrkKalmanUpdator"),
34  m_residualPullCalculator("Trk::ResidualPullCalculator/ResidualPullCalculator"),
35  m_idHelper(nullptr),
36  m_pixelID(nullptr),
37  m_sctID(nullptr),
38  m_trtID(nullptr) {
39  declareProperty("InDetTrackHoleSearchTool", m_holeSearchTool);
40  declareProperty("Updator", m_updatorHandle);
41  declareProperty("ResidualPullCalculator", m_residualPullCalculator);
42 }
43 
45 }
46 
49  ATH_CHECK(m_holeSearchTool.retrieve());
50  if (not (m_updatorHandle.empty())) {
51  ATH_CHECK(m_updatorHandle.retrieve());
52  }
53  ATH_CHECK(m_lorentzAngleTool.retrieve());
54 
55  std::vector<std::string> float_decor_names(kNFloatDecorators);
56  std::vector<std::string> int_decor_names(kNIntDecorators);
57  std::vector<std::string> uint64_decor_names(kNUInt64Decorators);
58 
59  int_decor_names[kDecorRegion]="measurement_region";
60  int_decor_names[kDecorDet]="measurement_det";
61  int_decor_names[kDecorILayer]="measurement_iLayer";
62  int_decor_names[kDecorType]="measurement_type";
63  int_decor_names[kDecorPhiWidth]="hitResiduals_phiWidth";
64  int_decor_names[kDecorEtaWidth]="hitResiduals_etaWidth";
65 
66  float_decor_names[kDecorResidualLocX]="hitResiduals_residualLocX";
67  float_decor_names[kDecorPullLocX]="hitResiduals_pullLocX";
68  float_decor_names[kDecorMeasLocX]="measurementLocX";
69  float_decor_names[kDecorTrkParamLocX]="trackParamLocX";
70  float_decor_names[kDecorMeasLocCovX]="measurementLocCovX";
71 
72  float_decor_names[kDecorResidualLocY]="hitResiduals_residualLocY";
73  float_decor_names[kDecorPullLocY]="hitResiduals_pullLocY";
74  float_decor_names[kDecorMeasLocY]="measurementLocY";
75  float_decor_names[kDecorTrkParamLocY]="trackParamLocY";
76  float_decor_names[kDecorMeasLocCovY]="measurementLocCovY";
77 
78  float_decor_names[kDecorAngle]="angle";
79  float_decor_names[kDecorEtaLoc]="etaloc";
80 
81  uint64_decor_names[kDecorID]="surfaceID";
82 
87  assert( m_intDecor.size() == kNIntDecorators);
88  assert( m_uint64Decor.size() == kNUInt64Decorators);
89  assert( m_floatDecor.size() == kNFloatDecorators);
90 
91  // ID Helper
93 
94  // Get the dictionary manager from the detector store
95  ATH_CHECK(detStore()->retrieve(m_idHelper, "AtlasID"));
96  ATH_CHECK(detStore()->retrieve(m_pixelID, "PixelID"));
97  ATH_CHECK(detStore()->retrieve(m_sctID, "SCT_ID"));
98  ATH_CHECK(detStore()->retrieve(m_trtID, "TRT_ID"));
99 
100  if (m_residualPullCalculator.empty()) {
101  ATH_MSG_INFO("No residual/pull calculator for general hit residuals configured.");
102  ATH_MSG_INFO("It is recommended to give R/P calculators to the det-specific tool handle lists then.");
103  } else if (m_residualPullCalculator.retrieve().isFailure()) {
104  ATH_MSG_FATAL( "Could not retrieve " << m_residualPullCalculator << " (to calculate residuals and pulls) " );
105  } else {
106  ATH_MSG_INFO("Generic hit residuals & pulls will be calculated in one or both available local coordinates");
107  }
108  return StatusCode::SUCCESS;
109 }
110 
113  return StatusCode::SUCCESS;
114 }
115 
116 // to migrate to AthReentrantAlgorithm later
118 InDetPhysHitDecoratorAlg::execute(const EventContext &ctx) const {
120  if ((not ptracks.isValid())) {
121  ATH_MSG_ERROR("Cannot get ReadHandle " << m_trkParticleName);
122  return StatusCode::FAILURE;
123  }
124 
125  std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<float> > >
126  float_decor( IDPVM::createDecorators<xAOD::TrackParticleContainer, std::vector<float> >(m_floatDecor, ctx) );
127  std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<int> > >
128  int_decor( IDPVM::createDecorators<xAOD::TrackParticleContainer,std::vector<int> >(m_intDecor, ctx) );
129  std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<uint64_t> > >
130  uint64_decor( IDPVM::createDecorators<xAOD::TrackParticleContainer,std::vector<uint64_t> >(m_uint64Decor, ctx) );
131 
132  for (const xAOD::TrackParticle *trk_particle : *ptracks) {
133  if (not decorateTrack(*trk_particle, float_decor, int_decor, uint64_decor) ) {
134  ATH_MSG_ERROR("Could not decorate track");
135  return StatusCode::FAILURE;
136  }
137  }
138  return StatusCode::SUCCESS;
139 }
140 
141 bool
143  std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<float> > > &float_decor,
144  std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<int> > > &int_decor,
145  std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<uint64_t> > > &uint64_decor) const
146 {
147  int trackNumber(0);
148 
149  using SingleResult_t = std::tuple<int, int, int, // detector, region, layer index,
150  float, float, // residual local position X, pull local position X
151  float, float, // residual local position Y, pull local position Y
152  int, int, int, // cluster dimensions in phi and eta directions, measurement type
153  float, float, // measurement local position X, measurement local position Y
154  float, float,// track parameter local X, track parameter local Y
155  float, float, // track angle in local module frame and associated eta
156  float, float, uint64_t>; // measurement covariance local X, measurement covariance local Y, surface identifier
157  using TrackResult_t = std::vector<SingleResult_t>;
158  const float invalidFloat(-1.);
159  const int invalidInteger(-1);
160  const uint64_t invalidID(0);
161  const SingleResult_t invalidResult = std::make_tuple(invalidInteger, invalidInteger, invalidInteger,
163  invalidInteger, invalidInteger, invalidInteger,
166  invalidID);
167  bool isUnbiased(true);
168  // get element link to the original track
169  const ElementLink< TrackCollection >& trackLink = particle.trackLink();
170  if (trackLink.isValid()) {
171  ATH_MSG_VERBOSE("Track link found ");
172  std::unique_ptr<const Trk::Track> trackWithHoles(m_holeSearchTool->getTrackWithHoles(**trackLink));
173  const auto& allTrackStates = *(trackWithHoles->trackStateOnSurfaces());
174  const int numberOfHits(allTrackStates.size());
175  unsigned int trackParametersCounter(numberOfHits);
176  TrackResult_t result;
177  result.reserve(numberOfHits);
178  if (!m_updatorHandle.empty()) {
179  isUnbiased = true;
180  } else {
181  ATH_MSG_WARNING("The updater handle is empty, now using biased estimators");
182  isUnbiased = false;
183  }
184  ATH_MSG_DEBUG("Num. track states in track " << ++trackNumber << ": " << allTrackStates.size());
185 
186  for (const auto *const thisTrackState: allTrackStates) {
187  // Copy logic from InDetRttPerformance to get hits/outliers/holes
188  // Variable specifying measurement type filled
189  SingleResult_t thisResult(invalidResult);
190  if (not thisTrackState) { // is this check needed?
191  msg(MSG::ERROR) << "TSOS is NULL" << (thisTrackState) << endmsg;
192  continue;
193  }
194  Identifier surfaceID;
195  const Trk::MeasurementBase* mesb = (thisTrackState)->measurementOnTrack();
196  const Trk::RIO_OnTrack* hit = mesb ? dynamic_cast<const Trk::RIO_OnTrack*>(mesb) : nullptr;
197  if (mesb && !hit) {
198  continue; // skip pseudomeasurements
199  }
200  // Get surfaceID, different for measuremnt hits & outliers, and holes
201  if (mesb && mesb->associatedSurface().associatedDetectorElement()) {
202  surfaceID = mesb->associatedSurface().associatedDetectorElement()->identify();
203  } // Holes
204  else {
205  if (not (thisTrackState)->trackParameters()) {
206  msg(MSG::INFO) << "TSOS surface is NULL" << endmsg;
207  continue;
208  }
209  surfaceID = (thisTrackState)->trackParameters()->associatedSurface().associatedDetectorElementIdentifier();
210  }
211  bool isMesb = (thisTrackState)->type(Trk::TrackStateOnSurface::Measurement);
212  bool isOutl = (thisTrackState)->type(Trk::TrackStateOnSurface::Outlier);
213  bool isHole = (thisTrackState)->type(Trk::TrackStateOnSurface::Hole);
214 
215  int measureType = -1;
216  if (isMesb) {
217  measureType = 0;
218  }
219  if (isOutl) {
220  measureType = 1;
221  }
222  if (isHole) {
223  measureType = 2;
224  }
225 
226  bool anyHit = isMesb || isOutl || isHole;
227  if (!anyHit) {
228  continue;
229  }
232  int iLayer(invalidInteger);
233  const bool successfulIdentification = decideDetectorRegion(surfaceID, det, r, iLayer);
234  if (not successfulIdentification) {
235  ATH_MSG_DEBUG("Could not identify surface");
236  continue;
237  }
238  uint64_t Surface_ID = surfaceID.get_compact();
239  // defining invalid values, they will be filled when and where needed
240  float residualLocX(invalidFloat), pullLocX(invalidFloat);
241  float residualLocY(invalidFloat), pullLocY(invalidFloat);
242  float measurementLocX(invalidFloat), trackParamLocX(invalidFloat), measurementLocCovX(invalidFloat);
243  float measurementLocY(invalidFloat), trackParamLocY(invalidFloat), measurementLocCovY(invalidFloat);
244  float angle(0.), etaloc(0.);
245  int phiWidth(invalidInteger), etaWidth(invalidInteger);
246  std::optional<Trk::ResidualPull> residualPull(std::nullopt);
247  const Trk::TrackParameters* biasedTrackParameters = thisTrackState->trackParameters();
248  if (biasedTrackParameters) {
249  ATH_MSG_VERBOSE("biased track parameters ok");
250  }
251  ATH_MSG_VERBOSE("checking mesb and track parameters");
252  if (mesb && biasedTrackParameters) {
253  ATH_MSG_DEBUG("mesb and biased track parameters are ok");
254  // for outliers, the measurement is not part of the fit, so track parameters are already unbiased
255  std::unique_ptr<const Trk::TrackParameters> cleanup_trackparam;
256  const Trk::TrackParameters* trackParameters =
258  biasedTrackParameters, mesb, isUnbiased) : biasedTrackParameters;
259 
260  if (trackParameters != biasedTrackParameters) {
261  cleanup_trackparam.reset(trackParameters);
262  }
263  if (not trackParameters) {
264  ATH_MSG_DEBUG("unbiased track parameters pointer is NULL");
265  }
266 
269 
270  residualPull= m_residualPullCalculator->residualPull(hit, trackParameters, resType);
271  ATH_MSG_VERBOSE("checking residual pull");
272  if (not residualPull) {
273  ATH_MSG_DEBUG("residualPull is NULL");
274  continue;
275  }
276 
277  ATH_MSG_DEBUG("residualPull is OK");
278 
279  residualLocX = 1000. * residualPull->residual()[Trk::loc1]; // residuals in microns
280  pullLocX = residualPull->pull()[Trk::loc1];
281  measurementLocX = hit->localParameters()[Trk::loc1];
282  trackParamLocX = trackParameters->parameters()[Trk::loc1];
283  measurementLocCovX = hit->localCovariance()(Trk::loc1,Trk::loc1);
284 
285  if (residualPull->dimension() > 1) {
286  residualLocY = 1000. * residualPull->residual()[Trk::loc2];
287  pullLocY = residualPull->pull()[Trk::loc2];
288  measurementLocY = hit->localParameters()[Trk::loc2];
289  trackParamLocY = trackParameters->parameters()[Trk::loc2];
290  measurementLocCovY = hit->localCovariance()(Trk::loc2,Trk::loc2);
291  }
292 
293  // Unbiased residuals
294  measureType = 4;
295 
296  if (hit && isUnbiased) {
297  // Cluster width determination
298  if ((det == L0PIXBARR)or(det == PIXEL) or(det == SCT)) {
299  const InDet::SiCluster* pCluster = dynamic_cast <const InDet::SiCluster*>(hit->prepRawData());
300  if (pCluster) {
301  InDet::SiWidth width = pCluster->width();
302  phiWidth = int(width.colRow().x());
303  etaWidth = int(width.colRow().y());
304 
305  // get candidate track angle in module local frame
306  Amg::Vector3D my_track = trackParameters->momentum();
307  const InDetDD::SiDetectorElement* element = pCluster->detectorElement();
308  Amg::Vector3D my_normal = element->normal();
309  Amg::Vector3D my_phiax = element->phiAxis();
310  Amg::Vector3D my_etaax = element->etaAxis();
311  float trkphicomp = my_track.dot(my_phiax);
312  float trketacomp = my_track.dot(my_etaax);
313  float trknormcomp = my_track.dot(my_normal);
314  double bowphi = atan2(trkphicomp,trknormcomp);
315  double boweta = atan2(trketacomp,trknormcomp);
316 
317  float tanl = m_lorentzAngleTool->getTanLorentzAngle(element->identifyHash(), Gaudi::Hive::currentContext());
318  int readoutside = element->design().readoutSide();
319 
320  // map the angles of inward-going tracks onto [-PI/2, PI/2]
321  if(bowphi > M_PI/2) bowphi -= M_PI;
322  if(bowphi < -M_PI/2) bowphi += M_PI;
323 
324  // finally, subtract the Lorentz angle effect
325  // the readoutside term is needed because of a bug in old
326  // geometry versions (CSC-01-* and CSC-02-*)
327  angle = atan(tan(bowphi)-readoutside*tanl);
328 
329  double thetaloc=-999.;
330  if(boweta > -0.5*M_PI && boweta < M_PI/2.) {
331  thetaloc = M_PI/2.-boweta;
332  } else if(boweta > M_PI/2. && boweta < M_PI) {
333  thetaloc = 1.5*M_PI-boweta;
334  } else { // 3rd quadrant
335  thetaloc = -0.5*M_PI-boweta;
336  }
337  etaloc = -1*log(tan(thetaloc/2.));
338  }
339  }
340  ATH_MSG_VERBOSE("hit and isUnbiased ok");
341  }
342  } else {
343  if (not mesb) {
344  ATH_MSG_VERBOSE("mesb not ok");
345  }
346  if (not biasedTrackParameters) {
347  ATH_MSG_VERBOSE("biasedTrackParameters were not found");
348  }
349  --trackParametersCounter;
350  }
351  thisResult = std::make_tuple(det, r, iLayer,
352  residualLocX, pullLocX, residualLocY, pullLocY,
353  phiWidth, etaWidth, measureType,
354  measurementLocX, measurementLocY,
355  trackParamLocX, trackParamLocY,
356  angle, etaloc,
357  measurementLocCovX, measurementLocCovY,
358  Surface_ID);
359  result.push_back(thisResult);
360  } // end of for loop*/
361  ATH_MSG_DEBUG( "Out of " << numberOfHits << " hits, " << trackParametersCounter
362  << " had track params, and " << result.size() << " had residuals.");
363  if (not result.empty()) {
364  const unsigned int arraySize = result.size();
365  std::vector<int> result_det;
366  result_det.reserve(arraySize);
367  std::vector<int> result_r;
368  result_r.reserve(arraySize);
369  std::vector<int> result_iLayer;
370  result_iLayer.reserve(arraySize);
371  std::vector<float> result_residualLocX;
372  result_residualLocX.reserve(arraySize);
373  std::vector<float> result_pullLocX;
374  result_pullLocX.reserve(arraySize);
375  std::vector<float> result_residualLocY;
376  result_residualLocY.reserve(arraySize);
377  std::vector<float> result_pullLocY;
378  result_pullLocY.reserve(arraySize);
379  std::vector<int> result_phiWidth;
380  result_phiWidth.reserve(arraySize);
381  std::vector<int> result_etaWidth;
382  result_etaWidth.reserve(arraySize);
383  std::vector<int> result_measureType;
384  result_measureType.reserve(arraySize);
385  std::vector<float> result_measurementLocX;
386  result_measurementLocX.reserve(arraySize);
387  std::vector<float> result_measurementLocY;
388  result_measurementLocY.reserve(arraySize);
389  std::vector<float> result_trackParamLocX;
390  result_trackParamLocX.reserve(arraySize);
391  std::vector<float> result_trackParamLocY;
392  result_trackParamLocY.reserve(arraySize);
393  std::vector<float> result_angle;
394  result_angle.reserve(arraySize);
395  std::vector<float> result_etaloc;
396  result_etaloc.reserve(arraySize);
397  std::vector<float> result_measurementLocCovX;
398  result_measurementLocCovX.reserve(arraySize);
399  std::vector<float> result_measurementLocCovY;
400  result_measurementLocCovY.reserve(arraySize);
401  std::vector<uint64_t> result_surfaceID;
402  result_surfaceID.reserve(arraySize);
403 
404  for (const SingleResult_t& single_result : result) {
405  result_det.push_back(std::get<0>(single_result));
406  result_r.push_back(std::get<1>(single_result));
407  result_iLayer.push_back(std::get<2>(single_result));
408  result_residualLocX.push_back(std::get<3>(single_result));
409  result_pullLocX.push_back(std::get<4>(single_result));
410  result_residualLocY.push_back(std::get<5>(single_result));
411  result_pullLocY.push_back(std::get<6>(single_result));
412  result_phiWidth.push_back(std::get<7>(single_result));
413  result_etaWidth.push_back(std::get<8>(single_result));
414  result_measureType.push_back(std::get<9>(single_result));
415  result_measurementLocX.push_back(std::get<10>(single_result));
416  result_measurementLocY.push_back(std::get<11>(single_result));
417  result_trackParamLocX.push_back(std::get<12>(single_result));
418  result_trackParamLocY.push_back(std::get<13>(single_result));
419  result_angle.push_back(std::get<14>(single_result));
420  result_etaloc.push_back(std::get<15>(single_result));
421  result_measurementLocCovX.push_back(std::get<16>(single_result));
422  result_measurementLocCovY.push_back(std::get<17>(single_result));
423  result_surfaceID.push_back(std::get<18>(single_result));
424  }
425 
426  int_decor[kDecorRegion](particle) = result_r;
427  int_decor[kDecorDet](particle) = result_det;
428  int_decor[kDecorILayer](particle) = result_iLayer;
429  int_decor[kDecorPhiWidth](particle) = result_phiWidth;
430  int_decor[kDecorEtaWidth](particle) = result_etaWidth;
431  int_decor[kDecorType](particle) = result_measureType;
432 
433  float_decor[kDecorResidualLocX](particle) = result_residualLocX;
434  float_decor[kDecorPullLocX](particle) = result_pullLocX;
435  float_decor[kDecorMeasLocX](particle) = result_measurementLocX;
436  float_decor[kDecorTrkParamLocX](particle) = result_trackParamLocX;
437  float_decor[kDecorMeasLocCovX](particle) = result_measurementLocCovX;
438 
439  float_decor[kDecorResidualLocY](particle) = result_residualLocY;
440  float_decor[kDecorPullLocY](particle) = result_pullLocY;
441  float_decor[kDecorMeasLocY](particle) = result_measurementLocY;
442  float_decor[kDecorTrkParamLocY](particle) = result_trackParamLocY;
443  float_decor[kDecorMeasLocCovY](particle) = result_measurementLocCovY;
444 
445  float_decor[kDecorAngle](particle) = result_angle;
446  float_decor[kDecorEtaLoc](particle) = result_etaloc;
447 
448  uint64_decor[kDecorID](particle) = result_surfaceID;
449 
450  return true;
451  } else {
452  // particle below pt threshold for decoration. Since this is not an error now "true" is returned.
453  // If "false" is returned the job would be aborted.
454  return true;
455  }
456  } else {
457  ATH_MSG_ERROR("No valid track link found ");
458  }
459  return false;
460 }
461 
463  Region& region, int& layer) const {
464  bool success(false);
465  const int pixelSctBarrelIndex(0);
466  const int trtBarrelIndex(1);
467 
469  region = INVALID_REGION;
470 
471  if (m_idHelper->is_pixel(id)) {
472  detector = PIXEL;
473  region = (m_pixelID->barrel_ec(id) == pixelSctBarrelIndex) ? (BARREL) : (ENDCAP);
474  layer = m_pixelID->layer_disk(id);
475  if (BARREL == region and layer == 0) {
477  }
478  }
479  else if (m_idHelper->is_sct(id)) {
480  detector = SCT;
481  region = (m_sctID->barrel_ec(id) == pixelSctBarrelIndex) ? (BARREL) : (ENDCAP);
482  layer = m_sctID->layer_disk(id);
483  }
484  else if (m_idHelper->is_trt(id)) {
485  detector = TRT;
486  region = (std::abs(m_trtID->barrel_ec(id)) == trtBarrelIndex) ? (BARREL) : (ENDCAP);
488  }
489  success = (detector != INVALID_DETECTOR) and (region != INVALID_REGION);
490 
491  return success;
492 }
493 
496  const Trk::MeasurementBase* measurement,
497  bool &isUnbiased) const {
498  const Trk::TrackParameters* unbiasedTrkParameters(trkParameters);
499 
500  if (!m_updatorHandle.empty() && (isUnbiased)) {
501  if (trkParameters->covariance()) {
502  // Get unbiased state
503  unbiasedTrkParameters = m_updatorHandle->removeFromState(*trkParameters,
504  measurement->localParameters(),
505  measurement->localCovariance()).release();
506  if (!unbiasedTrkParameters) {
507  ATH_MSG_INFO( "Could not get unbiased track parameters, use normal parameters" );
508  isUnbiased = false;
509  }
510  } else if (not m_alreadyWarned) {
511  // warn only once!
512  ATH_MSG_WARNING("TrackParameters contain no covariance, unbiased track states can not be calculated "
513  "(ie. pulls and residuals will be too small)" );
514  m_alreadyWarned = true;
515  isUnbiased = false;
516  } else {
517  isUnbiased = false;
518  } // end if no measured track parameter
519  }
520  return unbiasedTrkParameters;
521 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
InDetPhysHitDecoratorAlg::kDecorResidualLocX
@ kDecorResidualLocX
Definition: InDetPhysHitDecoratorAlg.h:80
beamspotman.r
def r
Definition: beamspotman.py:676
InDetPhysHitDecoratorAlg::m_holeSearchTool
ToolHandle< Trk::ITrackHoleSearchTool > m_holeSearchTool
Definition: InDetPhysHitDecoratorAlg.h:60
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
Trk::Surface::associatedDetectorElement
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
get_generator_info.result
result
Definition: get_generator_info.py:21
TrackParameters.h
InDetPhysHitDecoratorAlg::kDecorMeasLocY
@ kDecorMeasLocY
Definition: InDetPhysHitDecoratorAlg.h:87
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
InDetPhysHitDecoratorAlg::finalize
virtual StatusCode finalize() override
Definition: InDetPhysHitDecoratorAlg.cxx:112
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
InDetPhysHitDecoratorAlg::kDecorILayer
@ kDecorILayer
Definition: InDetPhysHitDecoratorAlg.h:69
InDetPhysHitDecoratorAlg::~InDetPhysHitDecoratorAlg
virtual ~InDetPhysHitDecoratorAlg()
Definition: InDetPhysHitDecoratorAlg.cxx:44
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TRTCalib_cfilter.detector
detector
Definition: TRTCalib_cfilter.py:241
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
InDetPhysHitDecoratorAlg::m_residualPullCalculator
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
Definition: InDetPhysHitDecoratorAlg.h:62
InDetPhysHitDecoratorAlg::m_idHelper
const AtlasDetectorID * m_idHelper
Definition: InDetPhysHitDecoratorAlg.h:107
InDetDD::SolidStateDetectorElementBase::etaAxis
const Amg::Vector3D & etaAxis() const
Definition: SolidStateDetectorElementBase.cxx:88
InDetPhysHitDecoratorAlg::kDecorPullLocY
@ kDecorPullLocY
Definition: InDetPhysHitDecoratorAlg.h:86
InDetPhysHitDecoratorAlg::kDecorTrkParamLocX
@ kDecorTrkParamLocX
Definition: InDetPhysHitDecoratorAlg.h:83
Trk::ResidualPull::Unbiased
@ Unbiased
RP with track state that has measurement not included.
Definition: ResidualPull.h:57
TRT_ID.h
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
M_PI
#define M_PI
Definition: ActiveFraction.h:11
Identifier::get_compact
value_type get_compact() const
Get the compact id.
safeDecorator.h
InDetDD::DetectorDesign::readoutSide
int readoutSide() const
ReadoutSide.
Definition: DetectorDesign.h:291
InDetPhysHitDecoratorAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: InDetPhysHitDecoratorAlg.cxx:118
Trk::loc2
@ loc2
generic first and second local coordinate
Definition: ParamDefs.h:35
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
SiClusterOnTrack.h
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
AtlasDetectorID::is_trt
bool is_trt(Identifier id) const
Definition: AtlasDetectorID.h:782
InDetPhysHitDecoratorAlg::INVALID_REGION
@ INVALID_REGION
Definition: InDetPhysHitDecoratorAlg.h:44
InDetPhysHitDecoratorAlg::Region
Region
Definition: InDetPhysHitDecoratorAlg.h:43
Trk::TrkDetElementBase::identify
virtual Identifier identify() const =0
Identifier.
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
InDetPhysHitDecoratorAlg::m_updatorHandle
ToolHandle< Trk::IUpdator > m_updatorHandle
Definition: InDetPhysHitDecoratorAlg.h:61
InDetDD::SolidStateDetectorElementBase::identifyHash
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
InDetPhysHitDecoratorAlg::m_prefix
Gaudi::Property< std::string > m_prefix
Definition: InDetPhysHitDecoratorAlg.h:103
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
IUpdator.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
InDetPhysHitDecoratorAlg::SCT
@ SCT
Definition: InDetPhysHitDecoratorAlg.h:41
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
InDetPhysHitDecoratorAlg::kDecorPullLocX
@ kDecorPullLocX
Definition: InDetPhysHitDecoratorAlg.h:81
InDetPhysHitDecoratorAlg::kDecorMeasLocCovY
@ kDecorMeasLocCovY
Definition: InDetPhysHitDecoratorAlg.h:89
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
InDetPhysHitDecoratorAlg::kDecorType
@ kDecorType
Definition: InDetPhysHitDecoratorAlg.h:70
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ResidualPull.h
Trk::TrackStateOnSurface::Hole
@ Hole
A hole on the track - this is defined in the following way.
Definition: TrackStateOnSurface.h:128
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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
InDetPhysHitDecoratorAlg::TRT
@ TRT
Definition: InDetPhysHitDecoratorAlg.h:41
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
InDetPhysHitDecoratorAlg::Subdetector
Subdetector
Definition: InDetPhysHitDecoratorAlg.h:40
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
InDetPhysHitDecoratorAlg::initialize
virtual StatusCode initialize() override
Definition: InDetPhysHitDecoratorAlg.cxx:48
TrackCollection.h
InDetPhysHitDecoratorAlg::m_trkParticleName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trkParticleName
Definition: InDetPhysHitDecoratorAlg.h:96
InDetPhysHitDecoratorAlg::decorateTrack
bool decorateTrack(const xAOD::TrackParticle &particle, std::vector< SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< float > > > &float_decor, std::vector< SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< int > > > &int_decor, std::vector< SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< uint64_t > > > &uint64_decor) const
Definition: InDetPhysHitDecoratorAlg.cxx:142
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
Trk::ParametersBase
Definition: ParametersBase.h:55
InDetPhysHitDecoratorAlg::kDecorAngle
@ kDecorAngle
Definition: InDetPhysHitDecoratorAlg.h:90
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
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:866
InDetPhysHitDecoratorAlg::getUnbiasedTrackParameters
const Trk::TrackParameters * getUnbiasedTrackParameters(const Trk::TrackParameters *trkParameters, const Trk::MeasurementBase *measurement, bool &isUnbiased) const
Definition: InDetPhysHitDecoratorAlg.cxx:495
InDetPhysHitDecoratorAlg::kDecorTrkParamLocY
@ kDecorTrkParamLocY
Definition: InDetPhysHitDecoratorAlg.h:88
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
TRT_ID::layer_or_wheel
int layer_or_wheel(const Identifier &id) const
Definition: TRT_ID.h:884
InDetDD::SolidStateDetectorElementBase::normal
virtual const Amg::Vector3D & normal() const override final
Get reconstruction local normal axes in global frame.
InDetPhysHitDecoratorAlg::m_floatDecor
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_floatDecor
Definition: InDetPhysHitDecoratorAlg.h:100
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...
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SCT
Definition: SCT_ChipUtils.h:14
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
Trk::MeasurementBase
Definition: MeasurementBase.h:58
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
InDetPhysHitDecoratorAlg::kDecorEtaLoc
@ kDecorEtaLoc
Definition: InDetPhysHitDecoratorAlg.h:91
ITrackHoleSearchTool.h
InDetPhysHitDecoratorAlg::L0PIXBARR
@ L0PIXBARR
Definition: InDetPhysHitDecoratorAlg.h:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Trk::MeasurementBase::associatedSurface
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
InDetPhysHitDecoratorAlg::kDecorDet
@ kDecorDet
Definition: InDetPhysHitDecoratorAlg.h:68
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
SiCluster.h
InDetPhysHitDecoratorAlg::m_trtID
const TRT_ID * m_trtID
Definition: InDetPhysHitDecoratorAlg.h:110
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetPhysHitDecoratorAlg::m_alreadyWarned
std::atomic< bool > m_alreadyWarned
Definition: InDetPhysHitDecoratorAlg.h:105
InDetPhysHitDecoratorAlg::m_lorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
Definition: InDetPhysHitDecoratorAlg.h:64
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::RIO_OnTrack::prepRawData
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
InDetPhysHitDecoratorAlg::kDecorEtaWidth
@ kDecorEtaWidth
Definition: InDetPhysHitDecoratorAlg.h:72
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
InDetPhysHitDecoratorAlg::InDetPhysHitDecoratorAlg
InDetPhysHitDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: InDetPhysHitDecoratorAlg.cxx:30
IResidualPullCalculator.h
InDet::SiCluster::width
const InDet::SiWidth & width() const
return width class reference
Trk::ResidualPull::Biased
@ Biased
RP with track state including the hit.
Definition: ResidualPull.h:55
VKalVrtAthena::AlgConsts::invalidFloat
constexpr double invalidFloat
Definition: Reconstruction/VKalVrt/VrtSecInclusive/VrtSecInclusive/Constants.h:23
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
InDetPhysHitDecoratorAlg::kDecorResidualLocY
@ kDecorResidualLocY
Definition: InDetPhysHitDecoratorAlg.h:85
InDetDD::SolidStateDetectorElementBase::phiAxis
const Amg::Vector3D & phiAxis() const
Definition: SolidStateDetectorElementBase.cxx:74
TRT::Track::trackNumber
@ trackNumber
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:75
InDetPhysHitDecoratorAlg::BARREL
@ BARREL
Definition: InDetPhysHitDecoratorAlg.h:44
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
InDetPhysHitDecoratorAlg::m_pixelID
const PixelID * m_pixelID
Definition: InDetPhysHitDecoratorAlg.h:108
InDetPhysHitDecoratorAlg::kNIntDecorators
@ kNIntDecorators
Definition: InDetPhysHitDecoratorAlg.h:73
xAOD::phiWidth
phiWidth
Definition: RingSetConf_v1.cxx:612
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
InDet::SiWidth
Definition: SiWidth.h:25
InDetPhysHitDecoratorAlg.h
InDetPhysHitDecoratorAlg::decideDetectorRegion
bool decideDetectorRegion(const Identifier &id, Subdetector &det, Region &r, int &layer) const
Definition: InDetPhysHitDecoratorAlg.cxx:462
InDetPhysHitDecoratorAlg::PIXEL
@ PIXEL
Definition: InDetPhysHitDecoratorAlg.h:41
IDPVM::createDecoratorKeys
void createDecoratorKeys(T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< SG::WriteDecorHandleKey< T_Cont > > &decor_out)
Definition: safeDecorator.h:125
IDPVM::createDecorators
std::vector< SG::WriteDecorHandle< T_Cont, T > > createDecorators(const std::vector< SG::WriteDecorHandleKey< T_Cont > > &keys, const EventContext &ctx)
Definition: safeDecorator.h:107
InDetPhysHitDecoratorAlg::m_sctID
const SCT_ID * m_sctID
Definition: InDetPhysHitDecoratorAlg.h:109
InDetPhysHitDecoratorAlg::m_intDecor
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_intDecor
Definition: InDetPhysHitDecoratorAlg.h:98
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
InDetPhysHitDecoratorAlg::kDecorPhiWidth
@ kDecorPhiWidth
Definition: InDetPhysHitDecoratorAlg.h:71
InDetPhysHitDecoratorAlg::kNUInt64Decorators
@ kNUInt64Decorators
Definition: InDetPhysHitDecoratorAlg.h:77
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
Trk::loc1
@ loc1
Definition: ParamDefs.h:34
InDetPhysHitDecoratorAlg::ENDCAP
@ ENDCAP
Definition: InDetPhysHitDecoratorAlg.h:44
InDetPhysHitDecoratorAlg::kNFloatDecorators
@ kNFloatDecorators
Definition: InDetPhysHitDecoratorAlg.h:92
InDetPhysHitDecoratorAlg::kDecorID
@ kDecorID
Definition: InDetPhysHitDecoratorAlg.h:76
InDetPhysHitDecoratorAlg::m_uint64Decor
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_uint64Decor
Definition: InDetPhysHitDecoratorAlg.h:99
readCCLHist.float
float
Definition: readCCLHist.py:83
InDet::SiCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h:40
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
Trk::ResidualPull::ResidualType
ResidualType
Definition: ResidualPull.h:53
InDetPhysHitDecoratorAlg::INVALID_DETECTOR
@ INVALID_DETECTOR
Definition: InDetPhysHitDecoratorAlg.h:41
InDetPhysHitDecoratorAlg::kDecorMeasLocCovX
@ kDecorMeasLocCovX
Definition: InDetPhysHitDecoratorAlg.h:84
InDetPhysHitDecoratorAlg::kDecorMeasLocX
@ kDecorMeasLocX
Definition: InDetPhysHitDecoratorAlg.h:82
Identifier
Definition: IdentifierFieldParser.cxx:14
InDetPhysHitDecoratorAlg::kDecorRegion
@ kDecorRegion
Definition: InDetPhysHitDecoratorAlg.h:67