#include <FPGATrackSimEtaPatternFilterTool.h>
|
ServiceHandle< IFPGATrackSimMappingSvc > | m_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"} |
|
ServiceHandle< IFPGATrackSimBankSvc > | m_FPGATrackSimBankSvc {this, "FPGATrackSimBankSvc", "FPGATrackSimBankSvc"} |
|
Gaudi::Property< std::string > | m_pattern_file_path {this, "EtaPatterns", "", "path to pattern file"} |
|
Gaudi::Property< unsigned > | m_threshold {this, "threshold", 0, "Minimum number of hit layers to fire a road"} |
|
Gaudi::Property< bool > | m_isSecondStage {this, "isSecondStage", false, "Whether or not his this a second stage HT"} |
|
Gaudi::Property< bool > | m_doEtaPatternConsts {this, "doEtaPatternConsts", false, "Use eta pattern IDs as part of sector definition"} |
|
Gaudi::Property< bool > | m_dynamicThreshold { this, "dynamicThreshold", false, "Stop lowering the threshold once matches have been found"} |
|
std::vector< FPGATrackSimRoad > | m_postfilter_roads |
|
unsigned | m_nLayers {} |
|
std::map< EtaPattern, layer_bitmask_t > | m_patternmap |
|
std::vector< std::map< ModuleId, ModulesToPattern > > | m_moduleHits |
|
◆ EtaPattern
◆ addHitsToMap()
Definition at line 204 of file FPGATrackSimEtaPatternFilterTool.cxx.
206 for (
unsigned lyr = 0; lyr <
m_nLayers; lyr++)
207 for (
auto & hit :
r->getHits(lyr))
210 ModuleId
mod = { hit->getDetType(), hit->getDetectorZone(), (
int)(hit->getEtaModule()) };
214 itr->second.addHit(hit);
219 ATH_MSG_ERROR(
"Module not in map: " << hit->getDetType() <<
" " << hit->getDetectorZone() <<
" " <<
static_cast<int>(hit->getEtaModule()) <<
" type: " << hit->getHitType() <<
" layer: " << lyr);
222 ATH_MSG_ERROR(
" " << itr2.first.siTech <<
" " << itr2.first.zone <<
" " << itr2.first.etaModule);
◆ addRedundantPatterns()
void FPGATrackSimEtaPatternFilterTool::addRedundantPatterns |
( |
std::set< EtaPattern > & |
usedPatterns, |
|
|
EtaPattern const & |
currPatt, |
|
|
unsigned |
nExtra |
|
) |
| |
|
private |
Definition at line 231 of file FPGATrackSimEtaPatternFilterTool.cxx.
233 usedPatterns.insert(currPatt);
235 std::vector<unsigned> allowmissing(nExtra, 0);
240 for (
auto h : allowmissing)
242 usedPatterns.insert(subpatt);
245 done = (nExtra == 0);
246 for (
unsigned i = 0;
i < nExtra;
i++)
252 done = (
i==nExtra-1);
◆ buildMap()
void FPGATrackSimEtaPatternFilterTool::buildMap |
( |
| ) |
|
|
private |
◆ buildRoad()
Definition at line 262 of file FPGATrackSimEtaPatternFilterTool.cxx.
267 r.setHitLayers(patt.second);
268 r.setEtaPatternID(etaPatternID);
269 for (
unsigned lyr = 0; lyr <
m_nLayers; lyr++) {
272 std::vector<std::shared_ptr<const FPGATrackSimHit> >(
274 if (
r.getNHits_layer().at(lyr) == 0) {
275 std::shared_ptr<FPGATrackSimHit> wcHit = std::make_shared<FPGATrackSimHit>();
279 r.setHits(lyr, std::vector<std::shared_ptr<const FPGATrackSimHit>>{wcHit});
289 r.setSectorBin(sectorbin);
290 std::vector<module_t> modules;
291 for (
unsigned int il = 0;
il <
r.getNLayers();
il++) {
292 if (
r.getNHits_layer()[
il] == 0) {
293 modules.push_back(-1);
295 modules.push_back(sectorbin);
◆ filterRoads()
StatusCode FPGATrackSimEtaPatternFilterTool::filterRoads |
( |
std::vector< std::shared_ptr< const FPGATrackSimRoad >> & |
prefilter_roads, |
|
|
std::vector< std::shared_ptr< const FPGATrackSimRoad >> & |
postfilter_roads |
|
) |
| |
|
overridevirtual |
Definition at line 129 of file FPGATrackSimEtaPatternFilterTool.cxx.
132 postfilter_roads.clear();
133 for (
const auto & road : prefilter_roads)
143 std::set<EtaPattern> usedPatterns;
150 for (
unsigned working_threshold =
m_nLayers; working_threshold >=
m_threshold; working_threshold--)
154 unsigned nLayers = std::popcount(patt_bitmask.second);
155 if (nLayers >= working_threshold)
159 for (
unsigned lyr = 0; lyr <
m_nLayers; lyr++)
160 if (!(patt_bitmask.second & (1 << lyr)))
164 if (usedPatterns.count(subpatt) > 0)
continue;
190 postfilter_roads.emplace_back(std::make_shared<const FPGATrackSimRoad>(
r));
191 return StatusCode::SUCCESS;
◆ finalize()
StatusCode FPGATrackSimEtaPatternFilterTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode FPGATrackSimEtaPatternFilterTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ readPatterns()
void FPGATrackSimEtaPatternFilterTool::readPatterns |
( |
std::string const & |
filepath | ) |
|
|
private |
Definition at line 59 of file FPGATrackSimEtaPatternFilterTool.cxx.
67 throw (
"FPGATrackSimEtaPatternFilterTool couldn't open " + filepath);
75 if (
line.empty() ||
line[0] ==
'#')
continue;
76 std::istringstream sline(
line);
84 ok = ok && (sline >> tech >>
zone >>
mod);
96 throw "FPGATrackSimEtaPatternFilterTool read error";
◆ resetCounters()
void FPGATrackSimEtaPatternFilterTool::resetCounters |
( |
| ) |
|
|
private |
◆ to_string() [1/3]
std::string FPGATrackSimEtaPatternFilterTool::to_string |
( |
const EtaPattern & |
patt | ) |
const |
|
private |
◆ to_string() [2/3]
◆ to_string() [3/3]
std::string FPGATrackSimEtaPatternFilterTool::to_string |
( |
const std::vector< unsigned > & |
v | ) |
const |
|
private |
◆ operator<
Definition at line 27 of file FPGATrackSimEtaPatternFilterTool.cxx.
29 if (lhs.siTech != rhs.siTech)
return lhs.siTech < rhs.siTech;
30 if (lhs.zone != rhs.zone)
return lhs.zone < rhs.zone;
31 return lhs.etaModule < rhs.etaModule;
◆ m_doEtaPatternConsts
Gaudi::Property<bool> FPGATrackSimEtaPatternFilterTool::m_doEtaPatternConsts {this, "doEtaPatternConsts", false, "Use eta pattern IDs as part of sector definition"} |
|
private |
◆ m_dynamicThreshold
Gaudi::Property<bool> FPGATrackSimEtaPatternFilterTool::m_dynamicThreshold { this, "dynamicThreshold", false, "Stop lowering the threshold once matches have been found"} |
|
private |
◆ m_FPGATrackSimBankSvc
◆ m_FPGATrackSimMapping
◆ m_isSecondStage
Gaudi::Property<bool> FPGATrackSimEtaPatternFilterTool::m_isSecondStage {this, "isSecondStage", false, "Whether or not his this a second stage HT"} |
|
private |
◆ m_moduleHits
◆ m_nLayers
unsigned FPGATrackSimEtaPatternFilterTool::m_nLayers {} |
|
private |
◆ m_pattern_file_path
Gaudi::Property<std::string> FPGATrackSimEtaPatternFilterTool::m_pattern_file_path {this, "EtaPatterns", "", "path to pattern file"} |
|
private |
◆ m_patternmap
◆ m_postfilter_roads
std::vector<FPGATrackSimRoad> FPGATrackSimEtaPatternFilterTool::m_postfilter_roads |
|
private |
◆ m_threshold
Gaudi::Property<unsigned> FPGATrackSimEtaPatternFilterTool::m_threshold {this, "threshold", 0, "Minimum number of hit layers to fire a road"} |
|
private |
The documentation for this class was generated from the following files: