 |
ATLAS Offline Software
|
Go to the documentation of this file.
3 #ifndef FPGATrackSimHOUGHTRANSFORMTOOL_H
4 #define FPGATrackSimHOUGHTRANSFORMTOOL_H
47 #include "GaudiKernel/ServiceHandle.h"
67 #include <unordered_set>
94 using base_class::base_class;
101 virtual StatusCode getRoads(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> &
hits, std::vector<std::shared_ptr<const FPGATrackSimRoad>> & roads)
override;
113 double yToX(
double y,
const std::shared_ptr<const FPGATrackSimHit> &hit)
const;
159 Gaudi::Property <int>
m_subRegion {
this,
"subRegion", 0,
" -1 for entire region (no slicing)"};
166 Gaudi::Property<std::vector<int> >
m_threshold {
this,
"threshold", {},
"Minimum number of hit layers to fire a road"};
169 Gaudi::Property<std::vector<int> >
m_conv {
this,
"convolution", {},
"Convolution filter, with size m_convSize_y * m_convSize_x"};
170 Gaudi::Property<std::vector<unsigned> >
m_combineLayers {
this,
"combine_layers", {},
""};
171 Gaudi::Property<std::vector<unsigned> >
m_binScale {
this,
"scale", {},
"Vector containing the scales for each layers"};
174 Gaudi::Property<std::vector<unsigned> >
m_hitExtend_x {
this,
"hitExtend_x", {},
"Hit lines will fill extra bins in x by this amount on each side, size == nLayers"};
175 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."};
176 Gaudi::Property <bool>
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"};
177 Gaudi::Property <bool>
m_fieldCorrection {
this,
"fieldCorrection",
true,
"Apply corrections to hough equation due to field nonuniformity"};
178 Gaudi::Property <bool>
m_useSectors {
this,
"useSectors",
false,
"Will reverse calculate the sector for track-fitting purposes"};
179 Gaudi::Property <bool>
m_idealGeoRoads {
this,
"IdealGeoRoads",
true,
"Set sectors to use ideal geometry fit constants"};
180 Gaudi::Property <bool>
m_doRegionalMapping {
this,
"RegionalMapping",
false,
"Use the sub-region maps to define the sector"};
181 Gaudi::Property <bool>
m_doEtaPatternConsts {
this,
"doEtaPatternConsts",
false,
"Whether to use the eta pattern tool for constant generation"};
182 Gaudi::Property <bool>
m_useSpacePoints {
this,
"useSpacePoints",
false,
"Whether we are using spacepoints."};
183 Gaudi::Property <std::string>
m_houghType {
this,
"houghType",
"Original",
"Switch Hough strategy. Original: close to mathematical HT, LowResource: emulate pre calculated LUTs base FPGA performance, Flexible: emulate culculation on FPGA performance"};
185 Gaudi::Property <std::string>
m_requirements {
this,
"requirements",
"",
"path of the requirements file"};
188 Gaudi::Property <int>
m_r_max {
this,
"r_max", 2047,
" - maximum -"};
189 Gaudi::Property <int>
m_phi_coord_max {
this,
"phi_coord_max", 65535,
" - maximum - phi"};
190 Gaudi::Property <double>
m_phi_range {
this,
"phi_range", 6.399609375,
"range of phi in rad, customized ofr the algo"};
191 Gaudi::Property <double>
m_r_max_mm {
this,
"r_max_mm", 1137.5,
"r value maximum used in the mm-to-bits conversion"};
192 Gaudi::Property <int>
m_bitwise_qApt_conv {
this,
"bitwise_qApt_conv", 16384,
"exponential of 2 to multiply with qA/pt in case the latter in < 1"};
193 Gaudi::Property <int>
m_bitwise_phi0_conv {
this,
"bitwise_phi0_conv", 1,
"exponential of 2 to multiply with phi0 in case the latter in < 1"};
194 Gaudi::Property <int>
m_phi0_sectors {
this,
"phi0_sectors", 1,
"firmware method to draw monotonic lines. separation alongside phi0"};
195 Gaudi::Property <int>
m_qApt_sectors {
this,
"qApt_sectors", 7,
"firmware method to draw monotonic lines. separation alongside qA/pt"};
196 Gaudi::Property <int>
m_pipes_qApt {
this,
"pipes_qApt", 8,
"!!!!!!MAX 32 !!!!!!clock domains separation alongside qA/pt bins"};
197 Gaudi::Property <int>
m_pipes_phi0 {
this,
"pipes_phi0", 1,
" !!!!!!MAX 32 !!!!!!clock domains separation alongside phi0 bins"};
241 Image createLayerImage(std::vector<unsigned>
const & combine_layers,
const std::vector<std::shared_ptr<const FPGATrackSimHit>> &
hits,
unsigned const scale)
const;
243 std::vector<std::vector<int>>
lineGenLay(
const std::shared_ptr<const FPGATrackSimHit> &hit)
const;
249 std::pair<unsigned, unsigned>
yToXBins(
size_t yBin_min,
size_t yBin_max,
const std::shared_ptr<const FPGATrackSimHit> &hit)
const;
252 void addRoad(
const std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> &
hits,
layer_bitmask_t hitLayers,
unsigned x,
unsigned y);
253 void addRoad(
const std::unordered_set<std::shared_ptr<const FPGATrackSimHit>> &
hits,
unsigned x,
unsigned y);
254 void addRoad(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> &
hits,
unsigned x,
unsigned y);
259 std::vector<std::vector<std::vector<LUT>>>
m_LUT;
261 void makeLUT(std::vector<std::vector<std::vector<LUT>>> &v_LUT,std::vector<TH1D*> &v_h,
const std::string&
tag=
"");
267 #endif // FPGATrackSimHOUGHTRANSFORMTOOL_H
Defines several vector wrappers for homogenous multi-dimensional vectors, declared as 1D arrays for l...
::StatusCode StatusCode
StatusCode definition for legacy code.
: FPGATrackSim-specific class to represent an hit in the detector.
Defines a class for roads.
Structs that store the 5 track parameters.