ATLAS Offline Software
Loading...
Searching...
No Matches
TimeCompatibilityCheckAlg.h
Go to the documentation of this file.
1
24
25#ifndef HGTD_RECALGS_TIMECOMPATIBILITYCHECKALG_H
26#define HGTD_RECALGS_TIMECOMPATIBILITYCHECKALG_H
27
29
30#include "GaudiKernel/ToolHandle.h"
31#include "GaudiKernel/SystemOfUnits.h"
39#include <string>
40
41
42namespace HGTD {
43
45
46public:
47 TimeCompatibilityCheckAlg(const std::string& name, ISvcLocator* pSvcLocator);
49 virtual StatusCode initialize() override final;
50 virtual StatusCode execute(const EventContext& ctx) const override final;
51
53 ToolHandle<IHGTD_HolesITkTool> m_extensionTool{this, "ITkHoles", "HGTD_IterativeExtensionTool/HGTD_IterativeExtensionTool", "Tool for calculating the holes in"};
54
55
56
57 SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleContainerKey{this, "TrackParticleContainerName", "InDetTrackParticles", "Name of the TrackParticle container"};
58 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_layerHasExtensionKey{this, "HGTD_has_extension", m_trackParticleContainerKey, "HGTD_has_extension", "deco with a handle for an extension"};
59 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_layerExtensionChi2Key{this, "HGTD_extension_chi2", m_trackParticleContainerKey, "HGTD_extension_chi2", "deco with a handle for a ch2 of extension"};
60 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterRawTimeKey{this, "HGTD_cluster_raw_time", m_trackParticleContainerKey, "HGTD_cluster_raw_time", "deco with a handle for layer cluster raw time"};
61 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterTimeKey{this, "HGTD_cluster_time", m_trackParticleContainerKey, "HGTD_cluster_time", "deco with a handle for cluster time"};
62 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterTruthClassKey{this, "HGTD_cluster_truth_class", m_trackParticleContainerKey, "HGTD_cluster_truth_class", "deco with a handle for a truth time"};
63 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterShadowedKey{this, "HGTD_cluster_shadowed", m_trackParticleContainerKey, "HGTD_cluster_shadowed", "deco with a handle for a shadowed cluster"};
64 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_layerClusterMergedKey{this, "HGTD_cluster_merged", m_trackParticleContainerKey, "HGTD_cluster_merged", "deco with a handle for a merged cluster"};
65 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_layerPrimaryExpectedKey{this, "HGTD_primary_expected", m_trackParticleContainerKey, "HGTD_primary_expected", "deco with a handle for an expected primary"};
66 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_extrapXKey{this, "HGTD_extrap_x",m_trackParticleContainerKey, "HGTD_extrap_x", "deco with a handle for an x of extrap"};
67 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_extrapYKey{this, "HGTD_extrap_y", m_trackParticleContainerKey, "HGTD_extrap_y", "deco with a handle for an y of extrap"};
68 SG::ReadDecorHandleKey<xAOD::TrackParticleContainer> m_holesHGTDKey{this, "HGTD_holes", m_trackParticleContainerKey, "HGTD_holes", "deco with the holes on track in HGTD"};
69
70
71 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_compatibleHitsTimesKey{this, "HGTD_times_of_compatible_hits",m_trackParticleContainerKey, "HGTD_times_of_compatible_hits", "deco with a handle for the time compatible hits' times"};
72 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_lastHitInITkCutKey{this, "HGTD_last_hit_in_ITk_cut", m_trackParticleContainerKey, "HGTD_last_hit_in_ITk_cut", "deco with a handle for the last hit to be close to HGTDrequirement"};
73 SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> m_holesITkKey{this, "HGTD_holes_in_ITk", m_trackParticleContainerKey, "HGTD_holes_in_ITk", "deco with a handle for the number of holes on track in ITk between the last hit on track and HGTD"};
74
75//TODO: the resolution is fixed to 0.035 ps, should add the resolution calculation after the irradiation
76
77struct Hit {
78 float m_time;
79 float m_resolution = 35 * Gaudi::Units::picosecond;
80};
81
82FloatProperty m_chi2_threshold{this, "Chi2Threshold", 1.5,
83 "Quality cut for decision to keep hits compatible in time"};
84
85FloatProperty m_delta_cut{this, "DeltaTCut", 2.0,
86 "Upper limit for a cluster delta t cut"};
87
88// using Hit_Vec_t = std::vector<Hit>:
89// using Float_Vec_t = std::vector<float>;
90float calculateChi2(const std::vector<Hit>& hits) const;
91
92std::vector<TimeCompatibilityCheckAlg::Hit>
93 getValidHits(const xAOD::TrackParticle* track_particle) const;
94
95bool passesDeltaT(const std::vector<Hit>& hits) const;
96
97std::vector<TimeCompatibilityCheckAlg::Hit>
98 getTimeCompatibleHits(const xAOD::TrackParticle* track_particle) const;
99
100bool lastHitIsOnLastSurface(const xAOD::TrackParticle& track_particle) const;
101
102const Trk::TrackParameters* getLastHitOnTrack(const Trk::Track& track) const;
103
104};
105
106} //namespace HGTD
107
108#endif // HGTD_RECALGS_TIMECOMPATIBILITYCHECKALG_H
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Handle class for reading a decoration on an object.
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.
std::vector< TimeCompatibilityCheckAlg::Hit > getValidHits(const xAOD::TrackParticle *track_particle) const
TimeCompatibilityCheckAlg(const std::string &name, ISvcLocator *pSvcLocator)
float calculateChi2(const std::vector< Hit > &hits) const
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_extrapYKey
bool passesDeltaT(const std::vector< Hit > &hits) const
ToolHandle< IHGTD_HolesITkTool > m_extensionTool
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterRawTimeKey
virtual StatusCode initialize() override final
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_compatibleHitsTimesKey
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTruthClassKey
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerExtensionChi2Key
std::vector< TimeCompatibilityCheckAlg::Hit > getTimeCompatibleHits(const xAOD::TrackParticle *track_particle) const
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTimeKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_lastHitInITkCutKey
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterShadowedKey
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_holesHGTDKey
bool lastHitIsOnLastSurface(const xAOD::TrackParticle &track_particle) const
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterMergedKey
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_extrapXKey
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerHasExtensionKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerKey
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerPrimaryExpectedKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_holesITkKey
const Trk::TrackParameters * getLastHitOnTrack(const Trk::Track &track) const
virtual StatusCode execute(const EventContext &ctx) const override final
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
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.
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
ParametersBase< TrackParametersDim, Charged > TrackParameters
TrackParticle_v1 TrackParticle
Reference the current persistent version:
#define private
Definition testRead.cxx:27