![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
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);
29 static inline std::string
to_string(
const std::vector<T> &
v);
37 declareInterface<IFPGATrackSimRoadFinderTool>(
this);
56 ATH_MSG_INFO(
"Convolution: " << to_string(
const_cast<std::vector<int>&
>(
m_conv.value())));
68 ATH_MSG_FATAL(
"initialize() Image size must be greater than 0");
74 ATH_MSG_FATAL(
"initialize() Hit extentsion list must have size % nLayers");
76 ATH_MSG_FATAL(
"initialize() Combine layers list must have size = 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");
85 if (!ok)
return StatusCode::FAILURE;
90 ATH_MSG_WARNING(
"initialize() localMaxWindowSize requires tracing hits, turning on automatically");
97 ATH_MSG_WARNING(
"initialize() idealGeoRoads conflicts with useSectors, switching off FPGATrackSim sector matching");
102 ATH_MSG_WARNING(
"initialize() idealGeoRoads requires tracing hits, turning on automatically");
131 return StatusCode::SUCCESS;
159 return StatusCode::SUCCESS;
181 for (
unsigned y_ = 0; y_ < new_size_y; y_++)
183 unsigned y_bin_min =
scale * y_;
184 unsigned y_bin_max =
scale * (y_ + 1);
190 for (
unsigned y = y_bin_min;
y < y_bin_max;
y++)
211 if (layerImage(
y,
x).
first > 0)
256 if (
i == 0 && j == 0)
continue;
275 static inline int quant(
double min,
double max,
unsigned nSteps,
double val)
281 static inline double unquant(
double min,
double max,
unsigned nSteps,
int step)
286 template <
typename T>
287 static inline std::string
to_string(
const std::vector<T> &
v)
289 std::ostringstream oss;
293 std::copy(
v.begin(),
v.end()-1, std::ostream_iterator<T>(oss,
", "));
306 double cor = 0.1216 *
r *
r - 0.0533 *
r + 0.0069;
309 else if (region == 4)
311 double cor = 0.4265 *
r *
r - 0.0662 *
r + 0.0036;
323 double r = hit->
getR();
324 double phi_hit = hit->
getGPhi();
326 x = asin(
r * fpgatracksim::A *
y -
d0 /
r) + phi_hit;
332 ATH_MSG_ERROR(
"yToX() not defined for the current m_par selection");
345 if (x_min > x_max)
std::swap(x_min, x_max);
359 if (x_bin_min < 0) x_bin_min = 0;
362 return { x_bin_min, x_bin_max };
389 double qoverpt =
r.getY()*0.001;
391 qoverpt = abs(qoverpt);
398 auto bounds = std::equal_range(qoverpt_bins.begin(), qoverpt_bins.end(), qoverpt);
402 if (sectorbin < 0) sectorbin = 0;
403 if ((sectorbin / 10) >
static_cast<int>(qoverpt_bins.size() - 2))sectorbin = 10*(qoverpt_bins.size() - 2);
406 int subregion =
r.getSubRegion();
409 std::vector<module_t> modules;
410 for (
unsigned int il = 0;
il <
r.getNLayers();
il++) {
411 if (
r.getNHits_layer()[
il] == 0) {
412 modules.push_back(-1);
415 wc_layers |= (0x1 <<
il);
416 r.setWCLayers(wc_layers);
422 std::vector<const FPGATrackSimHit*> wcHits;
423 wcHits.push_back(wcHit);
424 r.setHits(
il,wcHits);
427 modules.push_back(sectorbin);
439 r.setSectorBin(sectorbin);
463 r.setHitLayers(hitLayers);
476 hitLayers |= 1 << hit->getLayer();
488 std::vector<FPGATrackSimHit const *> road_hits;
496 unsigned int y_bin_max = y_bin_min +
m_binScale[hit->getLayer()];
502 road_hits.push_back(hit);
503 hitLayers |= 1 << hit->getLayer();
constexpr int SUBREGION_SECTOR_OFFSET
std::string find(const std::string &s)
return a remapped string
Maps physical layers to logical layers.
unsigned getLayer() const
const std::vector< double > & getQOverPtBins() const
Maps ITK module indices to FPGATrackSim regions.
void setDetType(SiliconTech detType)
sector_t findSector(std::vector< module_t > const &modules) const
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< std::vector< const FPGATrackSimHit * > > sortByLayer(Container const &hits)
constexpr int QPT_SECTOR_OFFSET
std::string to_string(const DetectorType &type)
: FPGATrackSim-specific class to represent an hit in the detector.
void setLayer(unsigned v)
#define ATH_MSG_WARNING(x)
bool isAbsQOverPtBinning() const
This file declares a class that stores the module IDs of the sectors.
void setHitType(HitType type)