ATLAS Offline Software
Loading...
Searching...
No Matches
ITRT_ToT_dEdx.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6#ifndef ITRT_TOT_DEDX_H
7#define ITRT_TOT_DEDX_H
8
9// Gaudi
10#include "GaudiKernel/IAlgTool.h"
11#include "GaudiKernel/EventContext.h"
13#include <optional>
14
15namespace Trk { class Track ; }
16namespace Trk { class TrackStateOnSurface ; }
17namespace InDet { class TRT_DriftCircleOnTrack ; }
18
19static const InterfaceID IID_ITRT_ToT_dEdx("ITRT_ToT_dEdx", 1, 0);
20
21class ITRT_ToT_dEdx : virtual public IAlgTool {
22
23
24public:
25
27 virtual ~ITRT_ToT_dEdx(){};
28
30 static const InterfaceID& interfaceID() { return IID_ITRT_ToT_dEdx; };
31
39 virtual double dEdx(
40 const EventContext& ctx,
41 const Trk::Track* track,
42 bool useHitsHT,
43 std::optional<float> localOccupancy = std::nullopt) const = 0;
44
45 virtual double dEdx(const Trk::Track* track,
46 bool useHitsHT,
47 std::optional<float> localOccupancy = std::nullopt) const;
48
56 virtual double usedHits(const EventContext& ctx,
57 const Trk::Track* track,
58 bool useHitsHT = true) const = 0;
59
60 virtual double usedHits(const Trk::Track* track,
61 bool useHitsHT = true) const;
62
63
74 virtual double getTest(const EventContext& ctx,
75 const double dEdx_obs,
76 const double pTrk,
77 Trk::ParticleHypothesis hypothesis,
78 Trk::ParticleHypothesis antihypothesis,
79 int nUsedHits) const = 0;
80
81 virtual double getTest(const double dEdx_obs,
82 const double pTrk,
83 Trk::ParticleHypothesis hypothesis,
84 Trk::ParticleHypothesis antihypothesis,
85 int nUsedHits) const;
86};
87
88// implement the non ctx aware methods in terms of the ctx
89// aware ones
90inline double
92 bool useHitsHT,
93 std::optional<float> localOccupancy) const
94{
95 return dEdx(Gaudi::Hive::currentContext(), track, useHitsHT, localOccupancy);
96}
97
98inline double
99ITRT_ToT_dEdx::usedHits(const Trk::Track* track, bool useHitsHT) const
100{
101 return usedHits(Gaudi::Hive::currentContext(), track, useHitsHT);
102}
103
104inline double
105ITRT_ToT_dEdx::getTest(const double dEdx_obs,
106 const double pTrk,
107 Trk::ParticleHypothesis hypothesis,
108 Trk::ParticleHypothesis antihypothesis,
109 int nUsedHits) const
110{
111 return getTest(Gaudi::Hive::currentContext(),
112 dEdx_obs,
113 pTrk,
114 hypothesis,
115 antihypothesis,
116 nUsedHits);
117}
118
119#endif // ITRT_TOT_DEDX_H
static const InterfaceID IID_ITRT_ToT_dEdx("ITRT_ToT_dEdx", 1, 0)
virtual double dEdx(const EventContext &ctx, const Trk::Track *track, bool useHitsHT, std::optional< float > localOccupancy=std::nullopt) const =0
function to calculate sum ToT normalised to number of used hits
virtual double getTest(const EventContext &ctx, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const =0
function to calculate likelihood ratio test
virtual ~ITRT_ToT_dEdx()
Virtual destructor.
virtual double usedHits(const EventContext &ctx, const Trk::Track *track, bool useHitsHT=true) const =0
function to calculate number of used hits
static const InterfaceID & interfaceID()
AlgTool interface methods.
Represents 'corrected' measurements from the TRT (for example, corrected for wire sag).
represents the track state (measurement, material, fit parameters and quality) at a surface.
Primary Vertex Finder.
Ensure that the ATLAS eigen extensions are properly loaded.
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.