New code from Murad reads regular muDst:

StRoot/StEEmcPool/muDst/StAdcPedHistoMaker.h

How to build new pedestals from the ezTree

  • It is assumed you have already produce ezTree from .daq files using 'siew' or by minidaq w/ daq2tree, or with miniroot
  • login to RCF and go to ezGames directory, where all programs are set up.
    This statement is probably obsolete, JB.
    ssh eemcdb@rcas6nnn       (e.g. rcas6010)
    cd ezGames
    
  • to sort events from run 5019022 execute
     root -b -q  'macros/sortAdc4Ped.C("R5023070",5000)'
    
    The output histo file is 'out/R5023070Ped.hist.root'
    One can also use a a smarter .C selecting minB eve (for pp200 @2004) macros/sortAdc4PedMinb.C together with ezGames/scripts/bldPed.sh looping over fills, but it is more tricky.

  • to view histos lunch GUI by typing
    cd ezGames
    guiWDpixels
    
  • to build pedestals execute
     root -b -q  'macros/fitAdc4Ped.C("R5023070")' >log
    
    Now, be aware this is fully automatic (means dumm) Gaussian fitting. You have ability to controll the peaks selection and fititng criteria, separately for towers and MAPMT. You can only tower peds, only MApmt peds, or both. Edit fitAdc4Ped.C script To process just one sector, change the sector range in the sorter.
  • QA there is basic QA for pedestals, aimed to identify suspected spectra. There is not comaparison to earlier versions. Example if nonconforming pedestal are below:
    name  QA[IHLNWX]  Nintegr  chi2/ndf amplitude   mean    sigma  erAmpl   erMean  erSigma
    09TB05  ......     2644     3.547  1110.753    11.082    0.923  26.759   0.0189  0.0128
    09TB06  I...W.     1750     0.837   111.190     1.917    3.675   6.486   0.8570  1.2969
    09TB07  ......     2652     2.677  1017.203    20.934    1.027  24.698   0.0204  0.0148
    05U018  ......     2964     0.242  1688.946   167.138    0.700  38.146   0.0129  0.0092
    05U019        0  failed
    05U020  ......     2964     1.674  1730.852   152.667    0.683  39.002   0.0126  0.0089
    06U264  ......     2956     1.165  1753.399   184.680    0.672  39.064   0.0124  0.0084
    06U265  ...N..     2930    75.503  1162.843   176.390    0.393  97.003   0.0136  0.0195
    06U266  ......     2931     7.212  1671.157   176.230    0.719  40.032   0.0350  0.0250
    
  • to view fitted pedestals lunch GUI by typing
    cd ezGames
    guiWDpixels
    
    and load one of the files: 'outPed/mapmt.hist.root' or 'outPed/towers.hist.root'

  • QA on single pedestal file is done by
        root.exe   -b ./macros/doPedQA.C("$run")
    
    Note, graphics is needed to generate .gif for suspected channels. Run this program for every run.

  • Automatization - all the steps above can by controled by one script macros/big_ped.sh

  • QA time depedence of peds
        root.exe   -b ./macros/doTimeQA.C
    
    You must redefine hardcoded list of runs/path

  • the pedestal files redy to load to DB are stored in
    rcas6017:~/ezGames > ll outPed
    -rw-r--r--    1 balewski rhstar       1401 Jan 23 18:26 ped.sector01
    -rw-r--r--    1 balewski rhstar       1401 Jan 23 18:26 ped.sector02
    -rw-r--r--    1 balewski rhstar       1401 Jan 23 18:26 ped.sector03
    -rw-r--r--    1 balewski rhstar       1401 Jan 23 18:26 ped.sector04
    -rw-r--r--    1 balewski rhstar      18697 Jan 23 18:27 ped.sector05
    -rw-r--r--    1 balewski rhstar      18766 Jan 23 18:27 ped.sector06
    -rw-r--r--    1 balewski rhstar      18674 Jan 23 18:27 ped.sector07
    -rw-r--r--    1 balewski rhstar      18513 Jan 23 18:27 ped.sector08
    -rw-r--r--    1 balewski rhstar       1401 Jan 23 18:26 ped.sector09
    -rw-r--r--    1 balewski rhstar       1401 Jan 23 18:26 ped.sector10
    -rw-r--r--    1 balewski rhstar       1401 Jan 23 18:26 ped.sector11
    -rw-r--r--    1 balewski rhstar       1401 Jan 23 18:26 ped.sector12
    
    Files for sectors 5-8 are bigger because of MAPMT. You are encuraged to edit the files if any pedestal value is wrong.

  • move the whole directory to
    /star/data04/sim/balewski/daq/pedDB-XXXX
    rename it to Rnnnnnnn.

  • To load pedestals to DB edit and execute
    cd ezGames
    macros/wrPedDb.sh (be carefull !)
    
    Note, edit content of this script before execution. Be responsible !
    Edit ~/dbServers.xml to change the DB-server, (robinson is recomended)