Project

General

Profile

Actions

Feature #275

closed

TDC mode flag

Added by Ole Hansen about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
1.00 h
Spent time:
Responsible:

Description

Classes for detectors that use TDC readouts should have a flag to set the TDC mode, either common stop or common start. Depending on the mode, the default handling of multiple hits on a channel should be to take the last or the first hit, respectively, assuming that multiple hits are usually caused by afterpulsing and that TDC hits are reported ordered in time. (Of course, neither assumption is always true, and so more advanced detector code would include more intelligent handling, but the simple approach here will handle the typical cases we have now.)

Actions #1

Updated by Ole Hansen about 6 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 80

Mostly implemented with commits d9d74c and e73b4af.

All TDC modules are assumed to be common stop when adding modules to the detector map. One needs to call THaDetMap::Module::SetTDCMode(true) to mark a module as using common start. Each detector should read its TDC mode from the database, although a simple flag would not allow a mix of common stop and common start modules (which would be an unusual scenario). The database part still needs to be done.

Actions #2

Updated by Ole Hansen about 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

Implemented reading TDC mode from the database via optional key "tdc.cnmstart" for THaScintillator and THaCherenkov. If set to 1, the detector assumes common start TDCs, if set to 0, it forces common stop mode processing. This affects the sign of the correlation between raw TDC data and calibrated times. For common start mode, we have

time = (rawdata - offset) * resolution

and for common stop,
time = (offset - rawdata) * resolution

Some old databases use a negative TDC resolution to handle common stop mode. This will still work, but only as long as the mode parameter is not present in the database. If the mode is set, regardless of how, the TDC resolution will be converted to positive. Setting the mode explicitly is encouraged.

Closed by commits 744cb11 and 2cbd01b.

Actions

Also available in: Atom PDF