EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
TrackClusterMatch_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2025 Tristan Protzman
3
4#pragma once
5
6#include <spdlog/logger.h>
8
12
13namespace eicrecon {
15 : public JOmniFactory<TrackClusterMatch_factory, TrackClusterMatchConfig> {
16private:
17 // Underlying algorithm
18 std::unique_ptr<eicrecon::TrackClusterMatch> m_algo;
19
20 // Declare inputs
21 PodioInput<edm4eic::TrackSegment> m_tracks{this};
22 PodioInput<edm4eic::Cluster> m_clusters{this};
23
24 // Declare outputs
25 PodioOutput<edm4eic::TrackClusterMatch> m_matched_particles{this};
26
27 // Declare parameters
28 ParameterRef<double> m_matching_distance{this, "matchingDistance", config().matching_distance};
29
30public:
31 void Configure() {
32 m_algo = std::make_unique<eicrecon::TrackClusterMatch>(GetPrefix());
33 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
34 m_algo->applyConfig(config());
35 m_algo->init();
36 }
37
38 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
39 m_algo->process({m_tracks(), m_clusters()}, {m_matched_particles().get()});
40 }
41};
42} // namespace eicrecon
Definition JOmniFactory.h:30
TrackClusterMatchConfig & 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
std::string GetPrefix()
Definition JOmniFactory.h:570
Definition TrackClusterMatch_factory.h:15
void Configure()
Definition TrackClusterMatch_factory.h:31
void Process(int32_t, uint64_t)
Definition TrackClusterMatch_factory.h:38
-client
Definition CalorimeterClusterRecoCoG.cc:37