|
|
| 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.
|
| |
|
Compare hits by their calibrated timestamp.
|
|
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.
|
| |
Represents a single calibrated ALCOR TDC hit with fine-time correction.
Wraps an alcor_finedata_struct and provides:
- Accessors for raw timing fields and derived channel-address fields.
- A static calibration table (shared across all instances) mapping global TDC indices to a 3-parameter calibration array.
- Methods to generate, persist, and load the calibration from ROOT histograms or plain files.
The fine-time phase is computed from the calibration parameters stored in the static calibration_parameters map.