Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-05 08:15:19

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,
0025             std::shared_ptr<spdlog::logger>& logger);
0026 
0027   /// Processes RawTrackerHit and produces a TrackerHit
0028   std::unique_ptr<edm4eic::TrackerHitCollection>
0029   process(const edm4eic::RawTrackerHitCollection& raw_hits);
0030 
0031   /// Set a configuration
0032   eicrecon::TrackerHitReconstructionConfig&
0033   applyConfig(eicrecon::TrackerHitReconstructionConfig& cfg) {
0034     m_cfg = cfg;
0035     return m_cfg;
0036   }
0037 
0038 private:
0039   /** algorithm logger */
0040   std::shared_ptr<spdlog::logger> m_log;
0041 
0042   /// Cell ID position converter
0043   const dd4hep::rec::CellIDPositionConverter* m_converter;
0044 };
0045 } // namespace eicrecon