ATLAS Offline Software
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 
15 namespace Trk { class Track ; }
16 namespace Trk { class TrackStateOnSurface ; }
17 namespace InDet { class TRT_DriftCircleOnTrack ; }
18 
19 static const InterfaceID IID_ITRT_ToT_dEdx("ITRT_ToT_dEdx", 1, 0);
20 
21 class ITRT_ToT_dEdx : virtual public IAlgTool {
22 
23 
24 public:
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
90 inline double
92  bool useHitsHT,
93  std::optional<float> localOccupancy) const
94 {
95  return dEdx(Gaudi::Hive::currentContext(), track, useHitsHT, localOccupancy);
96 }
97 
98 inline double
99 ITRT_ToT_dEdx::usedHits(const Trk::Track* track, bool useHitsHT) const
100 {
101  return usedHits(Gaudi::Hive::currentContext(), track, useHitsHT);
102 }
103 
104 inline double
105 ITRT_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
TrackParameters.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
ITRT_ToT_dEdx::usedHits
virtual double usedHits(const EventContext &ctx, const Trk::Track *track, bool useHitsHT=true) const =0
function to calculate number of used hits
ITRT_ToT_dEdx::dEdx
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
ITRT_ToT_dEdx::interfaceID
static const InterfaceID & interfaceID()
AlgTool interface methods.
Definition: ITRT_ToT_dEdx.h:30
ITRT_ToT_dEdx::~ITRT_ToT_dEdx
virtual ~ITRT_ToT_dEdx()
Virtual destructor.
Definition: ITRT_ToT_dEdx.h:27
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
ITRT_ToT_dEdx::getTest
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
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
ITRT_ToT_dEdx
Definition: ITRT_ToT_dEdx.h:21
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
xAOD::track
@ track
Definition: TrackingPrimitives.h:512