Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:02:58

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 #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<
0024       edm4hep::MCParticleCollection,
0025       edm4eic::TrackerHitCollection
0026     >,
0027     algorithms::Output<
0028       edm4eic::ReconstructedParticleCollection
0029     >
0030   >;
0031 
0032   class MatrixTransferStatic
0033   : public MatrixTransferStaticAlgorithm,
0034     public WithPodConfig<MatrixTransferStaticConfig> {
0035 
0036   public:
0037     MatrixTransferStatic(std::string_view name)
0038       : MatrixTransferStaticAlgorithm{name,
0039                             {"mcParticles", "inputHitCollection"},
0040                             {"outputParticleCollection"},
0041                             "Apply matrix method reconstruction to hits."} {}
0042 
0043     void init() final;
0044     void process(const Input&, const Output&) const final;
0045 
0046   private:
0047     const dd4hep::Detector* m_detector{algorithms::GeoSvc::instance().detector()};
0048     const dd4hep::rec::CellIDPositionConverter* m_converter{algorithms::GeoSvc::instance().cellIDPositionConverter()};
0049 
0050   };
0051 }