ATLAS Offline Software
Loading...
Searching...
No Matches
IFastRecoVisualizationTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONRECTOOLINTERFACESR4_IPATTERNVISUALIZATIONTOOL_H
5#define MUONRECTOOLINTERFACESR4_IPATTERNVISUALIZATIONTOOL_H
6
7#include <GaudiKernel/IAlgTool.h>
8
13#include <TObject.h>
14
15#include <memory>
16
17#include "Acts/Utilities/CloneablePtr.hpp"
18class EventContext;
19class TObject;
20
21namespace MuonR4 {
22 class SpacePointBucket;
23 class GlobalPattern;
24 class SpacePoint;
25}
26
27namespace MuonValR4{
29
30 class IFastRecoVisualizationTool : virtual public IAlgTool {
31 public:
33
34 using PrimitivePtr = std::unique_ptr<TObject>;
35 using PrimitiveVec = std::vector<PrimitivePtr>;
36 using GlobalPatternPtr = Acts::CloneablePtr<MuonR4::GlobalPattern>;
37
38 virtual ~IFastRecoVisualizationTool() = default;
41 enum class PatternStatus : std::uint32_t {
45 };
46 enum class HitStatus : std::uint32_t {
50 };
51
52 explicit PatternHitVisualInfo(const MuonR4::SpacePoint* seed, double thetaMin, double thetaMax) :
53 seed{seed}, thetaSearchMin{thetaMin}, thetaSearchMax{thetaMax} {}
54
55 const MuonR4::SpacePoint* seed{nullptr};
57 std::vector<const MuonR4::SpacePointBucket*> parentBuckets{};
59 std::unordered_map<const MuonR4::SpacePoint*, std::pair<double, double>> hitLineInfo{};
61 std::vector<const MuonR4::SpacePoint*> replacedHits{};
63 std::vector<const MuonR4::SpacePoint*> discardedHits{};
71 };
72 using PatternHitVisualInfoVec = std::vector<PatternHitVisualInfo>;
77 virtual void plotPatternBuckets(const EventContext& ctx,
78 const std::string& extraLabel,
79 PatternHitVisualInfoVec&& patternVisual) const = 0;
85 virtual void plotPatternBuckets(const EventContext& ctx,
86 const std::string& extraLabel,
87 PatternHitVisualInfoVec&& patternVisual,
88 PrimitiveVec&& extraPaints) const = 0;
93 virtual void plotPatternBuckets(const EventContext& ctx,
94 const std::string& extraLabel,
95 PatternHitVisualInfo&& patternVisual) const = 0;
101 virtual void plotPatternBuckets(const EventContext& ctx,
102 const std::string& extraLabel,
103 PatternHitVisualInfo&& patternVisual,
104 PrimitiveVec&& extraPaints) const = 0;
105
108 virtual bool isLabeled(const MuonR4::SpacePoint& hit) const = 0;
109 virtual bool isLabeled(const xAOD::UncalibratedMeasurement& hit) const = 0;
110
111 using LabeledSegmentSet = std::unordered_set<const xAOD::MuonSegment*>;
114 virtual LabeledSegmentSet getLabeledSegments(const std::vector<const MuonR4::SpacePoint*>& hits) const = 0;
115 virtual LabeledSegmentSet getLabeledSegments(const std::vector<const xAOD::UncalibratedMeasurement*>& hits) const = 0;
116
117 };
118}
119#endif
Data class to represent an eta maximum in hough space.
: The muon space point bucket represents a collection of points that will bre processed together in t...
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Helper tool to visualize a pattern recogntion incident or a certain stage of the segment fit.
virtual LabeledSegmentSet getLabeledSegments(const std::vector< const MuonR4::SpacePoint * > &hits) const =0
Fetches all labeled (e.g.
virtual void plotPatternBuckets(const EventContext &ctx, const std::string &extraLabel, PatternHitVisualInfo &&patternVisual) const =0
Draws the content of the bucket on a TCanvas and adds the patterns found within the bucket.
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.
std::unordered_set< const xAOD::MuonSegment * > LabeledSegmentSet
std::vector< PatternHitVisualInfo > PatternHitVisualInfoVec
virtual bool isLabeled(const xAOD::UncalibratedMeasurement &hit) const =0
virtual void plotPatternBuckets(const EventContext &ctx, const std::string &extraLabel, PatternHitVisualInfoVec &&patternVisual) const =0
Draws the content of the bucket on a TCanvas and adds the patterns found within the bucket.
virtual void plotPatternBuckets(const EventContext &ctx, const std::string &extraLabel, PatternHitVisualInfo &&patternVisual, PrimitiveVec &&extraPaints) const =0
Draws the content of the bucket on a TCanvas and adds the patterns found within the bucket.
Acts::CloneablePtr< MuonR4::GlobalPattern > GlobalPatternPtr
DeclareInterfaceID(IFastRecoVisualizationTool, 1, 0)
virtual void plotPatternBuckets(const EventContext &ctx, const std::string &extraLabel, PatternHitVisualInfoVec &&patternVisual, PrimitiveVec &&extraPaints) const =0
Draws the content of the bucket on a TCanvas and adds the patterns found within the bucket.
virtual ~IFastRecoVisualizationTool()=default
virtual LabeledSegmentSet getLabeledSegments(const std::vector< const xAOD::UncalibratedMeasurement * > &hits) const =0
This header ties the generic definitions in this package.
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
Structure to hold visual information about a pattern.
std::vector< const MuonR4::SpacePoint * > replacedHits
vector of hits that have been replaced by other hits
std::vector< const MuonR4::SpacePointBucket * > parentBuckets
Parent buckets.
std::vector< const MuonR4::SpacePoint * > discardedHits
vector of hits that have been discarded
PatternHitVisualInfo(const MuonR4::SpacePoint *seed, double thetaMin, double thetaMax)
c-tor
std::unordered_map< const MuonR4::SpacePoint *, std::pair< double, double > > hitLineInfo
For each hit save slope and window.
PatternStatus status
Status of the pattern to decide how to visualize it.