ATLAS Offline Software
Loading...
Searching...
No Matches
InDetPhysHitDecoratorAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
9
11#include "safeDecorator.h"
12#include "TrkParameters/TrackParameters.h" // Contains typedef to Trk::CurvilinearParameters
16// for the identifiers
22//
23#include <tuple>
24#include <limits>
25
26
27InDetPhysHitDecoratorAlg::InDetPhysHitDecoratorAlg(const std::string& name, ISvcLocator* pSvcLocator) :
28 AthReentrantAlgorithm(name,pSvcLocator) {}
29
32
33StatusCode
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
69 ATH_CHECK( m_trkParticleName.initialize() );
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 if (m_useTRT) {
82 ATH_CHECK(detStore()->retrieve(m_trtID, "TRT_ID"));
83 }
84
85 if (m_residualPullCalculator.empty()) {
86 ATH_MSG_INFO("No residual/pull calculator for general hit residuals configured.");
87 ATH_MSG_INFO("It is recommended to give R/P calculators to the det-specific tool handle lists then.");
88 } else if (m_residualPullCalculator.retrieve().isFailure()) {
89 ATH_MSG_FATAL( "Could not retrieve " << m_residualPullCalculator << " (to calculate residuals and pulls) " );
90 } else {
91 ATH_MSG_INFO("Generic hit residuals & pulls will be calculated in one or both available local coordinates");
92 }
93 return StatusCode::SUCCESS;
94}
95
96StatusCode
98 return StatusCode::SUCCESS;
99}
100
101// to migrate to AthReentrantAlgorithm later
102StatusCode
103InDetPhysHitDecoratorAlg::execute(const EventContext &ctx) const {
105 if ((not ptracks.isValid())) {
106 ATH_MSG_ERROR("Cannot get ReadHandle " << m_trkParticleName);
107 return StatusCode::FAILURE;
108 }
109
110 std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<float> > >
111 float_decor( IDPVM::createDecorators<xAOD::TrackParticleContainer, std::vector<float> >(m_floatDecor, ctx) );
112 std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<int> > >
113 int_decor( IDPVM::createDecorators<xAOD::TrackParticleContainer,std::vector<int> >(m_intDecor, ctx) );
114 std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<uint64_t> > >
115 uint64_decor( IDPVM::createDecorators<xAOD::TrackParticleContainer,std::vector<uint64_t> >(m_uint64Decor, ctx) );
116
117 for (const xAOD::TrackParticle *trk_particle : *ptracks) {
118 if (not decorateTrack(*trk_particle, float_decor, int_decor, uint64_decor) ) {
119 ATH_MSG_ERROR("Could not decorate track");
120 return StatusCode::FAILURE;
121 }
122 }
123 return StatusCode::SUCCESS;
124}
125
126bool
128 std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<float> > > &float_decor,
129 std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<int> > > &int_decor,
130 std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<uint64_t> > > &uint64_decor) const
131{
132 int trackNumber(0);
133
134 using SingleResult_t = std::tuple<int, int, int, // detector, region, layer index,
135 float, float, // residual local position X, pull local position X
136 float, float, // residual local position Y, pull local position Y
137 int, int, int, // cluster dimensions in phi and eta directions, measurement type
138 float, float, // measurement local position X, measurement local position Y
139 float, float,// track parameter local X, track parameter local Y
140 float, float, // track angle in local module frame and associated eta
141 float, float, uint64_t>; // measurement covariance local X, measurement covariance local Y, surface identifier
142 using TrackResult_t = std::vector<SingleResult_t>;
143 constexpr float invalidFloat(-1.);
144 constexpr int invalidInteger(-1);
145 constexpr uint64_t invalidID(0);
146 const SingleResult_t invalidResult = std::make_tuple(invalidInteger, invalidInteger, invalidInteger,
147 invalidFloat, invalidFloat, invalidFloat, invalidFloat,
148 invalidInteger, invalidInteger, invalidInteger,
149 invalidFloat, invalidFloat, invalidFloat, invalidFloat,
150 invalidFloat, invalidFloat, invalidFloat, invalidFloat,
151 invalidID);
152 bool isUnbiased(true);
153 // get element link to the original track
154 const ElementLink< TrackCollection >& trackLink = particle.trackLink();
155 if (trackLink.isValid()) {
156 ATH_MSG_VERBOSE("Track link found ");
157 std::unique_ptr<const Trk::Track> trackWithHoles(m_holeSearchTool->getTrackWithHoles(**trackLink));
158 const auto& allTrackStates = *(trackWithHoles->trackStateOnSurfaces());
159 const int numberOfHits(allTrackStates.size());
160 unsigned int trackParametersCounter(numberOfHits);
161 TrackResult_t result;
162 result.reserve(numberOfHits);
163 if (!m_updatorHandle.empty()) {
164 isUnbiased = true;
165 } else {
166 ATH_MSG_WARNING("The updater handle is empty, now using biased estimators");
167 isUnbiased = false;
168 }
169 ATH_MSG_DEBUG("Num. track states in track " << ++trackNumber << ": " << allTrackStates.size());
170
171 for (const auto *const thisTrackState: allTrackStates) {
172 // Copy logic from InDetRttPerformance to get hits/outliers/holes
173 // Variable specifying measurement type filled
174 SingleResult_t thisResult(invalidResult);
175 if (not thisTrackState) { // is this check needed?
176 msg(MSG::ERROR) << "TSOS is NULL" << (thisTrackState) << endmsg;
177 continue;
178 }
179 Identifier surfaceID;
180 const Trk::MeasurementBase* mesb = (thisTrackState)->measurementOnTrack();
181 const Trk::RIO_OnTrack* hit = mesb ? dynamic_cast<const Trk::RIO_OnTrack*>(mesb) : nullptr;
182 if (mesb && !hit) {
183 continue; // skip pseudomeasurements
184 }
185 // Get surfaceID, different for measuremnt hits & outliers, and holes
186 if (mesb && mesb->associatedSurface().associatedDetectorElement()) {
188 } // Holes
189 else {
190 if (not (thisTrackState)->trackParameters()) {
191 msg(MSG::INFO) << "TSOS surface is NULL" << endmsg;
192 continue;
193 }
194 surfaceID = (thisTrackState)->trackParameters()->associatedSurface().associatedDetectorElementIdentifier();
195 }
196 bool isMesb = (thisTrackState)->type(Trk::TrackStateOnSurface::Measurement);
197 bool isOutl = (thisTrackState)->type(Trk::TrackStateOnSurface::Outlier);
198 bool isHole = (thisTrackState)->type(Trk::TrackStateOnSurface::Hole);
199
200 int measureType = -1;
201 if (isMesb) {
202 measureType = 0;
203 }
204 if (isOutl) {
205 measureType = 1;
206 }
207 if (isHole) {
208 measureType = 2;
209 }
210
211 bool anyHit = isMesb || isOutl || isHole;
212 if (!anyHit) {
213 continue;
214 }
217 int iLayer(invalidInteger);
218 const bool successfulIdentification = decideDetectorRegion(surfaceID, det, r, iLayer);
219 if (not successfulIdentification) {
220 ATH_MSG_DEBUG("Could not identify surface");
221 continue;
222 }
223 uint64_t Surface_ID = surfaceID.get_compact();
224 // defining invalid values, they will be filled when and where needed
225 float residualLocX(invalidFloat), pullLocX(invalidFloat);
226 float residualLocY(invalidFloat), pullLocY(invalidFloat);
227 float measurementLocX(invalidFloat), trackParamLocX(invalidFloat), measurementLocCovX(invalidFloat);
228 float measurementLocY(invalidFloat), trackParamLocY(invalidFloat), measurementLocCovY(invalidFloat);
229 float angle(0.), etaloc(0.);
230 int phiWidth(invalidInteger), etaWidth(invalidInteger);
231 std::optional<Trk::ResidualPull> residualPull(std::nullopt);
232 const Trk::TrackParameters* biasedTrackParameters = thisTrackState->trackParameters();
233 if (biasedTrackParameters) {
234 ATH_MSG_VERBOSE("biased track parameters ok");
235 }
236 ATH_MSG_VERBOSE("checking mesb and track parameters");
237 if (mesb && biasedTrackParameters) {
238 ATH_MSG_DEBUG("mesb and biased track parameters are ok");
239 // for outliers, the measurement is not part of the fit, so track parameters are already unbiased
240 std::unique_ptr<const Trk::TrackParameters> cleanup_trackparam;
241 const Trk::TrackParameters* trackParameters =
243 biasedTrackParameters, mesb, isUnbiased) : biasedTrackParameters;
244
245 if (trackParameters != biasedTrackParameters) {
246 cleanup_trackparam.reset(trackParameters);
247 }
248 if (not trackParameters) {
249 ATH_MSG_DEBUG("unbiased track parameters pointer is NULL");
250 }
251
254
255 residualPull= m_residualPullCalculator->residualPull(hit, trackParameters, resType);
256 ATH_MSG_VERBOSE("checking residual pull");
257 if (not residualPull) {
258 ATH_MSG_DEBUG("residualPull is NULL");
259 continue;
260 }
261
262 ATH_MSG_DEBUG("residualPull is OK");
263
264 residualLocX = 1000. * residualPull->residual()[Trk::loc1]; // residuals in microns
265 pullLocX = residualPull->pull()[Trk::loc1];
266 measurementLocX = hit->localParameters()[Trk::loc1];
267 trackParamLocX = trackParameters->parameters()[Trk::loc1];
268 measurementLocCovX = hit->localCovariance()(Trk::loc1,Trk::loc1);
269
270 if (residualPull->dimension() > 1) {
271 residualLocY = 1000. * residualPull->residual()[Trk::loc2];
272 pullLocY = residualPull->pull()[Trk::loc2];
273 measurementLocY = hit->localParameters()[Trk::loc2];
274 trackParamLocY = trackParameters->parameters()[Trk::loc2];
275 measurementLocCovY = hit->localCovariance()(Trk::loc2,Trk::loc2);
276 }
277
278 // Unbiased residuals
279 measureType = 4;
280
281 if (hit && isUnbiased) {
282 // Cluster width determination
283 if ((det == L0PIXBARR)or(det == PIXEL) or(det == SCT)) {
284 assert(dynamic_cast <const InDet::SiCluster*>(hit->prepRawData())!=nullptr);
285 const InDet::SiCluster* pCluster = static_cast <const InDet::SiCluster*>(hit->prepRawData());
286 InDet::SiWidth width = pCluster->width();
287 phiWidth = int(width.colRow().x());
288 etaWidth = int(width.colRow().y());
289
290 // get candidate track angle in module local frame
291 Amg::Vector3D my_track = trackParameters->momentum();
292 const InDetDD::SiDetectorElement* element = pCluster->detectorElement();
293 Amg::Vector3D my_normal = element->normal();
294 Amg::Vector3D my_phiax = element->phiAxis();
295 Amg::Vector3D my_etaax = element->etaAxis();
296 double trkphicomp = my_track.dot(my_phiax);
297 double trketacomp = my_track.dot(my_etaax);
298 double trknormcomp = my_track.dot(my_normal);
299 double bowphi = std::atan2(trkphicomp,trknormcomp);
300 double boweta = std::atan2(trketacomp,trknormcomp);
301
302 double tanl = m_lorentzAngleTool->getTanLorentzAngle(element->identifyHash(), Gaudi::Hive::currentContext());
303 int readoutside = element->design().readoutSide();
304
305 // map the angles of inward-going tracks onto [-PI/2, PI/2]
306 if(bowphi > M_PI/2) bowphi -= M_PI;
307 if(bowphi < -M_PI/2) bowphi += M_PI;
308
309 // finally, subtract the Lorentz angle effect
310 // the readoutside term is needed because of a bug in old
311 // geometry versions (CSC-01-* and CSC-02-*)
312 angle = std::atan(std::tan(bowphi)-readoutside*tanl);
313
314 double thetaloc=-999.;
315 if(boweta > -0.5*M_PI && boweta < M_PI/2.) {
316 thetaloc = M_PI/2.-boweta;
317 } else if(boweta > M_PI/2. && boweta < M_PI) {
318 thetaloc = 1.5*M_PI-boweta;
319 } else { // 3rd quadrant
320 thetaloc = -0.5*M_PI-boweta;
321 }
322 etaloc = -1*log(tan(thetaloc/2.));
323 }
324 ATH_MSG_VERBOSE("hit and isUnbiased ok");
325 }
326 } else {
327 if (not mesb) {
328 ATH_MSG_VERBOSE("mesb not ok");
329 }
330 if (not biasedTrackParameters) {
331 ATH_MSG_VERBOSE("biasedTrackParameters were not found");
332 }
333 --trackParametersCounter;
334 }
335 thisResult = std::make_tuple(det, r, iLayer,
336 residualLocX, pullLocX, residualLocY, pullLocY,
337 phiWidth, etaWidth, measureType,
338 measurementLocX, measurementLocY,
339 trackParamLocX, trackParamLocY,
340 angle, etaloc,
341 measurementLocCovX, measurementLocCovY,
342 Surface_ID);
343 result.push_back(thisResult);
344 } // end of for loop*/
345 ATH_MSG_DEBUG( "Out of " << numberOfHits << " hits, " << trackParametersCounter
346 << " had track params, and " << result.size() << " had residuals.");
347 if (not result.empty()) {
348 const unsigned int arraySize = result.size();
349 std::vector<int> result_det;
350 result_det.reserve(arraySize);
351 std::vector<int> result_r;
352 result_r.reserve(arraySize);
353 std::vector<int> result_iLayer;
354 result_iLayer.reserve(arraySize);
355 std::vector<float> result_residualLocX;
356 result_residualLocX.reserve(arraySize);
357 std::vector<float> result_pullLocX;
358 result_pullLocX.reserve(arraySize);
359 std::vector<float> result_residualLocY;
360 result_residualLocY.reserve(arraySize);
361 std::vector<float> result_pullLocY;
362 result_pullLocY.reserve(arraySize);
363 std::vector<int> result_phiWidth;
364 result_phiWidth.reserve(arraySize);
365 std::vector<int> result_etaWidth;
366 result_etaWidth.reserve(arraySize);
367 std::vector<int> result_measureType;
368 result_measureType.reserve(arraySize);
369 std::vector<float> result_measurementLocX;
370 result_measurementLocX.reserve(arraySize);
371 std::vector<float> result_measurementLocY;
372 result_measurementLocY.reserve(arraySize);
373 std::vector<float> result_trackParamLocX;
374 result_trackParamLocX.reserve(arraySize);
375 std::vector<float> result_trackParamLocY;
376 result_trackParamLocY.reserve(arraySize);
377 std::vector<float> result_angle;
378 result_angle.reserve(arraySize);
379 std::vector<float> result_etaloc;
380 result_etaloc.reserve(arraySize);
381 std::vector<float> result_measurementLocCovX;
382 result_measurementLocCovX.reserve(arraySize);
383 std::vector<float> result_measurementLocCovY;
384 result_measurementLocCovY.reserve(arraySize);
385 std::vector<uint64_t> result_surfaceID;
386 result_surfaceID.reserve(arraySize);
387
388 for (const SingleResult_t& single_result : result) {
389 result_det.push_back(std::get<0>(single_result));
390 result_r.push_back(std::get<1>(single_result));
391 result_iLayer.push_back(std::get<2>(single_result));
392 result_residualLocX.push_back(std::get<3>(single_result));
393 result_pullLocX.push_back(std::get<4>(single_result));
394 result_residualLocY.push_back(std::get<5>(single_result));
395 result_pullLocY.push_back(std::get<6>(single_result));
396 result_phiWidth.push_back(std::get<7>(single_result));
397 result_etaWidth.push_back(std::get<8>(single_result));
398 result_measureType.push_back(std::get<9>(single_result));
399 result_measurementLocX.push_back(std::get<10>(single_result));
400 result_measurementLocY.push_back(std::get<11>(single_result));
401 result_trackParamLocX.push_back(std::get<12>(single_result));
402 result_trackParamLocY.push_back(std::get<13>(single_result));
403 result_angle.push_back(std::get<14>(single_result));
404 result_etaloc.push_back(std::get<15>(single_result));
405 result_measurementLocCovX.push_back(std::get<16>(single_result));
406 result_measurementLocCovY.push_back(std::get<17>(single_result));
407 result_surfaceID.push_back(std::get<18>(single_result));
408 }
409
410 int_decor[kDecorRegion](particle) = std::move(result_r);
411 int_decor[kDecorDet](particle) = std::move(result_det);
412 int_decor[kDecorILayer](particle) = std::move(result_iLayer);
413 int_decor[kDecorPhiWidth](particle) = std::move(result_phiWidth);
414 int_decor[kDecorEtaWidth](particle) = std::move(result_etaWidth);
415 int_decor[kDecorType](particle) = std::move(result_measureType);
416
417 float_decor[kDecorResidualLocX](particle) = std::move(result_residualLocX);
418 float_decor[kDecorPullLocX](particle) = std::move(result_pullLocX);
419 float_decor[kDecorMeasLocX](particle) = std::move(result_measurementLocX);
420 float_decor[kDecorTrkParamLocX](particle) = std::move(result_trackParamLocX);
421 float_decor[kDecorMeasLocCovX](particle) = std::move(result_measurementLocCovX);
422
423 float_decor[kDecorResidualLocY](particle) = std::move(result_residualLocY);
424 float_decor[kDecorPullLocY](particle) = std::move(result_pullLocY);
425 float_decor[kDecorMeasLocY](particle) = std::move(result_measurementLocY);
426 float_decor[kDecorTrkParamLocY](particle) = std::move(result_trackParamLocY);
427 float_decor[kDecorMeasLocCovY](particle) = std::move(result_measurementLocCovY);
428
429 float_decor[kDecorAngle](particle) = std::move(result_angle);
430 float_decor[kDecorEtaLoc](particle) = std::move(result_etaloc);
431
432 uint64_decor[kDecorID](particle) = std::move(result_surfaceID);
433
434 return true;
435 } else {
436 // particle below pt threshold for decoration. Since this is not an error now "true" is returned.
437 // If "false" is returned the job would be aborted.
438 return true;
439 }
440 } else {
441 ATH_MSG_ERROR("No valid track link found ");
442 }
443 return false;
444}
445
447 Region& region, int& layer) const {
448 bool success(false);
449 const int pixelSctBarrelIndex(0);
450 const int trtBarrelIndex(1);
451
452 detector = INVALID_DETECTOR;
453 region = INVALID_REGION;
454
455 if (m_idHelper->is_pixel(id)) {
456 detector = PIXEL;
457 region = (m_pixelID->barrel_ec(id) == pixelSctBarrelIndex) ? (BARREL) : (ENDCAP);
458 layer = m_pixelID->layer_disk(id);
459 if (BARREL == region and layer == 0) {
460 detector = L0PIXBARR;
461 }
462 }
463 else if (m_idHelper->is_sct(id)) {
464 detector = SCT;
465 region = (m_sctID->barrel_ec(id) == pixelSctBarrelIndex) ? (BARREL) : (ENDCAP);
466 layer = m_sctID->layer_disk(id);
467 }
468 else if (m_idHelper->is_trt(id)) {
469 if (!m_useTRT) {
470 ATH_MSG_ERROR("Inconsistency regarding TRT geometry");
471 return false;
472 }
473 detector = TRT;
474 region = (std::abs(m_trtID->barrel_ec(id)) == trtBarrelIndex) ? (BARREL) : (ENDCAP);
475 layer = m_trtID->layer_or_wheel(id);
476 }
477 success = (detector != INVALID_DETECTOR) and (region != INVALID_REGION);
478
479 return success;
480}
481
484 const Trk::MeasurementBase* measurement,
485 bool &isUnbiased) const {
486 const Trk::TrackParameters* unbiasedTrkParameters(trkParameters);
487
488 if (!m_updatorHandle.empty() && (isUnbiased)) {
489 if (trkParameters->covariance()) {
490 // Get unbiased state
491 unbiasedTrkParameters = m_updatorHandle->removeFromState(*trkParameters,
492 measurement->localParameters(),
493 measurement->localCovariance()).release();
494 if (!unbiasedTrkParameters) {
495 ATH_MSG_INFO( "Could not get unbiased track parameters, use normal parameters" );
496 isUnbiased = false;
497 }
498 } else if (not m_alreadyWarned) {
499 // warn only once!
500 ATH_MSG_WARNING("TrackParameters contain no covariance, unbiased track states can not be calculated "
501 "(ie. pulls and residuals will be too small)" );
502 m_alreadyWarned = true;
503 isUnbiased = false;
504 } else {
505 isUnbiased = false;
506 } // end if no measured track parameter
507 }
508 return unbiasedTrkParameters;
509}
#define M_PI
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
header file for class of same name
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
This is an Identifier helper class for the TRT subdetector.
const double width
const ServiceHandle< StoreGateSvc > & detStore() const
An algorithm that can be simultaneously executed in multiple threads.
value_type get_compact() const
Get the compact id.
int readoutSide() const
ReadoutSide.
Class to hold geometrical description of a silicon detector element.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
virtual const Amg::Vector3D & normal() const override final
Get reconstruction local normal axes in global frame.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
bool decideDetectorRegion(const Identifier &id, Subdetector &det, Region &r, int &layer) const
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
Gaudi::Property< bool > m_useTRT
InDetPhysHitDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_prefix
ToolHandle< Trk::ITrackHoleSearchTool > m_holeSearchTool
const Trk::TrackParameters * getUnbiasedTrackParameters(const Trk::TrackParameters *trkParameters, const Trk::MeasurementBase *measurement, bool &isUnbiased) const
virtual StatusCode initialize() override
const AtlasDetectorID * m_idHelper
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_intDecor
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trkParticleName
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
ToolHandle< Trk::IUpdator > m_updatorHandle
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_floatDecor
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_uint64Decor
virtual StatusCode execute(const EventContext &ctx) const override
virtual StatusCode finalize() override
const InDet::SiWidth & width() const
return width class reference
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...
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Handle class for adding a decoration to an object.
This class is the pure abstract base class for all fittable tracking measurements.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
const Amg::Vector3D & momentum() const
Access method for the momentum.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
@ Biased
RP with track state including the hit.
@ Unbiased
RP with track state that has measurement not included.
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
@ Hole
A hole on the track - this is defined in the following way.
virtual Identifier identify() const =0
Identifier.
int r
Definition globals.cxx:22
Eigen::Matrix< double, 3, 1 > Vector3D
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)
std::vector< SG::WriteDecorHandle< T_Cont, T > > createDecorators(const std::vector< SG::WriteDecorHandleKey< T_Cont > > &keys, const EventContext &ctx)
Definition HitInfo.h:33
@ loc2
generic first and second local coordinate
Definition ParamDefs.h:35
@ loc1
Definition ParamDefs.h:34
ParametersBase< TrackParametersDim, Charged > TrackParameters
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
implementation file for function of same name