ATLAS Offline Software
Loading...
Searching...
No Matches
VertexTimeAlg.h
Go to the documentation of this file.
1
10
11#ifndef HGTD_VERTEXTIMEALG_H
12#define HGTD_VERTEXTIMEALG_H
13
14// Local includes
15#include "Clustering.h"
16
17// Athena includes
25#include "xAODTracking/Vertex.h"
27
28// Gaudi includes
29#include "Gaudi/Property.h"
30#include "GaudiKernel/SystemOfUnits.h"
31
32// ROOT includes
33#include "TMVA/Reader.h"
34
35// Standard library includes
36#include <memory>
37#include <string>
38#include <utility>
39#include <vector>
40
41namespace HGTD {
42
44
45public:
46 VertexTimeAlg(const std::string& name, ISvcLocator* pSvcLocator);
47
48 StatusCode initialize() override final;
49 StatusCode execute(const EventContext& ctx) const override final;
50
51private:
53 this, "PrimaryVertexContainer", "PrimaryVertices",
54 "Name of the primary vertex container"
55 };
56
58 this, "TrackParticleContainer", "InDetTrackParticles",
59 "Name of the track container"
60 };
61
63 this, "VertexHasValidTime", m_primVxCont_key, "hasValidTime",
64 "Specifies if the vertex has a valid time"
65 };
66
68 this, "VertexTime", m_primVxCont_key, "time", "Time assigned to vertices"
69 };
70
72 this, "VertexTimeResolution", m_primVxCont_key, "timeResolution",
73 "Time resolution assigned to vertices"
74 };
75
77 this, "TrackHasValidTime", m_trackCont_key, "hasValidTime",
78 "Specifies if the track has a valid precision time"
79 };
80
82 this, "TrackTime", m_trackCont_key, "time", "Time assigned to tracks"
83 };
84
86 this, "TrackTimeResolution", m_trackCont_key, "timeResolution",
87 "Time resolution assigned to tracks"
88 };
89
90 Gaudi::Property<float> m_default_vxTime {
91 this, "DefaultVertexTime", 0.0 * Gaudi::Units::ns,
92 "The default time assigned to the vertex if no precision time can be calculated"
93 };
94
95 Gaudi::Property<float> m_default_vxTimeRes {
96 this, "DefaultVertexTimeResolution", 50.0 / std::sqrt(12.0) * Gaudi::Units::ns,
97 "The default time resolution assigned to the vertex if no precision time can be calculated"
98 };
99
100 Gaudi::Property<float> m_bdt_cutvalue {
101 this, "BDTCutValue", 0.2f ,
102 "The BDT output has to be above this value for the cluster to be accepted as HS"
103 };
104
105 std::vector<const xAOD::TrackParticle*> vertexAssociatedHGTDTracks(
106 const xAOD::Vertex* vertex, const xAOD::TrackParticleContainer* tracks,
107 double min_trk_pt) const;
108
110 const xAOD::TrackParticle* track, const xAOD::Vertex* vertex,
111 double min_trk_pt, const double significance_cut = 2.5) const;
112
113 std::vector<HGTD::Cluster<const xAOD::TrackParticle*>> clusterTracksInTime(
114 const EventContext& ctx,
115 const std::vector<const xAOD::TrackParticle*>& tracks,
116 double cluster_distance) const;
117
119 const EventContext& ctx,
120 const std::vector<HGTD::Cluster<const xAOD::TrackParticle*>>& clusters,
121 const xAOD::Vertex* vertex) const;
122
123 float scoreCluster(
124 const EventContext& ctx,
126 const xAOD::Vertex* vertex) const;
127
128 std::pair<float, float> getZOfCluster(
129 const HGTD::Cluster<const xAOD::TrackParticle*>& cluster) const;
130
131 std::pair<float, float> getOneOverPOfCluster(
132 const HGTD::Cluster<const xAOD::TrackParticle*>& cluster) const;
133
134 std::pair<float, float> getDOfCluster(
135 const HGTD::Cluster<const xAOD::TrackParticle*>& cluster) const;
136
137 float getSumPt2OfCluster(
138 const HGTD::Cluster<const xAOD::TrackParticle*>& cluster) const;
139
141 // Reader
142 std::unique_ptr<TMVA::Reader> reader { };
143
144 // BDT inputs
145 float delta_z { 0.0f };
146 float z_sigma { 0.0f };
147 float q_over_p { 0.0f };
148 float q_over_p_sigma { 0.0f };
149 float d0 { 0.0f };
150 float d0_sigma { 0.0f };
151 float delta_z_resunits { 0.0f };
152 float cluster_sumpt2 { 0.0f };
153 };
154
156
157};
158
159} // namespace HGTD
160
161#endif // HGTD_VERTEXTIMEALG_H
Maintain a set of objects, one per slot.
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.
An algorithm that can be simultaneously executed in multiple threads.
std::pair< float, float > getDOfCluster(const HGTD::Cluster< const xAOD::TrackParticle * > &cluster) const
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackCont_key
Gaudi::Property< float > m_default_vxTime
std::vector< const xAOD::TrackParticle * > vertexAssociatedHGTDTracks(const xAOD::Vertex *vertex, const xAOD::TrackParticleContainer *tracks, double min_trk_pt) const
std::pair< float, float > getOneOverPOfCluster(const HGTD::Cluster< const xAOD::TrackParticle * > &cluster) const
SG::ReadHandleKey< xAOD::VertexContainer > m_primVxCont_key
Gaudi::Property< float > m_bdt_cutvalue
std::pair< float, float > getZOfCluster(const HGTD::Cluster< const xAOD::TrackParticle * > &cluster) const
HGTD::Cluster< const xAOD::TrackParticle * > getHScluster(const EventContext &ctx, const std::vector< HGTD::Cluster< const xAOD::TrackParticle * > > &clusters, const xAOD::Vertex *vertex) const
bool passTrackVertexAssociation(const xAOD::TrackParticle *track, const xAOD::Vertex *vertex, double min_trk_pt, const double significance_cut=2.5) const
std::vector< HGTD::Cluster< const xAOD::TrackParticle * > > clusterTracksInTime(const EventContext &ctx, const std::vector< const xAOD::TrackParticle * > &tracks, double cluster_distance) const
SG::SlotSpecificObj< HSclusterBDT > m_BDT ATLAS_THREAD_SAFE
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_vxTimeRes_key
VertexTimeAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< float > m_default_vxTimeRes
float scoreCluster(const EventContext &ctx, const HGTD::Cluster< const xAOD::TrackParticle * > &cluster, const xAOD::Vertex *vertex) const
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_trackValidTime_key
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_trackTime_key
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_vxHasTime_key
StatusCode initialize() override final
float getSumPt2OfCluster(const HGTD::Cluster< const xAOD::TrackParticle * > &cluster) const
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_trackTimeRes_key
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_vxTime_key
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.
Maintain a set of objects, one per slot.
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.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
std::unique_ptr< TMVA::Reader > reader