#include <FPGATrackSimRegionMap.h>
|
| FPGATrackSimRegionMap (FPGATrackSimPlaneMap const *pmap, std::string const &filepath) |
|
void | loadModuleIDLUT (std::string const &filepath) |
|
void | loadRadiiFile (std::string const &radii_file) |
|
const FPGATrackSimPlaneMap * | getPlaneMap () const |
|
int | getNRegions () const |
|
bool | isModuleIDLUTloaded () const |
|
const FPGATrackSimRegionBoundaries & | getRegionBoundaries (int region, int layer, int section) const |
|
bool | isInRegion (uint32_t region, const FPGATrackSimHit &hit) const |
|
bool | isInRegion (uint32_t region, uint32_t plane, uint32_t section, int eta, int phi) const |
|
std::vector< uint32_t > | getRegions (const FPGATrackSimHit &hit) const |
|
uint32_t | getUnmappedID (uint32_t region, const FPGATrackSimHit &hit) const |
|
uint32_t | getLocalID (uint32_t region, uint32_t layer, uint32_t globalModuleID) const |
|
uint32_t | getGlobalID (uint32_t region, uint32_t layer, uint32_t localModuleID) const |
|
double | getAvgRadius (unsigned region, unsigned layer) const |
|
const std::vector< double > & | getAvgRadii (unsigned region) const |
|
Definition at line 61 of file FPGATrackSimRegionMap.h.
◆ FPGATrackSimRegionMap()
◆ allocateMap()
void FPGATrackSimRegionMap::allocateMap |
( |
std::ifstream & |
fin | ) |
|
|
private |
◆ getAvgRadii()
const std::vector<double>& FPGATrackSimRegionMap::getAvgRadii |
( |
unsigned |
region | ) |
const |
|
inline |
◆ getAvgRadius()
double FPGATrackSimRegionMap::getAvgRadius |
( |
unsigned |
region, |
|
|
unsigned |
layer |
|
) |
| const |
◆ getGlobalID()
uint32_t FPGATrackSimRegionMap::getGlobalID |
( |
uint32_t |
region, |
|
|
uint32_t |
layer, |
|
|
uint32_t |
localModuleID |
|
) |
| const |
Definition at line 334 of file FPGATrackSimRegionMap.cxx.
343 if (g_l.second == localModuleID)
return g_l.first;
345 ANA_MSG_ERROR(
"getGlobalID() Did not find global id for region " << region <<
", layer " <<
layer <<
", localID " << localModuleID);
◆ getLocalID()
uint32_t FPGATrackSimRegionMap::getLocalID |
( |
uint32_t |
region, |
|
|
uint32_t |
layer, |
|
|
uint32_t |
globalModuleID |
|
) |
| const |
◆ getNRegions()
int FPGATrackSimRegionMap::getNRegions |
( |
| ) |
const |
|
inline |
◆ getPlaneMap()
◆ getRegionBoundaries()
◆ getRegions()
◆ getUnmappedID()
uint32_t FPGATrackSimRegionMap::getUnmappedID |
( |
uint32_t |
region, |
|
|
const FPGATrackSimHit & |
hit |
|
) |
| const |
Definition at line 268 of file FPGATrackSimRegionMap.cxx.
290 int err[] = {1,1,1,1,1,1};
292 if (region >=
m_map.size()) anyerr =
err[1] = 2;
302 if (
eta < eta_min)
err[4] = 3;
303 if (
eta > eta_max)
err[4] = 2;
309 if (phi_min <= phi_max)
311 if (phi < phi_min || phi > phi_max)
err[5] = 2;
315 if (phi < phi_min && phi > phi_max)
err[5] = 3;
◆ isInRegion() [1/2]
◆ isInRegion() [2/2]
bool FPGATrackSimRegionMap::isInRegion |
( |
uint32_t |
region, |
|
|
uint32_t |
plane, |
|
|
uint32_t |
section, |
|
|
int |
eta, |
|
|
int |
phi |
|
) |
| const |
Definition at line 229 of file FPGATrackSimRegionMap.cxx.
231 if ( region >=
m_map.size()
241 if (eta < eta_min || eta > eta_max)
return false;
247 if (phi_min <= phi_max)
249 if (phi < phi_min || phi > phi_max)
return false;
253 if (phi < phi_min && phi > phi_max)
return false;
◆ isModuleIDLUTloaded()
bool FPGATrackSimRegionMap::isModuleIDLUTloaded |
( |
| ) |
const |
|
inline |
◆ loadModuleIDLUT()
void FPGATrackSimRegionMap::loadModuleIDLUT |
( |
std::string const & |
filepath | ) |
|
Definition at line 120 of file FPGATrackSimRegionMap.cxx.
123 ifstream
fin(filepath);
127 throw (
"FPGATrackSimRegionMap Couldn't open " + filepath);
137 istringstream sline(
line);
139 if (!(sline >> region >>
layer >> globalID >> localID))
◆ loadRadiiFile()
void FPGATrackSimRegionMap::loadRadiiFile |
( |
std::string const & |
radii_file | ) |
|
Definition at line 149 of file FPGATrackSimRegionMap.cxx.
157 std::ifstream
fin(filepath);
171 if (
line.empty() ||
line[0] ==
'#')
continue;
172 std::istringstream sline(
line);
173 std::vector<int> shifts;
176 ok = ok && (sline >> subregion);
190 ok = ok && (sline >>
r);
193 ANA_MSG_WARNING(
"Radius in radiiFile is "<<
r <<
" for layer: " <<
layer <<
" setting to dummy value!");
196 if (subregion == -1) {
◆ readRegion()
void FPGATrackSimRegionMap::readRegion |
( |
std::ifstream & |
fin, |
|
|
int |
expected_region |
|
) |
| |
|
private |
Definition at line 75 of file FPGATrackSimRegionMap.cxx.
84 if (
line.empty() ||
line[0] ==
'#')
continue;
85 istringstream sline(
line);
89 ok = ok && (sline >> region);
90 ok = ok && !(sline >>
dummy);
91 ok = ok && (region == expected_region);
96 int isPix{},
BEC{}, physLayer{}, phi_min{}, phi_max{}, phi_tot{}, eta_min{}, eta_max{}, eta_tot{};
98 ok = ok && (sline >>
isPix >>
BEC >> physLayer >> phi_min >> phi_max >> phi_tot >> eta_min >> eta_max >> eta_tot);
105 m_map[region][logiLayer][
section] = { phi_min, phi_max, eta_min, eta_max };
114 throw "FPGATrackSimRegionMap read error";
◆ m_global_local_map
std::vector<std::vector<std::map<uint32_t, uint32_t> > > FPGATrackSimRegionMap::m_global_local_map |
|
private |
◆ m_map
◆ m_nregions
int FPGATrackSimRegionMap::m_nregions = 0 |
|
private |
◆ m_pmap
◆ m_radii_map
std::vector<std::vector<double> > FPGATrackSimRegionMap::m_radii_map |
|
private |
The documentation for this class was generated from the following files: