|
|
| alcor_spilldata () |
| | Default constructor — initialises to an empty spill.
|
| |
| | alcor_spilldata (const alcor_spilldata_struct &v) |
| | Construct from an existing spill-data struct (copied).
|
| |
|
alcor_spilldata_struct | get_spilldata () const |
| | Returns a full copy of the internal spill-data struct.
|
| |
|
std::map< uint32_t, alcor_lightdata_struct > | get_frame () const |
| | Returns a copy of the frame → light-data map.
|
| |
|
std::map< uint8_t, uint32_t > | get_participants_mask () const |
| | Returns a copy of the device → participants-mask map.
|
| |
|
std::map< uint8_t, uint32_t > | get_dead_mask () const |
| | Returns a copy of the device → dead-mask map.
|
| |
|
std::vector< alcor_lightdata_struct > | get_frame_list () const |
| | Returns a copy of the flat light-data vector (TTree representation).
|
| |
|
std::vector< uint32_t > | get_frame_reference_list () const |
| | Returns a copy of the flat frame-reference vector (TTree representation).
|
| |
|
alcor_spilldata_struct & | get_spilldata_link () |
| | Returns a mutable reference to the internal spill-data struct.
|
| |
|
std::map< uint32_t, alcor_lightdata_struct > & | get_frame_link () |
| | Returns a mutable reference to the frame → light-data map.
|
| |
|
std::map< uint8_t, uint32_t > & | get_participants_mask_link () |
| | Returns a mutable reference to the participants-mask map.
|
| |
|
std::map< uint8_t, uint32_t > & | get_dead_mask_link () |
| | Returns a mutable reference to the dead-mask map.
|
| |
|
std::vector< alcor_lightdata_struct > & | get_frame_list_link () |
| | Returns a mutable reference to the flat light-data vector.
|
| |
|
std::vector< uint32_t > & | get_frame_reference_list_link () |
| | Returns a mutable reference to the flat frame-reference vector.
|
| |
| std::vector< trigger_event > & | get_frame_trigger_hits (uint32_t index_of_frame) |
| | Returns a mutable reference to the trigger-hit list for a given frame.
|
| |
| std::vector< alcor_finedata_struct > & | get_frame_timing_hits (uint32_t index_of_frame) |
| | Returns a mutable reference to the timing-hit list for a given frame.
|
| |
| std::vector< alcor_finedata_struct > & | get_frame_tracking_hits (uint32_t index_of_frame) |
| | Returns a mutable reference to the tracking-hit list for a given frame.
|
| |
| std::vector< alcor_finedata_struct > & | get_frame_cherenkov_hits (uint32_t index_of_frame) |
| | Returns a mutable reference to the Cherenkov-hit list for a given frame.
|
| |
|
void | set_spilldata (alcor_spilldata_struct v) |
| | Replaces the internal spill-data struct (copied).
|
| |
|
void | set_frame (std::map< uint32_t, alcor_lightdata_struct > v) |
| | Replaces the frame → light-data map (copied).
|
| |
|
void | set_participants_mask (std::map< uint8_t, uint32_t > v) |
| | Replaces the participants-mask map (copied).
|
| |
|
void | set_dead_mask (std::map< uint8_t, uint32_t > v) |
| | Replaces the dead-mask map (copied).
|
| |
|
void | set_spilldata_link (alcor_spilldata_struct &v) |
| | Replaces the internal spill-data struct (move-assigned from reference).
|
| |
|
void | set_frame_link (std::map< uint32_t, alcor_lightdata_struct > &v) |
| | Replaces the frame map (move-assigned from reference).
|
| |
|
void | set_participants_mask_link (std::map< uint8_t, uint32_t > &v) |
| | Replaces the participants-mask map (move-assigned from reference).
|
| |
|
void | set_dead_mask_link (std::map< uint8_t, uint32_t > &v) |
| | Replaces the dead-mask map (move-assigned from reference).
|
| |
|
void | clear () |
| | Resets the spill to an empty state, also clearing the deletion registry.
|
| |
| bool | has_trigger (uint32_t index_of_frame) |
| | Returns true if the given frame contains at least one trigger hit.
|
| |
| void | add_trigger_to_frame (uint32_t index_of_frame, trigger_event trg) |
| | Appends a trigger event to the hit list of the specified frame.
|
| |
| void | do_not_write_frame (uint32_t index_of_frame) |
| | Marks a frame to be excluded from the next TTree fill.
|
| |
| std::map< uint32_t, std::vector< uint8_t > > | get_not_dead_participants () |
| | Returns, per device, the list of channels that are participating but not marked as dead.
|
| |
| bool | has_data () |
| | Returns true if this object contains any spill data.
|
| |
| void | link_to_tree (TTree *input_tree) |
| | Binds the flat-vector members to branches of an existing input TTree.
|
| |
| void | write_to_tree (TTree *output_tree) |
| | Creates branches on an output TTree and binds them to the flat vectors.
|
| |
| void | prepare_tree_fill () |
| | Converts the working maps into flat vectors ready for TTree::Fill.
|
| |
| void | get_entry () |
| | Placeholder called after TTree::GetEntry — currently a no-op.
|
| |
|
| alcor_lightdata (const alcor_lightdata_struct &data_struct) |
| |
| 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.
|
| |
| 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) |
| |
| std::optional< float > | get_trigger_time (uint8_t trigger_index) |
| | Get the trigger time for a given trigger index.
|
| |
|
| 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.
|
| |