Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:03:01

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022 Whitney Armstrong, Sylvester Joosten, Wouter Deconinck, Dmitry Romanov
0003 
0004 #pragma once
0005 
0006 #include <DDRec/CellIDPositionConverter.h>
0007 #include <edm4eic/RawTrackerHitCollection.h>
0008 #include <edm4eic/TrackerHitCollection.h>
0009 #include <spdlog/logger.h>
0010 #include <memory>
0011 
0012 #include "TrackerHitReconstructionConfig.h"
0013 #include "algorithms/interfaces/WithPodConfig.h"
0014 
0015 namespace eicrecon {
0016 
0017     /**
0018      * Produces edm4eic::TrackerHit with geometric info from edm4eic::RawTrackerHit
0019      */
0020     class TrackerHitReconstruction : public WithPodConfig<TrackerHitReconstructionConfig> {
0021 
0022     public:
0023         /// Once in a lifetime initialization
0024         void init(const dd4hep::rec::CellIDPositionConverter* converter, std::shared_ptr<spdlog::logger>& logger);
0025 
0026         /// Processes RawTrackerHit and produces a TrackerHit
0027         std::unique_ptr<edm4eic::TrackerHitCollection> process(const edm4eic::RawTrackerHitCollection& raw_hits);
0028 
0029         /// Set a configuration
0030         eicrecon::TrackerHitReconstructionConfig& applyConfig(eicrecon::TrackerHitReconstructionConfig& cfg) {m_cfg = cfg; return m_cfg;}
0031 
0032     private:
0033         /** algorithm logger */
0034         std::shared_ptr<spdlog::logger> m_log;
0035 
0036         /// Cell ID position converter
0037         const dd4hep::rec::CellIDPositionConverter* m_converter;
0038     };
0039 }