EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
MatchToRICHPID_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright 2024, Dmitry Kalinkin
3
4#pragma once
5
8#include <edm4eic/CherenkovParticleID.h>
9#include <edm4eic/EDM4eicVersion.h>
10#include <edm4eic/ReconstructedParticle.h>
11#include <edm4eic/MCRecoParticleAssociation.h>
12#include <edm4hep/ParticleID.h>
13#include <memory>
14
15namespace eicrecon {
16
17class MatchToRICHPID_factory : public JOmniFactory<MatchToRICHPID_factory, MatchToRICHPIDConfig> {
18public:
20
21private:
22 std::unique_ptr<AlgoT> m_algo;
23
24 PodioInput<edm4eic::ReconstructedParticle> m_recoparticles_input{this};
25 PodioInput<edm4eic::MCRecoParticleAssociation> m_assocs_input{this};
26 PodioInput<edm4eic::CherenkovParticleID> m_cherenkov_particle_ids_input{this};
27 PodioOutput<edm4eic::ReconstructedParticle> m_recoparticles_output{this};
28#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
29 PodioOutput<edm4eic::MCRecoParticleLink> m_links_output{this};
30#endif
31 PodioOutput<edm4eic::MCRecoParticleAssociation> m_assocs_output{this};
32 PodioOutput<edm4hep::ParticleID> m_pids_output{this};
33
34public:
35 void Configure() {
36 m_algo = std::make_unique<AlgoT>(this->GetPrefix());
37 m_algo->level((algorithms::LogLevel)logger()->level());
38 m_algo->applyConfig(config());
39 m_algo->init();
40 };
41
42 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
43 m_algo->process({m_recoparticles_input(), m_assocs_input(), m_cherenkov_particle_ids_input()},
44 {m_recoparticles_output().get(),
45#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
46 m_links_output().get(),
47#endif
48 m_assocs_output().get(), m_pids_output().get()});
49 }
50};
51
52} // namespace eicrecon
Definition JOmniFactory.h:30
MatchToRICHPIDConfig & 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
std::string GetPrefix()
Definition JOmniFactory.h:570
Definition MatchToRICHPID_factory.h:17
void Configure()
Definition MatchToRICHPID_factory.h:35
void Process(int32_t, uint64_t)
Definition MatchToRICHPID_factory.h:42
Definition MatchToRICHPID.h:35
-client
Definition CalorimeterClusterRecoCoG.cc:37