ATLAS Offline Software
IPatternVisualizationTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONRECTOOLINTERFACESR4_IPATTERNVISUALIZATIONTOOL_H
5 #define MUONRECTOOLINTERFACESR4_IPATTERNVISUALIZATIONTOOL_H
6 
7 
8 #include <GaudiKernel/IAlgTool.h>
11 #include <xAODMuon/MuonSegment.h>
12 #include <memory>
13 
14 class EventContext;
15 class TObject;
16 
17 namespace MuonR4 {
18  class SpacePointBucket;
19  class SegmentSeed;
20  class Segment;
21 }
22 
23 namespace MuonValR4{
26  class IPatternVisualizationTool : virtual public IAlgTool {
27  public:
29 
30  using PrimitivePtr = std::unique_ptr<TObject>;
31  using PrimitiveVec = std::vector<PrimitivePtr>;
32  using MaximumVec = std::vector<MuonR4::ActsPeakFinderForMuon::Maximum>;
33 
34  virtual ~IPatternVisualizationTool() = default;
35 
40  virtual void visualizeBucket(const EventContext& ctx,
41  const MuonR4::SpacePointBucket& bucket,
42  const std::string& extraLabel) const = 0;
48  virtual void visualizeBucket(const EventContext& ctx,
49  const MuonR4::SpacePointBucket& bucket,
50  const std::string& extraLabel,
51  PrimitiveVec&& extraPaints) const = 0;
58  virtual void visualizeAccumulator(const EventContext& ctx,
59  const MuonR4::HoughPlane& accumulator,
60  const Acts::HoughTransformUtils::HoughAxisRanges& axisRanges,
61  const MaximumVec& maxima,
62  const std::string& extraLabel) const = 0;
70  virtual void visualizeAccumulator(const EventContext& ctx,
71  const MuonR4::HoughPlane& accumulator,
72  const Acts::HoughTransformUtils::HoughAxisRanges& axisRanges,
73  const MaximumVec& maxima,
74  const std::string& extraLabel,
75  PrimitiveVec&& extraPaints) const = 0;
76 
81  virtual void visualizeSeed(const EventContext& ctx,
82  const MuonR4::SegmentSeed& seed,
83  const std::string& extraLabel) const = 0;
89  virtual void visualizeSeed(const EventContext& ctx,
90  const MuonR4::SegmentSeed& seed,
91  const std::string& extraLabel,
92  PrimitiveVec&& extraPaints) const = 0;
97  virtual void visualizeSegment(const EventContext& ctx,
98  const MuonR4::Segment& segment,
99  const std::string& extraLabel) const = 0;
105  virtual void visualizeSegment(const EventContext& ctx,
106  const MuonR4::Segment& segment,
107  const std::string& extraLabel,
108  PrimitiveVec&& extraPaints) const = 0;
109 
112  virtual bool isLabeled(const MuonR4::SpacePoint& hit) const = 0;
113  virtual bool isLabeled(const xAOD::UncalibratedMeasurement& hit) const = 0;
114 
115 
116  using LabeledSegmentSet = std::unordered_set<const xAOD::MuonSegment*>;
119  virtual LabeledSegmentSet getLabeledSegments(const std::vector<const MuonR4::SpacePoint*>& hits) const = 0;
120  virtual LabeledSegmentSet getLabeledSegments(const std::vector<const xAOD::UncalibratedMeasurement*>& hits) const = 0;
121 
122  };
123 }
124 #endif
MuonValR4::IPatternVisualizationTool::visualizeAccumulator
virtual void visualizeAccumulator(const EventContext &ctx, const MuonR4::HoughPlane &accumulator, const Acts::HoughTransformUtils::HoughAxisRanges &axisRanges, const MaximumVec &maxima, const std::string &extraLabel, PrimitiveVec &&extraPaints) const =0
Visualize the content of the Hough accumulator in a TH2 histogram.
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MuonR4::SpacePointBucket
: The muon space point bucket represents a collection of points that will bre processed together in t...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h:21
Trk::TrackState::Segment
@ Segment
Definition: TrackStateDefs.h:37
MuonValR4::IPatternVisualizationTool::visualizeSeed
virtual void visualizeSeed(const EventContext &ctx, const MuonR4::SegmentSeed &seed, const std::string &extraLabel, PrimitiveVec &&extraPaints) const =0
Visualize the used space points of the seed together with the seed parameters.
MuonR4::Segment
Placeholder for what will later be the muon segment EDM representation.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:19
MuonSegment.h
MuonValR4::IPatternVisualizationTool::isLabeled
virtual bool isLabeled(const MuonR4::SpacePoint &hit) const =0
Returns whether the hit has been used on the labeled segments we refer to (e.g.
MuonValR4::IPatternVisualizationTool::getLabeledSegments
virtual LabeledSegmentSet getLabeledSegments(const std::vector< const MuonR4::SpacePoint * > &hits) const =0
Fetches all labeled (e.g.
MuonValR4::IPatternVisualizationTool::visualizeBucket
virtual void visualizeBucket(const EventContext &ctx, const MuonR4::SpacePointBucket &bucket, const std::string &extraLabel, PrimitiveVec &&extraPaints) const =0
Draws the content of the bucket on a TCanvas.
MuonR4::HoughPlane
Acts::HoughTransformUtils::HoughPlane< HoughHitType > HoughPlane
Definition: MuonHoughDefs.h:20
MuonValR4::IPatternVisualizationTool::visualizeSegment
virtual void visualizeSegment(const EventContext &ctx, const MuonR4::Segment &segment, const std::string &extraLabel) const =0
Visualize the used space points of the segment together with the seed parameters.
MuonValR4::IPatternVisualizationTool::PrimitivePtr
std::unique_ptr< TObject > PrimitivePtr
Definition: IPatternVisualizationTool.h:30
MuonValR4::IPatternVisualizationTool::visualizeSegment
virtual void visualizeSegment(const EventContext &ctx, const MuonR4::Segment &segment, const std::string &extraLabel, PrimitiveVec &&extraPaints) const =0
Visualize the used space points of the segment together with the seed parameters.
GeoPrimitives.h
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
MuonValR4::IPatternVisualizationTool::visualizeBucket
virtual void visualizeBucket(const EventContext &ctx, const MuonR4::SpacePointBucket &bucket, const std::string &extraLabel) const =0
Draws the content of the bucket on a TCanvas.
MuonValR4::IPatternVisualizationTool
Helper tool to visualize a pattern recogntion incident or a certain stage of the segment fit.
Definition: IPatternVisualizationTool.h:26
MuonValR4::IPatternVisualizationTool::visualizeSeed
virtual void visualizeSeed(const EventContext &ctx, const MuonR4::SegmentSeed &seed, const std::string &extraLabel) const =0
Visualize the used space points of the seed together with the seed parameters.
MuonValR4::IPatternVisualizationTool::visualizeAccumulator
virtual void visualizeAccumulator(const EventContext &ctx, const MuonR4::HoughPlane &accumulator, const Acts::HoughTransformUtils::HoughAxisRanges &axisRanges, const MaximumVec &maxima, const std::string &extraLabel) const =0
Visualize the content of the Hough accumulator in a TH2 histogram.
MuonR4::SpacePoint
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePoint.h:18
MuonValR4
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
Definition: IPatternVisualizationTool.h:23
MuonValR4::IPatternVisualizationTool::isLabeled
virtual bool isLabeled(const xAOD::UncalibratedMeasurement &hit) const =0
MuonHoughDefs.h
MuonValR4::IPatternVisualizationTool::PrimitiveVec
std::vector< PrimitivePtr > PrimitiveVec
Definition: IPatternVisualizationTool.h:31
MuonValR4::IPatternVisualizationTool::DeclareInterfaceID
DeclareInterfaceID(IPatternVisualizationTool, 1, 0)
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonR4::SegmentSeed
Representation of a segment seed (a fully processed hough maximum) produced by the hough transform.
Definition: SegmentSeed.h:14
MuonValR4::IPatternVisualizationTool::~IPatternVisualizationTool
virtual ~IPatternVisualizationTool()=default
MuonValR4::IPatternVisualizationTool::getLabeledSegments
virtual LabeledSegmentSet getLabeledSegments(const std::vector< const xAOD::UncalibratedMeasurement * > &hits) const =0
MuonValR4::IPatternVisualizationTool::MaximumVec
std::vector< MuonR4::ActsPeakFinderForMuon::Maximum > MaximumVec
Definition: IPatternVisualizationTool.h:32
MuonValR4::IPatternVisualizationTool::LabeledSegmentSet
std::unordered_set< const xAOD::MuonSegment * > LabeledSegmentSet
Definition: IPatternVisualizationTool.h:116
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5