Skip to content

Commit

Permalink
Merge pull request #1 from ResonantHbbHgg/dev-weights
Browse files Browse the repository at this point in the history
Adding missing files
  • Loading branch information
andreypz authored Aug 24, 2018
2 parents 3dcc5da + 8482589 commit 64033b3
Show file tree
Hide file tree
Showing 9 changed files with 429 additions and 0 deletions.
121 changes: 121 additions & 0 deletions Weights/MVAID/CSEVroot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
from ROOT import *
from array import array

etabins = [-2.5, -1.566, -1.4442, -1.0, 0.0, 1.0, 1.4442, 1.566, 2.5]
ptbins = [20, 30, 40, 50, 200]

nbins_eta = len(etabins)-1
nbins_pt = len(ptbins)-1

sfs = [[ [0,0] for x in range(nbins_pt)] for y in range(nbins_eta)]

##20-30, -2.5, -1.56
sfs[0][0][0] = 1#0.989453
sfs[0][0][1] = 1#0.0400067
##20-30, -1.56, -1.44
sfs[1][0][0] = 0
sfs[1][0][1] = 0
##20-30, -1.44, -1
sfs[2][0][0] = 1#0.997501
sfs[2][0][1] = 1#0.0744126
##20-30, -1, 0
sfs[3][0][0] = 1#0.999754
sfs[3][0][1] = 1#0.0258297
##20-30, 0, 1
sfs[4][0][0] = 1#1.01528
sfs[4][0][1] = 1#0.0218661
##20-30, 1, 1.44
sfs[5][0][0] = 1#0.955474
sfs[5][0][1] = 1#0.1803399
##20-30, 1.44, 1.566
sfs[6][0][0] = 0
sfs[6][0][1] = 0
##20-30, 1.566,
sfs[7][0][0] = 1#0.977028
sfs[7][0][1] = 1#0.0965378

##30-40, -2.5, -1.56
sfs[0][1][0] = 1#0.99054
sfs[0][1][1] = 1#0.0131795
##30-40, -1.56, -1.44
sfs[1][1][0] = 0
sfs[1][1][1] = 0
##30-40, -1.44, -1
sfs[2][1][0] = 1#0.994976
sfs[2][1][1] = 1#0.0245861
##30-40, -1, 0
sfs[3][1][0] = 1#0.997789
sfs[3][1][1] = 1#0.0103248
##30-40, 0, 1
sfs[4][1][0] = 1#0.997776
sfs[4][1][1] = 1#0.0271587
##30-40, 1, 1.44
sfs[5][1][0] = 1#0.996409
sfs[5][1][1] = 1#0.0219291
##30-40, 1.44, 1.566
sfs[6][1][0] = 0
sfs[6][1][1] = 0
##30-40, 1.566,
sfs[7][1][0] = 1#0.994255
sfs[7][1][1] = 1#0.0162298

##40-50, -2.5, -1.56
sfs[0][2][0] = 1#0.992323
sfs[0][2][1] = 1#0.0106739
##40-50, -1.56, -1.44
sfs[1][2][0] = 0
sfs[1][2][1] = 0
##40-50, -1.44, -1
sfs[2][2][0] = 1#0.996538
sfs[2][2][1] = 1#0.0076656
##40-50, -1, 0
sfs[3][2][0] = 1#0.997529
sfs[3][2][1] = 1#0.0058141
##40-50, 0, 1
sfs[4][2][0] = 1#1.00076
sfs[4][2][1] = 1#0.0063664
##40-50, 1, 1.44
sfs[5][2][0] = 1#1.00054
sfs[5][2][1] = 1#0.0076592
##40-50, 1.44, 1.566
sfs[6][2][0] = 0
sfs[6][2][1] = 0
##40-50, 1.566,
sfs[7][2][0] = 1#0.991665
sfs[7][2][1] = 1#0.0109673

##50-200, -2.5, -1.56
sfs[0][3][0] = 1#0.984755
sfs[0][3][1] = 1#0.0112026
##50-200, -1.56, -1.44
sfs[1][3][0] = 0
sfs[1][3][1] = 0
##50-200, -1.44, -1
sfs[2][3][0] = 1#0.989592
sfs[2][3][1] = 1#0.0121205
##50-200, -1, 0
sfs[3][3][0] = 1#0.994825
sfs[3][3][1] = 1#0.0125226
##50-200, 0, 1
sfs[4][3][0] = 1#0.998808
sfs[4][3][1] = 1#0.0135373
##50-200, 1, 1.44
sfs[5][3][0] = 1#0.990307
sfs[5][3][1] = 1#0.0264489
##50-200, 1.44, 1.566
sfs[6][3][0] = 0
sfs[6][3][1] = 0
##50-200, 1.566,
sfs[7][3][0] = 1#0.994873
sfs[7][3][1] = 1#0.0096489

fout = TFile("csevsf.root", "RECREATE")
sf2d = TH2F("csev_sfs", "csev_sfs", len(etabins)-1, array('d',etabins), len(ptbins)-1, array('d',ptbins))
for i,pt in enumerate(sfs):
for j,eta in enumerate(pt):
sf2d.SetBinContent(i+1, j+1, eta[0])
sf2d.SetBinError(i+1, j+1, eta[1])

