Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-09 07:53:27

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022 - 2024, Sylvester Joosten, Wouter Deconinck, Dmitry Romanov, Christopher Dilks, Dmitry Kalinkin
0003 
0004 #pragma once
0005 
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/MCRecoParticleAssociationCollection.h>
0008 #include <edm4eic/MCRecoTrackParticleAssociationCollection.h>
0009 #include <edm4eic/ReconstructedParticleCollection.h>
0010 #include <edm4eic/TrackCollection.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 TracksToParticlesAlgorithm = algorithms::Algorithm<
0020     algorithms::Input<edm4eic::TrackCollection,
0021                       std::optional<edm4eic::MCRecoTrackParticleAssociationCollection>>,
0022     algorithms::Output<edm4eic::ReconstructedParticleCollection,
0023                        std::optional<edm4eic::MCRecoParticleAssociationCollection>>>;
0024 
0025 class TracksToParticles : public TracksToParticlesAlgorithm, public WithPodConfig<NoConfig> {
0026 public:
0027   TracksToParticles(std::string_view name)
0028       : TracksToParticlesAlgorithm{
0029             name,
0030             {"inputTracksCollection", "inputTrackAssociationsCollection"},
0031             {"outputReconstructedParticlesCollection", "outputAssociationsCollection"},
0032             "Converts track to particles with associations"} {};
0033 
0034   void init() final;
0035   void process(const Input&, const Output&) const final;
0036 };
0037 
0038 } // namespace eicrecon