Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
31 namespace 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:
42  enum Subdetector {
44  };
45  enum Region {
47  };
50  };
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  ToolHandle<IActsTrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
64 
66  this, "TrackParticleKey", "", "Input track particle collection"};
67 
69  this, "MeasurementRegionKey", "measurement_region",
70  "Decorate track particle with region of the measurement (barrel, ec)"};
72  this, "MeasurementDetectorKey", "measurement_det",
73  "Decorate track particle with measurement detector id (innermost pix, pix, strip)"};
75  this, "MeasurementLayerKey", "measurement_iLayer",
76  "Decorate track particle with measurement layer"};
78  this, "Chi2HitPredictedKey", "chi2_hit_predicted",
79  "Predicted Chi2 contribution for each hit"};
81  this, "Chi2HitFilteredKey", "chi2_hit_filtered",
82  "Filtered Chi2 contribution for each hit"};
84  this, "MeasurementTypeKey", "measurement_type",
85  "Decorate track particle with type of track state (outlier,hole, biased/unbiased)"};
87  this, "MeasurementPhiWidthKey", "hitResiduals_phiWidth",
88  "Decorate track particle with measurement cluster size (in r-phi)"};
90  this, "MeasurementEtaWidthKey", "hitResiduals_etaWidth",
91  "Decorate track particle with measurement cluster size (in eta)"};
92 
93 
95  this, "ResidualLocXkey", "hitResiduals_residualLocX",
96  "Decorate track particle with unbiased residual in local x"};
98  this, "PullLocXkey", "hitResiduals_pullLocX",
99  "Decorate track particle with unbiased pull in local x"};
101  this, "MeasurementLocXkey", "measurementLocX",
102  "Decorate track particle with measurement local x"};
104  this, "TrackParameterLocXkey", "trackParamLocX",
105  "Decorate track particle with unbiased prediction in local x"};
107  this, "MeasurementLocCovXkey", "measurementLocCovX",
108  "Decorate track particle with local x measurement covariance"};
110  this, "TrackParameterLocCovXkey", "trackParameterLocCovX",
111  "Decorate track particle with unbiased local x prediction covariance"};
112 
114  this, "ResidualLocYkey", "hitResiduals_residualLocY",
115  "Decorate track particle with unbiased residual in local y"};
117  this, "PullLocYkey", "hitResiduals_pullLocY",
118  "Decorate track particle with unbiased pull in local y"};
120  this, "MeasurementLocYkey", "measurementLocY",
121  "Decorate track particle with measurement local y"};
123  this, "TrackParameterLocYkey", "trackParamLocY",
124  "Decorate track particle with unbiased prediction in local y"};
126  this, "MeasurementLocCovYkey", "measurementLocCovY",
127  "Decorate track particle with local y measurement covariance"};
129  this, "TrackParameterLocCovYkey", "trackParameterLocCovY",
130  "Decorate track particle with unbiased local y prediction covariance"};
131  };
132 }
133 
134 #endif
135 
136 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer >
ActsTrk::MeasurementToTrackParticleDecorationAlg::initialize
virtual StatusCode initialize() override
Definition: MeasurementToTrackParticleDecorationAlg.cxx:26
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_residualLocXkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_residualLocXkey
Definition: MeasurementToTrackParticleDecorationAlg.h:94
ActsTrk::MeasurementToTrackParticleDecorationAlg::~MeasurementToTrackParticleDecorationAlg
virtual ~MeasurementToTrackParticleDecorationAlg()=default
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_measurementLayerKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementLayerKey
Definition: MeasurementToTrackParticleDecorationAlg.h:74
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
ActsTrk::MeasurementToTrackParticleDecorationAlg::Region
Region
Definition: MeasurementToTrackParticleDecorationAlg.h:45
ActsTrk::MeasurementToTrackParticleDecorationAlg::evaluatePull
float evaluatePull(const float residual, const float measurementCovariance, const float trackParameterCovariance, const bool evaluateUnbiased) const
Definition: MeasurementToTrackParticleDecorationAlg.cxx:426
ActsTrk::MeasurementToTrackParticleDecorationAlg::MeasurementToTrackParticleDecorationAlg
MeasurementToTrackParticleDecorationAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MeasurementToTrackParticleDecorationAlg.cxx:21
ActsTrk::MeasurementToTrackParticleDecorationAlg::HIT
@ HIT
Definition: MeasurementToTrackParticleDecorationAlg.h:49
ActsTrk::MeasurementToTrackParticleDecorationAlg::INVALID_MEASUREMENT
@ INVALID_MEASUREMENT
Definition: MeasurementToTrackParticleDecorationAlg.h:49
ActsTrk::MeasurementToTrackParticleDecorationAlg::INNERMOST_PIXEL
@ INNERMOST_PIXEL
Definition: MeasurementToTrackParticleDecorationAlg.h:43
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_measurementDetectorKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementDetectorKey
Definition: MeasurementToTrackParticleDecorationAlg.h:71
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_trackParameterLocXkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackParameterLocXkey
Definition: MeasurementToTrackParticleDecorationAlg.h:103
ActsTrk::MeasurementToTrackParticleDecorationAlg::getUnbiasedTrackParameters
std::pair< Acts::BoundVector, Acts::BoundMatrix > getUnbiasedTrackParameters(const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state, bool useSmoothed=true) const
SG::ReadHandleKey< xAOD::TrackParticleContainer >
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_chi2HitFilteredKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_chi2HitFilteredKey
Definition: MeasurementToTrackParticleDecorationAlg.h:80
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_residualLocYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_residualLocYkey
Definition: MeasurementToTrackParticleDecorationAlg.h:113
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_trackParameterLocCovYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackParameterLocCovYkey
Definition: MeasurementToTrackParticleDecorationAlg.h:128
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_measurementLocXkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementLocXkey
Definition: MeasurementToTrackParticleDecorationAlg.h:100
ActsTrk::MeasurementToTrackParticleDecorationAlg::BIASED
@ BIASED
Definition: MeasurementToTrackParticleDecorationAlg.h:49
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_trackingGeometryTool
ToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool
Definition: MeasurementToTrackParticleDecorationAlg.h:63
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_pullLocYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_pullLocYkey
Definition: MeasurementToTrackParticleDecorationAlg.h:116
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
WriteDecorHandle.h
Handle class for adding a decoration to an object.
ActsTrk::MeasurementToTrackParticleDecorationAlg::ENDCAP
@ ENDCAP
Definition: MeasurementToTrackParticleDecorationAlg.h:46
ActsTrk::MeasurementToTrackParticleDecorationAlg::N_SUBDETECTORS
@ N_SUBDETECTORS
Definition: MeasurementToTrackParticleDecorationAlg.h:43
ActsTrk::MeasurementToTrackParticleDecorationAlg::getChi2Contribution
float getChi2Contribution(const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state) const
Definition: MeasurementToTrackParticleDecorationAlg.cxx:398
ActsTrk::MeasurementToTrackParticleDecorationAlg::PIXEL
@ PIXEL
Definition: MeasurementToTrackParticleDecorationAlg.h:43
ActsTrk::MeasurementToTrackParticleDecorationAlg::STRIP
@ STRIP
Definition: MeasurementToTrackParticleDecorationAlg.h:43
AthReentrantAlgorithm.h
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_measurementEtaWidthKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementEtaWidthKey
Definition: MeasurementToTrackParticleDecorationAlg.h:89
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_measurementRegionKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementRegionKey
Definition: MeasurementToTrackParticleDecorationAlg.h:68
ActsTrk::MeasurementToTrackParticleDecorationAlg::BARREL
@ BARREL
Definition: MeasurementToTrackParticleDecorationAlg.h:46
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_pullLocXkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_pullLocXkey
Definition: MeasurementToTrackParticleDecorationAlg.h:97
ActsTrk::MeasurementToTrackParticleDecorationAlg::Subdetector
Subdetector
Definition: MeasurementToTrackParticleDecorationAlg.h:42
ActsTrk::MeasurementToTrackParticleDecorationAlg::INVALID_REGION
@ INVALID_REGION
Definition: MeasurementToTrackParticleDecorationAlg.h:46
ActsTrk::MeasurementToTrackParticleDecorationAlg::UNBIASED
@ UNBIASED
Definition: MeasurementToTrackParticleDecorationAlg.h:49
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_trackParameterLocCovXkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackParameterLocCovXkey
Definition: MeasurementToTrackParticleDecorationAlg.h:109
ActsTrk::MeasurementToTrackParticleDecorationAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: MeasurementToTrackParticleDecorationAlg.cxx:82
ActsTrk::MeasurementToTrackParticleDecorationAlg::INVALID_DETECTOR
@ INVALID_DETECTOR
Definition: MeasurementToTrackParticleDecorationAlg.h:43
ActsTrk::MeasurementToTrackParticleDecorationAlg
Definition: MeasurementToTrackParticleDecorationAlg.h:33
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_measurementLocCovXkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementLocCovXkey
Definition: MeasurementToTrackParticleDecorationAlg.h:106
ActsTrk::MeasurementToTrackParticleDecorationAlg::MeasurementType
MeasurementType
Definition: MeasurementToTrackParticleDecorationAlg.h:48
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_measurementLocYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementLocYkey
Definition: MeasurementToTrackParticleDecorationAlg.h:119
ActsTrk::MeasurementToTrackParticleDecorationAlg::OUTLIER
@ OUTLIER
Definition: MeasurementToTrackParticleDecorationAlg.h:49
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_measurementPhiWidthKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementPhiWidthKey
Definition: MeasurementToTrackParticleDecorationAlg.h:86
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_trackParticlesKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticlesKey
Definition: MeasurementToTrackParticleDecorationAlg.h:65
ActsTrk::MeasurementToTrackParticleDecorationAlg::HOLE
@ HOLE
Definition: MeasurementToTrackParticleDecorationAlg.h:49
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:55
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_trackParameterLocYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_trackParameterLocYkey
Definition: MeasurementToTrackParticleDecorationAlg.h:122
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_chi2HitPredictedKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_chi2HitPredictedKey
Definition: MeasurementToTrackParticleDecorationAlg.h:77
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_measurementTypeKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementTypeKey
Definition: MeasurementToTrackParticleDecorationAlg.h:83
TrackContainer.h
TrackParticleContainer.h
IActsTrackingGeometryTool.h
ActsTrk::MeasurementToTrackParticleDecorationAlg::m_measurementLocCovYkey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_measurementLocCovYkey
Definition: MeasurementToTrackParticleDecorationAlg.h:125