File indexing completed on 2025-09-13 08:17:07
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include <algorithms/algorithm.h>
0010 #include <edm4eic/EDM4eicVersion.h>
0011 #include <edm4hep/EventHeaderCollection.h>
0012 #if EDM4EIC_VERSION_MAJOR > 8 || (EDM4EIC_VERSION_MAJOR == 8 && EDM4EIC_VERSION_MINOR >= 1)
0013 #include <edm4eic/SimPulseCollection.h>
0014 #else
0015 #include <edm4hep/TimeSeriesCollection.h>
0016 #endif
0017 #include <string>
0018 #include <string_view>
0019
0020 #include "algorithms/digi/PulseNoiseConfig.h"
0021 #include "algorithms/interfaces/UniqueIDGenSvc.h"
0022 #include "algorithms/interfaces/WithPodConfig.h"
0023
0024 namespace eicrecon {
0025
0026 #if EDM4EIC_VERSION_MAJOR > 8 || (EDM4EIC_VERSION_MAJOR == 8 && EDM4EIC_VERSION_MINOR >= 1)
0027 using PulseType = edm4eic::SimPulse;
0028 #else
0029 using PulseType = edm4hep::TimeSeries;
0030 #endif
0031
0032 using PulseNoiseAlgorithm = algorithms::Algorithm<
0033 algorithms::Input<edm4hep::EventHeaderCollection, PulseType::collection_type>,
0034 algorithms::Output<PulseType::collection_type>>;
0035
0036 class PulseNoise : public PulseNoiseAlgorithm, public WithPodConfig<PulseNoiseConfig> {
0037
0038 public:
0039 PulseNoise(std::string_view name)
0040 : PulseNoiseAlgorithm{name, {"RawHits"}, {"OutputPulses"}, {}} {}
0041 virtual void init() final;
0042 void process(const Input&, const Output&) const;
0043
0044 private:
0045 const algorithms::UniqueIDGenSvc& m_uid = algorithms::UniqueIDGenSvc::instance();
0046 };
0047
0048 }