Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-06-30 08:34:28

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2024 Daniel Brandenburg
0003 
0004 #pragma once
0005 
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/MCRecoParticleAssociationCollection.h>
0008 #include <edm4eic/ReconstructedParticleCollection.h>
0009 #include <edm4hep/MCParticleCollection.h>
0010 #include <string>
0011 #include <string_view>
0012 
0013 #include "algorithms/interfaces/ParticleSvc.h"
0014 
0015 namespace eicrecon {
0016 
0017 using ScatteredElectronsTruthAlgorithm = algorithms::Algorithm<
0018     algorithms::Input<edm4hep::MCParticleCollection, edm4eic::ReconstructedParticleCollection,
0019                       edm4eic::MCRecoParticleAssociationCollection>,
0020     algorithms::Output<edm4eic::ReconstructedParticleCollection>>;
0021 
0022 class ScatteredElectronsTruth : public ScatteredElectronsTruthAlgorithm {
0023 
0024 public:
0025   ScatteredElectronsTruth(std::string_view name)
0026       : ScatteredElectronsTruthAlgorithm{name,
0027                                          {"MCParticles", "inputParticles", "inputAssociations"},
0028                                          {"ReconstructedParticles"},
0029                                          "Output a list of possible scattered electrons using "
0030                                          "truth MC Particle associations."} {}
0031 
0032   void init() final;
0033   void process(const Input&, const Output&) const final;
0034 
0035 private:
0036   const algorithms::ParticleSvc& m_particleSvc = algorithms::ParticleSvc::instance();
0037 };
0038 
0039 } // namespace eicrecon