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