Difference between revisions of "Calibration Challenge"

From GlueXWiki
Jump to: navigation, search
(Pass 3)
(Pass 2)
Line 221: Line 221:
 
=== Pass 2 ===
 
=== Pass 2 ===
  
Plugins: HLDetectorTiming (per-channel alignment), BCAL timewalk, SC timewalk, PSC timewalk
+
Plugins: HLDetectorTiming (per-channel alignment), BCAL timewalk, SC timewalk, PSC timewalk, <span style="color: blue">PS energies</span>
  
 
Number of events:  all
 
Number of events:  all

Revision as of 16:14, 30 November 2015


Overview

We propose to run a "Calibration Challenge" starting the first week of December 2015.

The goal will be to take a run with zeroed out calibrations and to see how many calibrations can be automatically extracted.

Test runs will be performed in the weeks leading up to this challenge.


Types of Tests

Various types of tests could be run to exercise our calibration procedures.

  1. Calibration values are normalized to some neutral value (e.g. 1 or 0), and the calibrations are derived "ab initio".
    • Given the diversity of run conditions among the few production runs in the spring data, it makes sense to do this test with just one run at a time, and not combine runs. Therefore, we can test calibrations that only need ~1 runs' worth of data.
  2. Current calibration values are perturbed by some amount, and procedures are run to see how well the current values are recovered.
    • The perturbations would be specific to each calibration. Different functional forms? Gaussian? Square wave?
    • This would give us a way of testing calibrations that require more than one run's worth of data to be done from an uncalibrated state.


Types of Data

References:

The largest spring production run is 2931, so that would be a good choice. It has the following charateristics:

  • 50um diamond radiator
  • 800A solenoid current
  • 74M triggers

To test the tagger calibrations, PS triggered data is needed. Run 3180 looks good, it uses:

  • amorphous radiator
  • 1300A solenoid current
  • 41M triggers

In principle, simulations could be used as well. Some effort is needed to work on the software to support this.

Calibration Classes

We can classify the calibrations by the type and amount of data needed. Only tables that have well-defined procedures have been included.

One Run Photon Beam Data

  • All/base_time_offets
  • CDC/timing_offsets
  • FCAL/timing_offsets
  • START_COUNTER/adc_timing_offsets
  • START_COUNTER/tdc_timing_offsets
  • START_COUNTER/timewalk_parms
  • TOF/adc_timing_offsets
  • TOF/tdc_timing_offsets
  • TOF/...
  • BCAL/TDC_offsets
  • BCAL/ADC_timing_offsets
  • BCAL/timewalk_tdc
  • PHOTON_BEAM/RF/time_offset
  • PHOTON_BEAM/RF/time_offset_var
  • PHOTON_BEAM/RF/time_resolution_sq
  • PHOTON_BEAM/hodoscope/fadc_time_offsets
  • PHOTON_BEAM/hodoscope/tdc_time_offsets
  • PHOTON_BEAM/microscope/fadc_time_offsets
  • PHOTON_BEAM/microscope/tdc_time_offsets
  • PHOTON_BEAM/pair_spectrometer/coarse/fadc_time_offsets
  • PHOTON_BEAM/pair_spectrometer/coarse/tdc_time_offsets
  • PHOTON_BEAM/pair_spectrometer/fine/fadc_time_offsets
  • BCAL gain ratios
  • BCAL/attenutation_parms

Future:

  • Most basic FDC calibrations?

Multiple Run Photon Beam Data

  • BCAL/ADC_gains
  • FCAL/gains
  • START_COUNTER/attenuation_factors
  • START_COUNTER/propogation_speeds

Future:

  • CDC/wire_aligment ?

Cosmic Data

  • BCAL/effective_velocities?
  • CDC/cdc_drift
  • CDC/wire_aligment
  • CDC/sag_parameters
  • CDC/drift_parameters
  • magnetic field dependence? other tracking corrections?

Plugin Requirements

Calibration plugins should satisfy the following guidelines:

  1. Uses a DANA plugin to process the EVIO files
  2. ROOT/text files are the preferred intermediate file format
  3. The final output is a text file that can be used as an input to CCDB
  4. Contains ROOT scripts to make plots that monitor/verifies the outputs
  5. The outputs and execution steps are documented

If your plugin does not satisfy these, then please discuss the situation with the Calibration Coordinator (Sean), and we will develop a plan of action.

Challenge Type 1

We will focus on calibrations that can be fully done with one run's worth of beam data, ignoring calibrations that are best performed with cosmic data.

The following plugins will be used:

  • BCAL_attenlength_gainratio
  • BCAL_TDC_Timing
  • HLDetectorTiming
  • PSC_TW
  • RF_online
  • BCAL gains [upcoming] (Will M.)
  • PS energies [upcoming] (Alex B.)
  • SC timewalk [upcoming] (Mahmoud K.)
  • TAGH timewalk [upcoming] (Nathan S.)
  • TAGM timewalk [upcoming] (Alex B.)

Managing Constants

Proposal:

The MySQL CCDB is a convenient location to store the history of the constants generated in this challenge. This information would be useful for debugging and understanding how different calibration steps interact with each other.

We can store the results in a series of variations, one for each step, whose parent is the variation for the previous step (calib_pass0 -> calib_pass1 -> calib_pass2 -> ...)

