Difference between revisions of "Calibration Challenge"

From GlueXWiki
Jump to: navigation, search
(Challenge Type 1)
(Final Pass)
 
(82 intermediate revisions by 3 users not shown)
Line 31: Line 31:
 
* 50um diamond radiator
 
* 50um diamond radiator
 
* 800A solenoid current
 
* 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.
 
In principle, simulations could be used as well.  Some effort is needed to work on the software to support this.
Line 51: Line 56:
 
* TOF/tdc_timing_offsets
 
* TOF/tdc_timing_offsets
 
* TOF/...
 
* TOF/...
 +
* BCAL/TDC_offsets
 +
* BCAL/ADC_timing_offsets
 +
* BCAL/timewalk_tdc
 
* PHOTON_BEAM/RF/time_offset
 
* PHOTON_BEAM/RF/time_offset
 
* PHOTON_BEAM/RF/time_offset_var
 
* PHOTON_BEAM/RF/time_offset_var
Line 61: Line 69:
 
* PHOTON_BEAM/pair_spectrometer/coarse/tdc_time_offsets
 
* PHOTON_BEAM/pair_spectrometer/coarse/tdc_time_offsets
 
* PHOTON_BEAM/pair_spectrometer/fine/fadc_time_offsets
 
* PHOTON_BEAM/pair_spectrometer/fine/fadc_time_offsets
 +
* BCAL gain ratios
 +
* BCAL/attenutation_parms
  
 
Future:
 
Future:
Line 68: Line 78:
 
== Multiple Run Photon Beam Data ==
 
== Multiple Run Photon Beam Data ==
  
 +
* BCAL/ADC_gains
 
* FCAL/gains
 
* FCAL/gains
 
* START_COUNTER/attenuation_factors
 
* START_COUNTER/attenuation_factors
Line 78: Line 89:
 
== Cosmic Data ==
 
== Cosmic Data ==
  
 +
* BCAL/effective_velocities?
 
* CDC/cdc_drift
 
* CDC/cdc_drift
 
* CDC/wire_aligment
 
* CDC/wire_aligment
Line 84: Line 96:
  
 
* magnetic field dependence? other tracking corrections?
 
* magnetic field dependence? other tracking corrections?
 +
 +
= Plugin Requirements =
 +
 +
Calibration plugins should satisfy the following guidelines:
 +
 +
# Uses a DANA plugin to process the EVIO files
 +
# ROOT/text files are the preferred intermediate file format
 +
# The final output is a text file that can be used as an input to CCDB
 +
# Contains ROOT scripts to make plots that monitor/verifies the outputs
 +
# 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 =  
 
= 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:
 
The following plugins will be used:
* BCAL_TDC_Timing
+
* BCAL_attenlength_gainratio
 +
* BCAL_gainmatrix
 +
* BCAL_TDC_Timing
 +
* FCALgains
 +
* FCALpedestals
 
* HLDetectorTiming   
 
* HLDetectorTiming   
 +
* PS_timing
 
* PSC_TW
 
* PSC_TW
* <span style="color: red">SC timewalk [upcoming]</span>
+
* PS_E_calib
* <span style="color: red">TAGH timewalk [upcoming?]</span>
+
* RF_online
* <span style="color: red">TAGM timewalk [upcoming?]</span>
+
* st_tw_corr_auto
 +
* ST_Propagation_Time
 +
* ST_Tresolution
 +
* TAGH_timewalk
 +
* TAGM_TW
 +
 
 +
== 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 ==
 +
 
 +
=== Job Structure ===
 +
 
 +
* '''Job 0''': Pass 0, 1, 2
 +
* '''Job 1''': Pass 3
 +
* '''Job 2''': Final Pass
 +
 
 +
=== 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:  500k
 +
 
 +
hd_root options: -PHLDETECTORTIMING:DO_TDC_ADC_ALIGN=1 -PTOF:DELTA_T_ADC_TDC_MAX=1000 -PSC:HIT_TIME_WINDOW=1000 -PSC:DELTA_T_ADC_TDC_MAX=1000 -PTAGHHit:DELTA_T_ADC_TDC_MAX=1000 -PTAGMHit:DELTA_T_ADC_TDC_MAX=1000
 +
 
 +
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/TDC_offsets
 +
* /FCAL/timing_offsets
 +
* /START_COUNTER/adc_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 1.5 ===
 +
 
 +
Plugins: st_tw_corr_auto
 +
 
 +
Number of events:  1M
 +
 
 +
hd_root options: -PSC:USE_TIMEWALK_CORRECTION=0 -PSC:HIT_TIME_WINDOW=5000. -PSC:DELTA_T_ADC_TDC_MAX=5000.
 +
 
 +
Tables that are calibrated:
 +
 
 +
