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