File indexing completed on 2025-12-18 10:23:14
0001
0002
0003
0004
0005 #pragma once
0006
0007 #include <JANA/JEventSource.h>
0008 #include <random>
0009
0010 class RandomHitSource : public JEventSource {
0011
0012 Parameter<int> m_seed {this, "seed", 0, "Random seed"};
0013 Parameter<uint32_t> m_event_width_ns {this, "event_width", 20, "Event width [ns]"};
0014 Parameter<uint32_t> m_expected_clusters_per_event {this, "expected_clusters_per_event", 10, "Expected clusters per event"};
0015 Parameter<int> m_cell_cols {this, "cell_cols", 20, "Number of columns in the detector"};
0016 Parameter<int> m_cell_rows {this, "cell_rows", 10, "Number of rows in the detector"};
0017
0018 uint32_t m_event_start_timestamp_ns = 0;
0019 std::mt19937 m_rng;
0020
0021 public:
0022
0023 RandomHitSource();
0024 virtual ~RandomHitSource() = default;
0025
0026 void Init() override;
0027 Result Emit(JEvent&) override;
0028
0029 static std::string GetDescription();
0030 };
0031