fanurs / data-analysis-e15190-e14030

Data analysis for the experiment E15190-E14030 at the National Superconducting Cyclotron Laboratory (NSCL), currently known as the Facility for Rare Isotope Beams (FRIB). This experiment aims to constrain the nuclear equation of state with heavy ion collisions at intermediate energies.
https://fanurs.github.io/data-analysis-e15190-e14030
GNU General Public License v3.0
2 stars 0 forks source link

Calibration of branch `NWB_pos_x` #50

Closed Wieskejo closed 1 year ago

Wieskejo commented 1 year ago

This issue occurs when viewing the root files located in

/mnt/spirit/analysis/user/fanurs/e15190-e14030/data-analysis-e15190-e14030/database/root_files_candidates/

and

/mnt/spirit/analysis/user/fanurs/e15190-e14030/data-analysis-e15190-e14030/database/root_files/.

So far the issue has been observed in the span of runs [4266-4300].

The issue is that the branch NWB_pos_x, which should contain the x-position information AFTER correction using the Veto Wall shadows method, appears to have not been written correctly during file creation. Viewing the Veto Wall shadows this way shows that there is slight misalignment between bars.

Manually applying the saved position parameters p0 and p1 to the raw time difference between the left and right PMT results in Veto Wall shadows that are properly aligned, which suggests that the calibration parameters are not the cause of this problem.

fanurs commented 1 year ago

@Wieskejo Thanks for identifying such a critical bug.

The issue was caused by casting wrong types for the calibration parameters: https://github.com/fanurs/data-analysis-e15190-e14030/blob/58f87617a5c714f23fe9eb1fce9b9c43419c03ea/scripts/calibrate.cpp#L162-L167

p0 and p1 should have been double, not int. PR #51 has corrected this bug: https://github.com/fanurs/data-analysis-e15190-e14030/blob/da7d4afd9f55aca9d3286c7ba8f541855b762b03/scripts/calibrate.cpp#L166-L170

Fortunately, while other calibration procedures do depend on position calibration, e.g. ToF calibration, PSD calibraiton, etc., those scripts calculate positions directly from the position parameters instead of the branch NWB_pos_x. For instance, https://github.com/fanurs/data-analysis-e15190-e14030/blob/58f87617a5c714f23fe9eb1fce9b9c43419c03ea/e15190/neutron_wall/time_of_flight_calibration.py#L125-L127 and https://github.com/fanurs/data-analysis-e15190-e14030/blob/58f87617a5c714f23fe9eb1fce9b9c43419c03ea/e15190/neutron_wall/time_of_flight_calibration.py#L155