Steps in calibration of Endcap with MIP's using UxV
Updated September, 2005
  1. the code: cvs co StRoot/StEEmcPool/StEzSmdCal/ cons
    STEP 1 : no calib is avaliable,
    Goal: produce relative SMD gains
  2. root4star -b -q rdEztMuSmdCal.C
    Disable all masks, calibration is irrelevant, need enough events to have reasonable slopes in SMD, 700K CuCu minB events was enough. Make sure you do not cut on pre/post/smd energy - does not exist.
    LSF: bigSort.sh
  3. Fit SMD slopes
    Use: doSmdGains.C to fit 'expo' to just one plain, set internal switch to do that.
    Use :bigSectloop.sh to loop over plains.
    Pick absolute normalization scale to get abs gains close to 1.
    STEP 2a : rel SMD calib is avaliable,
    Goal: Determine corrections for absolute SMD gains.

    Re-play all events with SMD gains from slopes. Now you need all events you can afford.
    to find corrections (smooth function vs. strip ID) for all 24 SMD plains use: doSmdGains.C again, butch change internal switch to sum,average, and fit sums of SMD pairs.
  4. Apply gain corrections to SMD slopes, use: reCalSmd.C
  5. Display UxV points distribution: plSmdCal.C, plPresMap.C ?
    STEP 2b : rel SMD calib is avaliable,
    Goal: Determine absolute pre/post/tower calibration
  6. Fit pre/post spectra with gauss(ped)+Landau(MIP). Use: fitPrePost.C . You need to play with fit params. Note, automatic Web-page with plots and some QA is generated in WWW/tmp area.
  7. Fit tower spectra with gauss&Landau(MIP). Use: fitTower.C . Ped resudua are subtracted. You need to play with fit params. Note, automatic Web-page with plots and some QA is generated in WWW/tmp area.
  8. Display tower spectra vs. eta bin: plTwCal.C
    STEP 3 : ~all is absolutely calibrated
    Goal: slopes needs to be used for some tiles
  9. run script: fitSlope5.C , called by: fixGainUsingSlope.tcl to do relative calibration based on slopes of neighbours at the same eta bin.