ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimOverlapRemovalTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
11
12#ifndef FPGATrackSimOVERLAPREMOVALTOOL_H
13#define FPGATrackSimOVERLAPREMOVALTOOL_H
14
16#include "GaudiKernel/ServiceHandle.h"
17
22
23#include "GaudiKernel/ToolHandle.h"
25
26#include <string>
27#include <vector>
28#include <ostream>
29
36public:
37
38 FPGATrackSimOverlapRemovalTool (const std::string&, const std::string&, const IInterface*);
40
41 StatusCode initialize() override;
42
43 StatusCode runOverlapRemoval(std::vector<FPGATrackSimRoad>& roads);
44
45 // Original Overlap Removal function
46 // Compare chi2 and common number of hits
47 StatusCode runOverlapRemoval(std::vector<FPGATrackSimTrack>& tracks);
48
49 void setDoSecondStage(bool v) { m_do2ndStage = v; }
50 bool getDoSecondStage() const { return m_do2ndStage; }
51 ORAlgo getAlgorithm() const {return m_algo;}
52 // Find the one track from the duplicate group with the minium Chi2 and maximum # of hits
53
54 StatusCode removeOverlapping(FPGATrackSimTrack & track1, FPGATrackSimTrack & track2);
55 static bool compareTrackQuality(const FPGATrackSimTrack & track1, const FPGATrackSimTrack & track2);
56
57private:
58
59
60 Gaudi::Property <bool> m_do2ndStage { this, "DoSecondStage", false, "Do second stage of not?"};
61 Gaudi::Property <int> m_NumOfHitPerGrouping { this, "NumOfHitPerGrouping", 5, "Number of hits pre grouping"};
62 Gaudi::Property <float> m_minChi2 { this, "MinChi2", 40, "Minimum chi2 requirement for tracks being considered in OR"};
63 Gaudi::Property <bool> m_roadSliceOR { this, "roadSliceOR", true, "Do slice-wise overlap removal for roads (Hough-only)"};
64 Gaudi::Property <int> m_localMaxWindowSize { this, "localMaxWindowSize", 0, "Only create roads that are a local maximum within this window size. Set this to 0 to turn off local max filtering"};
65 Gaudi::Property <unsigned> m_imageSize_x { this, "nBins_x", 0, "number of bins in, eg, phi_track"};
66 Gaudi::Property <unsigned> m_imageSize_y { this, "nBins_y", 0, "number of bins in, eg, q/pT"};
67 Gaudi::Property <std::string> m_algorithm { this, "ORAlgo", "Normal", "Overlap removal algorithm"};
68 Gaudi::Property <bool> m_doFastOR { this, "doFastOR", false, "Use fast overlap removal algorithm instead of default"};
69 Gaudi::Property <bool> m_compareAllHits {this, "compareAllHits", true, "Compare all hits to all other hits when comparing two tracks"};
70 Gaudi::Property <bool> m_useV2OR {this, "useV2OR", true, "Use v2 overlap removal algorithm (worst-to-best sorting)"};
71 ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool", "", "Monitoring tool"};
72
73 ORAlgo m_algo{ORAlgo::Normal}; // Internal ORAlgo enum for faster compare
74
75
76 StatusCode runOverlapRemoval_fast(std::vector<FPGATrackSimTrack>& tracks);
77
78 // V2 overlap removal algorithm with sorted worst-to-best approach
79 StatusCode runOverlapRemoval_v2(std::vector<FPGATrackSimTrack>& tracks);
80
81 // Compare track quality for v2 algorithm (sorts worst-to-best)
82 static bool compareTrackQuality_v2(const FPGATrackSimTrack& track1, const FPGATrackSimTrack& track2);
83
84 // Helper for v2: count real hits in a track
85 static int countRealHits_v2(const FPGATrackSimTrack& track);
86
87 // Helper for v2: count overlapping hits between two tracks
88 int countOverlappingHits_v2(const FPGATrackSimTrack& track1, const FPGATrackSimTrack& track2) const;
89
90};
91
92#endif // FPGATrackSimOverlapRemovalTool_h
Defines a class for roads.
Header file to be included by clients of the Monitored infrastructure.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
ToolHandle< GenericMonitoringTool > m_monTool
int countOverlappingHits_v2(const FPGATrackSimTrack &track1, const FPGATrackSimTrack &track2) const
static bool compareTrackQuality_v2(const FPGATrackSimTrack &track1, const FPGATrackSimTrack &track2)
FPGATrackSimOverlapRemovalTool(const std::string &, const std::string &, const IInterface *)
StatusCode runOverlapRemoval_v2(std::vector< FPGATrackSimTrack > &tracks)
StatusCode runOverlapRemoval_fast(std::vector< FPGATrackSimTrack > &tracks)
static int countRealHits_v2(const FPGATrackSimTrack &track)
StatusCode runOverlapRemoval(std::vector< FPGATrackSimRoad > &roads)
static bool compareTrackQuality(const FPGATrackSimTrack &track1, const FPGATrackSimTrack &track2)
StatusCode removeOverlapping(FPGATrackSimTrack &track1, FPGATrackSimTrack &track2)
Gaudi::Property< std::string > m_algorithm