ATLAS Offline Software
Loading...
Searching...
No Matches
IHGTD_ExpertTrackTimeAccessor.h
Go to the documentation of this file.
1
17
18#ifndef IHGTD_EXPERTTRACKTIMEACCESSOR_H
19#define IHGTD_EXPERTTRACKTIMEACCESSOR_H
20
21#include "GaudiKernel/IAlgTool.h"
22#include "GaudiKernel/PhysicalConstants.h"
27
28class MsgStream;
29
30class IHGTD_ExpertTrackTimeAccessor : virtual public IAlgTool {
31
32public:
34
41 virtual bool
42 expertHasTime(const xAOD::TrackParticle& track_particle) const = 0;
43
51 virtual float
52 expertTime(const xAOD::TrackParticle& track_particle) const = 0;
53
62 virtual float
63 expertTimeRes(const xAOD::TrackParticle& track_particle) const = 0;
64
69 virtual float
70 fracPrimaryHits(const xAOD::TrackParticle& track_particle) const = 0;
71
77 const xAOD::TrackParticle& track_particle) const = 0;
78
83 virtual float getTruthTime(const xAOD::TruthParticle& truth_particle) const {
84 float truth_time = -999.;
85 auto production_vx = truth_particle.prodVtx();
86 if (production_vx) {
87 truth_time = production_vx->t() / Gaudi::Units::c_light;
88 }
89 return truth_time;
90 };
91
92 virtual float getTruthTime(const xAOD::TrackParticle& track_particle) const {
93 float truth_time = -999.;
94 auto truth_ptcl = xAOD::TruthHelpers::getTruthParticle(track_particle);
95 if (truth_ptcl) {
96 auto production_vx = truth_ptcl->prodVtx();
97 if (production_vx) {
98 truth_time = production_vx->t() / Gaudi::Units::c_light;
99 }
100 }
101 return truth_time;
102 }
103
104 virtual float getTruthTime(const xAOD::TruthVertex& truth_vertex) const {
105 return truth_vertex.t() / Gaudi::Units::c_light;
106 }
107};
108
109#endif // IHGTD_EXPERTTRACKTIMEACCESSOR_H
virtual float fracPrimaryHits(const xAOD::TrackParticle &track_particle) const =0
Returns the fraction of the hits used for the track time that were left by a primary particle.
virtual float getTruthTime(const xAOD::TruthVertex &truth_vertex) const
virtual float getTruthTime(const xAOD::TruthParticle &truth_particle) const
Returns the time of the associated truth vertex, if one can be found.
virtual float expertTimeRes(const xAOD::TrackParticle &track_particle) const =0
Assuming gaussian behaviour for the track time resolution, this function retuns the uncertainty on th...
DeclareInterfaceID(IHGTD_ExpertTrackTimeAccessor, 1, 0)
virtual int numberPotentialPrimaryHits(const xAOD::TrackParticle &track_particle) const =0
Returns the number of HGTD surfaces on which a hit from a primary particle was expected for this trac...
virtual bool expertHasTime(const xAOD::TrackParticle &track_particle) const =0
Not each track has a time defined.
virtual float expertTime(const xAOD::TrackParticle &track_particle) const =0
Returns the reconstructed time assigned to the track.
virtual float getTruthTime(const xAOD::TrackParticle &track_particle) const
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
float t() const
Vertex time.
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any).
TruthVertex_v1 TruthVertex
Typedef to implementation.
Definition TruthVertex.h:15
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.