Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <FPGATrackSimRegionMap.h>
|
| FPGATrackSimRegionMap (const std::vector< std::unique_ptr< FPGATrackSimPlaneMap >> &pmaps, std::string const &filepath) |
|
void | loadModuleIDLUT (std::string const &filepath) |
|
void | loadRadiiFile (std::string const &radii_file) |
|
const FPGATrackSimPlaneMap * | getPlaneMap (int iRegion) 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()
Definition at line 29 of file FPGATrackSimRegionMap.cxx.
33 ifstream
fin(filepath);
37 throw (
"FPGATrackSimRegionMap Couldn't open " + filepath);
45 for (
int region = 0; region <
m_nregions; region++){
◆ allocateMap()
void FPGATrackSimRegionMap::allocateMap |
( |
std::ifstream & |
fin | ) |
|
|
private |
Definition at line 50 of file FPGATrackSimRegionMap.cxx.
52 string line, towerKey;
58 istringstream sline(
line);
60 ok = ok && (towerKey ==
"towers");
64 throw (
"Pmap slice size does not match Rmap:" );
73 for (
int iRegion=0; iRegion<
int(
m_map.size()); iRegion++)
75 m_map.at(iRegion).resize(
m_pmaps.at(0)->getNLogiLayers());
76 for (
size_t l = 0;
l <
m_map.at(iRegion).size();
l++)
m_map.at(iRegion).at(
l).resize(
m_pmaps.at(iRegion)->getNSections(
l));
◆ 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 354 of file FPGATrackSimRegionMap.cxx.
363 if (g_l.second == localModuleID)
return g_l.first;
365 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 288 of file FPGATrackSimRegionMap.cxx.
310 int err[] = {1,1,1,1,1,1};
312 if (region >=
m_map.size()) anyerr =
err[1] = 2;
322 if (
eta < eta_min)
err[4] = 3;
323 if (
eta > eta_max)
err[4] = 2;
329 if (phi_min <= phi_max)
331 if (phi < phi_min || phi > phi_max)
err[5] = 2;
335 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 248 of file FPGATrackSimRegionMap.cxx.
250 if ( region >=
m_map.size()
260 if (eta < eta_min || eta > eta_max)
return false;
266 if (phi_min <= phi_max)
268 if (phi < phi_min || phi > phi_max)
return false;
272 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 128 of file FPGATrackSimRegionMap.cxx.
131 ifstream
fin(filepath);
135 throw (
"FPGATrackSimRegionMap Couldn't open " + filepath);
145 istringstream sline(
line);
147 if (!(sline >> region >>
layer >> globalID >> localID))
◆ loadRadiiFile()
void FPGATrackSimRegionMap::loadRadiiFile |
( |
std::string const & |
radii_file | ) |
|
Definition at line 157 of file FPGATrackSimRegionMap.cxx.
165 std::ifstream
fin(filepath);
179 if (
line.empty() ||
line[0] ==
'#')
continue;
180 std::istringstream sline(
line);
181 std::vector<int> shifts;
184 ok = ok && (sline >> subregion);
198 ok = ok && (sline >>
r);
201 ANA_MSG_WARNING(
"Radius in radiiFile is "<<
r <<
" for layer: " <<
layer <<
" setting to dummy value!");
204 if (subregion == -1) {
◆ readRegion()
void FPGATrackSimRegionMap::readRegion |
( |
std::ifstream & |
fin, |
|
|
int |
expected_region |
|
) |
| |
|
private |
Definition at line 82 of file FPGATrackSimRegionMap.cxx.
92 if (
line.empty() ||
line[0] ==
'#')
continue;
93 istringstream sline(
line);
97 ok = ok && (sline >> region);
98 ok = ok && !(sline >>
dummy);
99 ok = ok && (region == expected_region);
104 int isPix{},
BEC{}, physLayer{}, phi_min{}, phi_max{}, phi_tot{}, eta_min{}, eta_max{}, eta_tot{};
106 ok = ok && (sline >>
isPix >>
BEC >> physLayer >> phi_min >> phi_max >> phi_tot >> eta_min >> eta_max >> eta_tot);
113 m_map[region][logiLayer][
section] = { phi_min, phi_max, eta_min, eta_max };
115 if (++linesRead ==
m_pmaps.at(region)->getNDetLayers())
break;
122 throw "FPGATrackSimRegionMap read error";
◆ m_filepath
std::string FPGATrackSimRegionMap::m_filepath |
|
private |
◆ 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_pmaps
◆ m_radii_map
std::vector<std::vector<double> > FPGATrackSimRegionMap::m_radii_map |
|
private |
The documentation for this class was generated from the following files:
unsigned getSection() const
unsigned getPhiModule() const
std::vector< std::vector< std::map< uint32_t, uint32_t > > > m_global_local_map
unsigned getPhysLayer() const
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
SiliconTech getPairedDetType() const
unsigned getLayer() const
void readRegion(std::ifstream &fin, int expected_region)
def etamod(flags, cells_name, *args, **kw)
int getPairedEtaModule() const
def phimod(flags, cells_name, *args, **kw)
unsigned getPairedPhiModule() const
bool isInRegion(uint32_t region, const FPGATrackSimHit &hit) const
unsigned getPairedPhysLayer() const
DetectorZone getDetectorZone() const
std::vector< std::vector< std::vector< FPGATrackSimRegionBoundaries > > > m_map
DetectorZone getPairedDetZone() const
std::vector< std::vector< double > > m_radii_map
SiliconTech getDetType() const
std::vector< std::unique_ptr< FPGATrackSimPlaneMap > > const & m_pmaps
void allocateMap(std::ifstream &fin)
def ls(path, longls=False)
HitType getHitType() const