|
epic-drich-beam-test-analysis
ePIC dRICH beam test analysis framework
|
Class wrapping lightdata hits with convenient accessors and utilities. More...
#include <alcor_lightdata.h>
Public Member Functions | |
| alcor_lightdata (const alcor_lightdata_struct &data_struct) | |
Getters | |
| alcor_lightdata_struct | get_lightdata () const |
| Get a copy of the internal lightdata struct. | |
| std::vector< alcor_finedata_struct > | get_timing_hits () const |
| Get a copy of the timing hits. | |
| std::vector< alcor_finedata_struct > | get_tracking_hits () const |
| Get a copy of the tracking hits. | |
| std::vector< alcor_finedata_struct > | get_cherenkov_hits () const |
| Get a copy of the Cherenkov hits. | |
| std::vector< trigger_event > | get_triggers () const |
| Get a copy of trigger hits. | |
| alcor_lightdata_struct & | get_lightdata_link () |
| Get a reference to the internal lightdata struct. | |
| std::vector< alcor_finedata_struct > & | get_timing_hits_link () |
| Get a reference to the internal timing hits. | |
| std::vector< alcor_finedata_struct > & | get_tracking_hits_link () |
| Get a reference to the internal tracking hits. | |
| std::vector< alcor_finedata_struct > & | get_cherenkov_hits_link () |
| Get a reference to the internal Cherenkov hits. | |
| std::vector< trigger_event > & | get_triggers_link () |
| Get a reference to the internal trigger hits. | |
Setters | |
| void | set_lightdata (alcor_lightdata_struct v) |
| Set the internal lightdata struct. | |
| void | set_timing_hits (std::vector< alcor_finedata_struct > v) |
| void | set_tracking_hits (std::vector< alcor_finedata_struct > v) |
| void | set_cherenkov_hits (std::vector< alcor_finedata_struct > v) |
| void | set_trigger (std::vector< trigger_event > v) |
| void | set_lightdata_link (alcor_lightdata_struct &v) |
| void | set_timing_hits_link (std::vector< alcor_finedata_struct > &v) |
| void | set_tracking_hits_link (std::vector< alcor_finedata_struct > &v) |
| void | set_cherenkov_hits_link (std::vector< alcor_finedata_struct > &v) |
| void | set_trigger_link (std::vector< trigger_event > &v) |
Utility Methods | |
| std::optional< float > | get_trigger_time (uint8_t trigger_index) |
| Get the trigger time for a given trigger index. | |
Public Member Functions inherited from alcor_finedata | |
| alcor_finedata () | |
| Default constructor. Initialises all fields to zero. | |
| alcor_finedata (const alcor_finedata_struct &s) | |
| Construct from a decoded alcor_finedata_struct. | |
| alcor_finedata (const alcor_data_struct &d) | |
| Construct directly from a raw alcor_data_struct. | |
| alcor_finedata (const alcor_finedata &o) | |
| Copy constructor. | |
| alcor_finedata_struct | get_data_struct () const |
| Returns a copy of the underlying alcor_finedata_struct. | |
| uint32_t | get_global_index () const |
| Returns the calibration index identifying the TDC channel. | |
| uint32_t | get_rollover () const |
| Returns the rollover counter. | |
| uint16_t | get_coarse () const |
| Returns the coarse timestamp (clock-cycle count). | |
| uint8_t | get_fine () const |
| Returns the fine timestamp (TDC bin within a clock cycle). | |
| float | get_hit_x () const |
| Returns the x-axis position from mapping. | |
| float | get_hit_y () const |
| Returns the y-axis position from mapping. | |
| uint32_t | get_mask () const |
| Returns the hit bitmask. | |
| float | get_phase () const |
Returns the calibrated fine-time phase in clock cycles. Computed from the 3-parameter calibration stored in calibration_parameters. | |
| float | get_time () const |
| Returns the calibrated hit time in clock cycles. Combines rollover, coarse, and the fine-time phase correction. All unsigned fields are promoted to float before arithmetic to avoid unsigned underflow when subtracting the (potentially non-zero) phase. | |
| float | get_time_ns () const |
| Returns the calibrated hit time in nanoseconds. | |
| int | get_tdc () const |
| Returns the TDC index decoded from the calibration index. | |
| int | get_device () const |
| Returns the readout device ID decoded from the calibration index. | |
| int | get_fifo () const |
| Returns the FIFO number decoded from the calibration index. | |
| int | get_chip () const |
| Returns the chip ID decoded from the calibration index. | |
| int | get_eo_channel () const |
| Returns the even/odd channel index decoded from the calibration index. | |
| int | get_column () const |
| Returns the column address decoded from the calibration index. | |
| int | get_pixel () const |
| Returns the pixel address decoded from the calibration index. | |
| int | get_device_index () const |
| Returns the per-device TDC index. | |
| int | get_global_channel_index () const |
| Returns the global channel index stripped of TDC info. | |
| float | get_hit_x_rnd () const |
| Returns the pixel-randomised x-coordinate, uniform within ±1.5 mm of the hit position. | |
| float | get_hit_y_rnd () const |
| Returns the pixel-randomised y-coordinate, uniform within ±1.5 mm of the hit position. | |
| float | get_hit_r_rnd () const |
| Returns the radial distance from the origin using a freshly randomised position. | |
| float | get_hit_phi_rnd () const |
| Returns the azimuthal angle from the origin using a freshly randomised position [rad]. | |
| float | get_hit_r_rnd (std::array< float, 2 > v) const |
| Returns the radial distance from a custom centre using a freshly randomised position. | |
| float | get_hit_phi_rnd (std::array< float, 2 > v) const |
| Returns the azimuthal angle from a custom centre using a freshly randomised position [rad]. | |
| void | add_mask_bit (hit_mask bit) |
| Sets a single bit in the hit mask. | |
| void | clear_mask_bit (hit_mask bit) |
| Clears a single bit in the hit mask. | |
| bool | has_mask_bit (hit_mask bit) const |
| Checks whether a single bit is set in the hit mask. | |
| bool | is_ring_tag_first () const |
| Checks whether the hit is tagged as part of a ring (first pass). | |
| bool | is_ring_tag_second () const |
| Checks whether the hit is tagged as part of a ring (second pass). | |
| bool | is_cross_talk () const |
| Checks whether the hit is flagged as cross-talk. | |
| bool | is_afterpulse () const |
| Checks whether the hit is flagged as an afterpulse. | |
| bool | is_part_lane () const |
| Checks whether the hit originates from a partially active lane. | |
| bool | is_dead_lane () const |
| Checks whether the hit originates from a dead lane. | |
| void | set_data_struct (const alcor_finedata_struct &d) |
| Replaces the underlying data struct. | |
| void | set_global_index (uint32_t calib) |
| Sets the calibration index. | |
| void | set_rollover (uint32_t r) |
| Sets the rollover counter. | |
| void | set_coarse (uint16_t c) |
| Sets the coarse timestamp. | |
| void | set_fine (uint8_t f) |
| Sets the fine timestamp. | |
| void | set_mask (uint32_t mask) |
| Sets the hit bitmask. | |
| void | set_streaming_ring_trigger_mask () |
| Flags the hit as a streaming ring trigger participant. | |
| bool | operator< (const alcor_finedata &v) const |
| Less-than comparison against an alcor_finedata hit. | |
| bool | operator<= (const alcor_finedata &v) const |
| Less-than-or-equal comparison against an alcor_finedata hit. | |
| bool | operator> (const alcor_finedata &v) const |
| Greater-than comparison against an alcor_finedata hit. | |
| bool | operator>= (const alcor_finedata &v) const |
| Greater-than-or-equal comparison against an alcor_finedata hit. | |
| void | generate_calibration (TH2F *calibration_histogram, bool overwrite_calibration) |
| Derives calibration parameters from a 2D fine-time histogram. | |
| void | update_calibration (TH2F *h) |
Updates calibration without overwriting existing entries. Alias for generate_calibration with overwrite_calibration = false. | |
| void | write_calib_to_file (const std::string &filename) |
| Writes the current calibration parameters to a plain-text file. | |
| void | read_calib_from_file (const std::string &filename, bool clear_first=true, bool overwrites=true) |
| Loads calibration parameters from a plain-text file. | |
Additional Inherited Members | |
Static Public Member Functions inherited from alcor_finedata | |
| static void | set_param0 (int global_tdc_index, float value) |
| Sets calibration parameter 0 for a given TDC channel. | |
| static void | set_param1 (int global_tdc_index, float value) |
| Sets calibration parameter 1 for a given TDC channel. | |
| static void | set_param2 (int global_tdc_index, float value) |
| Sets calibration parameter 2 for a given TDC channel. | |
| static std::vector< mist::ring_finding::ring_result > | alcor_find_rings_hough (mist::ring_finding::hough_transform &ht, std::vector< alcor_finedata > &alcor_hits, float threshold_fraction, int min_hits, int min_active, int max_rings=2, float collection_radius=6.f) |
| Convert a vector of alcor_finedata hits into hough_hit, run the Hough-transform ring finder, write mask bits back onto the original hits, and return the ring results. | |
Class wrapping lightdata hits with convenient accessors and utilities.
Inherits from alcor_finedata and provides getters, setters, and utilities to work with trigger, timing, tracking, and Cherenkov hits.
| std::vector< alcor_finedata_struct > alcor_lightdata::get_cherenkov_hits | ( | ) | const |
Get a copy of the Cherenkov hits.
| std::vector< alcor_finedata_struct > & alcor_lightdata::get_cherenkov_hits_link | ( | ) |
Get a reference to the internal Cherenkov hits.
| alcor_lightdata_struct alcor_lightdata::get_lightdata | ( | ) | const |
Get a copy of the internal lightdata struct.
| alcor_lightdata_struct & alcor_lightdata::get_lightdata_link | ( | ) |
Get a reference to the internal lightdata struct.
| std::vector< alcor_finedata_struct > alcor_lightdata::get_timing_hits | ( | ) | const |
Get a copy of the timing hits.
| std::vector< alcor_finedata_struct > & alcor_lightdata::get_timing_hits_link | ( | ) |
Get a reference to the internal timing hits.
| std::vector< alcor_finedata_struct > alcor_lightdata::get_tracking_hits | ( | ) | const |
Get a copy of the tracking hits.
| std::vector< alcor_finedata_struct > & alcor_lightdata::get_tracking_hits_link | ( | ) |
Get a reference to the internal tracking hits.
| std::optional< float > alcor_lightdata::get_trigger_time | ( | uint8_t | trigger_index | ) |
Get the trigger time for a given trigger index.
| trigger_index | Index of the trigger in the vector |
| std::vector< trigger_event > alcor_lightdata::get_triggers | ( | ) | const |
Get a copy of trigger hits.
| std::vector< trigger_event > & alcor_lightdata::get_triggers_link | ( | ) |
Get a reference to the internal trigger hits.
| void alcor_lightdata::set_lightdata | ( | alcor_lightdata_struct | v | ) |
Set the internal lightdata struct.
| v | Copy of lightdata struct |