#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
◆ FPGATrackSimEtaPatternFilterTool()
FPGATrackSimEtaPatternFilterTool::FPGATrackSimEtaPatternFilterTool |
( |
const std::string & |
algname, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
ifc |
|
) |
| |
◆ addHitsToMap()
Definition at line 213 of file FPGATrackSimEtaPatternFilterTool.cxx.
215 for (
unsigned lyr = 0; lyr <
m_nLayers; lyr++)
216 for (
auto & hit :
r->getHits(lyr))
219 ModuleId
mod = { hit->getDetType(), hit->getDetectorZone(), (
int)(hit->getEtaModule()) };
222 itr->second.addHit(hit);
224 ATH_MSG_ERROR(
"Module not in map: " << hit->getDetType() <<
" " << hit->getDetectorZone() <<
" " <<
static_cast<int>(hit->getEtaModule()) );
227 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 235 of file FPGATrackSimEtaPatternFilterTool.cxx.
237 usedPatterns.insert(currPatt);
239 std::vector<unsigned> allowmissing(nExtra, 0);
244 for (
auto h : allowmissing)
246 usedPatterns.insert(subpatt);
249 done = (nExtra == 0);
250 for (
unsigned i = 0;
i < nExtra;
i++)
256 done = (
i==nExtra-1);
◆ buildMap()
void FPGATrackSimEtaPatternFilterTool::buildMap |
( |
| ) |
|
|
private |
◆ buildRoad()
Definition at line 266 of file FPGATrackSimEtaPatternFilterTool.cxx.
271 r.setHitLayers(patt.second);
272 r.setEtaPatternID(etaPatternID);
273 for (
unsigned lyr = 0; lyr <
m_nLayers; lyr++) {
276 std::vector<std::shared_ptr<const FPGATrackSimHit> >(
278 if (
r.getNHits_layer().at(lyr) == 0) {
279 std::shared_ptr<FPGATrackSimHit> wcHit = std::make_shared<FPGATrackSimHit>();
283 r.setHits(lyr, std::vector<std::shared_ptr<const FPGATrackSimHit>>{wcHit});
293 r.setSectorBin(sectorbin);
294 std::vector<module_t> modules;
295 for (
unsigned int il = 0;
il <
r.getNLayers();
il++) {
296 if (
r.getNHits_layer()[
il] == 0) {
297 modules.push_back(-1);
299 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 138 of file FPGATrackSimEtaPatternFilterTool.cxx.
141 postfilter_roads.clear();
142 for (
const auto & road : prefilter_roads)
152 std::set<EtaPattern> usedPatterns;
159 for (
unsigned working_threshold =
m_nLayers; working_threshold >=
m_threshold; working_threshold--)
163 unsigned nLayers = __builtin_popcount(patt_bitmask.second);
164 if (nLayers >= working_threshold)
168 for (
unsigned lyr = 0; lyr <
m_nLayers; lyr++)
169 if (!(patt_bitmask.second & (1 << lyr)))
173 if (usedPatterns.count(subpatt) > 0)
continue;
199 postfilter_roads.emplace_back(std::make_shared<const FPGATrackSimRoad>(
r));
200 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 68 of file FPGATrackSimEtaPatternFilterTool.cxx.
76 throw (
"FPGATrackSimEtaPatternFilterTool couldn't open " + filepath);
84 if (
line.empty() ||
line[0] ==
'#')
continue;
85 std::istringstream sline(
line);
93 ok = ok && (sline >> tech >>
zone >>
mod);
105 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 26 of file FPGATrackSimEtaPatternFilterTool.cxx.
28 if (lhs.siTech != rhs.siTech)
return lhs.siTech < rhs.siTech;
29 if (lhs.zone != rhs.zone)
return lhs.zone < rhs.zone;
30 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: