Skip to content
Snippets Groups Projects
Commit 369fecc4 authored by brusale's avatar brusale
Browse files

add cached position for hits

parent 1f6bc7e7
Branches sample-generation
No related tags found
No related merge requests found
......@@ -75,6 +75,8 @@ private:
std::vector<std::vector<SimTrack>> simTracks_;
std::vector<std::vector<SimVertex>> simVertices_;
std::unordered_map<uint32_t, std::pair<float, float>> cached_position_;
template <typename T>
std::vector<std::vector<T>> fillVector(const char *treeName,
const char *branchName, std::shared_ptr<TFile> file,
......
......@@ -179,6 +179,8 @@ void DataLoader::fillHitsSoA() {
hitsSoA_[i].time[j] = hitsTime[i][j];
hitsSoA_[i].fraction[j] = 0.f;
hitsSoA_[i].id[j] = hitsId[i][j];
cached_position_.emplace(hitsId[i][j], std::make_pair(hitsPos_x[i][j], hitsPos_y[i][j]));
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment