EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
FarDetectorTransportationPostML.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2024 - 2025 Simon Gardner
3
4#pragma once
5
6#include <algorithms/algorithm.h>
7#include <edm4eic/ReconstructedParticleCollection.h>
8#include <edm4eic/EDM4eicVersion.h>
9#include <edm4eic/MCRecoParticleAssociationCollection.h>
10#include <edm4eic/MCRecoTrackParticleAssociationCollection.h>
11#include <edm4eic/TensorCollection.h>
12#include <edm4hep/MCParticleCollection.h>
13#include <mutex>
14#include <optional>
15#include <string>
16#include <string_view>
17
20
21#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
22#include <edm4eic/MCRecoParticleLinkCollection.h>
23#endif
24
25namespace eicrecon {
26
27using FarDetectorTransportationPostMLAlgorithm = algorithms::Algorithm<
28 algorithms::Input<edm4eic::TensorCollection,
29 std::optional<edm4eic::MCRecoTrackParticleAssociationCollection>,
30 std::optional<edm4hep::MCParticleCollection>>,
31 algorithms::Output<edm4eic::ReconstructedParticleCollection,
32#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
33 edm4eic::MCRecoParticleLinkCollection,
34#endif
35 edm4eic::MCRecoParticleAssociationCollection>>;
36
39 public WithPodConfig<FarDetectorTransportationPostMLConfig> {
40
41public:
42 FarDetectorTransportationPostML(std::string_view name)
44 name,
45 {"inputPredictionsTensor", "trackAssociations", "beamElectrons"},
46 {"outputParticles",
47#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
48 "outputLinks",
49#endif
50 "outputAssociations"},
51 "Convert ML output tensor into reconstructed electron"} {
52 }
53
54 void init() final;
55 void process(const Input&, const Output&) const final;
56
57private:
58 double m_mass = 0.000511; // Default to electron mass in GeV
59 float m_charge = -1.0; // Default to electron charge
60 mutable float m_beamE = 10.0;
61 mutable std::once_flag m_initBeamE;
62};
63
64} // namespace eicrecon
Definition FarDetectorTransportationPostML.h:39
FarDetectorTransportationPostML(std::string_view name)
Definition FarDetectorTransportationPostML.h:42
Definition WithPodConfig.h:22
-client
Definition CalorimeterClusterRecoCoG.cc:37
algorithms::Algorithm< algorithms::Input< edm4eic::TensorCollection, std::optional< edm4eic::MCRecoTrackParticleAssociationCollection >, std::optional< edm4hep::MCParticleCollection > >, algorithms::Output< edm4eic::ReconstructedParticleCollection, edm4eic::MCRecoParticleLinkCollection, edm4eic::MCRecoParticleAssociationCollection > > FarDetectorTransportationPostMLAlgorithm
Definition FarDetectorTransportationPostML.h:35
Definition SimCalorimeterHitProcessor.cc:35