EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
SiliconTrackerDigi_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<SiliconTrackerDigi_factory, SiliconTrackerDigiConfig> {
15
16public:
18
19private:
20 std::unique_ptr<AlgoT> m_algo;
21
22 PodioInput<edm4hep::EventHeader> m_event_headers_input{this};
23 PodioInput<edm4hep::SimTrackerHit> m_sim_hits_input{this};
24
25 PodioOutput<edm4eic::RawTrackerHit> m_raw_hits_output{this};
26#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
27 PodioOutput<edm4eic::MCRecoTrackerHitLink> m_links_output{this};
28#endif
29 PodioOutput<edm4eic::MCRecoTrackerHitAssociation> m_assoc_output{this};
30
31 ParameterRef<double> m_threshold{this, "threshold", config().threshold};
32 ParameterRef<double> m_timeResolution{this, "timeResolution", config().timeResolution};
33
34public:
35 void Configure() {
36 m_algo = std::make_unique<AlgoT>(GetPrefix());
37 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
38 m_algo->applyConfig(config());
39 m_algo->init();
40 }
41
42 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
43 m_algo->process({m_event_headers_input(), m_sim_hits_input()}, {m_raw_hits_output().get(),
44#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
45 m_links_output().get(),
46#endif
47 m_assoc_output().get()});
48 }
49};
50
51} // namespace eicrecon
Definition JOmniFactory.h:30
SiliconTrackerDigiConfig & 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 SiliconTrackerDigi_factory.h:14
void Configure()
Definition SiliconTrackerDigi_factory.h:35
void Process(int32_t, uint64_t)
Definition SiliconTrackerDigi_factory.h:42
Definition SiliconTrackerDigi.h:34
-client
Definition CalorimeterClusterRecoCoG.cc:37