Skip to content

Time calibration of detector with common clock #767

@ajedele

Description

@ajedele

Currently, the newest version of R3BRoot has a function named R3BTimestitch. Below is an overview, description of the issue, the correction and the detectors affected.

Overview of the Timestitcher:
The function corrects the coarse time cycling of our TDCs. Typically, if the timing cycle is the same, a hit comes in somewhere in the middle of the cycle and when subtracting, for example, LOS from TOFD, you get the correct coarse time. However, sometimes, the LOS hit may come at the end of the cycle and the TOFD at the beginning. In this case, the coarse timing value is negative and incorrect. To compensate for this, we add x.5 time cycles, where x is an integer (usually 2-4 - value depends on how many clock cycles you will go through relative to the other electronics). We then take ((time + x.5*_length_of_cycle) % length_of_cycle). Then we subtract the 0.5*length_of_cycle that we added.

Issue:
If the electronics run of the same clock, you can do the time correction in 1 step, as done in the R3BTimestich code. However, NOT ALL OF OUR DETECTORS RUN ON AN INTERNAL CLOCK OF 200 kHz. For example, the 1st generation of our fiber detectors using the old drift chamber FW (should be s444, s473, s454) and the KILOMs run on a 150 kHz clock (currently incorrect in the code. Now set as 40965(ns), should be 40966.67(ns)). In this case, if you do the correction in 1 step, there will be an incorrect offset that is produced.

Correction:
To avoid the offset issue, the time correction should always be corrected in 2 step. Each detector should be correct individually and then the corrected times should be subtracted from each other.

Otherwise ALL detectors NEED to run on a 200 kHz clock.

Detectors affected:
-S2
-SOFIA start in cave c (maybe)
-LOS
-TOFD
-RPC
-Fibers
-NeuLAND (maybe)
-Any other current or future detector that runs on the clock distribution

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions