epic-drich-beam-test-analysis
ePIC dRICH beam test analysis framework
Loading...
Searching...
No Matches
alcor_lightdata.h
1#pragma once
2
3#include <vector>
4#include <cstdint>
5#include <algorithm>
6#include "alcor_finedata.h"
7#include "triggers.h"
8#include "config_reader.h"
9
17{
18 std::vector<trigger_event> trigger_hits;
19 std::vector<alcor_finedata_struct> timing_hits;
20 std::vector<alcor_finedata_struct> tracking_hits;
21 std::vector<alcor_finedata_struct> cherenkov_hits;
22
28 void clear();
29};
30
38{
39private:
40 alcor_lightdata_struct lightdata;
41
42public:
43 alcor_lightdata() = default;
44 alcor_lightdata(const alcor_lightdata_struct &data_struct);
45
48
53
58 std::vector<alcor_finedata_struct> get_timing_hits() const;
59
64 std::vector<alcor_finedata_struct> get_tracking_hits() const;
65
70 std::vector<alcor_finedata_struct> get_cherenkov_hits() const;
71
76 std::vector<trigger_event> get_triggers() const;
77
83
88 std::vector<alcor_finedata_struct> &get_timing_hits_link();
89
94 std::vector<alcor_finedata_struct> &get_tracking_hits_link();
95
100 std::vector<alcor_finedata_struct> &get_cherenkov_hits_link();
101
106 std::vector<trigger_event> &get_triggers_link();
108
111
116
117 void set_timing_hits(std::vector<alcor_finedata_struct> v);
118 void set_tracking_hits(std::vector<alcor_finedata_struct> v);
119 void set_cherenkov_hits(std::vector<alcor_finedata_struct> v);
120 void set_trigger(std::vector<trigger_event> v);
121
122 void set_lightdata_link(alcor_lightdata_struct &v);
123 void set_timing_hits_link(std::vector<alcor_finedata_struct> &v);
124 void set_tracking_hits_link(std::vector<alcor_finedata_struct> &v);
125 void set_cherenkov_hits_link(std::vector<alcor_finedata_struct> &v);
126 void set_trigger_link(std::vector<trigger_event> &v);
128
131
136 std::optional<float> get_trigger_time(uint8_t trigger_index);
138};
Represents a single calibrated ALCOR TDC hit with fine-time correction.
Definition alcor_finedata.h:103
Class wrapping lightdata hits with convenient accessors and utilities.
Definition alcor_lightdata.h:38
void set_lightdata(alcor_lightdata_struct v)
Set the internal lightdata struct.
Definition alcor_lightdata.cxx:34
std::vector< trigger_event > get_triggers() const
Get a copy of trigger hits.
Definition alcor_lightdata.cxx:25
std::vector< trigger_event > & get_triggers_link()
Get a reference to the internal trigger hits.
Definition alcor_lightdata.cxx:31
std::vector< alcor_finedata_struct > get_tracking_hits() const
Get a copy of the tracking hits.
Definition alcor_lightdata.cxx:23
std::vector< alcor_finedata_struct > get_cherenkov_hits() const
Get a copy of the Cherenkov hits.
Definition alcor_lightdata.cxx:24
alcor_lightdata_struct & get_lightdata_link()
Get a reference to the internal lightdata struct.
Definition alcor_lightdata.cxx:27
std::vector< alcor_finedata_struct > & get_cherenkov_hits_link()
Get a reference to the internal Cherenkov hits.
Definition alcor_lightdata.cxx:30
std::optional< float > get_trigger_time(uint8_t trigger_index)
Get the trigger time for a given trigger index.
Definition alcor_lightdata.cxx:47
std::vector< alcor_finedata_struct > & get_timing_hits_link()
Get a reference to the internal timing hits.
Definition alcor_lightdata.cxx:28
std::vector< alcor_finedata_struct > & get_tracking_hits_link()
Get a reference to the internal tracking hits.
Definition alcor_lightdata.cxx:29
std::vector< alcor_finedata_struct > get_timing_hits() const
Get a copy of the timing hits.
Definition alcor_lightdata.cxx:22
alcor_lightdata_struct get_lightdata() const
Get a copy of the internal lightdata struct.
Definition alcor_lightdata.cxx:21
Run configuration and readout mapping utilities for the ePIC dRICH beam test.
Structure holding all types of light detector hits for a spill.
Definition alcor_lightdata.h:17
void clear()
Clear all vectors and release memory.
Definition alcor_lightdata.cxx:4
Header-only trigger definitions, registry, and TOML-based configuration reader.