EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
TrackClusterMergeSplitter_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2026 Derek Anderson
3
4#pragma once
5
6#include <edm4eic/EDM4eicVersion.h>
7#include <string>
8
13
14namespace eicrecon {
15
17 : public JOmniFactory<TrackClusterMergeSplitter_factory, TrackClusterMergeSplitterConfig> {
18
19public:
22
23private:
24 // pointer to algorithm
25 std::unique_ptr<AlgoT> m_algo;
26
27 // input collections
28 PodioInput<edm4eic::TrackClusterMatch> m_track_cluster_matches_input{this};
29 PodioInput<edm4eic::Cluster> m_clusters_input{this};
30 PodioInput<edm4eic::TrackSegment> m_track_projections_input{this};
31
32 // output collections
33 PodioOutput<edm4eic::ProtoCluster> m_protoclusters_output{this};
34#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
35 PodioOutput<edm4eic::TrackProtoClusterLink> m_track_protocluster_links_output{this};
36#elif EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 4, 0)
37 PodioOutput<edm4eic::TrackProtoClusterMatch> m_track_protocluster_matches_output{this};
38#endif
39
40 // parameter bindings
41 ParameterRef<double> m_minSigCut{this, "minSigCut", config().minSigCut};
42 ParameterRef<double> m_avgEP{this, "avgEP", config().avgEP};
43 ParameterRef<double> m_sigEP{this, "sigEP", config().sigEP};
44 ParameterRef<double> m_drAdd{this, "drAdd", config().drAdd};
45 ParameterRef<uint64_t> m_surfaceToUse{this, "surfaceToUse", config().surfaceToUse};
46 ParameterRef<double> m_transverseEnergyProfileScale{this, "transverseEnergyProfileScale",
47 config().transverseEnergyProfileScale};
48
49 // services
50 Service<AlgorithmsInit_service> m_algoInitSvc{this};
51
52public:
54 void Configure() {
55 m_algo = std::make_unique<AlgoT>(GetPrefix());
56 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
57 m_algo->applyConfig(config());
58 m_algo->init();
59 }
60
62 void Process(int32_t /*run_number*/, uint64_t /*event_number*/) {
63 m_algo->process(
64 {m_track_cluster_matches_input(), m_clusters_input(), m_track_projections_input()},
65#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
66 { m_protoclusters_output().get(), m_track_protocluster_links_output().get() }
67#elif EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 4, 0)
68 { m_protoclusters_output().get(), m_track_protocluster_matches_output().get() }
69#else
70 {m_protoclusters_output().get()}
71#endif
72 );
73 }
74
75}; // end TrackClusterMergeSplitter_factory
76
77} // namespace eicrecon
Definition JOmniFactory.h:30
TrackClusterMergeSplitterConfig & config()
Retrieve reference to embedded config object.
Definition JOmniFactory.h:576
std::shared_ptr< spdlog::logger > & logger()
Retrieve reference to already-configured logger.
Definition JOmniFactory.h:573
Definition TrackClusterMergeSplitter_factory.h:17
void Process(int32_t, uint64_t)
! Primary algorithm call
Definition TrackClusterMergeSplitter_factory.h:62
void Configure()
! Configures algorithm
Definition TrackClusterMergeSplitter_factory.h:54
Track-Based Cluster Merger/Splitter.
Definition TrackClusterMergeSplitter.h:51
-client
Definition CalorimeterClusterRecoCoG.cc:37