ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
FPGATrackSimHoughTransformTool Class Reference

#include <FPGATrackSimHoughTransformTool.h>

Inheritance diagram for FPGATrackSimHoughTransformTool:
Collaboration diagram for FPGATrackSimHoughTransformTool:

Public Types

typedef vector2D< std::pair< int, std::unordered_set< std::shared_ptr< const FPGATrackSimHit > > > > Image
 

Public Member Functions

 FPGATrackSimHoughTransformTool (const std::string &, const std::string &, const IInterface *)
 
virtual StatusCode initialize () override
 
virtual StatusCode getRoads (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads) override
 
double getMinX () const
 
double getMaxX () const
 
double getMinY () const
 
double getMaxY () const
 
unsigned getThreshold () const
 
int getSubRegion () const
 
double yToX (double y, const std::shared_ptr< const FPGATrackSimHit > &hit) const
 
Image constgetImage () const
 

Private Member Functions

Image createLayerImage (std::vector< unsigned > const &combine_layers, const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, unsigned const scale) const
 
Image createImage (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits) const
 
Image convolute (Image const &image) const
 
std::pair< unsigned, unsigned > yToXBins (size_t yBin_min, size_t yBin_max, const std::shared_ptr< const FPGATrackSimHit > &hit) const
 
unsigned getExtension (unsigned y, unsigned layer) const
 
bool passThreshold (Image const &image, unsigned x, unsigned y) const
 
void matchIdealGeoSector (FPGATrackSimRoad &r) const
 
void addRoad (const std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit >>> &hits, layer_bitmask_t hitLayers, unsigned x, unsigned y)
 
void addRoad (const std::unordered_set< std::shared_ptr< const FPGATrackSimHit >> &hits, unsigned x, unsigned y)
 
void addRoad (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, unsigned x, unsigned y)
 
int conv (unsigned y, unsigned x)
 
void drawImage (Image const &image, std::string const &name)
 

Private Attributes

ServiceHandle< IFPGATrackSimEventSelectionSvcm_EvtSel {this, "FPGATrackSimEventSelectionSvc", "FPGATrackSimEventSelectionSvc"}
 
ServiceHandle< IFPGATrackSimBankSvcm_FPGATrackSimBankSvc {this, "FPGATrackSimBankSvc", "FPGATrackSimBankSvc"}
 
ServiceHandle< IFPGATrackSimMappingSvcm_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
 
FPGATrackSimTrackPars m_parMin
 
FPGATrackSimTrackPars m_parMax
 
FPGATrackSimTrackPars::pars_index m_par_x = FPGATrackSimTrackPars::IPHI
 
FPGATrackSimTrackPars::pars_index m_par_y = FPGATrackSimTrackPars::IHIP
 
Gaudi::Property< int > m_subRegion { this, "subRegion", 0," -1 for entire region (no slicing)"}
 
Gaudi::Property< float > m_tempMin_phi { this, "phi_min", 0, "min phi"}
 
Gaudi::Property< float > m_tempMax_phi { this, "phi_max", 0, "max phi"}
 
Gaudi::Property< float > m_tempMin_qOverPt { this, "qpT_min", 0, "min q/pt"}
 
Gaudi::Property< float > m_tempMax_qOverPt { this, "qpT_max", 0, "max q/pt"}
 
Gaudi::Property< float > m_tempMin_d0 { this, "d0_min", 0, "min q/pt"}
 
Gaudi::Property< float > m_tempMax_d0 { this, "d0_max", 0, "max q/pt"}
 
Gaudi::Property< std::vector< int > > m_threshold { this, "threshold", {},"Minimum number of hit layers to fire a road"}
 
Gaudi::Property< unsigned > m_imageSize_x { this, "nBins_x", 0, ""}
 
Gaudi::Property< unsigned > m_imageSize_y { this, "nBins_y", 0, ""}
 
Gaudi::Property< std::vector< int > > m_conv { this, "convolution", {}, "Convolution filter, with size m_convSize_y * m_convSize_x"}
 
Gaudi::Property< std::vector< unsigned > > m_combineLayers { this, "combine_layers", {}, ""}
 
Gaudi::Property< std::vector< unsigned > > m_binScale { this, "scale", {}, "Vector containing the scales for each layers"}
 
Gaudi::Property< unsigned > m_convSize_x { this, "convSize_x", 0, ""}
 
