EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
CALOROCDigitization_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2025 Minho Kim
3
4#pragma once
5
9
10namespace eicrecon {
11
13 : public JOmniFactory<CALOROCDigitization_factory, CALOROCDigitizationConfig> {
14
15public:
17
18private:
19 std::unique_ptr<AlgoT> m_algo;
20
21 PodioInput<edm4eic::SimPulse> m_pulse_input{this};
22 PodioOutput<edm4eic::RawCALOROCHit> m_digi_output{this};
23
24 ParameterRef<double> m_time_window{this, "timeWindow", config().time_window};
25 ParameterRef<double> m_adc_phase{this, "adcPhase", config().adc_phase};
26 ParameterRef<double> m_toa_thres{this, "toaThres", config().toa_thres};
27 ParameterRef<double> m_tot_thres{this, "totThres", config().tot_thres};
28 ParameterRef<unsigned int> m_capADC{this, "capADC", config().capADC};
29 ParameterRef<double> m_dyRangeSingleGainADC{this, "dyRangeSingleGainADC",
30 config().dyRangeSingleGainADC};
31 ParameterRef<double> m_dyRangeHighGainADC{this, "dyRangeHighGainADC",
32 config().dyRangeHighGainADC};
33 ParameterRef<double> m_dyRangeLowGainADC{this, "dyRangeLowGainADC", config().dyRangeLowGainADC};
34 ParameterRef<unsigned int> m_capTOA{this, "capTOA", config().capTOA};
35 ParameterRef<double> m_dyRangeTOA{this, "dyRangeTOA", config().dyRangeTOA};
36 ParameterRef<unsigned int> m_capTOT{this, "capTOT", config().capTOT};
37 ParameterRef<double> m_dyRangeTOT{this, "dyRangeTOT", config().dyRangeTOT};
38
39 Service<AlgorithmsInit_service> m_algorithmsInit{this};
40
41public:
42 void Configure() {
43 m_algo = std::make_unique<AlgoT>(GetPrefix());
44 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
45 m_algo->applyConfig(config());
46 m_algo->init();
47 }
48
49 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
50 m_algo->process({m_pulse_input()}, {m_digi_output().get()});
51 }
52};
53} // namespace eicrecon
Definition JOmniFactory.h:30
CALOROCDigitizationConfig & 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 CALOROCDigitization_factory.h:13
void Configure()
Definition CALOROCDigitization_factory.h:42
void Process(int32_t, uint64_t)
Definition CALOROCDigitization_factory.h:49
Definition CALOROCDigitization.h:22
-client
Definition CalorimeterClusterRecoCoG.cc:37