25 const std::vector<const Trk::SpacePoint*>& spacepoints,
26 std::vector<std::vector<uint32_t> >& tracks,
27 std::unordered_map<
int, std::unordered_map<int, float>>* )
const {
28 int64_t numSpacepoints = (int64_t)spacepoints.size();
29 std::vector<float> inputValues;
30 std::vector<uint32_t> spacepointIDs;
34 for (
const auto&
sp : spacepoints) {
38 for (
int i = 0; i < spacepointFeatures; i++){
41 inputValues.push_back((
float)sp_idx);
50 inputData[
"FEATURES"] = std::make_pair(
51 std::vector<int64_t>{numSpacepoints, spacepointFeatures}, std::move(inputValues));
54 outputData[
"LABELS"] = std::make_pair(std::vector<int64_t>{numSpacepoints, 1}, std::vector<int64_t>{});
58 auto& trackLabels = std::get<std::vector<int64_t>>(outputData[
"LABELS"].second);
59 if (trackLabels.size() == 0){
61 return StatusCode::SUCCESS;
65 std::vector<uint32_t> this_track;
66 for (
auto label : trackLabels) {
68 if (this_track.size() > 0) {
69 tracks.push_back(this_track);
73 this_track.push_back(
label);
77 return StatusCode::SUCCESS;