Gaudi::Property< unsigned > m_convSize_y { this, "convSize_y", 0, ""}
 
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"}
 
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."}
 
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"}
 
Gaudi::Property< bool > m_fieldCorrection { this, "fieldCorrection", true, "Apply corrections to hough equation due to field nonuniformity"}
 
Gaudi::Property< bool > m_useSectors { this, "useSectors", false, "Will reverse calculate the sector for track-fitting purposes"}
 
Gaudi::Property< bool > m_idealGeoRoads { this, "IdealGeoRoads", true, "Set sectors to use ideal geometry fit constants"}
 
Gaudi::Property< bool > m_doRegionalMapping { this, "RegionalMapping", false, "Use the sub-region maps to define the sector"}
 
Gaudi::Property< bool > m_doEtaPatternConsts { this, "doEtaPatternConsts", false, "Whether to use the eta pattern tool for constant generation"}
 
Gaudi::Property< bool > m_useSpacePoints { this, "useSpacePoints", false, "Whether we are using spacepoints."}
 
std::vector< std::vector< unsigned > > m_combineLayer2D
 
unsigned m_nLayers = 0U
 
unsigned m_nCombineLayers = 0U
 
double m_step_x = 0
 
double m_step_y = 0
 
std::vector< double > m_bins_x
 
std::vector< double > m_bins_y
 
Image m_image
 
std::vector< FPGATrackSimRoadm_roads
 

Detailed Description

Definition at line 90 of file FPGATrackSimHoughTransformTool.h.

Member Typedef Documentation

◆ Image

typedef vector2D<std::pair<int, std::unordered_set<std::shared_ptr<const FPGATrackSimHit> > > > FPGATrackSimHoughTransformTool::Image

Definition at line 119 of file FPGATrackSimHoughTransformTool.h.

Constructor & Destructor Documentation

◆ FPGATrackSimHoughTransformTool()

FPGATrackSimHoughTransformTool::FPGATrackSimHoughTransformTool ( const std::string &  algname,
const std::string &  name,
const IInterface *  ifc 
)

Definition at line 34 of file FPGATrackSimHoughTransformTool.cxx.

34  :
35  base_class(algname, name, ifc)
36 {
37  declareInterface<IFPGATrackSimRoadFinderTool>(this);
38 }

Member Function Documentation

◆ addRoad() [1/3]

void FPGATrackSimHoughTransformTool::addRoad ( const std::unordered_set< std::shared_ptr< const FPGATrackSimHit >> &  hits,
unsigned  x,
unsigned  y 
)
private

Definition at line 455 of file FPGATrackSimHoughTransformTool.cxx.

456 {
457  layer_bitmask_t hitLayers = 0;
458  for (auto const & hit : hits)
459  hitLayers |= 1 << hit->getLayer();
460 
461  auto sorted_hits = ::sortByLayer(hits);
462  sorted_hits.resize(m_nLayers); // If no hits in last layer, return from sortByLayer will be too short
463 
464  addRoad(sorted_hits, hitLayers, x, y);
465 }

◆ addRoad() [2/3]

void FPGATrackSimHoughTransformTool::addRoad ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits,
unsigned  x,
unsigned  y 
)
private

Definition at line 468 of file FPGATrackSimHoughTransformTool.cxx.

469 {
470  // Get the road hits
471  std::vector<std::shared_ptr<const FPGATrackSimHit>> road_hits;
472  layer_bitmask_t hitLayers = 0;
473  for (const auto & hit : hits)
474  {
475  if (m_subRegion >= 0 && !m_FPGATrackSimMapping->SubRegionMap()->isInRegion(m_subRegion, *hit)) continue;
476 
477  // Find the min/max y bins (after scaling)
478  unsigned int y_bin_min = (y / m_binScale[hit->getLayer()]) * m_binScale[hit->getLayer()];
479  unsigned int y_bin_max = y_bin_min + m_binScale[hit->getLayer()];
480 
481  // Find the min/max x bins
482  auto xBins = yToXBins(y_bin_min, y_bin_max, hit);
483  if (x >= xBins.first && x < xBins.second)
484  {
485  road_hits.push_back(hit);
486  hitLayers |= 1 << hit->getLayer();
487  }
488  }
489 
490  auto sorted_hits = ::sortByLayer(road_hits);
491  sorted_hits.resize(m_nLayers); // If no hits in last layer, return from sortByLayer will be too short
492 
493  addRoad(sorted_hits, hitLayers, x, y);
494 }

