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