DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TAMakerHorizontalMuonAlgorithm.hpp
Go to the documentation of this file.
1
9#ifndef TRIGGERALGS_HORIZONTALMUON_TRIGGERACTIVITYMAKERHORIZONTALMUON_HPP_
10#define TRIGGERALGS_HORIZONTALMUON_TRIGGERACTIVITYMAKERHORIZONTALMUON_HPP_
11
14#include <fstream>
15#include <vector>
16
17namespace triggeralgs {
19{
20public:
21 void process(const TriggerPrimitive& input_tp, std::vector<TriggerActivity>& output_ta);
22 void configure(const nlohmann::json& config);
23
24private:
26 uint16_t check_adjacency() const; // Returns longest string of adjacent collection hits in window
27
28 TPWindow m_current_window; // Holds collection hits only
29 int check_sot() const;
30
31 // Configurable parameters.
32 bool m_trigger_on_adc = false;
34 bool m_trigger_on_adjacency = true; // Default use of the horizontal muon triggering
35 bool m_trigger_on_sot = false;
36 uint16_t m_sot_threshold = 5000; // Time over threshold - threshold to exceed.
37 bool m_print_tp_info = false; // Prints out some information on every TP received
38 uint16_t m_adjacency_threshold = 15; // Default is 15 wire track for testing
39 int m_max_adjacency = 0; // The maximum adjacency seen so far in any window
40 uint32_t m_adc_threshold = 3000000; // Not currently triggering on this
41 uint16_t m_n_channels_threshold = 400; // Set this to ~80 for frames.bin, ~150-300 for tps_link_11.txt
42 uint16_t m_adj_tolerance = 3; // Adjacency tolerance - default is 3 from coldbox testing.
43 int index = 0;
44 uint16_t ta_adc = 0;
45 uint16_t ta_channels = 0;
46 timestamp_t m_window_length = 8000; // Shouldn't exceed the max drift which is ~9375 62.5 MHz ticks for VDCB
47
48 // For debugging and performance study purposes.
49 void add_window_to_record(TPWindow window);
50 void dump_window_record();
51 void dump_tp(TriggerPrimitive const& input_tp);
52 std::vector<TPWindow> m_window_record;
53};
54} // namespace triggeralgs
55#endif // TRIGGERALGS_HORIZONTALMUON_TRIGGERACTIVITYMAKERHORIZONTALMUON_HPP_
void process(const TriggerPrimitive &input_tp, std::vector< TriggerActivity > &output_ta)
TP processing function that creates & fills TAs.
dunedaq::trgdataformats::timestamp_t timestamp_t
Definition Types.hpp:16
A single energy deposition on a TPC or PDS channel.