File indexing completed on 2025-09-18 08:17:45
0001
0002
0003
0004
0005
0006 #pragma once
0007
0008 #include <DD4hep/Detector.h>
0009 #include <DDRec/CellIDPositionConverter.h>
0010 #include <algorithms/algorithm.h>
0011 #include <algorithms/geo.h>
0012 #include <edm4eic/ReconstructedParticleCollection.h>
0013 #include <edm4eic/TrackerHitCollection.h>
0014 #include <edm4hep/MCParticleCollection.h>
0015 #include <gsl/pointers>
0016 #include <string>
0017 #include <string_view>
0018
0019 #include "MatrixTransferStaticConfig.h"
0020 #include "algorithms/interfaces/WithPodConfig.h"
0021
0022 namespace eicrecon {
0023
0024 using MatrixTransferStaticAlgorithm = algorithms::Algorithm<
0025 algorithms::Input<edm4hep::MCParticleCollection, edm4eic::TrackerHitCollection>,
0026 algorithms::Output<edm4eic::ReconstructedParticleCollection>>;
0027
0028 class MatrixTransferStatic : public MatrixTransferStaticAlgorithm,
0029 public WithPodConfig<MatrixTransferStaticConfig> {
0030
0031 public:
0032 MatrixTransferStatic(std::string_view name)
0033 : MatrixTransferStaticAlgorithm{name,
0034 {"mcParticles", "inputHitCollection"},
0035 {"outputParticleCollection"},
0036 "Apply matrix method reconstruction to hits."} {}
0037
0038 void init() final;
0039 void process(const Input&, const Output&) const final;
0040
0041 private:
0042 const dd4hep::Detector* m_detector{algorithms::GeoSvc::instance().detector()};
0043 const dd4hep::rec::CellIDPositionConverter* m_converter{
0044 algorithms::GeoSvc::instance().cellIDPositionConverter()};
0045 };
0046 }