Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-29 07:05:56

0001 // Copyright 2023, Christopher Dilks
0002 // Subject to the terms in the LICENSE file found in the top-level directory.
0003 
0004 // merge together TrackSegments, sorting their TrackPoints by time
0005 /* FIXME: only VectorMember `points` is combined, which is all that is needed
0006  * for the RICH detectors. If using this algorithm for any other purpose, you
0007  * may want to combine the other members and relations in `TrackSegment`.
0008  */
0009 
0010 #pragma once
0011 
0012 // data model
0013 #include <algorithms/algorithm.h>
0014 #include <edm4eic/TrackSegmentCollection.h>
0015 #include <string>
0016 #include <string_view>
0017 #include <vector>
0018 
0019 namespace eicrecon {
0020 
0021 using MergeTracksAlgorithm =
0022     algorithms::Algorithm<algorithms::Input<std::vector<const edm4eic::TrackSegmentCollection>>,
0023                           algorithms::Output<edm4eic::TrackSegmentCollection>>;
0024 
0025 class MergeTracks : public MergeTracksAlgorithm {
0026 
0027 public:
0028   MergeTracks(std::string_view name)
0029       : MergeTracksAlgorithm{name,
0030                              {"inputTrackSegments"},
0031                              {"outputTrackSegments"},
0032                              "Effectively 'zip' the input track segments."} {}
0033 
0034   void init() final{};
0035   void process(const Input&, const Output&) const final;
0036 };
0037 } // namespace eicrecon