ATLAS Offline Software
Loading...
Searching...
No Matches
MeasurementToTrackParticleDecorationAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// Header file for class MeasurementToTrackParticleDecoration
7//
8// The algorithm extends xAOD::TrackParticles
9// with additional decorations associated to measurements,
10// i.e. residuals, pulls, modules
11//
13
14#ifndef MEASUREMENTTOTRACKPARTICLEDECORATIONALG_H
15#define MEASUREMENTTOTRACKPARTICLEDECORATIONALG_H
16
18#include "GaudiKernel/ServiceHandle.h"
20
23
26#include "Acts/Definitions/Units.hpp"
28#include "Acts/EventData/TrackStateProxy.hpp"
29
30
31namespace ActsTrk {
32
34 public:
35 MeasurementToTrackParticleDecorationAlg(const std::string &name,ISvcLocator *pSvcLocator);
37
38 virtual StatusCode initialize() override;
39 virtual StatusCode execute(const EventContext& ctx) const override;
40
41 private:
51
52 float getChi2Contribution(const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state) const;
53 std::pair<Acts::BoundVector, Acts::BoundMatrix> getUnbiasedTrackParameters(const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state,
54 bool useSmoothed = true) const;
55
56 float evaluatePull(const float residual,
57 const float measurementCovariance,
58 const float trackParameterCovariance,
59 const bool evaluateUnbiased) const;
60
61 private:
62
63 PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
64
66 this, "TrackParticleKey", "", "Input track particle collection"};
67
69 this, "MeasurementRegionKey", m_trackParticlesKey, "measurement_region",
70 "Decorate track particle with region of the measurement (barrel, ec)"};
72 this, "MeasurementDetectorKey", m_trackParticlesKey, "measurement_det",
73 "Decorate track particle with measurement detector id (innermost pix, pix, strip)"};
75 this, "MeasurementLayerKey", m_trackParticlesKey, "measurement_iLayer",
76 "Decorate track particle with measurement layer"};
78 this, "Chi2HitPredictedKey", m_trackParticlesKey, "chi2_hit_predicted",
79 "Predicted Chi2 contribution for each hit"};
81 this, "Chi2HitFilteredKey", m_trackParticlesKey, "chi2_hit_filtered",
82 "Filtered Chi2 contribution for each hit"};
84 this, "MeasurementTypeKey", m_trackParticlesKey, "measurement_type",
85 "Decorate track particle with type of track state (outlier,hole, biased/unbiased)"};
87 this, "MeasurementPhiWidthKey", m_trackParticlesKey, "hitResiduals_phiWidth",
88 "Decorate track particle with measurement cluster size (in r-phi)"};
90 this, "MeasurementEtaWidthKey", m_trackParticlesKey, "hitResiduals_etaWidth",
91 "Decorate track particle with measurement cluster size (in eta)"};
92
93
95 this, "ResidualLocXkey", m_trackParticlesKey, "hitResiduals_residualLocX",
96 "Decorate track particle with unbiased residual in local x"};
98 this, "PullLocXkey", m_trackParticlesKey, "hitResiduals_pullLocX",
99 "Decorate track particle with unbiased pull in local x"};
101 this, "MeasurementLocXkey", m_trackParticlesKey, "measurementLocX",
102 "Decorate track particle with measurement local x"};
104 this, "TrackParameterLocXkey", m_trackParticlesKey, "trackParamLocX",
105 "Decorate track particle with unbiased prediction in local x"};
107 this, "MeasurementLocCovXkey", m_trackParticlesKey, "measurementLocCovX",
108 "Decorate track particle with local x measurement covariance"};
110 this, "TrackParameterLocCovXkey", m_trackParticlesKey, "trackParameterLocCovX",
111 "Decorate track particle with unbiased local x prediction covariance"};
112
114 this, "ResidualLocYkey", m_trackParticlesKey, "hitResiduals_residualLocY",
115 "Decorate track particle with unbiased residual in local y"};
117 this, "PullLocYkey", m_trackParticlesKey, "hitResiduals_pullLocY",
118 "Decorate track particle with unbiased pull in local y"};
120 this, "MeasurementLocYkey", m_trackParticlesKey, "measurementLocY",
121 "Decorate track particle with measurement local y"};
123 this, "TrackParameterLocYkey", m_trackParticlesKey, "trackParamLocY",
124 "Decorate track particle with unbiased prediction in local y"};
126 this, "MeasurementLocCovYkey", m_trackParticlesKey, "measurementLocCovY",
127 "Decorate track particle with local y measurement covariance"};
129 this, "TrackParameterLocCovYkey", m_trackParticlesKey, "trackParameterLocCovY",
130 "Decorate track particle with unbiased local y prediction covariance"};
131 };
132}
133
134#endif
135
136
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for adding a decoration to an object.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_chi2HitPredictedKey
float evaluatePull(const float residual, const float measurementCovariance, const float trackParameterCovariance, const bool evaluateUnbiased) const
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementRegionKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_residualLocYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackParameterLocYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementLayerKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementDetectorKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementLocYkey
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
float getChi2Contribution(const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state) const
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementEtaWidthKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_pullLocYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementLocXkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementTypeKey
MeasurementToTrackParticleDecorationAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_residualLocXkey
virtual StatusCode execute(const EventContext &ctx) const override
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_pullLocXkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementLocCovXkey
std::pair< Acts::BoundVector, Acts::BoundMatrix > getUnbiasedTrackParameters(const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state, bool useSmoothed=true) const
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticlesKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackParameterLocXkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackParameterLocCovYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementLocCovYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackParameterLocCovXkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_chi2HitFilteredKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementPhiWidthKey
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...