EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
PulseNoise.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2025 Simon Gardner
3//
4// Adds noise to a time series pulse
5//
6
7#pragma once
8
9#include <algorithms/algorithm.h>
10#include <edm4eic/EDM4eicVersion.h>
11#include <edm4hep/EventHeaderCollection.h>
12#if EDM4EIC_VERSION_MAJOR > 8 || (EDM4EIC_VERSION_MAJOR == 8 && EDM4EIC_VERSION_MINOR >= 1)
13#include <edm4eic/SimPulseCollection.h>
14#else
15#include <edm4hep/TimeSeriesCollection.h>
16#endif
17#include <string>
18#include <string_view>
19
23
24namespace eicrecon {
25
26#if EDM4EIC_VERSION_MAJOR > 8 || (EDM4EIC_VERSION_MAJOR == 8 && EDM4EIC_VERSION_MINOR >= 1)
27using PulseType = edm4eic::SimPulse;
28#else
29using PulseType = edm4hep::TimeSeries;
30#endif
31
32using PulseNoiseAlgorithm = algorithms::Algorithm<
33 algorithms::Input<edm4hep::EventHeaderCollection, PulseType::collection_type>,
34 algorithms::Output<PulseType::collection_type>>;
35
36class PulseNoise : public PulseNoiseAlgorithm, public WithPodConfig<PulseNoiseConfig> {
37
38public:
39 PulseNoise(std::string_view name)
40 : PulseNoiseAlgorithm{name, {"RawHits"}, {"OutputPulses"}, {}} {}
41 virtual void init() final;
42 void process(const Input&, const Output&) const;
43
44private:
45 const algorithms::UniqueIDGenSvc& m_uid = algorithms::UniqueIDGenSvc::instance();
46};
47
48} // namespace eicrecon
Definition PulseNoise.h:36
PulseNoise(std::string_view name)
Definition PulseNoise.h:39
Definition WithPodConfig.h:22
edm4hep::TimeSeries PulseType
Definition digi_PulseGeneration.cc:29
Definition ActsSvc.h:11
-client
Definition CalorimeterClusterRecoCoG.cc:37
algorithms::Algorithm< algorithms::Input< edm4hep::EventHeaderCollection, PulseType::collection_type >, algorithms::Output< PulseType::collection_type > > PulseNoiseAlgorithm
Definition PulseNoise.h:34