fout.cd()
sf2d.Write()
fout.Close()
121 changes: 121 additions & 0 deletions Weights/MVAID/MVAIDroot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
from ROOT import *
from array import array

etabins = [-2.5, -1.566, -1.4442, -1.0, 0.0, 1.0, 1.4442, 1.566, 2.5]
ptbins = [20, 30, 40, 50, 200]

nbins_eta = len(etabins)-1
nbins_pt = len(ptbins)-1

sfs = [[ [0,0] for x in range(nbins_pt)] for y in range(nbins_eta)]

##20-30, -2.5, -1.56
sfs[0][0][0] = 0.989453
sfs[0][0][1] = 0.0400067
##20-30, -1.56, -1.44
sfs[1][0][0] = 0
sfs[1][0][1] = 0
##20-30, -1.44, -1
sfs[2][0][0] = 0.997501
sfs[2][0][1] = 0.0744126
##20-30, -1, 0
sfs[3][0][0] = 0.999754
sfs[3][0][1] = 0.0258297
##20-30, 0, 1
sfs[4][0][0] = 1.01528
sfs[4][0][1] = 0.0218661
##20-30, 1, 1.44
sfs[5][0][0] = 0.955474
sfs[5][0][1] = 0.1803399
##20-30, 1.44, 1.566
sfs[6][0][0] = 0
sfs[6][0][1] = 0
##20-30, 1.566,
sfs[7][0][0] = 0.977028
sfs[7][0][1] = 0.0965378

##30-40, -2.5, -1.56
sfs[0][1][0] = 0.99054
sfs[0][1][1] = 0.0131795
##30-40, -1.56, -1.44
sfs[1][1][0] = 0
sfs[1][1][1] = 0
##30-40, -1.44, -1
sfs[2][1][0] = 0.994976
sfs[2][1][1] = 0.0245861
##30-40, -1, 0
sfs[3][1][0] = 0.997789
sfs[3][1][1] = 0.0103248
##30-40, 0, 1
sfs[4][1][0] = 0.997776
sfs[4][1][1] = 0.0271587
##30-40, 1, 1.44
sfs[5][1][0] = 0.996409
sfs[5][1][1] = 0.0219291
##30-40, 1.44, 1.566
sfs[6][1][0] = 0
sfs[6][1][1] = 0
##30-40, 1.566,
sfs[7][1][0] = 0.994255
sfs[7][1][1] = 0.0162298

##40-50, -2.5, -1.56
sfs[0][2][0] = 0.992323
sfs[0][2][1] = 0.0106739
##40-50, -1.56, -1.44
sfs[1][2][0] = 0
sfs[1][2][1] = 0
##40-50, -1.44, -1
sfs[2][2][0] = 0.996538
sfs[2][2][1] = 0.0076656
##40-50, -1, 0
sfs[3][2][0] = 0.997529
sfs[3][2][1] = 0.0058141
##40-50, 0, 1
sfs[4][2][0] = 1.00076
sfs[4][2][1] = 0.0063664
##40-50, 1, 1.44
sfs[5][2][0] = 1.00054
sfs[5][2][1] = 0.0076592
##40-50, 1.44, 1.566
sfs[6][2][0] = 0
sfs[6][2][1] = 0
##40-50, 1.566,
sfs[7][2][0] = 0.991665
sfs[7][2][1] = 0.0109673

##50-200, -2.5, -1.56
sfs[0][3][0] = 0.984755
sfs[0][3][1] = 0.0112026
##50-200, -1.56, -1.44
sfs[1][3][0] = 0
sfs[1][3][1] = 0
##50-200, -1.44, -1
sfs[2][3][0] = 0.989592
sfs[2][3][1] = 0.0121205
##50-200, -1, 0
sfs[3][3][0] = 0.994825
sfs[3][3][1] = 0.0125226
##50-200, 0, 1
sfs[4][3][0] = 0.998808
sfs[4][3][1] = 0.0135373
##50-200, 1, 1.44
sfs[5][3][0] = 0.990307
sfs[5][3][1] = 0.0264489
##50-200, 1.44, 1.566
sfs[6][3][0] = 0
sfs[6][3][1] = 0
##50-200, 1.566,
sfs[7][3][0] = 0.994873
sfs[7][3][1] = 0.0096489

fout = TFile("mvaIDsf.root", "RECREATE")
sf2d = TH2F("mva_id_sfs", "mva_id_sfs", len(etabins)-1, array('d',etabins), len(ptbins)-1, array('d',ptbins))
for i,pt in enumerate(sfs):
for j,eta in enumerate(pt):
sf2d.SetBinContent(i+1, j+1, eta[0])
sf2d.SetBinError(i+1, j+1, eta[1])

fout.cd()
sf2d.Write()
fout.Close()
Binary file added Weights/MVAID/ScalingFactors_80X_Summer16.root
Binary file not shown.
Binary file added Weights/MVAID/csevsf.root
Binary file not shown.
Binary file added Weights/MVAID/egammaEffi.txt_EGM2D.root
Binary file not shown.
Binary file added Weights/MVAID/mvaIDsf.root
Binary file not shown.
Loading

0 comments on commit 64033b3

Please sign in to comment.