Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
21 using namespace asg::msgUserCode;
33 ifstream
fin(filepath);
37 throw (
"FPGATrackSimRegionMap Couldn't open " + filepath);
45 for (
int region = 0; region <
m_nregions; region++){
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));
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";
131 ifstream
fin(filepath);
135 throw (
"FPGATrackSimRegionMap Couldn't open " + filepath);
145 istringstream sline(
line);
147 if (!(sline >> region >>
layer >> globalID >> localID))
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) {
254 if ( region >=
m_map.size()
264 if (eta < eta_min || eta > eta_max)
return false;
270 if (phi_min <= phi_max)
272 if (phi < phi_min || phi > phi_max)
return false;
276 if (phi < phi_min && phi > phi_max)
return false;
284 std::vector<uint32_t> regions;
287 regions.push_back(region);
314 int err[] = {1,1,1,1,1,1};
316 if (region >=
m_map.size()) anyerr =
err[1] = 2;
326 if (
eta < eta_min)
err[4] = 3;
327 if (
eta > eta_max)
err[4] = 2;
333 if (phi_min <= phi_max)
335 if (phi < phi_min || phi > phi_max)
err[5] = 2;
339 if (phi < phi_min && phi > phi_max)
err[5] = 3;
354 return globalModuleID & 0x3ff;
367 if (g_l.second == localModuleID)
return g_l.first;
369 ANA_MSG_ERROR(
"getGlobalID() Did not find global id for region " << region <<
", layer " <<
layer <<
", localID " << localModuleID);
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
unsigned getPairedSection() const
SiliconTech getPairedDetType() const
unsigned getLayer() const
unsigned getPairedLayer() const
void readRegion(std::ifstream &fin, int expected_region)
Maps ITK module indices to FPGATrackSim regions.
def etamod(flags, cells_name, *args, **kw)
int getPairedEtaModule() const
uint32_t getGlobalID(uint32_t region, uint32_t layer, uint32_t localModuleID) const
def phimod(flags, cells_name, *args, **kw)
FPGATrackSimRegionMap(const std::vector< std::unique_ptr< FPGATrackSimPlaneMap >> &pmaps, std::string const &filepath)
uint32_t getLocalID(uint32_t region, uint32_t layer, uint32_t globalModuleID) const
unsigned getPairedPhiModule() const
bool isInRegion(uint32_t region, const FPGATrackSimHit &hit) const
unsigned getPairedPhysLayer() const
std::vector< uint32_t > getRegions(const FPGATrackSimHit &hit) const
void loadModuleIDLUT(std::string const &filepath)
DetectorZone getDetectorZone() const
std::vector< std::vector< std::vector< FPGATrackSimRegionBoundaries > > > m_map
uint32_t getUnmappedID(uint32_t region, const FPGATrackSimHit &hit) const
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)
void loadRadiiFile(std::string const &radii_file)
HitType getHitType() const
double getAvgRadius(unsigned region, unsigned layer) const