EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
FarDetectorTransportationPostML_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
6#include <edm4eic/EDM4eicVersion.h>
10
11namespace eicrecon {
12
14 : public JOmniFactory<FarDetectorTransportationPostML_factory,
15 FarDetectorTransportationPostMLConfig> {
16
17public:
19
20private:
21 std::unique_ptr<AlgoT> m_algo;
22
23 PodioInput<edm4eic::Tensor> m_prediction_tensor_input{this};
24 PodioInput<edm4eic::MCRecoTrackParticleAssociation> m_association_input{this};
25 PodioInput<edm4hep::MCParticle> m_beamelectrons_input{this};
26
27 PodioOutput<edm4eic::ReconstructedParticle> m_particle_output{this};
28#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
29 PodioOutput<edm4eic::MCRecoParticleLink> m_links_output{this};
30#endif
31 PodioOutput<edm4eic::MCRecoParticleAssociation> m_association_output{this};
32
33 ParameterRef<float> m_beamE{this, "beamE", config().beamE};
34 ParameterRef<bool> m_requireBeamElectron{this, "requireBeamElectron",
35 config().requireBeamElectron};
36 ParameterRef<int> m_pdg_value{
37 this, "pdgValue", config().pdg_value,
38 "PDG value for the particle type to identify (default is electron)"};
39
40 Service<AlgorithmsInit_service> m_algorithmsInit{this};
41
42public:
43 void Configure() {
44 m_algo = std::make_unique<AlgoT>(GetPrefix());
45 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
46 m_algo->applyConfig(config());
47 m_algo->init();
48 }
49
50 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
51 m_algo->process({m_prediction_tensor_input(), m_association_input(), m_beamelectrons_input()},
52 {m_particle_output().get(),
53#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
54 m_links_output().get(),
55#endif
56 m_association_output().get()});
57 }
58};
59
60} // namespace eicrecon
Definition JOmniFactory.h:30
FarDetectorTransportationPostMLConfig & 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 FarDetectorTransportationPostML_factory.h:15
void Configure()
Definition FarDetectorTransportationPostML_factory.h:43
void Process(int32_t, uint64_t)
Definition FarDetectorTransportationPostML_factory.h:50
Definition FarDetectorTransportationPostML.h:39
-client
Definition CalorimeterClusterRecoCoG.cc:37