|
epic-drich-beam-test-analysis
ePIC dRICH beam test analysis framework
|
Container for track-matched reconstructed data. More...
#include <alcor_recotrackdata.h>
Public Member Functions | |
Construction | |
| alcor_recotrackdata ()=default | |
| Default constructor — no shared pointers, all containers empty. | |
| alcor_recotrackdata (alcor_recodata &v) | |
| Construct by linking to an existing alcor_recodata. | |
Element access | |
| alcor_recotrackdata_struct & | recotrackdata_at (std::size_t idx) |
Mutable access to a track entry; auto-resizes if idx is out of range. | |
| const alcor_recotrackdata_struct & | recotrackdata_at (std::size_t idx) const |
| Const access — bounds-checked, no auto-resize. | |
| void | add_recotrackdata (const alcor_recotrackdata_struct &entry) |
| Append a new track entry to the internal vector. | |
| std::size_t | n_recotrackdata () const |
| Number of track entries in the current event. | |
| float | get_det_plane_x (std::size_t idx) const |
| Extrapolated X coordinate at the detector plane [mm]. | |
| float | get_det_plane_y (std::size_t idx) const |
| Extrapolated Y coordinate at the detector plane [mm]. | |
| float | get_traj_angcoeff_x (std::size_t idx) const |
| Track angular coefficient along X (dx/dz). | |
| float | get_traj_angcoeff_y (std::size_t idx) const |
| Track angular coefficient along Y (dy/dz). | |
| float | get_chi2ndof (std::size_t idx) const |
| Fit quality χ²/NDF. | |
Polar coordinates | |
| double | get_det_plane_r (std::size_t idx) const |
| Radial distance of the extrapolated impact point from the beam axis. | |
| double | get_det_plane_phi (std::size_t idx) const |
| Azimuthal angle of the extrapolated impact point. | |
| double | get_traj_angcoeff_theta (std::size_t idx) const |
| Magnitude of the transverse angular coefficient vector. | |
| double | get_traj_angcoeff_phi (std::size_t idx) const |
| Azimuthal angle of the track slope vector in the transverse plane. | |
Setters | |
| void | set_det_plane_x (std::size_t idx, float val) |
| Set extrapolated X [mm]. | |
| void | set_det_plane_y (std::size_t idx, float val) |
| Set extrapolated Y [mm]. | |
| void | set_traj_angcoeff_x (std::size_t idx, float val) |
| Set angular coefficient along X. | |
| void | set_traj_angcoeff_y (std::size_t idx, float val) |
| Set angular coefficient along Y. | |
| void | set_chi2ndof (std::size_t idx, float val) |
| Set χ²/NDF. | |
I/O | |
| void | clear () |
| Clear all track entries and release their memory; also calls alcor_recodata::clear(). | |
| void | link_to_tree (TTree *input_tree) |
| Bind branch addresses to an existing TTree for reading. | |
| void | write_to_tree (TTree *output_tree) |
Create branches on output_tree for writing. | |
Import from tracking | |
| void | import_event (std::vector< tracking_altai_struct > vec) |
| Populate track entries from an ALTAI reconstruction vector. | |
Public Member Functions inherited from alcor_recodata | |
| alcor_recodata ()=default | |
| Default constructor — creates an empty container. | |
| alcor_recodata (const std::vector< alcor_finedata_struct > &d) | |
| Construct a container pre-filled with an existing hit vector. | |
| std::vector< alcor_finedata_struct > | get_recodata () const |
| Return a copy of the full hit vector. | |
| std::vector< alcor_finedata_struct > * | get_recodata_ptr () |
| Return the raw pointer to the active hit vector (may be external). | |
| alcor_finedata_struct | get_recodata (int i) const |
Return a copy of the hit struct at index i. | |
| std::vector< alcor_finedata_struct > & | get_recodata_link () |
| Return a mutable reference to the full hit vector. | |
| alcor_finedata_struct & | get_recodata_link (int i) |
Return a mutable reference to the hit struct at index i. | |
| alcor_finedata | get_finedata (int i) const |
Construct and return a full alcor_finedata object for hit i. | |
| std::vector< trigger_event > | get_triggers () const |
| Return a copy of the full trigger vector. | |
| std::vector< trigger_event > * | get_triggers_ptr () |
| Return the raw pointer to the active trigger vector (may be external). | |
| std::vector< trigger_event > & | get_triggers_link () |
| Return a mutable reference to the full trigger vector. | |
| uint32_t | get_global_index (int i) const |
Global channel index for hit i. | |
| float | get_hit_x (int i) const |
| Hit x-coordinate from channel mapping [mm]. | |
| float | get_hit_y (int i) const |
| Hit y-coordinate from channel mapping [mm]. | |
| uint32_t | get_hit_mask (int i) const |
| Hit quality / classification bitmask. | |
| float | get_hit_t (int i) const |
Calibrated hit time [ns] for hit i. | |
| float | get_hit_r (int i) const |
| Radial distance from the detector origin [mm]. | |
| float | get_hit_r (int i, std::array< float, 2 > v) const |
Radial distance from a custom centre v [mm]. | |
| float | get_hit_phi (int i) const |
| Azimuthal angle from the detector origin [rad]. | |
| float | get_hit_phi (int i, std::array< float, 2 > v) const |
Azimuthal angle from a custom centre v [rad]. | |
| float | get_hit_x_rnd (int i) const |
| Pixel-randomised x-coordinate (uniform ±1.5 mm jitter within the pixel cell). | |
| float | get_hit_y_rnd (int i) const |
| Pixel-randomised y-coordinate (uniform ±1.5 mm jitter within the pixel cell). | |
| float | get_hit_r_rnd (int i) const |
| Radial distance from the origin using randomised coordinates. | |
| float | get_hit_r_rnd (int i, std::array< float, 2 > v) const |
Radial distance from v using randomised coordinates. | |
| float | get_hit_phi_rnd (int i) const |
| Azimuthal angle from the origin using randomised coordinates [rad]. | |
| float | get_hit_phi_rnd (int i, std::array< float, 2 > v) const |
Azimuthal angle from v using randomised coordinates [rad]. | |
| int | get_hit_tdc (int i) const |
TDC sub-channel index for hit i. | |
| int | get_device (int i) const |
Readout device ID for hit i. | |
| int | get_fifo (int i) const |
FIFO number for hit i. | |
| int | get_chip (int i) const |
Chip ID for hit i. | |
| int | get_eo_channel (int i) const |
Even/odd channel index for hit i. | |
| int | get_column (int i) const |
Column address for hit i. | |
| int | get_pixel (int i) const |
Pixel address for hit i. | |
| int | get_device_index (int i) const |
Per-device flat index for hit i. | |
| int | get_global_channel_index (int i) const |
Global channel index stripped of TDC info for hit i. | |
| std::optional< trigger_event > | get_trigger_by_index (uint8_t index) const |
Look up the first trigger whose index field matches index. | |
| std::optional< trigger_event > | get_timing_trigger () const |
| Return the timing trigger for this event, if present. | |
| void | set_recodata (std::vector< alcor_finedata_struct > v) |
| Replace the entire hit collection. | |
| void | set_recodata (int i, alcor_finedata_struct v) |
Replace the hit at index i. | |
| void | set_triggers (const std::vector< trigger_event > v) |
| Replace the entire trigger collection. | |
| void | set_recodata_ptr (std::vector< alcor_finedata_struct > *v) |
| Redirect the active hit pointer to an external vector. | |
| void | set_triggers_ptr (std::vector< trigger_event > *v) |
| Redirect the active trigger pointer to an external vector. | |
| void | set_global_index (int i, uint32_t v) |
Overwrite the global channel index of hit i. | |
| void | set_hit_x (int i, float v) |
Overwrite the x-coordinate of hit i [mm]. | |
| void | set_hit_y (int i, float v) |
Overwrite the y-coordinate of hit i [mm]. | |
| void | set_hit_mask (int i, uint32_t v) |
Overwrite the quality bitmask of hit i (full replacement). | |
| void | set_recodata_link (std::vector< alcor_finedata_struct > &v) |
Rebind the active hit pointer to v (copies vector and rebinds pointer). | |
| void | set_triggers_link (std::vector< trigger_event > &v) |
Rebind the active trigger pointer to v (copies vector and rebinds pointer). | |
| void | add_hit_mask (int i, uint32_t v) |
OR v into the bitmask of hit i. | |
| void | add_hit_mask_bit (int i, uint32_t v) |
Set the bit at position v in the bitmask of hit i. | |
| void | add_trigger (uint8_t index, uint16_t coarse, float fine_time=0.) |
| Append a trigger from its constituent fields. | |
| void | add_trigger (trigger_event hit) |
| Append a pre-built trigger_event. | |
| int | add_hit (const alcor_finedata_struct &hit) |
| Append a hit from an alcor_finedata_struct. | |
| int | add_hit (const alcor_finedata &hit) |
| Append a hit from an alcor_finedata object (stores its underlying struct). | |
| int | add_hit (uint32_t rollover, uint16_t coarse, uint8_t fine, float hit_x, float hit_y, uint32_t global_index, uint32_t hit_mask) |
| Append a hit from individual fields (constructed in-place). | |
| bool | check_trigger (uint8_t v) |
True if a trigger with index v exists for this event. | |
| bool | is_start_of_spill () |
| True if the start-of-spill trigger is present. | |
| bool | is_first_frames () |
| True if the first-frames trigger is present. | |
| bool | is_timing_available () |
| True if a timing trigger is present. | |
| bool | is_embedded_tracking_available () |
| True if embedded tracking data are attached to this event. | |
| bool | is_ring_found () |
| True if at least one ring has been reconstructed. | |
| bool | check_hit_mask (int i, uint32_t v) |
True if any bit of v is set in the mask of hit i. | |
| bool | is_afterpulse (int i) |
True if hit i is flagged as an afterpulse (delegates to alcor_finedata). | |
| bool | is_cross_talk (int i) |
True if hit i is flagged as optical cross-talk (delegates to alcor_finedata). | |
| bool | is_ring_tagged (int i) |
True if hit i has been associated with a reconstructed ring. | |
| void | clear () |
| Clear all hits and triggers, resetting the container to an empty state. Does not reset the Hough LUT or accumulator configuration. | |
| bool | link_to_tree (TTree *input_tree) |
Attach the container to branches of an existing input TTree. | |
| void | write_to_tree (TTree *output_tree) |
Create branches in output_tree for hits and triggers. | |
| void | find_rings (float_t distance_length_cut, float_t distance_time_cut) |
| Cluster hits into ring candidates using DBSCAN in the (R, t) plane. | |
| void | build_hough_lut (const std::map< int, std::array< float, 2 > > &index_to_hit_xy, float r_min, float r_max, float r_step, float cell_size) |
| Pre-compute the Hough-transform look-up table (LUT). | |
| void | find_rings_hough (float threshold_fraction, int min_hits) |
| Find ring candidates using the pre-computed Hough LUT. | |
Container for track-matched reconstructed data.
Inherits the full event/trigger machinery from alcor_recodata and adds a per-event vector of alcor_recotrackdata_struct entries, one per telescope track reconstructed by ALTAI.
| alcor_recotrackdata::alcor_recotrackdata | ( | alcor_recodata & | v | ) |
Construct by linking to an existing alcor_recodata.
Shares the recodata and trigger pointer arrays of v so that a single TTree branch set covers both base and derived data.
| v | Source recodata object whose internal pointers are borrowed. |
|
inline |
Azimuthal angle of the extrapolated impact point.
Computed as atan2(det_plane_y, det_plane_x).
| idx | Track index. |
φ [rad], in (−π, π].
|
inline |
Radial distance of the extrapolated impact point from the beam axis.
Computed as hypot(det_plane_x, det_plane_y).
| idx | Track index. |
r [mm].
|
inline |
Azimuthal angle of the track slope vector in the transverse plane.
Computed as atan2(angcoeff_y, angcoeff_x); describes the direction in which the track is deflected transversely with respect to the beam axis.
| idx | Track index. |
φ [rad], in (−π, π].
|
inline |
Magnitude of the transverse angular coefficient vector.
Equivalent to get_traj_angcoeff; provided here for naming symmetry with get_traj_angcoeff_phi().
| idx | Track index. |
hypot(angcoeff_x, angcoeff_y). | void alcor_recotrackdata::import_event | ( | std::vector< tracking_altai_struct > | vec | ) |
Populate track entries from an ALTAI reconstruction vector.
Maps each tracking_altai_struct in vec to an internal alcor_recotrackdata_struct, preserving insertion order.
| vec | Per-track ALTAI output for the current event. |
| void alcor_recotrackdata::link_to_tree | ( | TTree * | input_tree | ) |
Bind branch addresses to an existing TTree for reading.
| input_tree | TTree whose recotrackdata branch is to be read. |
| alcor_recotrackdata_struct & alcor_recotrackdata::recotrackdata_at | ( | std::size_t | idx | ) |
Mutable access to a track entry; auto-resizes if idx is out of range.
| idx | Track index (0-based). |
idx. | void alcor_recotrackdata::write_to_tree | ( | TTree * | output_tree | ) |
Create branches on output_tree for writing.
Registers recotrackdata, recodata, and triggers branches so a single Fill() call persists the complete event.
| output_tree | TTree to write into. |