Hall C Calibration Procedures

From HallCWiki
Jump to: navigation, search

Calibrations

Students / PostDocs write the section then an Expert validates the procedure

I expect to break each detector/calibration out into its own wiki page as they mature, but for now I think it is best to work on this single (big) page until we have settled on a "good" template.

Basic Template for each Detector/Calibration Procedure

For each detector subsystem we would like to capture/document the following information:

  • A list of all (or at least the most useful) ROOT tree variables associated with this detector
  • Description of the calibration algorithm (That is, how is it supposed to work -- what is the logic behind it?)
  • Files involved in the calibration
    • THc* or THa* modules that are needed/used
    • Database files that will be modified
    • Scripts that will be used
    • Dependencies of this calibration
      • Reference time cuts should be verified
      • FADC 'hit selection' timing cuts should be verified
      • Calorimeter calibration relies on good optics calibration for momentum determination
      • If tight timing cuts are used, then the hodoscopes may need to be calibrated first, etc
      • ... etc
  • Provide a step-by-step "Howto" that shows
    • What commands/scripts need to be run, in what order.
    • How do you verify that various cuts (ref times, trigger types, etc) are correct before you run the script(s)?
    • What do you look for to verify that the code has run correctly after you run the script(s)?
  • Common Pitfalls / Things to watch for
    • I have found it useful in the past to provide a list of common symptoms and solutions that people may run into.

Drift Chambers

  • Expert: Deb, Bill Henry
  • Student:

Hodoscopes

  • Expert: Carlos Yero, Deb Biswas, Bill Henry
  • Student: Mingyu
  • The hodoscope calibration scripts are in hallc_replay/CALIBRATION/hms_hodo_calib and hallc_replay/CALIBRATION/shms_hodo_calib
  • Carlos Yero wrote a pretty thorough guide to the calibration procedure on DocDB as well as some nice slides from the 2018 analysis workshop
  • Here are the steps for the HMS. The procedure is the same for the SHMS.
  1. Set the flag htofusinginvadc = 0 to NOT use the hodo parameters from the previous hodoscope calibration procedure. This flag is found on hallc_replay/PARAM/HMS/HODO/ directory.
  2. Replay a run with 1–2 million events.
  3. In the directory hallc_replay/CALIBRATION/hms_hodo_calib/, run the following code:
    • root -l timeWalkHistos.C(<run_num>)
    • This script takes as input the ROOTfile replayed and creates another ROOTfile with histogram objects that are used to perform the time-walk correction.
  4. To do the time-walk corrections, run the following code:
    • root -l timeWalkCalib.C(<run_num>)
    • This script takes as input the ROOTfile containing the histogram objects produced by the previous script. A parameter file containing the time-walk parameters will be produced at
      • hallc_replay/PARAM/HMS/HODO/hhodo_TWcalib_runNUM.param
    • Rename this file hhodo_TWcalib.param
  5. Replay the raw data file, once again (1 - 2 M events), with the updated time-walk parameters.
  6. In the hodoscopoe calibration directory, run the following code:
    • root -l fitHodoCalib.C
    • The first part of this script performs a linear fit on the time-walk corrected time vs. hodoscope track to determine the propagation velocity and the cable time difference across each paddle.
    • The second part of this code solves a matrix equation for the lambda parameters mentioned in Carlos's guide.
    • A parameter file containing the time-walk parameters will be produced at
      • hallc_replay/PARAM/HMS/HODO/hhodo_Vpcalib_runNUM.param
    • Rename this file hhodo_Vpcalib.param
  7. Replay the raw data one last time, and check the hodoscope beta distribution.
    • You may have to apply a calorimeter cut (for example, H.cal.etottracknorm>0.7) to get a clean sample. A good calibration should have beta centered at 1.

Calorimeter

  • Expert: Simona
  • Student: Melanie
  • Simona's slides on calorimeter analysis/calibration: [1]
  • The calorimeter calibration scripts are in hallc_replay/CALIBRATION/hms_cal_calib and hallc_replay/CALIBRATION/shms_cal_calib
  • Slides from the 2017 and 2018 analysis workshops are here [2], [3]

