6#include <algorithms/algorithm.h>
7#include <edm4eic/CalorimeterHit.h>
8#include <edm4eic/ClusterCollection.h>
9#include <edm4eic/EDM4eicVersion.h>
10#include <edm4eic/ProtoClusterCollection.h>
11#include <edm4eic/TrackClusterMatchCollection.h>
12#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
13#include <edm4eic/TrackProtoClusterLinkCollection.h>
14#elif EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 4, 0)
15#include <edm4eic/TrackProtoClusterMatchCollection.h>
17#include <edm4eic/TrackSegmentCollection.h>
31 algorithms::Input<edm4eic::TrackClusterMatchCollection, edm4eic::ClusterCollection,
32 edm4eic::TrackSegmentCollection>,
33#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
34 algorithms::Output<edm4eic::ProtoClusterCollection, edm4eic::TrackProtoClusterLinkCollection>>;
35#elif EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 4, 0)
36 algorithms::Output<edm4eic::ProtoClusterCollection, edm4eic::TrackProtoClusterMatchCollection>>;
38 algorithms::Output<edm4eic::ProtoClusterCollection>>;
58 {
"InputTrackClusterMatches",
"InputClusterCollection",
"InputTrackProjections"},
59#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
60 {
"OutputProtoClusterCollection",
"OutputTrackProtoClusterLinks"},
61#elif EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 4, 0)
62 {
"OutputProtoClusterCollection",
"OutputTrackProtoClusterMatches"},
64 {
"OutputProtoClusterCollection"},
66 "Merges or splits clusters based on tracks matched to them."} {
69 void process(
const Input&,
const Output&)
const final;
73 using segment_vector = std::vector<edm4eic::TrackSegment>;
76 using protocluster_vector = std::vector<edm4eic::MutableProtoCluster>;
79 using cluster_vector = std::vector<edm4eic::Cluster>;
82 using hit_to_weight_map =
83 std::map<edm4eic::CalorimeterHit, double, CompareObjectID<edm4eic::CalorimeterHit>>;
85 void merge_and_split_clusters(
const cluster_vector& to_merge,
const segment_vector& to_split,
86 protocluster_vector& new_protos)
const;
87 static void add_cluster_to_proto(
const edm4eic::Cluster& clust,
88 edm4eic::MutableProtoCluster& proto,
89 std::optional<hit_to_weight_map> split_weights = std::nullopt);
Track-Based Cluster Merger/Splitter.
Definition TrackClusterMergeSplitter.h:51
TrackClusterMergeSplitter(std::string_view name)
! Algorithm constructor
Definition TrackClusterMergeSplitter.h:55
Definition WithPodConfig.h:22
-client
Definition CalorimeterClusterRecoCoG.cc:37
algorithms::Algorithm< algorithms::Input< edm4eic::TrackClusterMatchCollection, edm4eic::ClusterCollection, edm4eic::TrackSegmentCollection >, algorithms::Output< edm4eic::ProtoClusterCollection, edm4eic::TrackProtoClusterLinkCollection > > TrackClusterMergeSplitterAlgorithm
Definition TrackClusterMergeSplitter.h:34