Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-04 08:02:14

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2024-2025 Simon Gardner, Chun Yuen Tsang, Prithwish Tribedy
0003 //
0004 // Convert energy deposition into analog pulses
0005 
0006 #pragma once
0007 
0008 #include <algorithms/algorithm.h>
0009 #include <edm4eic/unit_system.h>
0010 #include <edm4hep/SimTrackerHitCollection.h>
0011 #include <edm4hep/TimeSeriesCollection.h>
0012 #include <memory>
0013 #include <string>
0014 #include <string_view>
0015 
0016 #include "algorithms/digi/SiliconPulseGenerationConfig.h"
0017 #include "algorithms/interfaces/WithPodConfig.h"
0018 
0019 namespace eicrecon {
0020 
0021 class SignalPulse;
0022 
0023 using SiliconPulseGenerationAlgorithm =
0024     algorithms::Algorithm<algorithms::Input<edm4hep::SimTrackerHitCollection>,
0025                           algorithms::Output<edm4hep::TimeSeriesCollection>>;
0026 
0027 class SiliconPulseGeneration : public SiliconPulseGenerationAlgorithm,
0028                                public WithPodConfig<SiliconPulseGenerationConfig> {
0029 
0030 public:
0031   SiliconPulseGeneration(std::string_view name)
0032       : SiliconPulseGenerationAlgorithm{name, {"RawHits"}, {"OutputPulses"}, {}} {}
0033   void init() final;
0034   void process(const Input&, const Output&) const final;
0035 
0036 private:
0037 
0038   std::shared_ptr<SignalPulse> m_pulse;
0039   float m_min_sampling_time = 0 * edm4eic::unit::ns;
0040 
0041 };
0042 
0043 } // namespace eicrecon