ATLAS Offline Software
Loading...
Searching...
No Matches
HGTD_IterativeExtensionTool.h
Go to the documentation of this file.
1
23
24#ifndef HGTD_ITERATIVEEXTENTSIONTOOL_H
25#define HGTD_ITERATIVEEXTENTSIONTOOL_H
26
30
31#include "GaudiKernel/ToolHandle.h"
38
39#include <memory>
40
41class HGTD_ID;
43
45 : public extends<AthAlgTool, IHGTD_TrackTimeExtensionTool, IHGTD_HolesITkTool> {
46
47public:
48 HGTD_IterativeExtensionTool(const std::string&, const std::string&,
49 const IInterface*);
50
51 virtual StatusCode initialize() override final;
52
64 const EventContext& ctx, const xAOD::TrackParticle& track_ptkl,
65 const HGTD_ClusterContainer* container,
66 const HepMC::GenEvent* hs_event = nullptr,
67 const InDetSimDataCollection* sim_data = nullptr) const override final;
68
69 virtual std::vector<std::unique_ptr<Trk::TrackParameters> > getHolesITk(
70 const EventContext& ctx, const xAOD::TrackParticle& track_ptkl) const override final;
71
72
73private:
86 getLastHitOnTrack(const Trk::Track& track) const;
87
98 static std::vector<const Trk::Surface*>
100 const Trk::Layer* layer);
101
114 std::vector<std::unique_ptr<const Trk::TrackParameters>>
115 extrapolateToSurfaces(const EventContext& ctx,
116 const Trk::TrackParameters& param,
117 const std::vector<const Trk::Surface*>& surfaces) const;
118
123 std::unique_ptr<const Trk::TrackStateOnSurface>
125 const Trk::Track* track,
126 const std::vector<std::unique_ptr<const Trk::TrackParameters>>& params,
127 const HGTD_ClusterContainer* container, bool &on_surface) const;
128
133 std::unique_ptr<const Trk::TrackStateOnSurface>
135 const Trk::TrackParameters* param,
136 const HGTD_ClusterContainer* container) const;
137
143 std::unique_ptr<const Trk::TrackStateOnSurface>
144 updateState(const Trk::Track* track, const Trk::TrackParameters* param,
145 const HGTD_Cluster* cluster) const;
146
147 std::pair<const HGTD_Cluster*, HGTD::ClusterTruthInfo>
148 getTruthMatchedCluster(const std::vector<const Trk::Surface*>& surfaces,
149 const HGTD_ClusterContainer* container,
150 const xAOD::TruthParticle* truth_ptkl,
151 const HepMC::GenEvent* hs_event,
152 const InDetSimDataCollection* sim_data) const;
153 const Trk::Surface*
154 getFirstHGTDlayer(const xAOD::TrackParticle& track_ptkl) const;
155 bool isOnHGTDSurface(const std::unique_ptr<const Trk::TrackParameters>& last_param) const;
156
157 // extrapolation tool
158 ToolHandle<Trk::IExtrapolator> m_extrapolator{
159 this, "ExtrapolatorTool", "Trk::Extrapolator/AtlasExtrapolator",
160 "Tool for extrapolating the track to the HGTD surfaces"};
161 // kalman updator tool
162 ToolHandle<Trk::IUpdator> m_updator{
163 this, "UpdatorTool", "Trk::KalmanUpdator/KalmanUpdator",
164 "Tool for updating the track parameters accounting for new measurements"};
165
166 ToolHandle<IHGTD_TOFcorrectionTool> m_tof_corr_tool{
167 this, "TOFCorrTool", "StraightLineTOFcorrectionTool",
168 "Tool for correcting for time of flight"};
169
170 ToolHandle<IHGTD_ClusterTruthTool> m_truth_tool{
171 this, "ClusterTruthTool", "HGTD::ClusterTruthTool/ClusterTruthTool",
172 "Tool for classifying HGTD clusters with truth information"};
173
175 const HGTD_ID* m_hgtd_id_helper{nullptr};
176
181 FloatProperty m_chi2_cut{this, "Chi2Cut", 5.0,
182 "Quality cut for decision to keep track extension"};
183
187 IntegerProperty m_particle_hypot{
188 this, "ParticleHypothesis", Trk::ParticleHypothesis::pion,
189 "The hypothesis of the track's particle type"};
190
191 IntegerProperty m_phitol_ITk{
192 this, "ToleranceLevelITk", 3,
193 "The tolerance level in phi for an extrapolation to be a hole on track in ITk"};
194 IntegerProperty m_etatol_ITk{
195 this, "ToleranceLevelITk", 3,
196 "The tolerance level in eta for an extrapolation to be a hole on track in ITk"};
197};
198
199#endif // HGTD_ITERATIVEEXTENTSIONTOOL_H
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
Trk::PrepRawDataContainer< HGTD_ClusterCollection > HGTD_ClusterContainer
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
The Detector manager has methods to retrieve the Identifier helper and methods to retrieve the detect...
This is an Identifier helper class for the HGTD subdetector.
Definition HGTD_ID.h:47
ToolHandle< Trk::IExtrapolator > m_extrapolator
ToolHandle< IHGTD_TOFcorrectionTool > m_tof_corr_tool
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.
const Trk::TrackStateOnSurface * getLastHitOnTrack(const Trk::Track &track) const
Retrieve the last hit on track stored in the Trk::Track.
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.
virtual StatusCode initialize() override final
FloatProperty m_chi2_cut
Track extensions are only kept if the chi2/ndof is lower than the defined cut.
HGTD_IterativeExtensionTool(const std::string &, const std::string &, const IInterface *)
ToolHandle< IHGTD_ClusterTruthTool > m_truth_tool
const HGTD_DetectorManager * m_hgtd_det_mgr
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
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...
bool isOnHGTDSurface(const std::unique_ptr< const Trk::TrackParameters > &last_param) const
const Trk::Surface * getFirstHGTDlayer(const xAOD::TrackParticle &track_ptkl) const
IntegerProperty m_particle_hypot
Particle hypothesis used for the extrapolation.
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.
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, bool &on_surface) const
Finds the overall best fitting cluster by keeping the one that gave the lowest chi2 after testing eac...
virtual std::vector< std::unique_ptr< Trk::TrackParameters > > getHolesITk(const EventContext &ctx, const xAOD::TrackParticle &track_ptkl) const override final
ToolHandle< Trk::IUpdator > m_updator
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.
Base Class for a Detector Layer in the Tracking realm.
Definition Layer.h:72
Abstract Base Class for tracking surfaces.
Definition Surface.h:79
represents the track state (measurement, material, fit parameters and quality) at a surface.
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39
ParametersBase< TrackParametersDim, Charged > TrackParameters
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.