Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-28 07:48:20

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022 Whitney Armstrong, Wouter Deconinck, Sylvester Joosten, Dmitry Romanov
0003 
0004 #pragma once
0005 
0006 #include <algorithms/algorithm.h>
0007 #include <edm4eic/EDM4eicVersion.h>
0008 #include <edm4eic/MCRecoTrackerHitAssociationCollection.h>
0009 #include <edm4eic/RawTrackerHitCollection.h>
0010 #include <edm4hep/EventHeaderCollection.h>
0011 #include <edm4hep/SimTrackerHitCollection.h>
0012 #include <string>
0013 #include <string_view>
0014 
0015 #include "SiliconTrackerDigiConfig.h"
0016 #include "algorithms/interfaces/UniqueIDGenSvc.h"
0017 #include "algorithms/interfaces/WithPodConfig.h"
0018 
0019 #if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
0020 #include <edm4eic/MCRecoTrackerHitLinkCollection.h>
0021 #endif
0022 
0023 namespace eicrecon {
0024 
0025 using SiliconTrackerDigiAlgorithm = algorithms::Algorithm<
0026     algorithms::Input<edm4hep::EventHeaderCollection, edm4hep::SimTrackerHitCollection>,
0027     algorithms::Output<edm4eic::RawTrackerHitCollection,
0028 #if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
0029                        edm4eic::MCRecoTrackerHitLinkCollection,
0030 #endif
0031                        edm4eic::MCRecoTrackerHitAssociationCollection>>;
0032 
0033 class SiliconTrackerDigi : public SiliconTrackerDigiAlgorithm,
0034                            public WithPodConfig<SiliconTrackerDigiConfig> {
0035 
0036 public:
0037   SiliconTrackerDigi(std::string_view name)
0038       : SiliconTrackerDigiAlgorithm{name,
0039                                     {"eventHeaderCollection", "inputHitCollection"},
0040                                     {"outputRawHitCollection",
0041 #if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8, 7, 0)
0042                                      "outputHitLinks",
0043 #endif
0044                                      "outputHitAssociations"},
0045                                     "Apply threshold, digitize within ADC range, "
0046                                     "convert time with smearing resolution."} {
0047   }
0048 
0049   void init() final;
0050   void process(const Input&, const Output&) const final;
0051 
0052 private:
0053   const algorithms::UniqueIDGenSvc& m_uid = algorithms::UniqueIDGenSvc::instance();
0054 };
0055 
0056 } // namespace eicrecon