EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
JetReconstruction_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2024 Zhongling Ji, Derek Anderson
3
4#pragma once
5
6#include <string>
10
11namespace eicrecon {
12
13template <typename InputT>
15 : public JOmniFactory<JetReconstruction_factory<InputT>, JetReconstructionConfig> {
16
17public:
18 // algorithm to run
21
22private:
23 std::unique_ptr<Algo> m_algo;
24
25 // input collections
26 typename FactoryT::template PodioInput<edm4hep::EventHeader> m_event_header_input{this};
27 typename FactoryT::template PodioInput<InputT> m_input{this};
28
29 // output collection
30#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 9, 0)
31 typename FactoryT::template PodioOutput<edm4eic::Jet> m_output{this};
32#else
33 typename FactoryT::template PodioOutput<edm4eic::ReconstructedParticle> m_output{this};
34#endif
35
36 // parameter bindings
37 typename FactoryT::template ParameterRef<float> m_rJet{this, "rJet", FactoryT::config().rJet};
38 typename FactoryT::template ParameterRef<float> m_pJet{this, "pJet", FactoryT::config().pJet};
39 typename FactoryT::template ParameterRef<double> m_minCstPt{this, "minCstPt",
40 FactoryT::config().minCstPt};
41 typename FactoryT::template ParameterRef<double> m_maxCstPt{this, "maxCstPt",
42 FactoryT::config().maxCstPt};
43 typename FactoryT::template ParameterRef<double> m_minJetPt{this, "minJetPt",
44 FactoryT::config().minJetPt};
45 typename FactoryT::template ParameterRef<double> m_ghostMaxRap{this, "ghostMaxRap",
46 FactoryT::config().ghostMaxRap};
47 typename FactoryT::template ParameterRef<double> m_ghostArea{this, "ghostArea",
48 FactoryT::config().ghostArea};
49 typename FactoryT::template ParameterRef<int> m_numGhostRepeat{this, "numGhostRepeat",
50 FactoryT::config().numGhostRepeat};
51 typename FactoryT::template ParameterRef<std::string> m_jetAlgo{this, "jetAlgo",
52 FactoryT::config().jetAlgo};
53 typename FactoryT::template ParameterRef<std::string> m_recombScheme{
54 this, "recombScheme", FactoryT::config().recombScheme};
55 typename FactoryT::template ParameterRef<std::string> m_areaType{this, "areaType",
56 FactoryT::config().areaType};
57
58public:
59 void Configure() {
60 m_algo = std::make_unique<Algo>(this->GetPrefix());
61 m_algo->level(static_cast<algorithms::LogLevel>(this->logger()->level()));
62 m_algo->applyConfig(FactoryT::config());
63 m_algo->init();
64 }
65
66 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
67 m_algo->process({m_event_header_input(), m_input()}, {m_output().get()});
68 }
69
70}; // end JetReconstruction_factory definition
71
72} // namespace eicrecon
Definition JOmniFactory.h:30
JetReconstructionConfig & 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 JetReconstruction_factory.h:15
void Configure()
Definition JetReconstruction_factory.h:59
void Process(int32_t, uint64_t)
Definition JetReconstruction_factory.h:66
Definition JetReconstruction.h:42
-client
Definition CalorimeterClusterRecoCoG.cc:37
Definition JetReconstructionConfig.h:11
float rJet
Definition JetReconstructionConfig.h:13