* /START_COUNTER/timewalk_parms_v2
 +
 
 +
=== Pass 2 ===
 +
 
 +
Plugins: HLDetectorTiming (per-channel alignment), BCAL_TDC_Timing (first pass)
 +
 
 +
Number of events:  one file
 +
 
 +
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 
 +
 
 +
Tables that are calibrated:
 +
 
 +
* /BCAL/timewalk_tdc
 +
* /BCAL/base_time_offset
 +
* /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
 +
 
 +
=== Pass 3 ===
 +
 
 +
Plugins:  PS_timing, TAGH_timewalk, BCAL_attenlength_gainratio, BCAL_TDC_Timing (second pass)
 +
 
 +
Number of events:  all
 +
 
 +
hd_root options: -PBCAL:USE_TDC=1
 +
 
 +
Tables that are calibrated:
 +
 
 +
* /BCAL/channel_global_offset
 +
* /BCAL/tdiff_u_d
 +
* /BCAL/ADC_timing_offsets
 +
* /PHOTON_BEAM/hodoscope/tdc_timewalk
 +
* /PHOTON_BEAM/pair_spectrometer/base_time_offset
 +
* /PHOTON_BEAM/pair_spectrometer/coarse/tdc_timing_offsets
 +
* /PHOTON_BEAM/pair_spectrometer/coarse/adc_timing_offsets
 +
* /PHOTON_BEAM/pair_spectrometer/fine/adc_timing_offsets
 +
* /START_COUNTER/timewalk_parms_v2
 +
 
 +
=== Final Pass ===
 +
 
 +
Plugins: HLDetectorTiming,PSC_TW,BCAL_gainmatrix,FCALgains,FCALpedestals,ST_Tresolution,ST_Propagation_Time,p2gamma_hists,imaging,pedestal_online,BCAL_LEDonline,TOF_calib
 +
 
 +
Number of events: all
 +
 
 +
hd_root options:
 +
 
 +
Tables that are calibrated:
 +
 
 +
* /START_COUNTER/propagation_time_corr
 +
* /PHOTON_BEAM/pair_spectrometer/tdc_timewalk_corrections

Latest revision as of 19:33, 25 February 2016


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_gainmatrix
  • BCAL_TDC_Timing
  • FCALgains
  • FCALpedestals
  • HLDetectorTiming
  • PS_timing
  • PSC_TW
  • PS_E_calib
  • RF_online
  • st_tw_corr_auto
  • ST_Propagation_Time
  • ST_Tresolution
  • TAGH_timewalk
  • TAGM_TW

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

Job Structure

  • Job 0: Pass 0, 1, 2
  • Job 1: Pass 3
  • Job 2: Final Pass

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: 500k

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

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/TDC_offsets
  • /FCAL/timing_offsets
  • /START_COUNTER/adc_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 1.5

Plugins: st_tw_corr_auto

Number of events: 1M

hd_root options: -PSC:USE_TIMEWALK_CORRECTION=0 -PSC:HIT_TIME_WINDOW=5000. -PSC:DELTA_T_ADC_TDC_MAX=5000.

Tables that are calibrated:

  • /START_COUNTER/timewalk_parms_v2

Pass 2

Plugins: HLDetectorTiming (per-channel alignment), BCAL_TDC_Timing (first pass)

Number of events: one file

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

Tables that are calibrated:

  • /BCAL/timewalk_tdc
  • /BCAL/base_time_offset
  • /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

Pass 3

Plugins: PS_timing, TAGH_timewalk, BCAL_attenlength_gainratio, BCAL_TDC_Timing (second pass)

Number of events: all

hd_root options: -PBCAL:USE_TDC=1

Tables that are calibrated:

  • /BCAL/channel_global_offset
  • /BCAL/tdiff_u_d
  • /BCAL/ADC_timing_offsets
  • /PHOTON_BEAM/hodoscope/tdc_timewalk
  • /PHOTON_BEAM/pair_spectrometer/base_time_offset
  • /PHOTON_BEAM/pair_spectrometer/coarse/tdc_timing_offsets
  • /PHOTON_BEAM/pair_spectrometer/coarse/adc_timing_offsets
  • /PHOTON_BEAM/pair_spectrometer/fine/adc_timing_offsets
  • /START_COUNTER/timewalk_parms_v2

Final Pass

Plugins: HLDetectorTiming,PSC_TW,BCAL_gainmatrix,FCALgains,FCALpedestals,ST_Tresolution,ST_Propagation_Time,p2gamma_hists,imaging,pedestal_online,BCAL_LEDonline,TOF_calib

Number of events: all

hd_root options:

Tables that are calibrated:

  • /START_COUNTER/propagation_time_corr
  • /PHOTON_BEAM/pair_spectrometer/tdc_timewalk_corrections