PLASTIC Calibrator - PNapi90/DESPEC-Analysis-Framework GitHub Wiki

Small description of the PLASTIC Calibrator class.

General remarks

The fine time of the PLASTIC Detector System suffers from unequally distributed binning. Using binning-calibration, this uneven distribution can be fixed.

This class allows for an ONLINE or OFFLINE calibration of the PLASTIC Detector System data.

ONLINE Calibration

For each PLASTIC event, the fine time of the responding channels are sent to the PLASTIC_Calibrator object in PLASTIC_Detector_System via the function void PLASTIC_Calibrator::get_data(double**,UInt**,int,int*) which saves the data in a TH1 histogram (corresponding to TAMEX board ID and channel ID).

After a certain amount of saves (defined by max_count in PLASTIC_Detector_System), the ONLINE calibration is performed.

For this, all written histograms are transformed into cumulated histograms with

  • Bin_Content_Cumulated[i+1] = Bin_Content_Cumulated[i] + Bin_Content[i+1]

The calibration coefficient can then be obtained via

  • Calibrated_fine_T[i] = Bin_Content_Cumulated[i]/Total_Sum*5000ps

where Total_Sum is the sum of all cumulated bin contents. At the moment, there are 4000 bins in each histogram.

The resulting calibration files are saved at Configuration_Files/Calibration_PLASTIC/ with a corresponding map (MAP.dat) of all used TAMEX modules with respective channels.

images/CDF_PLASTIC.png The uncalibrated cumulated spectra (see Figure) will be saved in a Root file which can be found at Root_Trees/PLASTIC_TREE.root.

OFFLINE Calibration

This is the standard procedure.

  • All configuration files generated by the ONLINE Calibration are read in using the file MAP.dat in Configuration_Files/Calibration_PLASTIC/ first.
  • For each fine time of the PLASTIC_Detector_System data, the corresponding calibration value is determined by double get_Calibration_val(double value,int tamex_id_tmp,int ch_id_tmp).
  • Inside double get_Calibration_val(...), a linear spline interpolation is performed between the calibration file grid points to get a more accurate calibration value
    Linear spline interpolation: y(x) = (y2 - y1)/(x2 - x1)*(x - x1) + y1