◆ addRoad() [3/3]

void FPGATrackSimHoughTransformTool::addRoad ( const std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit >>> &  hits,
layer_bitmask_t  hitLayers,
unsigned  x,
unsigned  y 
)
private

Definition at line 429 of file FPGATrackSimHoughTransformTool.cxx.

430 {
431  m_roads.emplace_back();
432  FPGATrackSimRoad & r = m_roads.back();
433 
434  r.setRoadID(m_roads.size() - 1);
435  r.setPID(y * m_imageSize_y + x);
436  r.setHits( std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>>(hits)); //copy hits
437 
438  // We use the y coordinate in matchIdealGeoSectors
439  // and so it needs to be available before setting the sector.
440 
441  r.setSubRegion(m_subRegion);
442  r.setX(m_bins_x[x] + m_step_x/2);
443  r.setY(m_bins_y[y] + m_step_y/2);
444  r.setXBin(x);
445  r.setYBin(y);
446  r.setHitLayers(hitLayers);
447  r.setSubRegion(m_subRegion);
448 
449  if (m_useSectors) r.setSector(m_FPGATrackSimBankSvc->SectorBank_1st()->findSector(hits));
451 }

◆ conv()

int FPGATrackSimHoughTransformTool::conv ( unsigned  y,
unsigned  x 
)
inlineprivate

Definition at line 210 of file FPGATrackSimHoughTransformTool.h.

210 { return m_conv[y * m_convSize_x + x]; } // NOTE: y index is first

◆ convolute()

FPGATrackSimHoughTransformTool::Image FPGATrackSimHoughTransformTool::convolute ( Image const image) const
private

Definition at line 221 of file FPGATrackSimHoughTransformTool.cxx.

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 }

◆ createImage()

FPGATrackSimHoughTransformTool::Image FPGATrackSimHoughTransformTool::createImage ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits) const
private

Definition at line 202 of file FPGATrackSimHoughTransformTool.cxx.

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 }

◆ createLayerImage()

FPGATrackSimHoughTransformTool::Image FPGATrackSimHoughTransformTool::createLayerImage ( std::vector< unsigned > const combine_layers,
const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits,
unsigned const  scale 
) const
private

Definition at line 162 of file FPGATrackSimHoughTransformTool.cxx.

163 {
165 
166  for (auto const & hit : hits)
167  {
168  if (std::find(layers.begin(), layers.end(), hit->getLayer()) == layers.end()) continue;
169 
170  if (m_subRegion >= 0) {
171  // NOTE: uncomment middle piece if we port over 2nd stage functionality.
172  auto* subrmap = /*(m_2ndStage) ? m_FPGATrackSimMapping->SubRegionMap_2nd() :*/ m_FPGATrackSimMapping->SubRegionMap();
173  if (!(subrmap->isInRegion(m_subRegion, *hit))) {
174  continue;
175  }
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 }

◆ drawImage()

void FPGATrackSimHoughTransformTool::drawImage ( Image const image,
std::string const name 
)
private

◆ getExtension()

unsigned FPGATrackSimHoughTransformTool::getExtension ( unsigned  y,
unsigned  layer 
) const
private

Definition at line 349 of file FPGATrackSimHoughTransformTool.cxx.

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 }

◆ getImage()

Image const& FPGATrackSimHoughTransformTool::getImage ( ) const
inline

Definition at line 124 of file FPGATrackSimHoughTransformTool.h.

124 { return m_image; } // Returns the image generated from the last call of getRoads

◆ getMaxX()

double FPGATrackSimHoughTransformTool::getMaxX ( ) const
inline

Definition at line 110 of file FPGATrackSimHoughTransformTool.h.

110 { return m_parMax[m_par_x]; }

◆ getMaxY()

double FPGATrackSimHoughTransformTool::getMaxY ( ) const
inline

Definition at line 112 of file FPGATrackSimHoughTransformTool.h.

112 { return m_parMax[m_par_y]; }

◆ getMinX()

double FPGATrackSimHoughTransformTool::getMinX ( ) const
inline

Definition at line 109 of file FPGATrackSimHoughTransformTool.h.

109 { return m_parMin[m_par_x]; }

◆ getMinY()

double FPGATrackSimHoughTransformTool::getMinY ( ) const
inline

Definition at line 111 of file FPGATrackSimHoughTransformTool.h.

111 { return m_parMin[m_par_y]; }

◆ getRoads()

StatusCode FPGATrackSimHoughTransformTool::getRoads ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits,
std::vector< std::shared_ptr< const FPGATrackSimRoad >> &  roads 
)
overridevirtual

