b-tag rate correction factor for 1tag and 2tag:
   -- CDF Note 9091 (page 4)
   -- /cdf/s13/hslee/METJets/template_NN/TRM/NBTAG_CORR/calcCBTAG.C

Iterative correction to remove signal contamination:
   -- CDF Note 3464 (page 14)
   -- /cdf/s13/hslee/METJets/template_NN/TRM/ITER_CORR/ITERCORR_NJETS_loop.C

Final background modeling to calculate 'prob'
   -- /cdf/s13/hslee/METJets/template_NN/TRM/calcBkgd_Corr_njets.C

Summer2011 Update

    Generate NNtraining Codes: NN_Cpp.cxx NN_Cpp.hh
  1. Generate data.root and ttop25.root with NNinput information, though NNout doesn't have valid value
    -- -- cd /cdf/s13/tangjian/Analysis/spring2011/templating_METJ_newtest/TMTRel/scripts
    code ./EventSelect/METJetsSelection_forNNtraining.cc .hh are used for producing root files. Note: each time you add new data to the analysis, you need to change the 'prob' calculation of signals, which is at the end of the .cc file, the three fractional constant are the fraction of each different trigger paths, which you can get from fcdflnx1.fnal.gov:/cdf/home/tangjian/temp/lumi.txt , which was calculated from dpslum.sh
  2. Generate NN_Cpp.cxx and NN_Cpp.hh files:
    -- -- change .bashrc file to use root5 version in cdfs7.uchicago.edu
    -- -- cd /cdf/s13/tangjian/Analysis/spring2011/templating_METJ_newtest/NNtraining

    $ root -l
    $ .L NNtraining_new.C+
    $ NNtraining()
  3. Run Event Selection for signal and data to produce Tagrate.root
    -- -- cd /cdf/s13/tangjian/Analysis/spring2011/bkgdModel/Tagrate
    -- -- $root -l $.L getTAGRmatrix.C+ $getTAGRmatrix()

    For convenience, run genBkgdProb.C to generate data_bkgdwithProb.root file for num calculations
    -- -- use code data_bkgdwithProb.C to calculate the bkgd numbers, with or without some cuts

    Generate data_bkgdmodeling.root file for correction procedures
    .L calcTagBkgd.C+
  4. Iterative Correction
    cd /cdf/s13/tangjian/Analysis/spring2011/bkgdModel
    use MCBEFF.C to calculate the average b-tagging efficiency, which is to be used in iterative correction

    cd /cdf/s13/tangjian/Analysis/spring2011/bkgdModel/ITER_CORR
    -- -- $Root[] .L ITERCORR_NNOUT.C+ (NOTE: use the result from MCBEFF.C and fill it in the MCBEFF1 variable) $run.sh
  5. Btag Correction Factor
    cd /cdf/s13/tangjian/Analysis/spring2011/bkgdModel/BTAG_CORR
    Use calcCBTAG.C (not calcCBTAG_new.C) to generate the btag correction factor
  6. Generate bkgd file with all corrections applied
    cd /cdf/s13/tangjian/Analysis/spring2011/bkgdModel/Tagrate
    Use calcBkgd_Corr.C to generate data_bkgd_2.root
    code bkgdVali.C can calculate the bkgd vs data num of event within NNout 0.4
  7. Calculate Number of Candidate Events
    cd /cdf/s13/tangjian/Analysis/spring2011/bkgdModel
    Use tst.C to calculate 1-tag 2-tag num of events within diff jet multiplicities