41#ifndef HGTD_RECALGS_TRACKTIMEDEFANDQUALITYALG_H
42#define HGTD_RECALGS_TRACKTIMEDEFANDQUALITYALG_H
52static constexpr unsigned short s_hgtd_layers = 4;
70 virtual StatusCode
initialize() override final;
78 this,
"TrackParticleContainerName",
"InDetTrackParticles",
79 "Name of the TrackParticle container"};
83 "deco with a handle for an extension"};
86 "deco with a handle for cluster time"};
90 "HGTD_cluster_truth_class",
91 "deco with a handle for a truth time"};
97 "Time resolution assigned to this track"};
103 "Bitfield for working point definition"};
105 Gaudi::Property<bool>
m_doActs {
this,
"doActs",
false};
126 this,
"Chi2Threshold", 1.5,
127 "Quality cut for decision to keep hits compatible in time"};
129 "Upper limit for a cluster delta t cut"};
132 this,
"DefaultTime", 0.0,
133 "Default time used for tracks without HGTD timing info"};
137 this,
"DefaultTimeRes", 50. / std::sqrt(12.),
138 "Default time resolution used for tracks without HGTD timing info"};
142 const std::vector<bool>& has_clusters,
143 const std::vector<int>& hit_classification)
const;
145 std::array<Hit, s_hgtd_layers>
147 const std::vector<bool>& has_clusters,
148 const std::vector<int>& hit_classification)
const;
157 float calculateChi2(
const std::array<Hit, s_hgtd_layers>& hits)
const;
168 bool passesDeltaT(
const std::array<Hit, s_hgtd_layers>& hits)
const;
178 float meanTime(
const std::array<Hit, s_hgtd_layers>& hits)
const;
215 short getValidPattern(
const std::array<Hit, s_hgtd_layers>& hits)
const;
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
const short m_primes_ptrn_sft
Gaudi::Property< bool > m_doActs
float calculateChi2(const std::array< Hit, s_hgtd_layers > &hits) const
Calculates the chi2 of the hit times given their resolution.
const short m_holes_ptrn_sft
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_time_dec_key
FloatProperty m_chi2_threshold
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTruthClassKey
std::array< Hit, s_hgtd_layers > getValidHits(const std::vector< float > ×, const std::vector< bool > &has_clusters, const std::vector< int > &hit_classification) const
CleaningResult runTimeConsistencyCuts(const std::vector< float > ×, const std::vector< bool > &has_clusters, const std::vector< int > &hit_classification) const
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_time_res_dec_key
FloatProperty m_deltat_cut
std::pair< float, float > getRadiusAndZ(const xAOD::TrackParticle &track_particle) const
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerKey
float meanTime(const std::array< Hit, s_hgtd_layers > &hits) const
Calculates the arithmetic mean of the valid hit times;.
const short m_recoed_ptrn_sft
void setLayerAsInvalid(std::array< Hit, s_hgtd_layers > &hits, short layer) const
Given a layer number, the hit sitting on this layer is flagged as invalid.
virtual ~TrackTimeDefAndQualityAlg()
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_hasValidTime_dec_key
float trackTimeResolution(const std::array< Hit, s_hgtd_layers > &hits) const
Calculates the combined resolution.
const short m_comp_ptrn_sft
short findLayerWithBadChi2(std::array< Hit, s_hgtd_layers > hits) const
Identifies time outliers by finding the layer within which a hit contributes negatively to the overal...
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTimeKey
bool lastHitIsOnLastSurface(const xAOD::TrackParticle &track_particle) const
Checks if the last hit on track was found on a pre-specified set of Pixel and Strip layers close to t...
bool passesDeltaT(const std::array< Hit, s_hgtd_layers > &hits) const
Checks two hits for time compatibility.
FloatProperty m_default_time_res
virtual StatusCode execute(const EventContext &ctx) const override final
short getValidPattern(const std::array< Hit, s_hgtd_layers > &hits) const
Returns the pattern of valid hits in HGTD as a 4-bit bitfield, where a 1 encodes that a valid hit was...
TrackTimeDefAndQualityAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_summarypattern_dec_key
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerHasExtensionKey
const Trk::TrackParameters * getLastHitOnTrack(const Trk::Track &track) const
FloatProperty m_default_time
virtual StatusCode initialize() override final
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
ParametersBase< TrackParametersDim, Charged > TrackParameters
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
std::array< Hit, s_hgtd_layers > m_hits