Definition at line 139 of file FPGATrackSimHoughTransformTool.cxx.

140 {
141  roads.clear();
142  m_roads.clear();
143 
145  if (!m_conv.empty()) m_image = convolute(m_image);
146 
147  for (unsigned y = 0; y < m_imageSize_y; y++)
148  for (unsigned x = 0; x < m_imageSize_x; x++)
149  if (passThreshold(m_image, x, y)) {
150  if (m_traceHits)
151  addRoad(m_image(y, x).second, x, y);
152  else
153  addRoad(hits, x, y);
154  }
155 
156  roads.reserve(m_roads.size());
157  for (FPGATrackSimRoad & r : m_roads) roads.emplace_back(std::make_shared<const FPGATrackSimRoad>(r));
158 
159  return StatusCode::SUCCESS;
160 }

◆ getSubRegion()

int FPGATrackSimHoughTransformTool::getSubRegion ( ) const
inline

Definition at line 114 of file FPGATrackSimHoughTransformTool.h.

114 { return m_subRegion; }

◆ getThreshold()

unsigned FPGATrackSimHoughTransformTool::getThreshold ( ) const
inline

Definition at line 113 of file FPGATrackSimHoughTransformTool.h.

113 { return m_threshold[m_threshold.size() / 2]; }

◆ initialize()

StatusCode FPGATrackSimHoughTransformTool::initialize ( )
overridevirtual

Definition at line 41 of file FPGATrackSimHoughTransformTool.cxx.

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()->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 }

◆ matchIdealGeoSector()

void FPGATrackSimHoughTransformTool::matchIdealGeoSector ( FPGATrackSimRoad r) const
private

Definition at line 362 of file FPGATrackSimHoughTransformTool.cxx.

363 {
364 
365  // This logic is now identical between the 1D and 2D Hough tools. Perhaps it should
366  // be moved into the sector bank class?
367 
368  // We now look up the binning information in the sector bank.
369  const FPGATrackSimSectorBank* sectorbank = m_FPGATrackSimBankSvc->SectorBank_1st();
370 
371  // Look up q/pt (or |q/pt|) from the Hough road, convert to MeV.
372  double qoverpt = r.getY()*0.001;
373  if (sectorbank->isAbsQOverPtBinning()) {
374  qoverpt = abs(qoverpt);
375  }
376 
377  int sectorbin = 0;
378 
379  // Retrieve the bin boundaries from the sector bank; map this onto them.
380  std::vector<double> qoverpt_bins = sectorbank->getQOverPtBins();
381  auto bounds = std::equal_range(qoverpt_bins.begin(), qoverpt_bins.end(), qoverpt);
382 
383  sectorbin = fpgatracksim::QPT_SECTOR_OFFSET*(bounds.first - qoverpt_bins.begin() - 1);
384 
385  if (sectorbin < 0) sectorbin = 0;
386  if ((sectorbin / 10) > static_cast<int>(qoverpt_bins.size() - 2))sectorbin = 10*(qoverpt_bins.size() - 2);
387 
388  if (m_doRegionalMapping){
389  int subregion = r.getSubRegion();
390  sectorbin += subregion*fpgatracksim::SUBREGION_SECTOR_OFFSET;
391  }
392  std::vector<module_t> modules;
393  for (unsigned int il = 0; il < r.getNLayers(); il++) {
394  if (r.getNHits_layer()[il] == 0) {
395  modules.push_back(-1);
396 
397  layer_bitmask_t wc_layers = r.getWCLayers();
398  wc_layers |= (0x1 << il);
399  r.setWCLayers(wc_layers);
400 
401  std::shared_ptr<FPGATrackSimHit> wcHit = std::make_shared<FPGATrackSimHit>();
403  wcHit->setLayer(il);
404  wcHit->setDetType(m_FPGATrackSimMapping->PlaneMap_1st()->getDetType(il));
405  std::vector<std::shared_ptr<const FPGATrackSimHit>> wcHits;
406  wcHits.emplace_back(std::move(wcHit));
407  r.setHits(il,std::move(wcHits));
408  }
409  else {
410  modules.push_back(sectorbin);
411  }
412  }
413 
414  // If we are using eta patterns. We need to first run the roads through the road filter.
415  // Then the filter will be responsible for setting the actual sector.
416  // As a hack, we can store the sector bin ID in the road for now.
417  // This is fragile! If we want to store a different ID for each layer, it will break.
418 
419  // Similarly, we do the same thing for spacepoints. this probably means we can't combine the two.
420  // maybe better to store the module array instead of just a number?
421 
422  r.setSectorBin(sectorbin);
424  r.setSector(sectorbank->findSector(modules));
425  }
426 }

