Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-11 07:53:34

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2024 Dmitry Kalinkin
0003 
0004 #pragma once
0005 
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/ClusterCollection.h>
0008 #include <edm4eic/MCRecoClusterParticleAssociationCollection.h>
0009 #include <edm4eic/TensorCollection.h>
0010 #include <edm4hep/ParticleIDCollection.h>
0011 #include <optional>
0012 #include <string>
0013 #include <string_view>
0014 
0015 #include "algorithms/interfaces/WithPodConfig.h"
0016 
0017 namespace eicrecon {
0018 
0019 using CalorimeterParticleIDPostMLAlgorithm = algorithms::Algorithm<
0020     algorithms::Input<edm4eic::ClusterCollection,
0021                       std::optional<edm4eic::MCRecoClusterParticleAssociationCollection>,
0022                       edm4eic::TensorCollection>,
0023     algorithms::Output<edm4eic::ClusterCollection,
0024                        std::optional<edm4eic::MCRecoClusterParticleAssociationCollection>,
0025                        edm4hep::ParticleIDCollection>>;
0026 
0027 class CalorimeterParticleIDPostML : public CalorimeterParticleIDPostMLAlgorithm,
0028                                     public WithPodConfig<NoConfig> {
0029 
0030 public:
0031   CalorimeterParticleIDPostML(std::string_view name)
0032       : CalorimeterParticleIDPostMLAlgorithm{
0033             name,
0034             {"inputClusters", "inputClusterAssociations", "inputPredictionsTensor"},
0035             {"outputClusters", "outputClusterAssociations", "outputParticleIDs"},
0036             ""} {}
0037 
0038   void init() final;
0039   void process(const Input&, const Output&) const final;
0040 };
0041 
0042 } // namespace eicrecon