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 gluon120 - keep them disabled until a base set of calibrations have been established.
    • Work in CALIBRATION_TRAIN/online
      • Currently, CALIBRATION_TRAIN=/gluonwork1/Users/sdobbs/calibration_train
    • Modify the starting run in
      • This determines the run range over which we search for new runs to calibrate. It's a good idea to increase this during the run (every month?) to decrease the overhead for this process
    • Update RCDB_SEARCH_* in
      • This search is used to get a list of "production runs" as tagged by the DAQ, so we don't bother
      • RCDB_SEARCH_MIN and _MAX are used to specify the run range for this search. It would probably be better to
      • RCDB_PRODUCTION_SEARCH is the search string to specify the production run requirements, usually it's an alias likee @is_dirc_production or @is_primex_production
    • Update RUN_PERIOD
    • Add "-N" switch to call if we're running without the magnetic field
      • The CCDB and everything will be properly set with or without this switch, but we're making it an intentional choice to switch calibration procedures.
    • Update halld_recon software
      • update $CALIBRATION_TRAIN/online/ to modify the software environment if need be - generally try to build on the standard offline environment, which doesn't use version XML files
      • cd $HALLD_RECON_HOME/src ; git pull origin master ; scons -j20 install
    • Check which drive calibration data is being written to (currently gluonraid2)
  • Check to make sure the magnetic field is properly set. This is just for the check-out period - this will be automatically updated in CCDB by the scripts
    • Look at value of Magnets/Solenoid/solenoid_map
    • To update, run " <solenoid_current> <starting run>"
  • 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?)
    • Update the file $CALIBRATION_TRAIN/
    • update the RUNPERIOD and run ranges, similar to


  • 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
  • Go through the RF Calibration procedures


  • Look at occupancy plots to find dead channels
  • Check firmware if there's new firmware (n.b. there's probably not 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