EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
CalorimeterHitReco_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2023 Wouter Deconinck
3
4#pragma once
5
9
10namespace eicrecon {
11
13 : public JOmniFactory<CalorimeterHitReco_factory, CalorimeterHitRecoConfig> {
14
15private:
16public:
18
19private:
20 std::unique_ptr<AlgoT> m_algo;
21
22 PodioInput<edm4hep::RawCalorimeterHit> m_raw_hits_input{this};
23 PodioOutput<edm4eic::CalorimeterHit> m_rec_hits_output{this};
24
25 ParameterRef<unsigned int> m_capADC{this, "capacityADC", config().capADC};
26 ParameterRef<double> m_dyRangeADC{this, "dynamicRangeADC", config().dyRangeADC};
27 ParameterRef<unsigned int> m_pedMeanADC{this, "pedestalMean", config().pedMeanADC};
28 ParameterRef<double> m_pedSigmaADC{this, "pedestalSigma", config().pedSigmaADC};
29 ParameterRef<double> m_resolutionTDC{this, "resolutionTDC", config().resolutionTDC};
30 ParameterRef<double> m_thresholdFactor{this, "thresholdFactor", config().thresholdFactor};
31 ParameterRef<double> m_thresholdValue{this, "thresholdValue", config().thresholdValue};
32 ParameterRef<std::string> m_samplingFraction{this, "samplingFraction", config().sampFrac};
33 ParameterRef<std::string> m_readout{this, "readout", config().readout};
34 ParameterRef<std::string> m_layerField{this, "layerField", config().layerField};
35 ParameterRef<std::string> m_sectorField{this, "sectorField", config().sectorField};
36 ParameterRef<std::string> m_localDetElement{this, "localDetElement", config().localDetElement};
37 ParameterRef<std::vector<std::string>> m_localDetFields{this, "localDetFields",
38 config().localDetFields};
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_raw_hits_input()}, {m_rec_hits_output().get()});
52 }
53};
54
55} // namespace eicrecon
Definition JOmniFactory.h:30
CalorimeterHitRecoConfig & 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 CalorimeterHitReco_factory.h:13
void Process(int32_t, uint64_t)
Definition CalorimeterHitReco_factory.h:50
void Configure()
Definition CalorimeterHitReco_factory.h:43
Definition CalorimeterHitReco.h:37
-client
Definition CalorimeterClusterRecoCoG.cc:37