EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
ClustersToParticles_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2026 ePIC Collaboration
3
4#pragma once
5
10
11namespace eicrecon {
12
14 : public JOmniFactory<ClustersToParticles_factory, ClustersToParticlesConfig> {
15public:
17
18private:
19 // algorithm
20 std::unique_ptr<AlgoT> m_algo;
21
22 // input collections
23 PodioInput<edm4eic::Cluster> m_clusters_in{this};
24 PodioInput<edm4eic::MCRecoClusterParticleAssociation> m_cluster_assocs_in{this};
25
26 // output collections
27 PodioOutput<edm4eic::ReconstructedParticle> m_parts_out{this};
28#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
29 PodioOutput<edm4eic::MCRecoParticleLink> m_part_links_out{this};
30#endif
31 PodioOutput<edm4eic::MCRecoParticleAssociation> m_part_assocs_out{this};
32
33 // parameters
34 ParameterRef<int> m_pdgCode{this, "pdgCode", config().pdgCode};
35
36 // services
37 Service<AlgorithmsInit_service> m_algorithmsInit{this};
38
39public:
40 void Configure() {
41 m_algo = std::make_unique<AlgoT>(GetPrefix());
42 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
43 m_algo->applyConfig(config());
44 m_algo->init();
45 }
46
47 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
48 m_algo->process({m_clusters_in(), m_cluster_assocs_in()}, {m_parts_out().get(),
49#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
50 m_part_links_out().get(),
51#endif
52 m_part_assocs_out().get()});
53 }
54};
55
56} // namespace eicrecon
Definition JOmniFactory.h:30
ClustersToParticlesConfig & 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 ClustersToParticles_factory.h:14
void Process(int32_t, uint64_t)
Definition ClustersToParticles_factory.h:47
void Configure()
Definition ClustersToParticles_factory.h:40
Definition ClustersToParticles.h:35
-client
Definition CalorimeterClusterRecoCoG.cc:37