File indexing completed on 2025-07-06 08:34:50
0001
0002
0003
0004 #pragma once
0005 #include <DD4hep/Detector.h>
0006 #include <algorithms/algorithm.h>
0007 #include <algorithms/geo.h>
0008 #include <edm4eic/ReconstructedParticleCollection.h>
0009 #include <spdlog/logger.h>
0010 #include <gsl/pointers>
0011 #include <memory>
0012 #include <string> // for basic_string
0013 #include <string_view> // for string_view
0014
0015 #include "algorithms/interfaces/ParticleSvc.h"
0016 #include "algorithms/interfaces/WithPodConfig.h"
0017 #include "algorithms/reco/FarForwardLambdaReconstructionConfig.h"
0018
0019 namespace eicrecon {
0020
0021 using FarForwardLambdaReconstructionAlgorithm = algorithms::Algorithm<
0022 algorithms::Input<const edm4eic::ReconstructedParticleCollection>,
0023
0024 algorithms::Output<edm4eic::ReconstructedParticleCollection,
0025 edm4eic::ReconstructedParticleCollection>>;
0026 class FarForwardLambdaReconstruction : public FarForwardLambdaReconstructionAlgorithm,
0027 public WithPodConfig<FarForwardLambdaReconstructionConfig> {
0028 public:
0029 FarForwardLambdaReconstruction(std::string_view name)
0030 : FarForwardLambdaReconstructionAlgorithm{
0031 name,
0032 {"inputNeutrals"},
0033 {"outputLambdas", "outputLambdaDecayProductsCM"},
0034 "Reconstructs lambda candidates and their decay products (in the CM frame) from the "
0035 "reconstructed neutrons and photons"} {}
0036
0037 void init() final;
0038 void process(const Input&, const Output&) const final;
0039
0040 private:
0041 std::shared_ptr<spdlog::logger> m_log;
0042 const algorithms::ParticleSvc& m_particleSvc = algorithms::ParticleSvc::instance();
0043 const dd4hep::Detector* m_detector{algorithms::GeoSvc::instance().detector()};
0044 double m_zMax{0};
0045 };
0046 }