JeffersonLab / hcana

Hall C++ Analyzer
7 stars 118 forks source link

Add Helicity Detector #419

Closed sawjlab closed 5 years ago

sawjlab commented 5 years ago

Undoes delayed helicity reporting by learning seed of pseudo random sequence used by injector helicity electronics.

This detector class should be added to the Trigger apparatus. Delivers the global variables "hel" and "helrep". "helrep" is the reported delayed helicity and "hel" is the actual helicity. + and - helicity are reported as +1 and -1. If the event is during a MPS settling period, then the helicity variables are zero. For the first few seconds of a run, the "hel" variable will be zero as the pseudo random sequence seed has not been determined. (If the trigger class is "T" and this detector is called "helicity", then these variables will be T.helicity.hel and T.helicity.helrep.

By default, it is assumed that there is delayed reporting of 8 cycles and that Quartets are used. If delayed helicity reporting is not in use, then set the parameter "helicity_delay" to zero.