ATLAS Offline Software
HGTD_IterativeExtensionTool.h
Go to the documentation of this file.
1 
23 #ifndef HGTD_ITERATIVEEXTENTSIONTOOL_H
24 #define HGTD_ITERATIVEEXTENTSIONTOOL_H
25 
28 
29 #include "GaudiKernel/ToolHandle.h"
36 
37 #include <memory>
38 
39 class HGTD_ID;
41 
43  : public extends<AthAlgTool, IHGTD_TrackTimeExtensionTool> {
44 
45 public:
46  HGTD_IterativeExtensionTool(const std::string&, const std::string&,
47  const IInterface*);
48 
49  virtual StatusCode initialize() override final;
50 
62  const EventContext& ctx, const xAOD::TrackParticle& track_ptkl,
63  const HGTD_ClusterContainer* container,
64  const HepMC::GenEvent* hs_event = nullptr,
65  const InDetSimDataCollection* sim_data = nullptr) const override final;
66 
67 private:
80  getLastHitOnTrack(const Trk::Track& track) const;
81 
92  static std::vector<const Trk::Surface*>
94  const Trk::Layer* layer);
95 
108  std::vector<std::unique_ptr<const Trk::TrackParameters>>
109  extrapolateToSurfaces(const EventContext& ctx,
110  const Trk::TrackParameters& param,
111  const std::vector<const Trk::Surface*>& surfaces) const;
112 
117  std::unique_ptr<const Trk::TrackStateOnSurface>
119  const Trk::Track* track,
120  const std::vector<std::unique_ptr<const Trk::TrackParameters>>& params,
121  const HGTD_ClusterContainer* container) const;
122 
127  std::unique_ptr<const Trk::TrackStateOnSurface>
129  const Trk::TrackParameters* param,
130  const HGTD_ClusterContainer* container) const;
131 
137  std::unique_ptr<const Trk::TrackStateOnSurface>
138  updateState(const Trk::Track* track, const Trk::TrackParameters* param,
139  const HGTD_Cluster* cluster) const;
140 
141  std::pair<const HGTD_Cluster*, HGTD::ClusterTruthInfo>
142  getTruthMatchedCluster(const std::vector<const Trk::Surface*>& surfaces,
143  const HGTD_ClusterContainer* container,
144  const xAOD::TruthParticle* truth_ptkl,
145  const HepMC::GenEvent* hs_event,
146  const InDetSimDataCollection* sim_data) const;
147 
148  // extrapolation tool
149  ToolHandle<Trk::IExtrapolator> m_extrapolator{
150  this, "ExtrapolatorTool", "Trk::Extrapolator/AtlasExtrapolator",
151  "Tool for extrapolating the track to the HGTD surfaces"};
152  // kalman updator tool
153  ToolHandle<Trk::IUpdator> m_updator{
154  this, "UpdatorTool", "Trk::KalmanUpdator/KalmanUpdator",
155  "Tool for updating the track parameters accounting for new measurements"};
156 
157  ToolHandle<IHGTD_TOFcorrectionTool> m_tof_corr_tool{
158  this, "TOFCorrTool", "StraightLineTOFcorrectionTool",
159  "Tool for correcting for time of flight"};
160 
161  ToolHandle<IHGTD_ClusterTruthTool> m_truth_tool{
162  this, "ClusterTruthTool", "HGTD::ClusterTruthTool/ClusterTruthTool",
163  "Tool for classifying HGTD clusters with truth information"};
164 
166  const HGTD_ID* m_hgtd_id_helper{nullptr};
167 
172  FloatProperty m_chi2_cut{this, "Chi2Cut", 5.0,
173  "Quality cut for decision to keep track extension"};
174 
178  IntegerProperty m_particle_hypot{
179  this, "ParticleHypothesis", Trk::ParticleHypothesis::pion,
180  "The hypothesis of the track's particle type"};
181 };
182 
183 #endif // HGTD_ITERATIVEEXTENTSIONTOOL_H
HGTD::ExtensionObject
Definition: IHGTD_TrackTimeExtensionTool.h:32
IHGTD_TrackTimeExtensionTool.h
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
IHGTD_ClusterTruthTool.h
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
HGTD_IterativeExtensionTool::getCompatibleSurfaces
static std::vector< const Trk::Surface * > getCompatibleSurfaces(const Trk::TrackParameters &param, const Trk::Layer *layer)
Select all within the vincinity of the point of extrapolation.
Definition: HGTD_IterativeExtensionTool.cxx:229
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
HGTD_IterativeExtensionTool::m_hgtd_id_helper
const HGTD_ID * m_hgtd_id_helper
Definition: HGTD_IterativeExtensionTool.h:166
HGTD_IterativeExtensionTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: HGTD_IterativeExtensionTool.h:149
HGTD_IterativeExtensionTool::initialize
virtual StatusCode initialize() override final
Definition: HGTD_IterativeExtensionTool.cxx:34
xAOD::pion
@ pion
Definition: TrackingPrimitives.h:196
HGTD_IterativeExtensionTool::getTruthMatchedCluster
std::pair< const HGTD_Cluster *, HGTD::ClusterTruthInfo > getTruthMatchedCluster(const std::vector< const Trk::Surface * > &surfaces, const HGTD_ClusterContainer *container, const xAOD::TruthParticle *truth_ptkl, const HepMC::GenEvent *hs_event, const InDetSimDataCollection *sim_data) const
Definition: HGTD_IterativeExtensionTool.cxx:416
IExtrapolator.h
InDetSimDataCollection
Definition: InDetSimDataCollection.h:25
HGTD_IterativeExtensionTool::extrapolateToSurfaces
std::vector< std::unique_ptr< const Trk::TrackParameters > > extrapolateToSurfaces(const EventContext &ctx, const Trk::TrackParameters &param, const std::vector< const Trk::Surface * > &surfaces) const
After the compatible surfaces have been selected, the extrapolation is repeated to each of them.
Definition: HGTD_IterativeExtensionTool.cxx:272
HGTD_IterativeExtensionTool::m_updator
ToolHandle< Trk::IUpdator > m_updator
Definition: HGTD_IterativeExtensionTool.h:153
HGTD_IterativeExtensionTool::m_hgtd_det_mgr
const HGTD_DetectorManager * m_hgtd_det_mgr
Definition: HGTD_IterativeExtensionTool.h:165
IUpdator.h
HGTD_Cluster
Definition: HGTD_Cluster.h:35
HGTD_IterativeExtensionTool::m_truth_tool
ToolHandle< IHGTD_ClusterTruthTool > m_truth_tool
Definition: HGTD_IterativeExtensionTool.h:161
HGTD_IterativeExtensionTool::getLastHitOnTrack
const Trk::TrackStateOnSurface * getLastHitOnTrack(const Trk::Track &track) const
Retrieve the last hit on track stored in the Trk::Track.
Definition: HGTD_IterativeExtensionTool.cxx:204
HGTD_IterativeExtensionTool::m_tof_corr_tool
ToolHandle< IHGTD_TOFcorrectionTool > m_tof_corr_tool
Definition: HGTD_IterativeExtensionTool.h:157
HGTD_IterativeExtensionTool::updateState
std::unique_ptr< const Trk::TrackStateOnSurface > updateState(const Trk::Track *track, const Trk::TrackParameters *param, const HGTD_Cluster *cluster) const
Calls the TOF correction tool to build an HGTD_ClusterOnTrack with a calibrated time and resolution a...
Definition: HGTD_IterativeExtensionTool.cxx:383
HGTD_IterativeExtensionTool::extendTrackToHGTD
virtual HGTD::ExtensionObject extendTrackToHGTD(const EventContext &ctx, const xAOD::TrackParticle &track_ptkl, const HGTD_ClusterContainer *container, const HepMC::GenEvent *hs_event=nullptr, const InDetSimDataCollection *sim_data=nullptr) const override final
Finds the (up to) four measurements in HGTD that can be associated to the track.
Definition: HGTD_IterativeExtensionTool.cxx:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
AthAlgTool.h
HGTD_ID
Definition: HGTD_ID.h:47
Trk::ParametersBase
Definition: ParametersBase.h:55
HGTD_IterativeExtensionTool::m_particle_hypot
IntegerProperty m_particle_hypot
Particle hypothesis used for the extrapolation.
Definition: HGTD_IterativeExtensionTool.h:178
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
HGTD_IterativeExtensionTool::findBestCompatibleCluster
std::unique_ptr< const Trk::TrackStateOnSurface > findBestCompatibleCluster(const Trk::Track *track, const Trk::TrackParameters *param, const HGTD_ClusterContainer *container) const
Find the cluster on a given surface that has the best chi2 passing the cut.
Definition: HGTD_IterativeExtensionTool.cxx:331
HGTD_IterativeExtensionTool::m_chi2_cut
FloatProperty m_chi2_cut
Track extensions are only kept if the chi2/ndof is lower than the defined cut.
Definition: HGTD_IterativeExtensionTool.h:172
HGTD_IterativeExtensionTool
Definition: HGTD_IterativeExtensionTool.h:43
Trk::PrepRawDataContainer
Definition: PrepRawDataContainer.h:26
HGTD_DetectorManager
Definition: HGTD_DetectorManager.h:33
HGTD_IterativeExtensionTool::HGTD_IterativeExtensionTool
HGTD_IterativeExtensionTool(const std::string &, const std::string &, const IInterface *)
Definition: HGTD_IterativeExtensionTool.cxx:29
IHGTD_TOFcorrectionTool.h
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
TruthParticle.h
HGTD_ClusterContainer.h
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
HGTD_IterativeExtensionTool::updateStateWithBestFittingCluster
std::unique_ptr< const Trk::TrackStateOnSurface > updateStateWithBestFittingCluster(const Trk::Track *track, const std::vector< std::unique_ptr< const Trk::TrackParameters >> &params, const HGTD_ClusterContainer *container) const
Finds the overall best fitting cluster by keeping the one that gave the lowest chi2 after testing eac...
Definition: HGTD_IterativeExtensionTool.cxx:295
Trk::Layer
Definition: Layer.h:73