EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
FarDetectorTransportationPreML_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2024 - 2025, Simon Gardner
3
4#pragma once
5
9
10namespace eicrecon {
11
13 : public JOmniFactory<FarDetectorTransportationPreML_factory,
14 FarDetectorTransportationPreMLConfig> {
15
16public:
18
19private:
20 std::unique_ptr<AlgoT> m_algo;
21
22 PodioInput<edm4eic::Track> m_track_input{this};
23 PodioInput<edm4eic::MCRecoTrackParticleAssociation> m_association_input{this};
24 PodioInput<edm4hep::MCParticle> m_beamelectrons_input{this};
25
26 PodioOutput<edm4eic::Tensor> m_feature_tensor_output{this};
27 PodioOutput<edm4eic::Tensor> m_target_tensor_output{this};
28
29 ParameterRef<float> m_beamE{this, "beamE", config().beamE};
30 ParameterRef<bool> m_requireBeamElectron{this, "requireBeamElectron",
31 config().requireBeamElectron};
32
33public:
34 void Configure() {
35 m_algo = std::make_unique<AlgoT>(GetPrefix());
36 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
37 m_algo->applyConfig(config());
38 m_algo->init();
39 }
40
41 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
42 m_algo->process({m_track_input(), m_association_input(), m_beamelectrons_input()},
43 {m_feature_tensor_output().get(), m_target_tensor_output().get()});
44 }
45};
46
47} // namespace eicrecon
Definition JOmniFactory.h:30
FarDetectorTransportationPreMLConfig & 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 FarDetectorTransportationPreML_factory.h:14
void Configure()
Definition FarDetectorTransportationPreML_factory.h:34
void Process(int32_t, uint64_t)
Definition FarDetectorTransportationPreML_factory.h:41
Definition FarDetectorTransportationPreML.h:28
-client
Definition CalorimeterClusterRecoCoG.cc:37