EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
PIDLookup.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2024, Nathan Brei, Dmitry Kalinkin
3
4#pragma once
5
6#include <DD4hep/Detector.h>
7#include <algorithms/algorithm.h>
8#include <algorithms/geo.h>
9#include <edm4eic/MCRecoParticleAssociationCollection.h>
10#include <edm4eic/EDM4eicVersion.h>
11#include <edm4eic/ReconstructedParticleCollection.h>
12#include <edm4hep/EventHeaderCollection.h>
13#include <edm4hep/ParticleIDCollection.h>
14#include <stdint.h>
15#include <gsl/pointers>
16#include <string>
17#include <string_view>
18
19#include "PIDLookupConfig.h"
24
25#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
26#include <edm4eic/MCRecoParticleLinkCollection.h>
27#endif
28
29namespace eicrecon {
30
31using PIDLookupAlgorithm = algorithms::Algorithm<
32 algorithms::Input<edm4hep::EventHeaderCollection, edm4eic::ReconstructedParticleCollection,
33 edm4eic::MCRecoParticleAssociationCollection>,
34 algorithms::Output<edm4eic::ReconstructedParticleCollection,
35#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
36 edm4eic::MCRecoParticleLinkCollection,
37#endif
38 edm4eic::MCRecoParticleAssociationCollection,
39 edm4hep::ParticleIDCollection>>;
40
41class PIDLookup : public PIDLookupAlgorithm, public WithPodConfig<PIDLookupConfig> {
42
43public:
44 PIDLookup(std::string_view name)
46 name,
47 {"eventHeader", "inputParticlesCollection", "inputParticleAssociationsCollection"},
48 {"outputParticlesCollection",
49#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
50 "outputParticleLinks",
51#endif
52 "outputParticleAssociationsCollection", "outputParticleIDCollection"},
53 ""} {
54 }
55
56 void init() final;
57 void process(const Input&, const Output&) const final;
58
59private:
60 int32_t m_system;
61 const algorithms::UniqueIDGenSvc& m_uid = algorithms::UniqueIDGenSvc::instance();
62 const algorithms::ParticleSvc& m_particleSvc = algorithms::ParticleSvc::instance();
63 const dd4hep::Detector* m_detector{algorithms::GeoSvc::instance().detector()};
64 const PIDLookupTable* m_lut;
65};
66
67} // namespace eicrecon
Definition PIDLookup.h:41
PIDLookup(std::string_view name)
Definition PIDLookup.h:44
Definition WithPodConfig.h:22
Definition ActsSvc.h:11
Definition ActsGeometryProvider.h:28
-client
Definition CalorimeterClusterRecoCoG.cc:37
algorithms::Algorithm< algorithms::Input< edm4hep::EventHeaderCollection, edm4eic::ReconstructedParticleCollection, edm4eic::MCRecoParticleAssociationCollection >, algorithms::Output< edm4eic::ReconstructedParticleCollection, edm4eic::MCRecoParticleLinkCollection, edm4eic::MCRecoParticleAssociationCollection, edm4hep::ParticleIDCollection > > PIDLookupAlgorithm
Definition PIDLookup.h:39