ATLAS Offline Software
IExtendedTrackSummaryHelperTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef IEXTENDEDTRACKSUMMARYHELPERTOOL
6 #define IEXTENDEDTRACKSUMMARYHELPERTOOL
7 
9 #include "GaudiKernel/EventContext.h"
10 #include "GaudiKernel/IAlgTool.h"
11 #include "GaudiKernel/ThreadLocalContext.h"
12 #include <vector>
13 #include <bitset>
14 
15 
16 class Identifier;
17 
18 namespace Trk {
19 
20  static const InterfaceID IID_IExtendedTrackSummaryHelperTool("Trk::IExtendedTrackSummaryHelperTool", 1, 0);
21 
35  {
36  public:
37  static const InterfaceID& interfaceID();
40 
41  /* Expand/Extend the interface , with methods using the EventContext
42  */
43 
44  /*
45  * For now due to client compatibility
46  * we provide a default implementations
47  * in terms of the the older interface
48  */
49 
50  virtual void analyse(
51  const EventContext& ctx,
52  const Trk::Track& track,
53  const RIO_OnTrack* rot,
54  const TrackStateOnSurface* tsos,
55  std::vector<int>& information,
56  std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const
57  {
58  (void)ctx;
59  analyse(track, rot, tsos, information, hitPattern);
60  };
61 
62  virtual void analyse(
63  const EventContext& ctx,
64  const Trk::Track& track,
65  const CompetingRIOsOnTrack* crot,
66  const TrackStateOnSurface* tsos,
67  std::vector<int>& information,
68  std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const
69  {
70  (void)ctx;
71  analyse(track, crot, tsos, information, hitPattern);
72  }
73 
74  virtual void addDetailedTrackSummary(const EventContext& ctx,
75  const Track& track,
77  {
78  (void)ctx;
80  };
81 
82  /*
83  * Implement the ITrackSummaryHelperTool part
84  * of the interface for the methods with the same
85  * name as the method above.
86  */
87  virtual void analyse(
88  const Trk::Track& track,
89  const RIO_OnTrack* rot,
90  const TrackStateOnSurface* tsos,
91  std::vector<int>& information,
92  std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const override
93  {
94  analyse(Gaudi::Hive::currentContext(),
95  track,
96  rot,
97  tsos,
98  information,
99  hitPattern);
100  }
101 
102  virtual void analyse(
103  const Trk::Track& track,
104  const CompetingRIOsOnTrack* crot,
105  const TrackStateOnSurface* tsos,
106  std::vector<int>& information,
107  std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const override
108  {
109  analyse(Gaudi::Hive::currentContext(),
110  track,
111  crot,
112  tsos,
113  information,
114  hitPattern);
115  }
116 
118  const Track& track,
119  Trk::TrackSummary& summary) const override
120  {
121  addDetailedTrackSummary(Gaudi::Hive::currentContext(), track, summary);
122  }
123 
124  };
125 
127  {
128  return IID_ITrackSummaryHelperTool;
129  }
130 
131 }
132 #endif
Trk::ITrackSummaryHelperTool::analyse
virtual void analyse(const Trk::Track &track, const RIO_OnTrack *rot, const TrackStateOnSurface *tsos, std::vector< int > &information, std::bitset< Trk::numberOfDetectorTypes > &hitPattern) const =0
fill 'information' and 'hitpattern' using information from 'rot'.
Trk::IExtendedTrackSummaryHelperTool::analyse
virtual void analyse(const EventContext &ctx, const Trk::Track &track, const CompetingRIOsOnTrack *crot, const TrackStateOnSurface *tsos, std::vector< int > &information, std::bitset< Trk::numberOfDetectorTypes > &hitPattern) const
Definition: IExtendedTrackSummaryHelperTool.h:62
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::IExtendedTrackSummaryHelperTool
Definition: IExtendedTrackSummaryHelperTool.h:35
Trk::IExtendedTrackSummaryHelperTool::analyse
virtual void analyse(const EventContext &ctx, const Trk::Track &track, const RIO_OnTrack *rot, const TrackStateOnSurface *tsos, std::vector< int > &information, std::bitset< Trk::numberOfDetectorTypes > &hitPattern) const
Definition: IExtendedTrackSummaryHelperTool.h:50
Trk::ITrackSummaryHelperTool::addDetailedTrackSummary
virtual void addDetailedTrackSummary(const Trk::Track &track, Trk::TrackSummary &summary) const =0
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
Trk::CompetingRIOsOnTrack
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
Definition: CompetingRIOsOnTrack.h:64
Trk::IExtendedTrackSummaryHelperTool::addDetailedTrackSummary
virtual void addDetailedTrackSummary(const Track &track, Trk::TrackSummary &summary) const override
Definition: IExtendedTrackSummaryHelperTool.h:117
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
Trk::IExtendedTrackSummaryHelperTool::addDetailedTrackSummary
virtual void addDetailedTrackSummary(const EventContext &ctx, const Track &track, Trk::TrackSummary &summary) const
Definition: IExtendedTrackSummaryHelperTool.h:74
ITrackSummaryHelperTool.h
Trk::ITrackSummaryHelperTool
Interface for structuring the summary creation into sub-detector specific tools.
Definition: ITrackSummaryHelperTool.h:37
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
Trk::IExtendedTrackSummaryHelperTool::interfaceID
static const InterfaceID & interfaceID()
Definition: IExtendedTrackSummaryHelperTool.h:126
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Trk::IExtendedTrackSummaryHelperTool::analyse
virtual void analyse(const Trk::Track &track, const CompetingRIOsOnTrack *crot, const TrackStateOnSurface *tsos, std::vector< int > &information, std::bitset< Trk::numberOfDetectorTypes > &hitPattern) const override
Definition: IExtendedTrackSummaryHelperTool.h:102
Trk::IExtendedTrackSummaryHelperTool::analyse
virtual void analyse(const Trk::Track &track, const RIO_OnTrack *rot, const TrackStateOnSurface *tsos, std::vector< int > &information, std::bitset< Trk::numberOfDetectorTypes > &hitPattern) const override
fill 'information' and 'hitpattern' using information from 'rot'.
Definition: IExtendedTrackSummaryHelperTool.h:87
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65