** Warning **

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=lxr_eic at /usr/local/share/lxr/lxr-2.3.7/lib/LXR/Common.pm line 1161, <GEN5503> line 1.

Last-Modified: Mon, 27 Jul 2025 09:03:12 GMT Content-Type: text/html; charset=utf-8 /master/EICrecon/src/algorithms/reco/MC2ReconstructedParticle.h
Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-27 07:54:08

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022 - 2025 Sylvester Joosten, Whitney Armstrong, Wouter Deconinck, Dmitry Romanov
0003 
0004 #pragma once
0005 
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/ReconstructedParticleCollection.h>
0008 #include <edm4hep/MCParticleCollection.h>
0009 #include <spdlog/logger.h>
0010 #include <memory>
0011 
0012 #include "algorithms/interfaces/WithPodConfig.h"
0013 
0014 namespace eicrecon {
0015 
0016 using MC2ReconstructedParticleAlgorithm =
0017     algorithms::Algorithm<algorithms::Input<edm4hep::MCParticleCollection>,
0018                           algorithms::Output<edm4eic::ReconstructedParticleCollection>>;
0019 
0020 /**
0021   * Converts edm4hep::MCParticle to edm4eic::ReconstructedParticle
0022   */
0023 class MC2ReconstructedParticle : public MC2ReconstructedParticleAlgorithm,
0024                                  public WithPodConfig<NoConfig> {
0025 public:
0026   MC2ReconstructedParticle(std::string_view name)
0027       : MC2ReconstructedParticleAlgorithm{name,
0028                                           {"inputMCParticles"},
0029                                           {"outputReconstructedParticles"},
0030                                           "Convert truth MC particles into reconstructed particles,"
0031                                           "optionally applying momentum smearing."} {}
0032 
0033   /** Initialized algorithms with required data. Init function is assumed to be called once **/
0034   void init() final;
0035 
0036   /** process function convert one data type to another **/
0037   void process(const Input&, const Output&) const final;
0038 };
0039 
0040 } // namespace eicrecon