EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
PulseCombiner.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// Convert energy deposition into ADC pulses
5// ADC pulses are assumed to follow the shape of landau function
6
7#pragma once
8
9#include <algorithms/algorithm.h>
10#include <edm4eic/EDM4eicVersion.h>
11#include <cstdint>
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#include <vector>
20
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
33 algorithms::Algorithm<algorithms::Input<PulseType::collection_type>,
34 algorithms::Output<PulseType::collection_type>>;
35
36class PulseCombiner : public PulseCombinerAlgorithm, public WithPodConfig<PulseCombinerConfig> {
37
38public:
39 PulseCombiner(std::string_view name)
40 : PulseCombinerAlgorithm{name, {"InputPulses"}, {"OutputPulses"}, {}} {}
41 virtual void init() final;
42 void process(const Input&, const Output&) const final;
43
44private:
45 std::vector<std::vector<PulseType>> clusterPulses(const std::vector<PulseType> pulses) const;
46 static std::vector<float> sumPulses(const std::vector<PulseType> pulses);
47 uint64_t m_detector_bitmask = 0xFFFFFFFFFFFFFFFF;
48};
49
50} // namespace eicrecon
Definition PulseCombiner.h:36
PulseCombiner(std::string_view name)
Definition PulseCombiner.h:39
Definition WithPodConfig.h:22
edm4hep::TimeSeries PulseType
Definition digi_PulseGeneration.cc:29
-client
Definition CalorimeterClusterRecoCoG.cc:37
algorithms::Algorithm< algorithms::Input< PulseType::collection_type >, algorithms::Output< PulseType::collection_type > > PulseCombinerAlgorithm
Definition PulseCombiner.h:34
edm4hep::TimeSeries PulseType
Definition PulseCombiner.h:29
Definition SimCalorimeterHitProcessor.cc:35