File indexing completed on 2025-01-30 10:04:50
0001
0002
0003
0004 #pragma once
0005
0006 #include <TRandomGen.h>
0007 #include <algorithms/algorithm.h>
0008 #include <edm4eic/MCRecoTrackerHitAssociationCollection.h>
0009 #include <edm4eic/RawTrackerHitCollection.h>
0010 #include <edm4hep/SimTrackerHitCollection.h>
0011 #include <functional>
0012 #include <string>
0013 #include <string_view>
0014
0015 #include "SiliconTrackerDigiConfig.h"
0016 #include "algorithms/interfaces/WithPodConfig.h"
0017
0018 namespace eicrecon {
0019
0020 using SiliconTrackerDigiAlgorithm =
0021 algorithms::Algorithm<algorithms::Input<edm4hep::SimTrackerHitCollection>,
0022 algorithms::Output<edm4eic::RawTrackerHitCollection,
0023 edm4eic::MCRecoTrackerHitAssociationCollection>>;
0024
0025 class SiliconTrackerDigi : public SiliconTrackerDigiAlgorithm,
0026 public WithPodConfig<SiliconTrackerDigiConfig> {
0027
0028 public:
0029 SiliconTrackerDigi(std::string_view name)
0030 : SiliconTrackerDigiAlgorithm{name,
0031 {"inputHitCollection"},
0032 {"outputRawHitCollection", "outputHitAssociations"},
0033 "Apply threshold, digitize within ADC range, "
0034 "convert time with smearing resolution."} {}
0035
0036 void init() final;
0037 void process(const Input&, const Output&) const final;
0038
0039 private:
0040
0041 TRandomMixMax m_random;
0042 std::function<double()> m_gauss;
0043
0044
0045
0046
0047
0048
0049 };
0050
0051 }