EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
TracksToParticles_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
7#include <edm4eic/MCRecoParticleAssociation.h>
8#include <edm4eic/EDM4eicVersion.h>
9#include <edm4eic/ReconstructedParticle.h>
10#include <edm4eic/Track.h>
11#include <edm4hep/MCParticleCollection.h>
12#include <edm4hep/ParticleID.h>
13#include <memory>
14
15namespace eicrecon {
16
17class TracksToParticles_factory : public JOmniFactory<TracksToParticles_factory, NoConfig> {
18public:
20
21private:
22 std::unique_ptr<AlgoT> m_algo;
23
24 PodioInput<edm4eic::Track> m_tracks_input{this};
25 PodioInput<edm4eic::MCRecoTrackParticleAssociation> m_trackassocs_input{this};
26 PodioOutput<edm4eic::ReconstructedParticle> m_recoparticles_output{this};
27#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
28 PodioOutput<edm4eic::MCRecoParticleLink> m_recolinks_output{this};
29#endif
30 PodioOutput<edm4eic::MCRecoParticleAssociation> m_recoassocs_output{this};
31
32public:
33 void Configure() {
34 m_algo = std::make_unique<AlgoT>(this->GetPrefix());
35 m_algo->level((algorithms::LogLevel)logger()->level());
36 m_algo->applyConfig(config());
37 m_algo->init();
38 };
39
40 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
41 m_algo->process({m_tracks_input(), m_trackassocs_input()}, {m_recoparticles_output().get(),
42#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
43 m_recolinks_output().get(),
44#endif
45 m_recoassocs_output().get()});
46 }
47};
48
49} // namespace eicrecon
Definition JOmniFactory.h:30
NoConfig & 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 TracksToParticles_factory.h:17
void Configure()
Definition TracksToParticles_factory.h:33
void Process(int32_t, uint64_t)
Definition TracksToParticles_factory.h:40
Definition TracksToParticles.h:33
-client
Definition CalorimeterClusterRecoCoG.cc:37