The workflow would be:

  • When starting, initialize relevant tables in calib_pass0 to starting values
  • Before each pass, generate new SQLite file for batch job(s)
  • At the end of each pass, the calibrations generated at that point would be loaded into the corresponding variation

At the end of the process, the final results would be stored in text files on disk and added to the parent "calib" variation.

Further processing can then be done.

Outputs

The outputs of this exercise will be stored in /work/halld/calib_challenge

They will also be viewable from the web at: https://halldweb.jlab.org/calib_challenge/

Besides validation histograms and constant files, the following outputs will be generated:

  • Histograms and TTrees for BCAL gain calibration

Run Plan

Pass 0

Step 1

Plugins: RF_online (timing validation)

Number of events: 100k (can be as low as 10k)

Validation: Check TI-times, tdc -> time conversion, and RF period. If bad, fix, and run Step 2. If all were OK, skip to calibrations in Pass 0b (don't rerun for Step 2).

hd_root options: -PEVENTS_TO_KEEP=100000 -PPLUGINS=RF_online

Step 2

Plugins: RF_online (time_resolution_sq, coarse timing offsets)

Number of events: 100k (can be as low as 10k)

hd_root options: -PEVENTS_TO_KEEP=100000 -PPLUGINS=RF_online

Step 3

Plugins: RF_online (fine timing offsets, time_offset_var)

Number of events: 100k (can be as low as 10k)

hd_root options: -PEVENTS_TO_KEEP=100000 -PPLUGINS=RF_online

Tables that are calibrated:

  • /PHOTON_BEAM/RF/time_offset
  • /PHOTON_BEAM/RF/time_resolution_sq
  • /PHOTON_BEAM/RF/time_offset
  • /PHOTON_BEAM/RF/time_offset_var

Pass 1

Plugins: HLDetectorTiming (rough timing + ADC/TDC alignment)

Number of events: all

hd_root options: -PHLDETECTORTIMING:DO_TDC_ADC_ALIGN=1 -PTOF:DELTA_T_ADC_TDC_MAX=500 -PSC:HIT_TIME_WINDOW=500 -PSC:DELTA_T_ADC_TDC_MAX=500 -PTAGHHit:DELTA_T_ADC_TDC_MAX=500 -PTAGMHit:DELTA_T_ADC_TDC_MAX=500

Tables that are calibrated:

  • /BCAL/base_time_offset
  • /CDC/base_time_offset
  • /FCAL/base_time_offset
  • /FDC/base_time_offset
  • /START_COUNTER/base_time_offset
  • /PHOTON_BEAM/hodoscope/base_time_offset
  • /PHOTON_BEAM/microscope/base_time_offset
  • /TOF/base_time_offset
  • /BCAL/ADC_timing_offsets
  • /BCAL/TDC_offsets
  • /FCAL/timing_offsets
  • /START_COUNTER/adc_timing_offsets
  • /START_COUNTER/tdc_timing_offsets
  • /PHOTON_BEAM/microscope/fadc_time_offsets
  • /PHOTON_BEAM/microscope/tdc_time_offsets
  • /PHOTON_BEAM/hodoscope/fadc_time_offsets
  • /PHOTON_BEAM/hodoscope/tdc_time_offsets
  • /TOF/adc_timing_offsets

Pass 2

Plugins: HLDetectorTiming (per-channel alignment), BCAL timewalk, SC timewalk, PSC timewalk, PS energies

Number of events: all

hd_root options: -PHLDETECTORTIMING:DO_TRACK_BASED=1 -PPID:OUT_OF_TIME_CUT=1000 -PTRKFIT:MASS_HYPOTHESES_POSITIVE=0.14 -PTRKFIT:MASS_HYPOTHESES_NEGATIVE=0.14 -PSC:USE_TIMEWALK_CORRECTION=0 -PSC:HIT_TIME_WINDOW=5000. -PSC:DELTA_T_ADC_TDC_MAX=5000.

Tables that are calibrated:

  • /BCAL/base_time_offset
  • /BCAL/timewalk_tdc
  • /BCAL/channel_global_offset
  • /BCAL/tdiff_u_d
  • /BCAL/ADC_timing_offsets
  • /CDC/base_time_offset
  • /FCAL/base_time_offset
  • /FDC/base_time_offset
  • /START_COUNTER/base_time_offset
  • /START_COUNTER/adc_timing_offsets
  • /START_COUNTER/tdc_timing_offsets
  • /PHOTON_BEAM/hodoscope/base_time_offset
  • /PHOTON_BEAM/microscope/base_time_offset
  • /PHOTON_BEAM/microscope/fadc_time_offsets
  • /PHOTON_BEAM/microscope/tdc_time_offsets
  • /PHOTON_BEAM/hodoscope/fadc_time_offsets
  • /PHOTON_BEAM/hodoscope/tdc_time_offsets
  • /PHOTON_BEAM/pair_spectrometer/tdc_timewalk_corrections

Pass 3

Plugins: TAGH timewalk, TAGM timewalk, BCAL_attenlength_gainratio

Number of events: all

hd_root options:

Tables that are calibrated:

  • /PHOTON_BEAM/hodoscope/tdc_timewalk

Validation Pass

Plugins: HLDetectorTiming,RF_online,st_tw_corr_auto,TAGH_timewalk,BCAL_gainmatrix

Number of events: all

hd_root options: