EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
LGADHitCalibration_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2025 Chun Yuen Tsang
3
4#pragma once
5
9
10namespace eicrecon {
11
13 : public JOmniFactory<LGADHitCalibration_factory, LGADHitCalibrationConfig> {
14private:
15 std::unique_ptr<eicrecon::LGADHitCalibration> m_algo;
16
17 PodioInput<edm4eic::RawTrackerHit> m_raw_hits_input{this};
18 PodioOutput<edm4eic::TrackerHit> m_rec_hits_output{this};
19
20 ParameterRef<double> m_c_slope{this, "cSlope", config().c_slope};
21 ParameterRef<double> m_c_intercept{this, "cIntercept", config().c_intercept};
22 ParameterRef<double> m_t_slope{this, "tSlope", config().t_slope};
23 ParameterRef<double> m_t_intercept{this, "tIntercept", config().t_intercept};
24
25public:
26 void Configure() {
27 m_algo = std::make_unique<eicrecon::LGADHitCalibration>(GetPrefix());
28 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
29 m_algo->applyConfig(config());
30 m_algo->init();
31 }
32
33 void ChangeRun(int32_t /* run_number */) {}
34
35 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
36 m_algo->process({m_raw_hits_input()}, {m_rec_hits_output().get()});
37 }
38};
39
40} // namespace eicrecon
Definition JOmniFactory.h:30
LGADHitCalibrationConfig & 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 LGADHitCalibration_factory.h:13
void Configure()
Definition LGADHitCalibration_factory.h:26
void Process(int32_t, uint64_t)
Definition LGADHitCalibration_factory.h:35
void ChangeRun(int32_t)
Definition LGADHitCalibration_factory.h:33
-client
Definition CalorimeterClusterRecoCoG.cc:37