General Calibration Procedures

From GlueXWiki
Jump to: navigation, search

General Reference

Starting a New Run Period


  • Online calibrations
    • The online calibrations are run by a crontab running on gluon105 - keep them disabled until a base set of calibrations have been established.
    • Work in CALIBRATION_TRAIN/online
    • Modify the starting run in
    • Update RCDB_SEARCH_* in
    • Update RUN_PERIOD
    • Check which drive calibration data is being written to (currently gluonraid2)
  • Check to make sure the magnetic field is properly set? This might not be a problem if it's being set online now...
  • Offline calibrations
    • Right now, basically these are just skimming the data
    • ~20% of the data (file # < 30) are running skims which require tracking (pi0 skims, omegas, ...), the rest just get PS triggers and other specialties
    • Base directory for these files is: /work/halld/home/gxproj3/calib_jobs
    • Make new directory for a run period: "mkdir RunPeriod-2018-08"
    • Change into this directory and make some basic directories "mkdir log scripts sqlite_ccdb"
    • Copy in the "script" files from the previous run period (why not?)


  • Several data types stored in the data stream rely on shared-memory and other ancilliary processes to be running. So it's good to check these. Make sure that BOR records are being written early on in the raw data, that board configurations are being written into each event, and that EPICS events are showing up in the data stream
    • Note that the first two events in a run are generally control events: Prestart and Go. Then usually the BOR event should show up
  • Make sure parameters are being reasonably propagated into the RCDB


  • Look at occupancy plots to find dead channels
  • Check firmware if there's new firmware.
    • So far, this has only really been tested for the fADC250's
    • hd_root -PPLUGINS=lowlevel_online -PLOWLEVEL:CHECKEMULATION=1 data.evio
      • This prints out cases where the emulated pulses don't match the measured pulses
    • hd_dump -PSKIP_TO_EVENT=XXXXXX -PEVIO:VERBOSE=10 -DDf250PulseData data.evio
      • If you see bad pulses, you can look at the pulse data by running a command like this
  • Start the timing calibrations
    • Start with the RF Calibration - for normal running, it's usually enough to just calibrate the fine timing offsets
    • Check TOF_TDC_shift calibration
    • Run HLDetectorTiming and use the HistMacro_Online*.C plugins to check the overall timing, perform a rough timing calibration
      • ROOT: SetPrimaryPeaks.C("hd_root.root",<run>,"default")
    • Run HLDetectorTiming to perform a finer alignment
      • ROOT: AdjustTiming.C("hd_root.root",<run>,"default")
      • Push calibrations to "calib" variation
        • From $CALIBRATION_TRAIN/scripts: [make sure "max_run=ccdb.INFINITE_RUN" is set]
        • python -T timing_tables -R 50612 -S default -D calib