ATLAS Offline Software
FPGATrackSimHoughTransformTool.cxx
Go to the documentation of this file.
1 // Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
21 
22 #include <sstream>
23 #include <cmath>
24 #include <algorithm>
25 
26 static inline int quant(double min, double max, unsigned nSteps, double val);
27 static inline double unquant(double min, double max, unsigned nSteps, int step);
28 template <typename T>
29 static inline std::string to_string(const std::vector<T> &v);
30 
32 // AthAlgTool
33 
34 FPGATrackSimHoughTransformTool::FPGATrackSimHoughTransformTool(const std::string& algname, const std::string &name, const IInterface *ifc) :
35  base_class(algname, name, ifc)
36 {
37  declareInterface<IFPGATrackSimRoadFinderTool>(this);
38 }
39 
40 
42 {
43 
44  // Move temp variables over from properties to struct
51 
52 
53  // Debug
54  ATH_MSG_INFO("Image size: " << m_imageSize_x << " x " << m_imageSize_y);
55  ATH_MSG_INFO("Convolution size: " << m_convSize_x << " x " << m_convSize_y);
56  ATH_MSG_INFO("Convolution: " << to_string(const_cast<std::vector<int>&>(m_conv.value())));
57  ATH_MSG_INFO("Hit Extend: " << to_string(const_cast<std::vector<unsigned>&>(m_hitExtend_x.value())));
58 
59  // Retrieve info
61  ATH_CHECK(m_FPGATrackSimMapping.retrieve());
62  m_nLayers = m_FPGATrackSimMapping->PlaneMap_1st(0)->getNLogiLayers();
63 
64  // Error checking
65  // TODO check bounds are set correctly
66  bool ok = false;
68  ATH_MSG_FATAL("initialize() Image size must be greater than 0");
69  else if (m_conv.size() != m_convSize_x * m_convSize_y)
70  ATH_MSG_FATAL("initialize() Convolution sizes don't match");
71  else if (!m_conv.empty() && (m_convSize_x % 2 == 0 || m_convSize_y % 2 == 0))
72  ATH_MSG_FATAL("initialize() Convolution sizes must be odd");
73  else if (m_hitExtend_x.size() % m_nLayers)
74  ATH_MSG_FATAL("initialize() Hit extentsion list must have size % nLayers");
75  else if (!m_combineLayers.empty() && m_combineLayers.size() != m_nLayers)
76  ATH_MSG_FATAL("initialize() Combine layers list must have size = nLayers");
77  else if (m_threshold.size() % 2 != 1)
78  ATH_MSG_FATAL("initialize() Threshold size must be odd");
79  else if (!m_binScale.empty() && m_binScale.size() != m_nLayers)
80  ATH_MSG_FATAL("initialize() Bin scale list must have size = nLayers");
81  else if (std::any_of(m_binScale.begin(), m_binScale.end(), [&](unsigned i){ return m_imageSize_y % i != 0; }))
82  ATH_MSG_FATAL("initialize() The imagesize is not divisible by scale");
83  else
84  ok = true;
85  if (!ok) return StatusCode::FAILURE;
86 
87  // Warnings / corrections
89  {
90  ATH_MSG_WARNING("initialize() localMaxWindowSize requires tracing hits, turning on automatically");
91  m_traceHits = true;
92  }
93  if (m_idealGeoRoads)
94  {
95  if (m_useSectors)
96  {
97  ATH_MSG_WARNING("initialize() idealGeoRoads conflicts with useSectors, switching off FPGATrackSim sector matching");
98  m_useSectors = false;
99  }
100  if (!m_traceHits)
101  {
102  ATH_MSG_WARNING("initialize() idealGeoRoads requires tracing hits, turning on automatically");
103  m_traceHits = true;
104  }
105  }
106  if (m_binScale.empty()) m_binScale.value().resize(m_nLayers, 1);
107 
108  // Fill convenience variables
111  for (unsigned i = 0; i <= m_imageSize_x; i++)
112  m_bins_x.push_back(unquant(m_parMin[m_par_x], m_parMax[m_par_x], m_imageSize_x, i));
113  for (unsigned i = 0; i <= m_imageSize_y; i++)
114  m_bins_y.push_back(unquant(m_parMin[m_par_y], m_parMax[m_par_y], m_imageSize_y, i));
115 
116  // Initialize combine layers
117  if (!m_combineLayers.empty())
118  {
119  m_nCombineLayers = *std::max_element(m_combineLayers.begin(), m_combineLayers.end()) + 1;
121  for (unsigned i = 0; i < m_combineLayers.size(); i++)
122  m_combineLayer2D[m_combineLayers[i]].push_back(i);
123  }
124  else
125  {
127  for (unsigned i = 0; i < m_nLayers; i++)
128  m_combineLayer2D.push_back({ i });
129  }
130 
131  return StatusCode::SUCCESS;
132 }
133 
134 
135 
137 // Main Algorithm
138 
139 StatusCode FPGATrackSimHoughTransformTool::getRoads(const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits, std::vector<std::shared_ptr<const FPGATrackSimRoad>> & roads)
140 {
141  roads.clear();
142  m_roads.clear();
143 
145 
146  if (!m_conv.empty()) m_image = convolute(m_image);
147 
148  for (unsigned y = 0; y < m_imageSize_y; y++)
149  {
150  for (unsigned x = 0; x < m_imageSize_x; x++)
151  {
152  if (passThreshold(m_image, x, y)) {
153  if (m_traceHits)
154  {
155  addRoad(m_image(y, x).second, x, y);
156  }
157  else{
158  addRoad(hits, x, y);
159  }
160  }
161  }
162  }
163  roads.reserve(m_roads.size());
164  for (FPGATrackSimRoad & r : m_roads) roads.emplace_back(std::make_shared<const FPGATrackSimRoad>(r));
165 
166  return StatusCode::SUCCESS;
167 }
168 
169 FPGATrackSimHoughTransformTool::Image FPGATrackSimHoughTransformTool::createLayerImage(std::vector<unsigned> const & layers, const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits, unsigned const scale) const
170 {
172 
173  for (auto const & hit : hits)
174  {
175  if (std::find(layers.begin(), layers.end(), hit->getLayer()) == layers.end()) continue;
176 
177 
178  // This scans over y (pT) because that is more efficient in memory, in C.
179  // Unknown if firmware will want to scan over x instead.
180  unsigned new_size_y = m_imageSize_y / scale;
181  for (unsigned y_ = 0; y_ < new_size_y; y_++)
182  {
183  unsigned y_bin_min = scale * y_;
184  unsigned y_bin_max = scale * (y_ + 1);
185 
186  // Find the min/max x bins
187  auto xBins = yToXBins(y_bin_min, y_bin_max, hit);
188 
189  // Update the image
190  for (unsigned y = y_bin_min; y < y_bin_max; y++)
191  for (unsigned x = xBins.first; x < xBins.second; x++)
192  {
193  image(y, x).first++;
194  if (m_traceHits) image(y, x).second.insert(hit);
195  }
196  }
197  }
198 
199  return image;
200 }
201 
202 FPGATrackSimHoughTransformTool::Image FPGATrackSimHoughTransformTool::createImage(const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits) const
203 {
205 
206  for (unsigned i = 0; i < m_nCombineLayers; i++)
207  {
209  for (unsigned x = 0; x < m_imageSize_x; ++x)
210  for (unsigned y = 0; y < m_imageSize_y; ++y)
211  if (layerImage(y, x).first > 0)
212  {
213  image(y, x).first++;
214  image(y, x).second.insert(layerImage(y, x).second.begin(), layerImage(y, x).second.end());
215  }
216  }
217 
218  return image;
219 }
220 
222 {
224 
225  for (unsigned y0 = 0; y0 < m_imageSize_y; y0++) // Loop over out
226  for (unsigned x0 = 0; x0 < m_imageSize_x; x0++)
227  for (unsigned r = 0; r < m_convSize_y; r++) // Loop over conv
228  for (unsigned c = 0; c < m_convSize_x; c++) {
229  int y = -static_cast<int>(m_convSize_y) / 2 + r + y0; // Indices of input
230  int x = -static_cast<int>(m_convSize_x) / 2 + c + x0; //
231 
232  if (y >= 0 && y < static_cast<int>(m_imageSize_y) && x >= 0 && x < static_cast<int>(m_imageSize_x)) {
233  int val = m_conv[r * m_convSize_x + c] * image(y, x).first;
234  if (val > 0) {
235  out(y0, x0).first += val;
236  out(y0, x0).second.insert(image(y, x).second.begin(), image(y, x).second.end());
237  }
238  }
239  }
240  return out;
241 }
242 
243 bool FPGATrackSimHoughTransformTool::passThreshold(Image const & image, unsigned x, unsigned y) const
244 {
245  // Pass window threshold
246  unsigned width = m_threshold.size() / 2;
247  if (x < width || (image.size(1) - x) < width) return false;
248  for (unsigned i = 0; i < m_threshold.size(); i++) {
249  if (image(y, x - width + i).first < m_threshold[i]) return false;
250  }
251 
252  // Pass local-maximum check
253  if (m_localMaxWindowSize) {
254  for (int j = -m_localMaxWindowSize; j <= m_localMaxWindowSize; j++) {
255  for (int i = -m_localMaxWindowSize; i <= m_localMaxWindowSize; i++) {
256  if (i == 0 && j == 0) continue;
257  if (y + j < image.size(0) && x + i < image.size(1)) {
258  if (image(y+j, x+i).first > image(y, x).first) return false;
259  if (image(y+j, x+i).first == image(y, x).first) {
260  if (image(y+j, x+i).second.size() > image(y, x).second.size()) return false;
261  if (image(y+j, x+i).second.size() == image(y, x).second.size() && j <= 0 && i <= 0) return false; // favor bottom-left (low phi, low neg q/pt)
262  }
263  }
264  }
265  }
266  }
267  return true;
268 }
269 
271 // Helpers
272 
273 
274 // Quantizes val, given a range [min, max) split into nSteps. Returns the bin below.
275 static inline int quant(double min, double max, unsigned nSteps, double val)
276 {
277  return static_cast<int>((val - min) / (max - min) * nSteps);
278 }
279 
280 // Returns the lower bound of the bin specified by step
281 static inline double unquant(double min, double max, unsigned nSteps, int step)
282 {
283  return min + (max - min) * step / nSteps;
284 }
285 
286 template <typename T>
287 static inline std::string to_string(const std::vector<T> &v)
288 {
289  std::ostringstream oss;
290  oss << "[";
291  if (!v.empty())
292  {
293  std::copy(v.begin(), v.end()-1, std::ostream_iterator<T>(oss, ", "));
294  oss << v.back();
295  }
296  oss << "]";
297  return oss.str();
298 }
299 
300 double FPGATrackSimHoughTransformTool::yToX(double y, const std::shared_ptr<const FPGATrackSimHit> &hit) const
301 {
302  double x = 0;
303 
305  {
306  double r = hit->getR(); // mm
307  double phi_hit = hit->getGPhi(); // radians
308  double d0 = std::isnan(m_parMin.d0) ? 0 : m_parMin.d0; // mm, assume min = max
309  x = asin(r * fpgatracksim::A * y - d0 / r) + phi_hit;
310 
311  if (m_fieldCorrection) x += fieldCorrection(m_EvtSel->getRegionID(), y, r);
312  }
313  else
314  {
315  ATH_MSG_ERROR("yToX() not defined for the current m_par selection");
316  }
317 
318  return x;
319 }
320 
321 // Find the min/max x bins of the hit's line, in each y bin. Max is exclusive.
322 // Note this assumes yToX is monotonic. Returns {0, 0} if hit lies out of bounds.
323 std::pair<unsigned, unsigned> FPGATrackSimHoughTransformTool::yToXBins(size_t yBin_min, size_t yBin_max, const std::shared_ptr<const FPGATrackSimHit> & hit) const
324 {
325  // Get float values
326  double x_min = yToX(m_bins_y[yBin_min], hit);
327  double x_max = yToX(m_bins_y[yBin_max], hit);
328  if (x_min > x_max) std::swap(x_min, x_max);
329  if (x_max < m_parMin[m_par_x] || x_min > m_parMax[m_par_x])
330  return { 0, 0 }; // out of bounds
331 
332  // Get bins
333  int x_bin_min = quant(m_parMin[m_par_x], m_parMax[m_par_x], m_imageSize_x, x_min);
334  int x_bin_max = quant(m_parMin[m_par_x], m_parMax[m_par_x], m_imageSize_x, x_max) + 1; // exclusive
335 
336  // Extend bins
337  unsigned extend = getExtension(yBin_min, hit->getLayer());
338  x_bin_min -= extend;
339  x_bin_max += extend;
340 
341  // Clamp bins
342  if (x_bin_min < 0) x_bin_min = 0;
343  if (x_bin_max > static_cast<int>(m_imageSize_x)) x_bin_max = m_imageSize_x;
344 
345  return { x_bin_min, x_bin_max };
346 }
347 
348 // We allow variable extension based on the size of m_hitExtend_x. See comments below.
349 unsigned FPGATrackSimHoughTransformTool::getExtension(unsigned y, unsigned layer) const
350 {
351  if (m_hitExtend_x.size() == m_nLayers) return m_hitExtend_x[layer];
352  if (m_hitExtend_x.size() == m_nLayers * 2)
353  {
354  // different extension for low pt vs high pt, split in half but irrespective of sign
355  // first nLayers entries of m_hitExtend_x is for low pt half, rest are for high pt half
356  if (y < m_imageSize_y / 4 || y > 3 * m_imageSize_y / 4) return m_hitExtend_x[layer];
357  return m_hitExtend_x[m_nLayers + layer];
358  }
359  return 0;
360 }
361 
362 // Creates a road from hits that pass through the given bin (x, y), and pushes it onto m_roads
363 void FPGATrackSimHoughTransformTool::addRoad(const std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>> & hits, layer_bitmask_t hitLayers, unsigned x, unsigned y)
364 {
365  m_roads.emplace_back();
366  FPGATrackSimRoad & r = m_roads.back();
367 
368  r.setRoadID(m_roads.size() - 1);
369  r.setPID(y * m_imageSize_y + x);
370  r.setHits( std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>>(hits)); //copy hits
371 
372  // We use the y coordinate in matchIdealGeoSectors
373  // and so it needs to be available before setting the sector.
374 
375  r.setSubRegion(m_subRegion);
376  r.setX(m_bins_x[x] + m_step_x/2);
377  r.setY(m_bins_y[y] + m_step_y/2);
378  r.setXBin(x);
379  r.setYBin(y);
380  r.setHitLayers(hitLayers);
381  r.setSubRegion(m_subRegion);
382 }
383 
384 
385 // Creates a road from hits that pass through the given bin (x, y), and pushes it onto m_roads
386 void FPGATrackSimHoughTransformTool::addRoad(const std::unordered_set<std::shared_ptr<const FPGATrackSimHit>> & hits, unsigned x, unsigned y)
387 {
388  layer_bitmask_t hitLayers = 0;
389  for (auto const & hit : hits)
390  hitLayers |= 1 << hit->getLayer();
391 
392  auto sorted_hits = ::sortByLayer(hits);
393  sorted_hits.resize(m_nLayers); // If no hits in last layer, return from sortByLayer will be too short
394 
395  addRoad(sorted_hits, hitLayers, x, y);
396 }
397 
398 // Use this version of addRoad when hit tracing is turned off
399 void FPGATrackSimHoughTransformTool::addRoad(const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits, unsigned x, unsigned y)
400 {
401  // Get the road hits
402  std::vector<std::shared_ptr<const FPGATrackSimHit>> road_hits;
403  layer_bitmask_t hitLayers = 0;
404  for (const auto & hit : hits)
405  {
406  // Find the min/max y bins (after scaling)
407  unsigned int y_bin_min = (y / m_binScale[hit->getLayer()]) * m_binScale[hit->getLayer()];
408  unsigned int y_bin_max = y_bin_min + m_binScale[hit->getLayer()];
409 
410  // Find the min/max x bins
411  auto xBins = yToXBins(y_bin_min, y_bin_max, hit);
412  if (x >= xBins.first && x < xBins.second)
413  {
414  road_hits.push_back(hit);
415  hitLayers |= 1 << hit->getLayer();
416  }
417  }
418 
419  auto sorted_hits = ::sortByLayer(road_hits);
420  sorted_hits.resize(m_nLayers); // If no hits in last layer, return from sortByLayer will be too short
421 
422  addRoad(sorted_hits, hitLayers, x, y);
423 }
FPGATrackSimHoughTransformTool::m_bins_y
std::vector< double > m_bins_y
Definition: FPGATrackSimHoughTransformTool.h:181
FPGATrackSimHoughTransformTool::m_tempMax_qOverPt
Gaudi::Property< float > m_tempMax_qOverPt
Definition: FPGATrackSimHoughTransformTool.h:149
FPGATrackSimHoughTransformTool::m_FPGATrackSimBankSvc
ServiceHandle< IFPGATrackSimBankSvc > m_FPGATrackSimBankSvc
Definition: FPGATrackSimHoughTransformTool.h:132
FPGATrackSimTrackPars::IHIP
@ IHIP
Definition: FPGATrackSimTrackPars.h:49
beamspotman.r
def r
Definition: beamspotman.py:676
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
getMenu.algname
algname
Definition: getMenu.py:54
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
FPGATrackSimTrackPars::phi
double phi
Definition: FPGATrackSimTrackPars.h:24
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimHoughTransformTool::m_nLayers
unsigned m_nLayers
Definition: FPGATrackSimHoughTransformTool.h:175
FPGATrackSimHoughTransformTool::m_useSectors
Gaudi::Property< bool > m_useSectors
Definition: FPGATrackSimHoughTransformTool.h:164
FPGATrackSimHoughTransformTool::m_nCombineLayers
unsigned m_nCombineLayers
Definition: FPGATrackSimHoughTransformTool.h:176
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FPGATrackSimHoughTransformTool::m_fieldCorrection
Gaudi::Property< bool > m_fieldCorrection
Definition: FPGATrackSimHoughTransformTool.h:163
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
FPGATrackSimHoughTransformTool::addRoad
void addRoad(const std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit >>> &hits, layer_bitmask_t hitLayers, unsigned x, unsigned y)
Definition: FPGATrackSimHoughTransformTool.cxx:363
FPGATrackSimHoughTransformTool::m_traceHits
Gaudi::Property< bool > m_traceHits
Definition: FPGATrackSimHoughTransformTool.h:161
FPGATrackSimPlaneMap.h
Maps physical layers to logical layers.
FPGATrackSimTrackPars::qOverPt
double qOverPt
Definition: FPGATrackSimTrackPars.h:25
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
IFPGATrackSimMappingSvc.h
FPGATrackSimHoughTransformTool::m_binScale
Gaudi::Property< std::vector< unsigned > > m_binScale
Definition: FPGATrackSimHoughTransformTool.h:157
FPGATrackSimHoughTransformTool::m_parMin
FPGATrackSimTrackPars m_parMin
Definition: FPGATrackSimHoughTransformTool.h:139
FPGATrackSimHoughTransformTool::m_combineLayers
Gaudi::Property< std::vector< unsigned > > m_combineLayers
Definition: FPGATrackSimHoughTransformTool.h:156
FPGATrackSimHoughTransformTool.h
Implements road finding using a Hough transform.
FPGATrackSimHoughTransformTool::m_idealGeoRoads
Gaudi::Property< bool > m_idealGeoRoads
Definition: FPGATrackSimHoughTransformTool.h:165
FPGATrackSimTrackPars::d0
double d0
Definition: FPGATrackSimTrackPars.h:26
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
FPGATrackSimHit::getLayer
unsigned getLayer() const
Definition: FPGATrackSimHit.cxx:77
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
FPGATrackSimHoughTransformTool::m_tempMin_phi
Gaudi::Property< float > m_tempMin_phi
Definition: FPGATrackSimHoughTransformTool.h:146
FPGATrackSimHoughTransformTool::createImage
Image createImage(const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits) const
Definition: FPGATrackSimHoughTransformTool.cxx:202
FPGATrackSimHoughTransformTool::m_convSize_x
Gaudi::Property< unsigned > m_convSize_x
Definition: FPGATrackSimHoughTransformTool.h:158
FPGATrackSimHoughTransformTool::m_conv
Gaudi::Property< std::vector< int > > m_conv
Definition: FPGATrackSimHoughTransformTool.h:155
FPGATrackSimHoughTransformTool::m_imageSize_y
Gaudi::Property< unsigned > m_imageSize_y
Definition: FPGATrackSimHoughTransformTool.h:154
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
x
#define x
FPGATrackSimHoughTransformTool::m_par_y
FPGATrackSimTrackPars::pars_index m_par_y
Definition: FPGATrackSimHoughTransformTool.h:143
FPGATrackSimHoughTransformTool::m_bins_x
std::vector< double > m_bins_x
Definition: FPGATrackSimHoughTransformTool.h:180
FPGATrackSimConstants.h
FPGATrackSimHoughTransformTool::m_tempMax_phi
Gaudi::Property< float > m_tempMax_phi
Definition: FPGATrackSimHoughTransformTool.h:147
FPGATrackSimHit::getGPhi
float getGPhi() const
Definition: FPGATrackSimHit.h:141
FPGATrackSimHoughTransformTool::m_tempMax_d0
Gaudi::Property< float > m_tempMax_d0
Definition: FPGATrackSimHoughTransformTool.h:151
FPGATrackSimHoughTransformTool::m_tempMin_qOverPt
Gaudi::Property< float > m_tempMin_qOverPt
Definition: FPGATrackSimHoughTransformTool.h:148
FPGATrackSimHoughTransformTool::m_par_x
FPGATrackSimTrackPars::pars_index m_par_x
Definition: FPGATrackSimHoughTransformTool.h:142
FPGATrackSimRegionMap.h
Maps ITK module indices to FPGATrackSim regions.
FPGATrackSimHoughTransformTool::m_localMaxWindowSize
Gaudi::Property< bool > m_localMaxWindowSize
Definition: FPGATrackSimHoughTransformTool.h:162
FPGATrackSimHoughTransformTool::m_step_y
double m_step_y
Definition: FPGATrackSimHoughTransformTool.h:179
vector2D< std::pair< int, std::unordered_set< std::shared_ptr< const FPGATrackSimHit > > > >
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
FPGATrackSimHoughTransformTool::yToXBins
std::pair< unsigned, unsigned > yToXBins(size_t yBin_min, size_t yBin_max, const std::shared_ptr< const FPGATrackSimHit > &hit) const
Definition: FPGATrackSimHoughTransformTool.cxx:323
FPGATrackSimHoughTransformTool::FPGATrackSimHoughTransformTool
FPGATrackSimHoughTransformTool(const std::string &, const std::string &, const IInterface *)
Definition: FPGATrackSimHoughTransformTool.cxx:34
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
FPGATrackSimHoughTransformTool::convolute
Image convolute(Image const &image) const
Definition: FPGATrackSimHoughTransformTool.cxx:221
fieldCorrection
double fieldCorrection(unsigned region, double qpt, double r)
Definition: FPGATrackSimFunctions.cxx:163
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
FPGATrackSimHoughTransformTool::getExtension
unsigned getExtension(unsigned y, unsigned layer) const
Definition: FPGATrackSimHoughTransformTool.cxx:349
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FPGATrackSimHoughTransformTool::m_convSize_y
Gaudi::Property< unsigned > m_convSize_y
Definition: FPGATrackSimHoughTransformTool.h:159
checkCorrelInHIST.nSteps
int nSteps
Definition: checkCorrelInHIST.py:458
FPGATrackSimHoughTransformTool::m_step_x
double m_step_x
Definition: FPGATrackSimHoughTransformTool.h:178
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
FPGATrackSimHoughTransformTool::m_roads
std::vector< FPGATrackSimRoad > m_roads
Definition: FPGATrackSimHoughTransformTool.h:189
FPGATrackSimHoughTransformTool::m_subRegion
Gaudi::Property< int > m_subRegion
Definition: FPGATrackSimHoughTransformTool.h:145
FPGATrackSimHoughTransformTool::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimHoughTransformTool.cxx:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
FPGATrackSimHit.h
: FPGATrackSim-specific class to represent an hit in the detector.
FPGATrackSimHoughTransformTool::m_imageSize_x
Gaudi::Property< unsigned > m_imageSize_x
Definition: FPGATrackSimHoughTransformTool.h:153
MyPlots.image
string image
Definition: MyPlots.py:43
FPGATrackSimHoughTransformTool::yToX
double yToX(double y, const std::shared_ptr< const FPGATrackSimHit > &hit) const
Definition: FPGATrackSimHoughTransformTool.cxx:300
FPGATrackSimTrackPars::IPHI
@ IPHI
Definition: FPGATrackSimTrackPars.h:49
python.PyAthena.v
v
Definition: PyAthena.py:154
FPGATrackSimHoughTransformTool::createLayerImage
Image createLayerImage(std::vector< unsigned > const &combine_layers, const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, unsigned const scale) const
Definition: FPGATrackSimHoughTransformTool.cxx:169
FPGATrackSimHoughTransformTool::getRoads
virtual StatusCode getRoads(const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads) override
Definition: FPGATrackSimHoughTransformTool.cxx:139
FPGATrackSimHit::getR
float getR() const
Definition: FPGATrackSimHit.h:140
ActsTrk::detail::MakeDerivedVariant::extend
constexpr std::variant< Args..., T > extend(const std::variant< Args... > &, const T &)
Definition: MakeDerivedVariant.h:17
y
#define y
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
FPGATrackSimHoughTransformTool::passThreshold
bool passThreshold(Image const &image, unsigned x, unsigned y) const
Definition: FPGATrackSimHoughTransformTool.cxx:243
IFPGATrackSimEventSelectionSvc.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
layer_bitmask_t
uint32_t layer_bitmask_t
Definition: FPGATrackSimTypes.h:22
DeMoScan.first
bool first
Definition: DeMoScan.py:536
IFPGATrackSimBankSvc.h
LArCellBinning.step
step
Definition: LArCellBinning.py:158
FPGATrackSimHoughTransformTool::m_hitExtend_x
Gaudi::Property< std::vector< unsigned > > m_hitExtend_x
Definition: FPGATrackSimHoughTransformTool.h:160
FPGATrackSimHoughTransformTool::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimHoughTransformTool.h:133
calibdata.copy
bool copy
Definition: calibdata.py:27
FPGATrackSimHoughTransformTool::m_tempMin_d0
Gaudi::Property< float > m_tempMin_d0
Definition: FPGATrackSimHoughTransformTool.h:150
FPGATrackSimHoughTransformTool::m_parMax
FPGATrackSimTrackPars m_parMax
Definition: FPGATrackSimHoughTransformTool.h:140
FPGATrackSimHoughTransformTool::m_combineLayer2D
std::vector< std::vector< unsigned > > m_combineLayer2D
Definition: FPGATrackSimHoughTransformTool.h:170
FPGATrackSimTypes.h
python.compressB64.c
def c
Definition: compressB64.py:93
FPGATrackSimHoughTransformTool::m_EvtSel
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_EvtSel
Definition: FPGATrackSimHoughTransformTool.h:131
FPGATrackSimSectorBank.h
This file declares a class that stores the module IDs of the sectors.
MakeTH3DFromTH2Ds.xBins
list xBins
Definition: MakeTH3DFromTH2Ds.py:76
FPGATrackSimRoad
Definition: FPGATrackSimRoad.h:30
FPGATrackSimHoughTransformTool::m_threshold
Gaudi::Property< std::vector< int > > m_threshold
Definition: FPGATrackSimHoughTransformTool.h:152
sortByLayer
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > sortByLayer(Container const &hits)
Definition: FPGATrackSimHit.h:270
FPGATrackSimHoughTransformTool::m_image
Image m_image
Definition: FPGATrackSimHoughTransformTool.h:188