EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
CalorimeterHitDigi_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2023 - 2025, Chao Peng, Sylvester Joosten, Whitney Armstrong, Wouter Deconinck, Nathan Brei, Dmitry Kalinkin
3
4#pragma once
5
6#include <edm4eic/EDM4eicVersion.h>
10
11namespace eicrecon {
12
14 : public JOmniFactory<CalorimeterHitDigi_factory, CalorimeterHitDigiConfig> {
15
16public:
18
19private:
20 std::unique_ptr<AlgoT> m_algo;
21
22 PodioInput<edm4hep::EventHeader> m_event_headers_input{this};
23 PodioInput<edm4hep::SimCalorimeterHit> m_hits_input{this};
24 PodioOutput<edm4hep::RawCalorimeterHit> m_hits_output{this};
25#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
26 PodioOutput<edm4eic::MCRecoCalorimeterHitLink> m_links_output{this};
27#endif
28 PodioOutput<edm4eic::MCRecoCalorimeterHitAssociation> m_hit_assocs_output{this};
29
30 ParameterRef<std::vector<double>> m_energyResolutions{this, "energyResolutions", config().eRes};
31 ParameterRef<double> m_timeResolution{this, "timeResolution", config().tRes};
32 ParameterRef<unsigned int> m_capADC{this, "capacityADC", config().capADC};
33 ParameterRef<double> m_dyRangeADC{this, "dynamicRangeADC", config().dyRangeADC};
34 ParameterRef<unsigned int> m_pedMeanADC{this, "pedestalMean", config().pedMeanADC};
35 ParameterRef<double> m_pedSigmaADC{this, "pedestalSigma", config().pedSigmaADC};
36 ParameterRef<double> m_resolutionTDC{this, "resolutionTDC", config().resolutionTDC};
37 ParameterRef<std::string> m_corrMeanScale{this, "scaleResponse", config().corrMeanScale};
38 ParameterRef<std::vector<std::string>> m_fields{this, "signalSumFields", config().fields};
39 ParameterRef<std::string> m_readout{this, "readoutClass", config().readout};
40 ParameterRef<std::string> m_readoutType{this, "readoutType", config().readoutType};
41 ParameterRef<double> m_lightYield{this, "lightYield", config().lightYield};
42 ParameterRef<double> m_photonDetectionEfficiency{this, "photonDetectionEfficiency",
43 config().photonDetectionEfficiency};
44 ParameterRef<unsigned long long> m_numEffectiveSipmPixels{this, "numEffectiveSipmPixels",
45 config().numEffectiveSipmPixels};
46
47 Service<AlgorithmsInit_service> m_algorithmsInit{this};
48
49public:
50 void Configure() {
51 m_algo = std::make_unique<AlgoT>(GetPrefix());
52 m_algo->level(static_cast<algorithms::LogLevel>(logger()->level()));
53 m_algo->applyConfig(config());
54 m_algo->init();
55 }
56
57 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
58 m_algo->process({m_event_headers_input(), m_hits_input()}, {m_hits_output().get(),
59#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
60 m_links_output().get(),
61#endif
62 m_hit_assocs_output().get()});
63 }
64};
65
66} // namespace eicrecon
Definition JOmniFactory.h:30
CalorimeterHitDigiConfig & 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 CalorimeterHitDigi_factory.h:14
void Configure()
Definition CalorimeterHitDigi_factory.h:50
void Process(int32_t, uint64_t)
Definition CalorimeterHitDigi_factory.h:57
Definition CalorimeterHitDigi.h:47
-client
Definition CalorimeterClusterRecoCoG.cc:37