DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
triggeralgs
include
triggeralgs
PlaneCoincidence
TAMakerPlaneCoincidenceAlgorithm.hpp
Go to the documentation of this file.
1
8
9
#ifndef TRIGGERALGS_PLANECOINCIDENCE_TRIGGERACTIVITYMAKERPLANECOINCIDENCE_HPP_
10
#define TRIGGERALGS_PLANECOINCIDENCE_TRIGGERACTIVITYMAKERPLANECOINCIDENCE_HPP_
11
12
#include "
detchannelmaps/TPCChannelMap.hpp
"
13
#include "
triggeralgs/TriggerActivityFactory.hpp
"
14
#include "
triggeralgs/TPWindow.hpp
"
15
#include <fstream>
16
#include <vector>
17
18
#include <chrono>
19
#include <map>
20
#include <memory>
21
#include <string>
22
#include <unordered_set>
23
#include <utility>
24
25
namespace
triggeralgs
{
26
class
TAMakerPlaneCoincidenceAlgorithm
:
public
TriggerActivityMaker
27
{
28
public
:
29
void
process
(
const
TriggerPrimitive
& input_tp, std::vector<TriggerActivity>& output_ta);
30
void
configure
(
const
nlohmann::json& config);
31
32
private
:
33
TriggerActivity
construct_ta
(
TPWindow
m_current_window
)
const
;
34
uint16_t
check_adjacency
(
TPWindow
window)
const
;
// Returns longest string of adjacent collection hits in window
35
36
TPWindow
m_current_window
;
// Possibly redundant for this alg?
37
uint64_t
m_primitive_count
= 0;
38
int
check_sot
(
TPWindow
m_current_window
)
const
;
39
//void clearWindows(TriggerPrimitive const input_tp); // Function to clear or reset all windows, according to TP channel
40
41
// Make 3 instances of the Window class. One for each view plane.
42
TPWindow
m_collection_window
;
// Z
43
TPWindow
m_induction1_window
;
// U
44
TPWindow
m_induction2_window
;
// Y
45
46
// Configurable parameters.
47
std::string
m_channel_map_name
=
"VDColdboxTPCChannelMap"
;
// Default is coldbox
48
uint16_t
m_adjacency_threshold
= 15;
// Default is 15 wire track for testing
49
int
m_max_adjacency
= 0;
// The maximum adjacency seen so far in any window
50
uint32_t
m_sot_threshold
= 2000;
// Work out good values for this
51
uint32_t
m_adc_threshold
= 300000;
// AbsRunningSum HF Alg Finds Induction ADC ~10x higher
52
uint16_t
m_adj_tolerance
= 5;
// Adjacency tolerance - default is 3 from coldbox testing.
53
int
index
= 0;
54
uint16_t
ta_adc
= 0;
55
uint16_t
ta_channels
= 0;
56
timestamp_t
m_window_length
= 3000;
// Shouldn't exceed the max drift
57
58
// Channel map object, for separating TPs by the plane view they come from
59
std::shared_ptr<dunedaq::detchannelmaps::TPCChannelMap>
channelMap
= dunedaq::detchannelmaps::make_tpc_map(
m_channel_map_name
);
60
61
// For debugging and performance study purposes.
62
void
add_window_to_record
(
TPWindow
window);
63
void
dump_window_record
();
64
void
dump_tp
(
TriggerPrimitive
const
& input_tp);
65
std::vector<TPWindow>
m_window_record
;
66
};
67
}
// namespace triggeralgs
68
#endif
// TRIGGERALGS_PLANECOINCIDENCE_TRIGGERACTIVITYMAKERPLANECOINCIDENCE_HPP_
TPCChannelMap.hpp
TPWindow.hpp
TriggerActivityFactory.hpp
triggeralgs::TAMakerPlaneCoincidenceAlgorithm
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:27
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_window_length
timestamp_t m_window_length
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:56
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::ta_channels
uint16_t ta_channels
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:55
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::channelMap
std::shared_ptr< dunedaq::detchannelmaps::TPCChannelMap > channelMap
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:59
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_adjacency_threshold
uint16_t m_adjacency_threshold
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:48
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::dump_tp
void dump_tp(TriggerPrimitive const &input_tp)
Definition
TAMakerPlaneCoincidenceAlgorithm.cpp:240
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::ta_adc
uint16_t ta_adc
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:54
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_induction1_window
TPWindow m_induction1_window
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:43
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_primitive_count
uint64_t m_primitive_count
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:37
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::configure
void configure(const nlohmann::json &config)
Definition
TAMakerPlaneCoincidenceAlgorithm.cpp:100
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_adc_threshold
uint32_t m_adc_threshold
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:51
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_channel_map_name
std::string m_channel_map_name
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:47
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::check_adjacency
uint16_t check_adjacency(TPWindow window) const
Definition
TAMakerPlaneCoincidenceAlgorithm.cpp:142
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::construct_ta
TriggerActivity construct_ta(TPWindow m_current_window) const
Definition
TAMakerPlaneCoincidenceAlgorithm.cpp:118
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::index
int index
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:53
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_sot_threshold
uint32_t m_sot_threshold
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:50
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_max_adjacency
int m_max_adjacency
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:49
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_induction2_window
TPWindow m_induction2_window
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:44
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::check_sot
int check_sot(TPWindow m_current_window) const
Definition
TAMakerPlaneCoincidenceAlgorithm.cpp:259
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::dump_window_record
void dump_window_record()
Definition
TAMakerPlaneCoincidenceAlgorithm.cpp:212
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_adj_tolerance
uint16_t m_adj_tolerance
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:52
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::add_window_to_record
void add_window_to_record(TPWindow window)
Definition
TAMakerPlaneCoincidenceAlgorithm.cpp:204
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_window_record
std::vector< TPWindow > m_window_record
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:65
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_current_window
TPWindow m_current_window
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:36
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::process
void process(const TriggerPrimitive &input_tp, std::vector< TriggerActivity > &output_ta)
TP processing function that creates & fills TAs.
Definition
TAMakerPlaneCoincidenceAlgorithm.cpp:19
triggeralgs::TAMakerPlaneCoincidenceAlgorithm::m_collection_window
TPWindow m_collection_window
Definition
TAMakerPlaneCoincidenceAlgorithm.hpp:42
triggeralgs::TPWindow
Definition
TPWindow.hpp:21
triggeralgs::TriggerActivityMaker
Definition
TriggerActivityMaker.hpp:29
triggeralgs
Definition
AbstractFactory.hpp:18
triggeralgs::timestamp_t
dunedaq::trgdataformats::timestamp_t timestamp_t
Definition
Types.hpp:16
triggeralgs::TriggerPrimitive
dunedaq::trgdataformats::TriggerPrimitive TriggerPrimitive
Definition
TriggerPrimitive.hpp:22
triggeralgs::TriggerActivity
Definition
TriggerActivity.hpp:20
Generated on
for DUNE-DAQ by
1.17.0