15#include "tracking_altai.h"
98 float get_det_plane_x(std::size_t idx)
const {
return recotrackdata.at(idx).det_plane_x; }
100 float get_det_plane_y(std::size_t idx)
const {
return recotrackdata.at(idx).det_plane_y; }
106 float get_chi2ndof(std::size_t idx)
const {
return recotrackdata.at(idx).chi2ndof; }
124 return std::hypot(recotrackdata.at(idx).det_plane_x,
125 recotrackdata.at(idx).det_plane_y);
138 return std::atan2(recotrackdata.at(idx).det_plane_y,
139 recotrackdata.at(idx).det_plane_x);
153 return std::hypot(recotrackdata.at(idx).traj_angcoeff_x,
154 recotrackdata.at(idx).traj_angcoeff_y);
168 return std::atan2(recotrackdata.at(idx).traj_angcoeff_y,
169 recotrackdata.at(idx).traj_angcoeff_x);
228 void import_event(std::vector<tracking_altai_struct> vec);
237 std::vector<alcor_recotrackdata_struct> recotrackdata;
238 std::vector<alcor_recotrackdata_struct> *recotrackdata_ptr = &recotrackdata;
257inline double calculate_angle(
double detector_to_telescope_plane,
double pixel_position)
259 return std::atan(pixel_position / detector_to_telescope_plane);
276 double pixel_position,
double pixel_position_error)
278 (void)detector_to_telescope_plane;
279 (void)detector_to_telescope_plane_error;
280 (void)pixel_position;
281 (void)pixel_position_error;
Reconstructed hit data and analysis utilities for the ALCOR detector.
double calculate_angle_resolution(double detector_to_telescope_plane, double detector_to_telescope_plane_error, double pixel_position, double pixel_position_error)
Compute track-angle resolution via error propagation (stub).
Definition alcor_recotrackdata.h:275
const double detector_to_telescope_plane_3
Distance to plane 3 [cm].
Definition alcor_recotrackdata.h:290
const double pixel_resolution_plane_0
Plane 0 pixel resolution [cm].
Definition alcor_recotrackdata.h:294
const double pixel_resolution_plane_1
Plane 1 pixel resolution [cm].
Definition alcor_recotrackdata.h:295
const double pixel_resolution_plane_2
Plane 2 pixel resolution [cm].
Definition alcor_recotrackdata.h:296
const double detector_to_telescope_plane_1
Distance to plane 1 [cm].
Definition alcor_recotrackdata.h:288
const double pixel_resolution_plane_3
Plane 3 pixel resolution [cm].
Definition alcor_recotrackdata.h:297
double calculate_angle(double detector_to_telescope_plane, double pixel_position)
Compute the track angle at the detector plane.
Definition alcor_recotrackdata.h:257
const double detector_to_telescope_plane_2
Distance to plane 2 [cm].
Definition alcor_recotrackdata.h:289
const double detector_to_telescope_plane_0
Distance to plane 0 [cm].
Definition alcor_recotrackdata.h:287
Container and analysis engine for a collection of reconstructed ALCOR hits.
Definition alcor_recodata.h:53
Container for track-matched reconstructed data.
Definition alcor_recotrackdata.h:56
void set_det_plane_x(std::size_t idx, float val)
Set extrapolated X [mm].
Definition alcor_recotrackdata.h:179
float get_chi2ndof(std::size_t idx) const
Fit quality χ²/NDF.
Definition alcor_recotrackdata.h:106
void add_recotrackdata(const alcor_recotrackdata_struct &entry)
Append a new track entry to the internal vector.
Definition alcor_recotrackdata.h:92
alcor_recotrackdata_struct & recotrackdata_at(std::size_t idx)
Mutable access to a track entry; auto-resizes if idx is out of range.
Definition alcor_recotrackdata.cxx:14
void write_to_tree(TTree *output_tree)
Create branches on output_tree for writing.
Definition alcor_recotrackdata.cxx:41
void clear()
Clear all track entries and release their memory; also calls alcor_recodata::clear().
Definition alcor_recotrackdata.cxx:23
alcor_recotrackdata()=default
Default constructor — no shared pointers, all containers empty.
void import_event(std::vector< tracking_altai_struct > vec)
Populate track entries from an ALTAI reconstruction vector.
Definition alcor_recotrackdata.cxx:55
void set_traj_angcoeff_x(std::size_t idx, float val)
Set angular coefficient along X.
Definition alcor_recotrackdata.h:183
std::size_t n_recotrackdata() const
Number of track entries in the current event.
Definition alcor_recotrackdata.h:95
double get_det_plane_r(std::size_t idx) const
Radial distance of the extrapolated impact point from the beam axis.
Definition alcor_recotrackdata.h:122
void set_det_plane_y(std::size_t idx, float val)
Set extrapolated Y [mm].
Definition alcor_recotrackdata.h:181
double get_traj_angcoeff_theta(std::size_t idx) const
Magnitude of the transverse angular coefficient vector.
Definition alcor_recotrackdata.h:151
void link_to_tree(TTree *input_tree)
Bind branch addresses to an existing TTree for reading.
Definition alcor_recotrackdata.cxx:30
double get_traj_angcoeff_phi(std::size_t idx) const
Azimuthal angle of the track slope vector in the transverse plane.
Definition alcor_recotrackdata.h:166
void set_traj_angcoeff_y(std::size_t idx, float val)
Set angular coefficient along Y.
Definition alcor_recotrackdata.h:185
float get_traj_angcoeff_x(std::size_t idx) const
Track angular coefficient along X (dx/dz).
Definition alcor_recotrackdata.h:102
float get_traj_angcoeff_y(std::size_t idx) const
Track angular coefficient along Y (dy/dz).
Definition alcor_recotrackdata.h:104
float get_det_plane_x(std::size_t idx) const
Extrapolated X coordinate at the detector plane [mm].
Definition alcor_recotrackdata.h:98
double get_det_plane_phi(std::size_t idx) const
Azimuthal angle of the extrapolated impact point.
Definition alcor_recotrackdata.h:136
float get_det_plane_y(std::size_t idx) const
Extrapolated Y coordinate at the detector plane [mm].
Definition alcor_recotrackdata.h:100
const alcor_recotrackdata_struct & recotrackdata_at(std::size_t idx) const
Const access — bounds-checked, no auto-resize.
Definition alcor_recotrackdata.h:89
void set_chi2ndof(std::size_t idx, float val)
Set χ²/NDF.
Definition alcor_recotrackdata.h:187
Track fit parameters and extrapolated position for one telescope plane.
Definition alcor_recotrackdata.h:28
float det_plane_x
Extrapolated X coordinate at the detector plane [mm].
Definition alcor_recotrackdata.h:29
float traj_angcoeff_x
Track angular coefficient along X (dx/dz).
Definition alcor_recotrackdata.h:31
float traj_angcoeff_y
Track angular coefficient along Y (dy/dz).
Definition alcor_recotrackdata.h:32
float det_plane_y
Extrapolated Y coordinate at the detector plane [mm].
Definition alcor_recotrackdata.h:30
alcor_recotrackdata_struct(alcor_recodata &v)
Construct from a reconstructed data entry.
float chi2ndof
Fit quality: χ²/NDF.
Definition alcor_recotrackdata.h:33