EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
ScatteredElectronsEMinusPz_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2024 Daniel Brandenburg
3
4#pragma once
5
6#include <JANA/JEvent.h>
7#include <memory>
8#include <string>
9#include <utility>
10#include <vector>
11
15
16namespace eicrecon {
17
19 : public JOmniFactory<ScatteredElectronsEMinusPz_factory, ScatteredElectronsEMinusPzConfig> {
20
21public:
23
24private:
25 std::unique_ptr<AlgoT> m_algo;
26
27 PodioInput<edm4eic::ReconstructedParticle> m_rc_particles_input{this};
28 PodioInput<edm4eic::ReconstructedParticle> m_rc_electrons_input{this};
29
30 // Declare outputs
31 PodioOutput<edm4eic::ReconstructedParticle> m_out_reco_particles{this};
32
33 // Declare parameters
34 ParameterRef<float> m_min_e_minus_pz{this, "minEMinusPz", config().minEMinusPz};
35 ParameterRef<float> m_max_e_minus_pz{this, "maxEMinusPz", config().maxEMinusPz};
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_rc_particles_input(), m_rc_electrons_input()},
49 {m_out_reco_particles().get()});
50 }
51};
52
53} // namespace eicrecon
Definition JOmniFactory.h:30
ScatteredElectronsEMinusPzConfig & 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 ScatteredElectronsEMinusPz_factory.h:19
void Process(int32_t, uint64_t)
Definition ScatteredElectronsEMinusPz_factory.h:47
void Configure()
Definition ScatteredElectronsEMinusPz_factory.h:40
Definition ScatteredElectronsEMinusPz.h:23
-client
Definition CalorimeterClusterRecoCoG.cc:37