File indexing completed on 2025-07-06 07:55:43
0001
0002
0003
0004 #pragma once
0005
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/ReconstructedParticleCollection.h>
0008 #include <edm4eic/TensorCollection.h>
0009 #include <edm4hep/MCParticleCollection.h>
0010 #include <mutex>
0011 #include <optional>
0012 #include <string>
0013 #include <string_view>
0014
0015 #include "algorithms/fardetectors/FarDetectorTransportationPostMLConfig.h"
0016 #include "algorithms/interfaces/WithPodConfig.h"
0017
0018 namespace eicrecon {
0019
0020 using FarDetectorTransportationPostMLAlgorithm = algorithms::Algorithm<
0021 algorithms::Input<edm4eic::TensorCollection, std::optional<edm4hep::MCParticleCollection>>,
0022 algorithms::Output<edm4eic::ReconstructedParticleCollection>>;
0023
0024 class FarDetectorTransportationPostML
0025 : public FarDetectorTransportationPostMLAlgorithm,
0026 public WithPodConfig<FarDetectorTransportationPostMLConfig> {
0027
0028 public:
0029 FarDetectorTransportationPostML(std::string_view name)
0030 : FarDetectorTransportationPostMLAlgorithm{
0031 name,
0032 {"inputPredictionsTensor"},
0033 {"outputParticles"},
0034 "Convert ML output tensor into reconstructed electron"} {}
0035
0036 void init() final;
0037 void process(const Input&, const Output&) const final;
0038
0039 private:
0040 mutable float m_beamE = 10.0;
0041 mutable std::once_flag m_initBeamE;
0042 };
0043
0044 }