Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 08:17:45

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022, 2023 Alex Jentsch, Wouter Deconinck, Sylvester Joosten, David Lawrence, Simon Gardner
0003 //
0004 // This converted from: https://eicweb.phy.anl.gov/EIC/juggler/-/blob/master/JugReco/src/components/FarForwardParticles.cpp
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 } // namespace eicrecon