Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-13 10:09:35

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 #include "algorithms/interfaces/WithPodConfig.h"
0020 
0021 namespace eicrecon {
0022 
0023 using MergeTracksAlgorithm =
0024     algorithms::Algorithm<algorithms::Input<std::vector<const edm4eic::TrackSegmentCollection>>,
0025                           algorithms::Output<edm4eic::TrackSegmentCollection>>;
0026 
0027 class MergeTracks : public MergeTracksAlgorithm, public WithPodConfig<NoConfig> {
0028 
0029 public:
0030   MergeTracks(std::string_view name)
0031       : MergeTracksAlgorithm{name,
0032                              {"inputTrackSegments"},
0033                              {"outputTrackSegments"},
0034                              "Effectively 'zip' the input track segments."} {}
0035 
0036   void init() final {};
0037   void process(const Input&, const Output&) const final;
0038 };
0039 } // namespace eicrecon