PSC TW Calibration

From GlueXWiki
Revision as of 21:03, 23 November 2015 by Aebarnes (Talk | contribs) (Created page with "== Overview == The plugin PSC_TW is used to determine the time-walk of the pair spectrometer coarse counter TDCs. Instead of using the fADC for a time reference, the RF signal...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

The plugin PSC_TW is used to determine the time-walk of the pair spectrometer coarse counter TDCs. Instead of using the fADC for a time reference, the RF signal is used. This plugin will generate a ROOT file from an EVIO or HDDM file that contains 16 histograms, the time difference versus pedestal-subtracted pulse peak amplitude for all 16 coarse counter modules. A separate ROOT macro will analyze and fit these histograms and provide a table for the CCDB as well as an output ROOT file containing the results for verification.

Generating a ROOT file

To run the plugin, use the following command:

hd_root -PPLUGINS=PSC_TW /path/to/datafile

If a different output filename must be used, change the output file name by adding the following to the hd_root command

-o new_filename.root
  • Note: If a file other than hd_root.root is used as the input file for the fitting macro, the macro will need it's input file changed.

Using the ROOT macro

Once the file ROOT file has been generated use the macro run_fit.C in the following way

$ root -l -b -q 'tw_corr.C("hd_root.root")'

This will load the macro tw_corr.C and then call the method tw_corr(). Once it finishes it will exit ROOT. No display will be set.

  • Screen output has been turned off by default. If you would like to see the results as they are computed, change the flag OUTPUT to true at the top of the macro.
  • If the input file is not hd_root.root, edit the command so that it matches the correct filename.

Adding the time-walk parameters to CCDB

To add files to the CCDB, type the following

$ ccdb -i
ccdb> cd PHOTON_BEAM/pair_spectrometer
ccdb> add tdc_timewalk_corrections psc_tw_parms.out

Debugging the ROOT macro

If problems arise with the ROOT macro, set the flag DEBUG to true. This will print out the current position of the code and can help narrow down the problem.