Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-10-16 05:06:32

0001 #include "RecoHGCal/TICL/interface/TracksterLinkingAlgoBase.h"
0002 #include "RecoHGCal/TICL/plugins/TracksterLinkingRecovery.h"
0003 
0004 using namespace ticl;
0005 
0006 void TracksterLinkingRecovery::linkTracksters(
0007     const Inputs& input,
0008     std::vector<Trackster>& resultTracksters,
0009     std::vector<std::vector<unsigned int>>& linkedResultTracksters,
0010     std::vector<std::vector<unsigned int>>& linkedTracksterIdToInputTracksterId) {
0011   resultTracksters.reserve(input.tracksters.size());
0012   linkedResultTracksters.resize(input.tracksters.size());
0013   linkedTracksterIdToInputTracksterId.resize(input.tracksters.size());
0014   // Merge all trackster collections into a single collection
0015   for (size_t i = 0; i < input.tracksters.size(); ++i) {
0016     resultTracksters.push_back(input.tracksters[i]);
0017     linkedResultTracksters[i].push_back(resultTracksters.size() - 1);
0018     linkedTracksterIdToInputTracksterId[i].push_back(resultTracksters.size() - 1);
0019   }
0020 }