◆ passThreshold()

bool FPGATrackSimHoughTransformTool::passThreshold ( Image const image,
unsigned  x,
unsigned  y 
) const
private

Definition at line 243 of file FPGATrackSimHoughTransformTool.cxx.

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 }

◆ yToX()

double FPGATrackSimHoughTransformTool::yToX ( double  y,
const std::shared_ptr< const FPGATrackSimHit > &  hit 
) const

Definition at line 300 of file FPGATrackSimHoughTransformTool.cxx.

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 }

◆ yToXBins()

std::pair< unsigned, unsigned > FPGATrackSimHoughTransformTool::yToXBins ( size_t  yBin_min,
size_t  yBin_max,
const std::shared_ptr< const FPGATrackSimHit > &  hit 
) const
private

Definition at line 323 of file FPGATrackSimHoughTransformTool.cxx.

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 }

Member Data Documentation

◆ m_bins_x

std::vector<double> FPGATrackSimHoughTransformTool::m_bins_x
private

Definition at line 180 of file FPGATrackSimHoughTransformTool.h.

◆ m_bins_y

std::vector<double> FPGATrackSimHoughTransformTool::m_bins_y
private

Definition at line 181 of file FPGATrackSimHoughTransformTool.h.

◆ m_binScale

Gaudi::Property<std::vector<unsigned> > FPGATrackSimHoughTransformTool::m_binScale { this, "scale", {}, "Vector containing the scales for each layers"}
private

Definition at line 157 of file FPGATrackSimHoughTransformTool.h.

◆ m_combineLayer2D

std::vector<std::vector<unsigned> > FPGATrackSimHoughTransformTool::m_combineLayer2D
private

Definition at line 170 of file FPGATrackSimHoughTransformTool.h.

◆ m_combineLayers

Gaudi::Property<std::vector<unsigned> > FPGATrackSimHoughTransformTool::m_combineLayers { this, "combine_layers", {}, ""}
private

Definition at line 156 of file FPGATrackSimHoughTransformTool.h.

◆ m_conv

Gaudi::Property<std::vector<int> > FPGATrackSimHoughTransformTool::m_conv { this, "convolution", {}, "Convolution filter, with size m_convSize_y * m_convSize_x"}
private

Definition at line 155 of file FPGATrackSimHoughTransformTool.h.

◆ m_convSize_x

Gaudi::Property<unsigned> FPGATrackSimHoughTransformTool::m_convSize_x { this, "convSize_x", 0, ""}
private

Definition at line 158 of file FPGATrackSimHoughTransformTool.h.

◆ m_convSize_y

Gaudi::Property<unsigned> FPGATrackSimHoughTransformTool::m_convSize_y { this, "convSize_y", 0, ""}
private

Definition at line 159 of file FPGATrackSimHoughTransformTool.h.

◆ m_doEtaPatternConsts

Gaudi::Property<bool> FPGATrackSimHoughTransformTool::m_doEtaPatternConsts { this, "doEtaPatternConsts", false, "Whether to use the eta pattern tool for constant generation"}
private

Definition at line 167 of file FPGATrackSimHoughTransformTool.h.

◆ m_doRegionalMapping

Gaudi::Property<bool> FPGATrackSimHoughTransformTool::m_doRegionalMapping { this, "RegionalMapping", false, "Use the sub-region maps to define the sector"}
private

Definition at line 166 of file FPGATrackSimHoughTransformTool.h.

◆ m_EvtSel

ServiceHandle<IFPGATrackSimEventSelectionSvc> FPGATrackSimHoughTransformTool::m_EvtSel {this, "FPGATrackSimEventSelectionSvc", "FPGATrackSimEventSelectionSvc"}
private

Definition at line 131 of file FPGATrackSimHoughTransformTool.h.

◆ m_fieldCorrection

Gaudi::Property<bool> FPGATrackSimHoughTransformTool::m_fieldCorrection { this, "fieldCorrection", true, "Apply corrections to hough equation due to field nonuniformity"}
private

Definition at line 163 of file FPGATrackSimHoughTransformTool.h.

◆ m_FPGATrackSimBankSvc

ServiceHandle<IFPGATrackSimBankSvc> FPGATrackSimHoughTransformTool::m_FPGATrackSimBankSvc {this, "FPGATrackSimBankSvc", "FPGATrackSimBankSvc"}
private

Definition at line 132 of file FPGATrackSimHoughTransformTool.h.

◆ m_FPGATrackSimMapping

ServiceHandle<IFPGATrackSimMappingSvc> FPGATrackSimHoughTransformTool::m_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
private

Definition at line 133 of file FPGATrackSimHoughTransformTool.h.

◆ m_hitExtend_x

Gaudi::Property<std::vector<unsigned> > FPGATrackSimHoughTransformTool::m_hitExtend_x { this, "hitExtend_x", {}, "Hit lines will fill extra bins in x by this amount on each side, size == nLayers"}
private

Definition at line 160 of file FPGATrackSimHoughTransformTool.h.

◆ m_idealGeoRoads

Gaudi::Property<bool> FPGATrackSimHoughTransformTool::m_idealGeoRoads { this, "IdealGeoRoads", true, "Set sectors to use ideal geometry fit constants"}
private

Definition at line 165 of file FPGATrackSimHoughTransformTool.h.

◆ m_image

Image FPGATrackSimHoughTransformTool::m_image
private

Definition at line 188 of file FPGATrackSimHoughTransformTool.h.

◆ m_imageSize_x

Gaudi::Property<unsigned> FPGATrackSimHoughTransformTool::m_imageSize_x { this, "nBins_x", 0, ""}
private

Definition at line 153 of file FPGATrackSimHoughTransformTool.h.

◆ m_imageSize_y

Gaudi::Property<unsigned> FPGATrackSimHoughTransformTool::m_imageSize_y { this, "nBins_y", 0, ""}
private

Definition at line 154 of file FPGATrackSimHoughTransformTool.h.

◆ m_localMaxWindowSize

Gaudi::Property<bool> FPGATrackSimHoughTransformTool::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"}
private

Definition at line 162 of file FPGATrackSimHoughTransformTool.h.

◆ m_nCombineLayers

unsigned FPGATrackSimHoughTransformTool::m_nCombineLayers = 0U
private

Definition at line 176 of file FPGATrackSimHoughTransformTool.h.

◆ m_nLayers

unsigned FPGATrackSimHoughTransformTool::m_nLayers = 0U
private

Definition at line 175 of file FPGATrackSimHoughTransformTool.h.

◆ m_par_x

FPGATrackSimTrackPars::pars_index FPGATrackSimHoughTransformTool::m_par_x = FPGATrackSimTrackPars::IPHI
private

Definition at line 142 of file FPGATrackSimHoughTransformTool.h.

◆ m_par_y

FPGATrackSimTrackPars::pars_index FPGATrackSimHoughTransformTool::m_par_y = FPGATrackSimTrackPars::IHIP
private

Definition at line 143 of file FPGATrackSimHoughTransformTool.h.

◆ m_parMax

FPGATrackSimTrackPars FPGATrackSimHoughTransformTool::m_parMax
private

Definition at line 140 of file FPGATrackSimHoughTransformTool.h.

◆ m_parMin

FPGATrackSimTrackPars FPGATrackSimHoughTransformTool::m_parMin
private

Definition at line 139 of file FPGATrackSimHoughTransformTool.h.

◆ m_roads

std::vector<FPGATrackSimRoad> FPGATrackSimHoughTransformTool::m_roads
private

Definition at line 189 of file FPGATrackSimHoughTransformTool.h.

◆ m_step_x

double FPGATrackSimHoughTransformTool::m_step_x = 0
private

Definition at line 178 of file FPGATrackSimHoughTransformTool.h.

◆ m_step_y

double FPGATrackSimHoughTransformTool::m_step_y = 0
private

