22 const std::string &
name,
const IInterface *ifc)
30 return StatusCode::SUCCESS;
34 std::vector<FPGATrackSimTrack> &tracks,
40 for (
auto iroad : roads) {
42 double y = iroad->getY();
45 int sector = iroad->getSector();
48 return StatusCode::SUCCESS;
73 std::vector<std::vector<int>> combs =
77 for (
size_t icomb = 0; icomb < combs.size(); icomb++) {
80 std::vector<int>
const &hit_indices = combs[icomb];
81 std::vector<const FPGATrackSimHit *> hit_list;
87 if (hit_indices[
layer] >= 0) {
91 hit_list.push_back(hit);
96 std::sort(hit_list.begin(), hit_list.end(),
98 double rho1 = std::hypot(hit1->getX(), hit1->getY());
99 double rho2 = std::hypot(hit2->getX(), hit2->getY());
104 std::map<std::string, std::map<std::string, double>> valMap;
105 std::map<std::string, std::map<std::string, std::vector<double>>>
109 for (
int i = 1;
i <= 8;
i++) {
110 TString indexStr = Form(
"%d",
i);
111 valMap[
"dNN"][(
"hitX" + indexStr).
Data()] = 0;
112 valMap[
"dNN"][(
"hitY" + indexStr).
Data()] = 0;
113 valMap[
"dNN"][(
"hitZ" + indexStr).
Data()] = 0;
118 double rotateAngle = 0;
121 for (
const auto &hit : hit_list) {
124 double x0 = hit->getX();
125 double y0 = hit->getY();
126 double z0 = hit->getZ();
142 TString indexStr = Form(
"%d",
index);
143 valMap[
"dNN"][(
"hitX" + indexStr).
Data()] = xf /
getXScale();
144 valMap[
"dNN"][(
"hitY" + indexStr).
Data()] = yf /
getYScale();
150 std::shared_ptr<lwt::LightweightGraph> lwnn_map = nnMap->
getNNMap();
151 auto scoreMap = lwnn_map->compute(valMap, vectorMap);
152 float nn_val = scoreMap.at(
"NNScore");
162 for (
const auto &ihit : hit_list) {
163 unsigned int layer = ihit->getLayer();
174 tracks.push_back(track_cand);
185 return StatusCode::SUCCESS;
190 std::vector<FPGATrackSimMultiTruth> mtv;
197 if (
layer <
t.getFPGATrackSimHits().size())
198 mtv.push_back(
t.getFPGATrackSimHits().at(
layer).getTruth());
202 mtv.back().assign_equal_normalization();
212 const bool ok = mt.
best(tbarcode, tfrac);
214 t.setEventIndex(tbarcode.first);
215 t.setBarcode(tbarcode.second);
216 t.setBarcodeFrac(tfrac);