How to perform calibration

  1. Replay a run with HCANA and include the following branches
    • HMS
      • H.cal.1pr.goodNegAdcPulseInt
      • H.cal.1pr.goodPosAdcPulseInt
      • H.cal.2ta.goodNegAdcPulseInt
      • H.cal.2ta.goodPosAdcPulseInt
      • H.cal.3ta.goodNegAdcPulseInt
      • H.cal.3ta.goodPosAdcPulseInt
      • H.cal.4ta.goodNegAdcPulseInt
      • H.cal.4ta.goodPosAdcPulseInt
      • H.cal.nclust
      • H.dc.ntrack
      • H.dc.x_fp
      • H.dc.y_fp
      • H.dc.xp_fp
      • H.dc.yp_fp
      • H.gtr.p
      • H.gtr.dp
      • H.cer.npeSum
      • H.hod.beta
    • SHMS
      • P.cal.pr.goodNegAdcPulseInt
      • P.cal.pr.goodPosAdcPulseInt
      • P.cal.fly.goodAdcPulseInt
      • P.dc.x_fp
      • P.dc.y_fp
      • P.dc.xp_fp
      • P.dc.yp_fp
      • P.dc.ntrack
      • P.gtr.p
      • P.gtr.dp
      • P.hgcer.npeSum
      • P.ngcer.npeSum
      • P.hod.beta
      • P.cal.nclust
      • P.cal.ntracks
      • P.cal.fly.nclust
      • P.cal.fly.ntracks
  1. Create a ROOTfiles directory in the calibration directory (hms_cal_calib or shms_cal_calib)
  2. Modify the input file to select cuts (beta, delta, cherenkov)
  3. Run the calibration script from HCANA .x cal_calib.cpp+("prefix_root_file")

Gas Cerenkovs

  • Expert: Simona
  • Student: Melanie

ROOT Tree Variables

SHMS Heavy Gas Cherenkov (HGC or "hgcer") and Noble Gas Cherenkov (NGC or "ngcer")

  • P.h(n)gcer.npeSum
  • P.h(n)gcer.totNumAdcHits
  • P.h(n)gcer.totNumGoodAdcHits
  • P.h(n)gcer.totNumTracksFired
  • P.h(n)gcer.totNumTracksMatched
  • P.h(n)gcer.xAtCer
  • P.h(n)gcer.yAtCer


  • T.shms.pH(N)GCER_adcMultiplicity
  • T.shms.pH(N)GCER_adcPed
  • T.shms.pH(N)GCER_adcPedRaw
  • T.shms.pH(N)GCER_adcPulseAmp
  • T.shms.pH(N)GCER_adcPulseAmpRaw
  • T.shms.pH(N)GCER_adcPulseInt
  • T.shms.pH(N)GCER_adcPulseIntRaw
  • T.shms.pH(N)GCER_adcPulseTime
  • T.shms.pH(N)GCER_adcPulseTimeRaw


  • T.shms.pH(N)GCER_tdcMultiplicity
  • T.shms.pH(N)GCER_tdcTime
  • T.shms.pH(N)GCER_tdcTimeRaw


  • Ndata.P.h(n)gcer.adcCounter
  • P.h(n)gcer.adcCounter
  • Ndata.P.h(n)gcer.adcErrorFlag
  • P.h(n)gcer.adcErrorFlag
  • Ndata.P.h(n)gcer.adcPed
  • P.h(n)gcer.adcPed
  • Ndata.P.h(n)gcer.adcPedRaw
  • P.h(n)gcer.adcPedRaw
  • Ndata.P.h(n)gcer.adcPulseAmp
  • P.h(n)gcer.adcPulseAmp
  • Ndata.P.h(n)gcer.adcPulseAmpRaw
  • P.h(n)gcer.adcPulseAmpRaw
  • Ndata.P.h(n)gcer.adcPulseInt
  • P.h(n)gcer.adcPulseInt
  • Ndata.P.h(n)gcer.adcPulseIntRaw
  • P.h(n)gcer.adcPulseIntRaw
  • Ndata.P.h(n)gcer.adcPulseTime
  • P.h(n)gcer.adcPulseTime
  • Ndata.P.h(n)gcer.adcPulseTimeRaw
  • P.h(n)gcer.adcPulseTimeRaw
  • Ndata.P.h(n)gcer.goodAdcHitUsed
  • P.h(n)gcer.goodAdcHitUsed
  • Ndata.P.h(n)gcer.goodAdcMult
  • P.h(n)gcer.goodAdcMult
  • Ndata.P.h(n)gcer.goodAdcPed
  • P.h(n)gcer.goodAdcPed
  • Ndata.P.h(n)gcer.goodAdcPulseAmp
  • P.h(n)gcer.goodAdcPulseAmp
  • Ndata.P.h(n)gcer.goodAdcPulseInt
  • P.h(n)gcer.goodAdcPulseAmp
  • Ndata.P.h(n)gcer.goodAdcPulseIntRaw
  • P.h(n)gcer.goodAdcPulseInt
  • Ndata.P.h(n)gcer.goodAdcPulseTime
  • P.h(n)gcer.goodAdcPulseTime
  • Ndata.P.h(n)gcer.goodAdcTdcDiffTime
  • P.h(n)gcer.goodAdcTdcDiffTime


  • Ndata.P.h(n)gcer.npe
  • P.h(n)gcer.npe
  • Ndata.P.h(n)gcer.numAdcHits
  • P.h(n)gcer.numAdcHits
  • Ndata.P.h(n)gcer.numGoodAdcHits
  • P.h(n)gcer.numGoodAdcHits
  • Ndata.P.h(n)gcer.numTracksFired
  • P.h(n)gcer.numGoodAdcHits
  • Ndata.P.h(n)gcer.numTracksMatched
  • P.h(n)gcer.numTracksMatched

Calibration Algorithm

  • There are two methods used to calibrate the gas Cherenkovs:
    • The first - most straightforward - method is to identify the single photo-electron (SPE) peak from the ADC readout (and the oscilloscope). The pulse amplitudes of the PMTs are read out using FADCs and integrated to produce the pulse integrals. These histograms are then fitted along the range of the SPE signal to find the mean, which gives the number of picocoulombs for 1 photo-electron. This is the "adc_to_npe" calibration coefficient, which is then manually added to the parameter files located in hallc_replay/PARAM/HMS/CER/hcer_calib.param for the HMS and hallc_replay/PARAM/SHMS/HGCER/phgcer_calib.param for the SHMS HGC
      • Identifying SPE signals requires only very little light, so beam isn't needed. These calibrations are done using cosmics
      • See Simona Malace's elog entry on an HMS cherenkov calibration
    • Clear SPE spectra hasn't been attainable with the SHMS NGC, so a second method is used to calibrate it. This is done for each PMT at a time by selecting electrons whose Cherenkov light was reflected on one PMT only. A calorimeter cut, timing cut, graphical X and Y cuts at the mirror planes, and cuts to ensure that very low pulse integrals are seen on all other PMTs (except for the one under calibration) are all needed. Once these are applied, the pulse integral histograms are fitted to get the number of photoelectrons (npe = μ²/σ²) and then the expected integral per single photo-electron (spe = μ/npe), which is the "adc_to_npe" calibration coefficient manually added to the parameter file located in hallc_replay/PARAM/SHMS/NGCER/pngcer_calib.param
      • See Simona Malace's elog entry on an SHMS NGC cherenkov calibration for a more thorough explanation
      • See also Burcu Duran's notes on this type of calibration, a student who's done extensive PID studies with the NGC for the J/Psi experiment: SHMS NGCER Calib.pdf
  • Once these calibration constants are found and implemented, replaying the run should result in the npe distribution with the single photo-electron peak centered around 1 (H.cer.npe[0] {H.cer.goodAdcMult[0]==1} for example, in the first elog post above, where indices [0] and [1] correspond to one of the two PMTs in the HMS cherenkov)

Needed Files

  • The calibration scripts for the gas cherenkovs are located in: hallc_replay/hms_cer_calib for the HMS gas cherenkov and hallc_replay/shms_hgcer_calib for the SHMS heavy gas cherenkov.
  • You will need to have replayed either the HMS or SHMS run, depending on which calibration you're doing, so that the appropriate root file has been generated.
    • If the -all option was used, then the file will be in the form of: (s)hms_replay_production_all_XXXX_-1.root where XXXX is the run number
    • If a certain number of events was chosen, then the file will be in the form of: (s)hms_replay_production_XXXX__XXXX.root with the run number and number of events

How to Run the Calibration

  • First, always remember to load the Pol He3 software to properly set your environment: source /group/c-polhe3/software/setup.sh
  • For the HMS gas cherenkov calibration, go to /hallc_replay/CALIBRATION/hms_cer_calib and type root -l "run_cal.C(RunNum,NumEvents)" where -1 is an option for NumEvents if a full replay was done
    • You will be prompted to enter 1 if it was a coincidence run. For our experiments, it won't be. Enter 0.
    • Enter showall when prompted to "enter options for calibration."
    • The ADC-to-NPE conversion value will be outputted to the terminal for PMT 1 and PMT 2, and can be seen as the mean displayed in the Pulse Integral histograms.
    • You'll be asked if you want to update the calibration constants with the better estimate. If you type "y," then a new parameters file called hcer_calib_XXXX.param for that specific run number will be generated and stored in hallc_replay/PARAM/HMS/CER

Common Issues

Aerogel (Not in use for this run)

Optics

  • Expert: Mark Jones
  • Post-Doc: Jixie

EDTM

BPM / Raster

  • Expert: Mark Jones
  • Student: Mingyu

BCM

  • Expert: Dave Mack
  • Student: Melanie

Acceptance

  • Expert: Mark Jones
  • Student: Murchanna

...