BCAL Calibration

From GlueXWiki
Revision as of 16:19, 18 January 2018 by Dalton (Talk | contribs)

Jump to: navigation, search

Timing Calibration Order

  1. 2 numbers (ADC, TDC) for each system (BCAL, FCAL etc.) Obtained by lining up the timing peak for all hits at zero. (plugin hl_detector_timing)
  2. Per channel: 1 number to move the TDC distributions mean to coincide with the ADC distribution mean. Average these offsets and apply to base time for TDC.
  3. Timewalk
  4. Make correlated offset to each end of the BCAL to set Z=0 at the center. Add time to one and and subtract same time to other end.
  5. Make correlated offset to each end of the BCAL to set global time correct. Add same time to both ends.


Concrete Steps in Calibration

macros are located at /group/halld/Users/dalton/BCAL/monitoring/macros/

  1. Remove 4ns ADC hardware offset (pass 1)
    1. Run reconstruction with BCAL_TDC_Timing plugin to produce the BCAL_TDC_Offsets/Deltat_raw/ histogram
    2. Run analysis script over output
      • script for single run is macros/extract_ADC_Dt_Zcorr.C
      • macros/monitor.py --adc4ns can be used to run over all runs
    3. Load constants to CCDB table /BCAL/ADC_timing_offsets using python macros/commit_CCDB.py -d output/ADCendDt/correction/ --adc
  2. Remove 32ns TDC hardware offset (pass 1)
    1. Set CCDB table /BCAL/TDC_offsets to 0
    2. Run reconstruction with BCAL_online plugin to produce the /bcal/bcal_Uhit_tdiff_raw_ave histogram (pass 1)
    3. Run analysis script over output
      • script for single run is macros/extract_Uhit_tdiff.C
      • macros/monitor.py can be used to run over all runs
    4. Load constants to CCDB table /BCAL/TDC_offsets using python macros/commit_CCDB.py -d output/tdiff/TDCcorrection/runs/ --tdc -v
  3. TDC timewalk correction (pass 2)
    1. Prerequisites:
      1. Remove 4ns ADC hardware offset
      2. Remove 32ns ADC hardware offset
    2. Run reconstruction with BCAL_TDC_Timing plugin
    3. Run analysis script over output
      • script for single run is macros/fit_TDCtimewalk.C
      • macros/monitor.py --timewalk can be used to run over all runs
    4. Load constants to CCDB
  4. Position from end time-difference (pass 2)
    1. Prerequisites:
      1. Remove 4ns ADC hardware offset
    2. Run reconstruction with BCAL_TDC_Timing plugin
    3. Run analysis script over output
      • script for single run is macros/
      • ./macros/monitor.py --position can be used to run over all runs
    4. Load constants to CCDB
  5. Calibrate the point time offset from tracking (pass 2)
    1. Prerequisites:
      1. Remove 4ns ADC hardware offset
    2. Run reconstruction with BCAL_TDC_Timing plugin
    3. Run analysis script over output
      1. Linear fit (needs ~1M events per run)
        • script for single run is macros/fit_ZvsDeltaT_p1.C
        • macros/monitor.py can be used to run over all runs
      2. Quadratic fit (needs 5 files per run)
    4. Load constants to CCDB
  6. Attenuation length and gain ratio (pass 3)
    1. Prerequisites:
      1. position calibration (pass 2)
    2. Run reconstruction with BCAL_attenlength_gainratio plugin
    3. Run analysis script over output
    4. Load constants to CCDB


CCDB Tables

base_time_offset

2 column, 1 rows.
This is used in DBCALHit_factory.cc , it is added to the hit time

ADC_timing_offsets

1 col, 1536 row
This is loaded in DBCALHit_factory and is used to remove the 4 ns timing offset.

effective_velocities

1 col, 768 row
used in DBCALCluster_factory::overlap() (cluster with hit)
used in DBCALPoint_factory  to calculate z and throw away points > 60 cm from BCAL
used in DBCALPoint to subtract the fiber-propagation-time from the time sum

channel_global_offset

1 col, 768 row
This is used in DBCALHit_factory and DBCALTDCHit_factory , it is subtracted from the hit time.

z_track_parms

3 col, 768 row
Used in BCALPoint to get z position from delta_t

tdiff_u_d

1 col, 768 row
This is used in DBCALHit_factory and DBCALTDCHit_factory, but we agree now that it should not be.

digi_scales

3 col, 1 rows.
ASCALE not used, but TSCALE is

TDC_offsets

1 col, 1152 row
This is used in DBCALTDCHit_factory , it is subtracted from the hit time.
I think this is to line up the TDCs with the ADCs.