Definition at line 179 of file FPGATrackSimHoughTransformTool.h.

◆ m_subRegion

Gaudi::Property<int> FPGATrackSimHoughTransformTool::m_subRegion { this, "subRegion", 0," -1 for entire region (no slicing)"}
private

Definition at line 145 of file FPGATrackSimHoughTransformTool.h.

◆ m_tempMax_d0

Gaudi::Property<float> FPGATrackSimHoughTransformTool::m_tempMax_d0 { this, "d0_max", 0, "max q/pt"}
private

Definition at line 151 of file FPGATrackSimHoughTransformTool.h.

◆ m_tempMax_phi

Gaudi::Property<float> FPGATrackSimHoughTransformTool::m_tempMax_phi { this, "phi_max", 0, "max phi"}
private

Definition at line 147 of file FPGATrackSimHoughTransformTool.h.

◆ m_tempMax_qOverPt

Gaudi::Property<float> FPGATrackSimHoughTransformTool::m_tempMax_qOverPt { this, "qpT_max", 0, "max q/pt"}
private

Definition at line 149 of file FPGATrackSimHoughTransformTool.h.

◆ m_tempMin_d0

Gaudi::Property<float> FPGATrackSimHoughTransformTool::m_tempMin_d0 { this, "d0_min", 0, "min q/pt"}
private

Definition at line 150 of file FPGATrackSimHoughTransformTool.h.

◆ m_tempMin_phi

Gaudi::Property<float> FPGATrackSimHoughTransformTool::m_tempMin_phi { this, "phi_min", 0, "min phi"}
private

Definition at line 146 of file FPGATrackSimHoughTransformTool.h.

◆ m_tempMin_qOverPt

Gaudi::Property<float> FPGATrackSimHoughTransformTool::m_tempMin_qOverPt { this, "qpT_min", 0, "min q/pt"}
private

Definition at line 148 of file FPGATrackSimHoughTransformTool.h.

◆ m_threshold

Gaudi::Property<std::vector<int> > FPGATrackSimHoughTransformTool::m_threshold { this, "threshold", {},"Minimum number of hit layers to fire a road"}
private

Definition at line 152 of file FPGATrackSimHoughTransformTool.h.

◆ m_traceHits

Gaudi::Property<bool> FPGATrackSimHoughTransformTool::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."}
private

Definition at line 161 of file FPGATrackSimHoughTransformTool.h.

◆ m_useSectors

Gaudi::Property<bool> FPGATrackSimHoughTransformTool::m_useSectors { this, "useSectors", false, "Will reverse calculate the sector for track-fitting purposes"}
private

Definition at line 164 of file FPGATrackSimHoughTransformTool.h.

◆ m_useSpacePoints

Gaudi::Property<bool> FPGATrackSimHoughTransformTool::m_useSpacePoints { this, "useSpacePoints", false, "Whether we are using spacepoints."}
private

Definition at line 168 of file FPGATrackSimHoughTransformTool.h.


