ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimLLPDoubletHoughTransformTool.h
Go to the documentation of this file.
1// Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3#ifndef FPGATrackSimLLPDOUBLETHOUGHTRANSFORMTOOL_H
4#define FPGATrackSimLLPDOUBLETHOUGHTRANSFORMTOOL_H
5
6
7#include "TFile.h"
8#include "GaudiKernel/ServiceHandle.h"
10
11
18
19
20/*
21Implments HoughT for d0, q/pt using hit doublets
22Hough space x -> d0 , y -> q/pt
23*/
24
25class FPGATrackSimLLPDoubletHoughTransformTool : public extends <AthAlgTool, IFPGATrackSimRoadFinderTool >
26{
27
28public:
30 using base_class::base_class;
31
32 virtual StatusCode initialize() override;
33 virtual StatusCode finalize() override;
34
35 virtual StatusCode getRoads(const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits, std::vector<std::shared_ptr<const FPGATrackSimRoad>> & roads) override;
36 virtual int getSubRegion() const override{return -1;}
37 //TODO mabye this should have a subRegion
38
39private:
40
41 Gaudi::Property <unsigned> m_imageSize_x { this, "nBins_x", 0, ""};
42 Gaudi::Property <unsigned> m_imageSize_y { this, "nBins_y", 0, ""};
43 Gaudi::Property <int> m_threshold { this, "m_threshold", 8, "Threshold to be allied to bins of abs(d0) > 50 (mm)"};
44 Gaudi::Property <int> m_threshold50 { this, "m_threshold50", 8, "Threshold to be allied to bins of abs(d0) < (mm)"};
45 Gaudi::Property <bool> m_traceHits { this, "traceHits", true, "Trace each hit that goes in a bin. Disabling this will save memory/time since each bin doesn't have to store all its hits but the roads created won't have hits from convolution, etc."};
46 Gaudi::Property <float> m_d0_range { this, "d0_range", 120, "The d0 span: (-range, range) in mm"};
47 Gaudi::Property <float> m_qOverPt_range { this, "qOverPt_range", 0.002, "The q/pT span: (-range, range) in e/MeV"};
48 Gaudi::Property <bool> m_continuous { this, "continuous", true, "assure that there is continuity of the line (i.e. middle bins in d0 are filled when one q/pT step would result in a hole)"};
49
50
52 std::vector<FPGATrackSimRoad> m_roads;
53
54 const double m_acceptedDistanceBetweenLayersMin = 200; // min R disstance for hits pair filtering
56
57 double m_step_x = 0; // helpers (accumulator granularity)
58 double m_step_y = 0;
59
60 StatusCode fillImage(std::shared_ptr<const FPGATrackSimHit> &hit1, std::shared_ptr<const FPGATrackSimHit> &hit2, Image& image) const;
61 bool passThreshold(Image const & image, int x, int y) const;
62 bool isLocalMaxima(Image const & image, int x, int y) const;
63
64 FPGATrackSimRoad createRoad(const std::unordered_set<std::shared_ptr<const FPGATrackSimHit>> & hits, unsigned x, unsigned y) const;
65 unsigned m_event = 0;
66 void drawImage(Image const & image) const;
67
68 float xtod0(int x) const { return x*m_step_x - m_d0_range; }
69 float ytoqoverpt(int y) const { return y*m_step_y - m_qOverPt_range; }
72
73};
74
75#endif //
76
77
: FPGATrackSim-specific class to represent an hit in the detector.
Defines a class for roads.
Structs that store the 5 track parameters.
Defines several vector wrappers for homogenous multi-dimensional vectors, declared as 1D arrays for l...
Interface declaration for road finder tools.
#define y
#define x
bool passThreshold(Image const &image, int x, int y) const
bool isLocalMaxima(Image const &image, int x, int y) const
virtual StatusCode getRoads(const std::vector< std::shared_ptr< const FPGATrackSimHit > > &hits, std::vector< std::shared_ptr< const FPGATrackSimRoad > > &roads) override
FPGATrackSimRoad createRoad(const std::unordered_set< std::shared_ptr< const FPGATrackSimHit > > &hits, unsigned x, unsigned y) const
StatusCode fillImage(std::shared_ptr< const FPGATrackSimHit > &hit1, std::shared_ptr< const FPGATrackSimHit > &hit2, Image &image) const
vector2D< std::pair< int, std::unordered_set< std::shared_ptr< const FPGATrackSimHit > > > > Image