Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:03:02

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 
0005 #pragma once
0006 
0007 #include <algorithms/algorithm.h>
0008 #include <edm4eic/MCRecoParticleAssociationCollection.h>
0009 #include <edm4eic/MCRecoTrackParticleAssociationCollection.h>
0010 #include <edm4eic/ReconstructedParticleCollection.h>
0011 #include <edm4eic/TrackCollection.h>
0012 #include <optional>
0013 #include <string>
0014 #include <string_view>
0015 
0016 #include "algorithms/interfaces/WithPodConfig.h"
0017 
0018 
0019 namespace eicrecon {
0020 
0021 using TracksToParticlesAlgorithm =
0022     algorithms::Algorithm<
0023       algorithms::Input<
0024         edm4eic::TrackCollection,
0025         std::optional<edm4eic::MCRecoTrackParticleAssociationCollection>
0026       >,
0027       algorithms::Output<
0028         edm4eic::ReconstructedParticleCollection,
0029         std::optional<edm4eic::MCRecoParticleAssociationCollection>
0030       >
0031     >;
0032 
0033 class TracksToParticles : public TracksToParticlesAlgorithm, public WithPodConfig<NoConfig> {
0034 public:
0035 
0036     TracksToParticles(std::string_view name) : TracksToParticlesAlgorithm{name, {"inputTracksCollection", "inputTrackAssociationsCollection"}, {"outputReconstructedParticlesCollection", "outputAssociationsCollection"}, "Converts track to particles with associations"} {};
0037 
0038     void init() final;
0039     void process(const Input&, const Output&) const final;
0040 
0041 };
0042 
0043 }