For each event, the telemetry contains nine charge values, stored in the columns POSTPHAS and PREPHAS, corresponding to an array of 3x3 pixels, the central pixel and eight surrounding pixels. This task reads the nine elements of the POSTPHAS and PREPHAS columns and applies various corrections necessary to calibrate the energy of the events and writes the result in the PHAS column of the output file. The algorithm used to calculate the PHAS column is described below (steps 1-5).
The task also assign a grade value to each event (GRADE column of the output file). The grades are assigned following a charge pattern definition stored in the CALDB grade file (parameter 'gradefile'). The output event file contains calibrated 'PHAS', 'GRADE' and 'SWTRIG' columns. Optionally, the columns 'RAWPHAS', 'OFFPHAS' and 'TRPHAS' are also stored in the output file by setting the paramter 'cleancols=no'.
The algorithm used is summarized below.
1) Computation of RAWPHAS (9 dimensional vector):
where the 9 values of OFFSET[9] are read from the input CAP_OFFSET
file and are dependent on:
- the coordinates (RAWX, RAWY) of the pixels (3X3 array)
- the capacitor number (S_CAP column) of the event
- the detector (DET_ID column)
where NUMRISE, DENRISE are read from the input event file. The 9 values
of TIMERISE[9] are read by default from the input PHAPAR file and are dependent on:
- the coordinates (RAWX, RAWY) of the pixels (3X3 array)
- the detector (DET_ID column)
If the parameter 'phaparfile' is set to 'NONE', the 9 values are provided in input to the task through the specific parameter 'timerise' (default=0.0016).
4b) selection of the N pixels ("E+") with TRPHAS >= 'EVTTHR[9]' (not including the M pixels defined in point 4a)
4c) selection of the 9-N-M pixels ("E-") with TRPHAS < 'EVTTHR[9]'
The 9 values of EVTTHR[9] are read by default from the input PHAPAR file and are dependent on:
- the coordinates (RAWX, RAWY) of the pixels (3X3 array)
- the detector (DET_ID column)
If the parameter 'phaparfile' is set to 'NONE', the 9 values are provided in input to the task through the specific parameter 'evtthr' (default=55).
4d) calculation of the mean of the pixels with TRPHAS < 'EVTTHR[9]':
< E- >=(&sum E-)/(9-N-M)
4e) computation of PHAS (9 dim. vector) for the N pixels "E+":
PHAS[9] = TRPHAS[9] - < E->
4f) computation of PHAS (9 dim. vector) for the 9-N-M pixels "E-":
PHAS[9] = TRPHAS[9]
4g) setting to zero PHAS values for the M pixels out of detector::
PHAS[9] = 0
> nucalcpha infile=nu40060001001A_uf.evt outfile=nu40060001001A_out.evt