The documentation for this class was generated from the following files:
FPGATrackSimHoughTransformTool::m_bins_y
std::vector< double > m_bins_y
Definition: FPGATrackSimHoughTransformTool.h:181
fpgatracksim::SUBREGION_SECTOR_OFFSET
constexpr int SUBREGION_SECTOR_OFFSET
Definition: FPGATrackSimConstants.h:24
FPGATrackSimHoughTransformTool::m_tempMax_qOverPt
Gaudi::Property< float > m_tempMax_qOverPt
Definition: FPGATrackSimHoughTransformTool.h:149
PlotCalibFromCool.il
il
Definition: PlotCalibFromCool.py:381
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:429
FPGATrackSimHoughTransformTool::m_traceHits
Gaudi::Property< bool > m_traceHits
Definition: FPGATrackSimHoughTransformTool.h:161
FPGATrackSimTrackPars::qOverPt
double qOverPt
Definition: FPGATrackSimTrackPars.h:25
FPGATrackSimHoughTransformTool::matchIdealGeoSector
void matchIdealGeoSector(FPGATrackSimRoad &r) const
Definition: FPGATrackSimHoughTransformTool.cxx:362
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::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:74
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
FPGATrackSimSectorBank::getQOverPtBins
const std::vector< double > & getQOverPtBins() const
Definition: FPGATrackSimSectorBank.h:52
FPGATrackSimHoughTransformTool::m_tempMax_phi
Gaudi::Property< float > m_tempMax_phi
Definition: FPGATrackSimHoughTransformTool.h:147
FPGATrackSimHit::getGPhi
float getGPhi() const
Definition: FPGATrackSimHit.h:134
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
HitType::wildcard
@ wildcard
FPGATrackSimHoughTransformTool::m_par_x
FPGATrackSimTrackPars::pars_index m_par_x
Definition: FPGATrackSimHoughTransformTool.h:142
FPGATrackSimHoughTransformTool::m_localMaxWindowSize
Gaudi::Property< bool > m_localMaxWindowSize
Definition: FPGATrackSimHoughTransformTool.h:162
FPGATrackSimHit::setDetType
void setDetType(SiliconTech detType)
Definition: FPGATrackSimHit.h:55
FPGATrackSimHoughTransformTool::m_step_y
double m_step_y
Definition: FPGATrackSimHoughTransformTool.h:179
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
FPGATrackSimSectorBank::findSector
sector_t findSector(std::vector< module_t > const &modules) const
Definition: FPGATrackSimSectorBank.cxx:121
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
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
FPGATrackSimHoughTransformTool::m_step_x
double m_step_x
Definition: FPGATrackSimHoughTransformTool.h:178
MuonR4::SegmentFit::ParamDefs::x0
@ x0
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
FPGATrackSimHoughTransformTool::m_roads
std::vector< FPGATrackSimRoad > m_roads
Definition: FPGATrackSimHoughTransformTool.h:189
FPGATrackSimSectorBank
Definition: FPGATrackSimSectorBank.h:32
FPGATrackSimHoughTransformTool::m_useSpacePoints
Gaudi::Property< bool > m_useSpacePoints
Definition: FPGATrackSimHoughTransformTool.h:168
FPGATrackSimHoughTransformTool::m_subRegion
Gaudi::Property< int > m_subRegion
Definition: FPGATrackSimHoughTransformTool.h:145
FPGATrackSimHoughTransformTool::m_doRegionalMapping
Gaudi::Property< bool > m_doRegionalMapping
Definition: FPGATrackSimHoughTransformTool.h:166
MuonR4::SegmentFit::ParamDefs::y0
@ y0
fpgatracksim::QPT_SECTOR_OFFSET
constexpr int QPT_SECTOR_OFFSET
Definition: FPGATrackSimConstants.h:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
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
FPGATrackSimHoughTransformTool::Image
vector2D< std::pair< int, std::unordered_set< std::shared_ptr< const FPGATrackSimHit > > > > Image
Definition: FPGATrackSimHoughTransformTool.h:119
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:162
FPGATrackSimHit::getR
float getR() const
Definition: FPGATrackSimHit.h:133
ActsTrk::detail::MakeDerivedVariant::extend
constexpr std::variant< Args..., T > extend(const std::variant< Args... > &, const T &)
Definition: MakeDerivedVariant.h:17
FPGATrackSimHit::setLayer
void setLayer(unsigned v)
Definition: FPGATrackSimHit.h:92
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
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
FPGATrackSimSectorBank::isAbsQOverPtBinning
bool isAbsQOverPtBinning() const
Definition: FPGATrackSimSectorBank.h:54
FPGATrackSimHoughTransformTool::m_hitExtend_x
Gaudi::Property< std::vector< unsigned > > m_hitExtend_x
Definition: FPGATrackSimHoughTransformTool.h:160
FPGATrackSimHoughTransformTool::m_doEtaPatternConsts
Gaudi::Property< bool > m_doEtaPatternConsts
Definition: FPGATrackSimHoughTransformTool.h:167
FPGATrackSimHoughTransformTool::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimHoughTransformTool.h:133
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
python.compressB64.c
def c
Definition: compressB64.py:93
FPGATrackSimHoughTransformTool::m_EvtSel
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_EvtSel
Definition: FPGATrackSimHoughTransformTool.h:131
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
FPGATrackSimHit::setHitType
void setHitType(HitType type)
Definition: FPGATrackSimHit.h:54
sortByLayer
std::vector< std::vector< std::shared_ptr< const FPGATrackSimHit > > > sortByLayer(Container const &hits)
Definition: FPGATrackSimHit.h:250
FPGATrackSimHoughTransformTool::m_image
Image m_image
Definition: FPGATrackSimHoughTransformTool.h:188