Skip to content
jrquirk edited this page Jun 3, 2014 · 3 revisions

Summary

Looks through ODB and Low Level Data Quality (LLDQ) histograms to estimate what are the Pedestal, Polarity, and TimeShift (called Offset in the code sometimes). It also determines whether or not a channel is Enabled, and under certain circumstances corrects the Sampling Frequency. Then outputs all of this to an ODB file to be read in on the next running of alcapana.

Algorithms

Pedestal

Looks at the Y-projection of the Shapes 2D histogram and takes the bin with the highest value. It looks at least 5 bins away from the upper and lower rail in an effort to avoid overflows.

Polarity

Looks for the farthest non-zero bin from the pedestal in the same histogram as the Pedestal; the polarity is in this direction. Again, looks at least 5 bins away from the edges.

TimeShift

Looks at the muSc timing correlation plots and takes the bin with the largest value. If there aren't enough hits, rebins until a reasonable peak is seen. If there is no peak at least 10 samples high after 3 rebins, sets to zero.

Enabled

If either of the Shapes or Timing histograms are not present or empty, the channel is considered disabled. Otherwise, it is assumed enabled. The exception is the muSc, which has an empty timing histogram. ##Sampling Frequency For runs 2091-2103, the sampling frequency in the ODBs are wrong (1e+08), and are set to their correct freuqnecies (1.6129e+07). See issue #45 for what prompted this.

Compiling

cd AlcapDAQ
. thisdaq.sh
cd analyzer/odb_check/
make

Running

odb_check [--usage] [-h|--help] -d DATA_DIR [-c CORRECTED_ODB_DIR] [-r RUN_MIN RUN_MAX] [run1 run2 ...]

-d    Directory where hist/ and odb/ directories are.
-c    Directory where corrected OFB files should go (default: DATA_DIR/corr/)
-r    Run range to process. Multiple run ranges can be passed with multiple -r flags
run#  Space separated list of runs to process

For directory arguments, the trailing slash is optional.