EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
ImagingClusterReco_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2023 Wouter Deconinck
3
4#pragma once
5
6#include <edm4eic/EDM4eicVersion.h>
10
11namespace eicrecon {
12
14 : public JOmniFactory<ImagingClusterReco_factory, ImagingClusterRecoConfig> {
15
16public:
18
19private:
20 std::unique_ptr<AlgoT> m_algo;
21
22 PodioInput<edm4eic::ProtoCluster> m_protos_input{this};
23#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
24 PodioInput<edm4eic::MCRecoCalorimeterHitLink> m_mchitlinks_input{this};
25#endif
26 PodioInput<edm4eic::MCRecoCalorimeterHitAssociation> m_mchitassocs_input{this};
27
28 PodioOutput<edm4eic::Cluster> m_clusters_output{this};
29#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
30 PodioOutput<edm4eic::MCRecoClusterParticleLink> m_links_output{this};
31#endif
32 PodioOutput<edm4eic::MCRecoClusterParticleAssociation> m_assocs_output{this};
33 PodioOutput<edm4eic::Cluster> m_layers_output{this};
34
35 ParameterRef<int> m_trackStopLayer{this, "trackStopLayer", config().trackStopLayer};
36
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_protos_input(),
49#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
50 m_mchitlinks_input(),
51#endif
52 m_mchitassocs_input()},
53 {m_clusters_output().get(),
54#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
55 m_links_output().get(),
56#endif
57 m_assocs_output().get(), m_layers_output().get()});
58 }
59};
60
61} // namespace eicrecon
Definition JOmniFactory.h:30
ImagingClusterRecoConfig & 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 ImagingClusterReco_factory.h:14
void Process(int32_t, uint64_t)
Definition ImagingClusterReco_factory.h:47
void Configure()
Definition ImagingClusterReco_factory.h:40
Definition ImagingClusterReco.h:63
-client
Definition CalorimeterClusterRecoCoG.cc:37