Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:27:58

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022 - 2025 Whitney Armstrong, Wouter Deconinck, Sylvester Joosten, Dmitry Romanov, Yann Bedfer
0003 
0004 #pragma once
0005 
0006 #include <DD4hep/Detector.h>
0007 #include <DD4hep/Segmentations.h>
0008 #include <algorithms/algorithm.h>
0009 #include <edm4eic/MCRecoTrackerHitAssociationCollection.h>
0010 #include <edm4eic/RawTrackerHitCollection.h>
0011 #include <edm4hep/EventHeaderCollection.h>
0012 #include <edm4hep/SimTrackerHitCollection.h>
0013 #include <string>
0014 #include <string_view>
0015 
0016 #include "MPGDTrackerDigiConfig.h"
0017 #include "algorithms/interfaces/UniqueIDGenSvc.h"
0018 #include "algorithms/interfaces/WithPodConfig.h"
0019 
0020 namespace eicrecon {
0021 
0022 using MPGDTrackerDigiAlgorithm = algorithms::Algorithm<
0023     algorithms::Input<edm4hep::EventHeaderCollection, edm4hep::SimTrackerHitCollection>,
0024     algorithms::Output<edm4eic::RawTrackerHitCollection,
0025                        edm4eic::MCRecoTrackerHitAssociationCollection>>;
0026 
0027 class MPGDTrackerDigi : public MPGDTrackerDigiAlgorithm,
0028                         public WithPodConfig<MPGDTrackerDigiConfig> {
0029 
0030 public:
0031   MPGDTrackerDigi(std::string_view name)
0032       : MPGDTrackerDigiAlgorithm{
0033             name,
0034             {"eventHeaderCollection", "inputHitCollection"},
0035             {"outputRawHitCollection", "outputHitAssociations"},
0036             "2D-strip segmentation, apply threshold, digitize within ADC range, "
0037             "convert time with smearing resolution."} {}
0038 
0039   void init() final;
0040   void process(const Input&, const Output&) const final;
0041 
0042 private:
0043   const algorithms::UniqueIDGenSvc& m_uid = algorithms::UniqueIDGenSvc::instance();
0044 
0045   /** Segmentation */
0046   const dd4hep::Detector* m_detector{nullptr};
0047   dd4hep::Segmentation m_seg;
0048 };
0049 
0050 } // namespace eicrecon