NAME

hxievtid -- Reconstructs Hitomi HXI events

USAGE

hxievtid infile outfile remapfile fluorefile badpixfile enecutfile

DESCRIPTION

The hxievtid task determines whether the signals in an occurrence constitute a valid event and computes the event position and the energy deposited in the detector. The input file to hxievtid is an SFF (second FITS file) with variable length array columns where each row contains an occurrence with multiple signals recorded at a given time. The output event file, specified by the parameter 'outfile', has a different structure and does not contain columns with variable length arrays. In the output file, each row corresponds to a reconstructed event, and the columns RAWX, RAWY, and PI contain the reconstructed x-position, y-position, and energy respectively of that event, along with additional columns containing other event characteristics, as described below.

The HXI consists of five detector layers in a vertical stack: four Si strip detectors at the top, and a single CdTe detector at the bottom. Each layer is a strip detector with top-side strips running perpendicular to bottom-side strips. Signals in more than one layer are rejected unless they are reconstructed with an X-ray fluorescence event. Signals below the threshold PHA values given in 'badpixfile' are not used in the reconstruction.

The only localization patterns recognized as a valid signal are:

  1. One signal on the top side and one signal on the bottom side.
  2. One signal on the top side and two signals in adjacent strips on the bottom side.
  3. Two signals in adjacent strips on the top side and one signal on the bottom side.
  4. Two signals in adjacent strips on the top side and two signals in adjacent strips on the bottom side.

Occurrences with signals matching one of the template patterns in both the CdTe layer and one Si layer may be accepted if the reconstructed energy deposited in the Si layer is within one of the ranges for a fluorescence X-ray from the CdTe layer.

The reconstructed energy of an event is computed using the signal EPI values calculated in hxisgdpha. For events occurring in a single layer, the event energy (EPI in keV) is taken to be the sum of the one or two signals in the top layer for Si or the bottom layer for CdTe. For events with signals in a single Si layer and the CdTe layer, the EPI is taken from the one or two bottom layer signals in the CdTe layer. The PI value of the event is calculated using a channel size of 0.1 keV.

The coordinate location (RAWX, RAWY) is evaluated by taking the strip number associated with the signal with the larger EPI in both top (RAWY) and bottom (RAWX) sides. In the case of an occurrence with both signals equally split and having the same EPI, the signal determining the position is chosen randomly. For events with signals in two layers, one on Si and one on CdTe, the procedure for position determination is applied for signals in the CdTe layer.

Reconstruction results for each occcurence are in the output file specified by the 'outfile' parameter. Columns copied from the input SFF are TIME, OCCURRENCE_ID, CATEGORY, FLAG_SEU, FLAG_LCHK, FLAG_TRIG, FLAG_TRIGPAT, FLAG_HITPAT, FLAG_FASTBGO, LIVETIME, PROC_STATUS, and STATUS.

Output file columns populated by the reconstruction are as follows:

Additional coordinate columns are added to the file but populated later by the coordevt task: ACTX, ACTY, DETX, DETY, FOCX, FOCY, X, and Y.

The bit flags in the RECO_STATUS (reconstruction status) column are as follows:

 Bit  Description
 ------(Occurrence mode identification)-------------------------------
  0    Mode is Am 241
  1    Mode is PSEUDO
  2    Mode is CALMODE
  3    Mode is READALL
  4    Mode is NOTSURE
 ------(Event reconstruction skipped for this occurrence)-------------
  5    Bad PROC_STATUS
  6    Mode is READALL or CALMODE and SKIPRECO option is YES
  7    Occurrence has no signals
  8    FASTBGO or HITPAT flag is set and REJECTBGO option is YES
 ------(Event reconstruction outcome)---------------------------------
  9    Event could not be reconstructed

PARAMETERS

infile = sff.evt [filename]
Input HXI event data file; output from the hxisgdpha task.

outfile = sffa.evt [filename]
Output event file.

remapfile = CALDB [filename CALDB|file name]
File containing the remapping of ASIC and READOUT numbers. If the parameter is set to CALDB, the file is read the calibration database.

fluorefile = CALDB [filename CALDB|file name]
File containing the energy ranges of fluorescence electrons in CdTe and Si. If the parameter is set to CALDB, the file is read from the calibration database.

badpixfile = CALDB [filename CALDB|file name]
File containing the energy threshold defining a real signal for each readout. If the parameter is set to CALDB, the file s read from the calibration database.

enecutfile = CALDB [filename CALDB|file name]
File containing criteria for rejecting events with a large difference between the top- and bottom-side energies in a layer. If the parameter is set to CALDB, the file is read from the calibration database.

(occurrenceid = -1) [integer]
If greater than zero, the task only expands this single occurrence.

(rejectbgo = no) [boolean yes|no]
If 'rejectbgo=yes', reject events for which BGO trigger occurred. The BGO is the active anticoincdence shield made of Bismuth Germanium Oxide.

(outcalfile = NONE) [filename NONE|file name]
Name of output file containing the reconstruction information for each occurrence by detector side. This file is used for calibration and not used for science analysis.

(datamode = NONE) [string]
If 'datamode' is not set to NONE (or an empty string), 'datamode' is used in place of the value of the keyword DATAMODE that is in the input event file.

(skipreco = no) [boolean yes|no]
If 'skipreco=yes' skip the reconstruction of READALL and CALMODE events.

(buffer = -1) [integer -1|0|N]
Rows to buffer (-1=auto, 0=none, N>0=numrows).

(clobber = no) [boolean yes|no]
Overwrites the existing output file if set to yes.

(chatter = 1) [integer 0|1|2|3]
Chatter level for output. Set to 0 to suppress output, or to 1, 2, or 3 for increasing the chatter of the output.

(logfile = !DEFAULT) [string DEFAULT|NONE|file name]
Log file name. If set to DEFAULT, uses the name of the task and, if preceded by "!", overwrites the file if it exists. If set to NONE, no log file is created.

(debug = no) [boolean yes|no]
Diagnostic output is printed to the screen if set to yes.

(history = yes) [boolean yes|no]
Records tool parameters in HISTORY.

EXAMPLES

1. Reconstruct HXI events using the default values of all hidden parameters. This option produces no extra output file.
hxievtid infile=HXI_SFF.fits outfile=HXI_output.fits remapfile=CALDB fluorefile=CALDB badpixfile=CALDB enecutfile="CALDB
2. Reconstruct HXI events and produce an extra output file.
hxievtid infile=HXI_SFF.fits outfile=HXI_output.fits remapfile=CALDB fluorefile=CALDB badpixfile=CALDB enecutfile=CALDB outcalfile=extra.fits clobber=yes
3. Reconstruct HXI events for a single occurrence.
hxievtid infile=HXI_SFF.fits outfile=HXI_output.fits remapfile=CALDB fluorefile=CALDB badpixfile=CALDB enecutfile=CALDB occurrenceid=2 clobber=yes

SEE ALSO

hxisgdsff, hxisgdpha, sgdevtid,

LAST MODIFIED

November 1, 2023