Skip to content

Commit

Permalink
Changes that never made it during DAS
Browse files Browse the repository at this point in the history
  • Loading branch information
lcorcodilos committed May 19, 2021
1 parent 0eae8cf commit 594736f
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 13 deletions.
25 changes: 12 additions & 13 deletions configs_2Dalpha/input_dataBsUnblindRun2_deep.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"fitGuesses":false,
"prerun":false,
"year":2,
"rpfRatio":false,
"rpfRatio":false
},

"PROCESS": {
Expand All @@ -34,7 +34,8 @@
"HISTFAIL":"MtwvMtFail",
"SYSTEMATICS":["lumi","ttbar_xsec"],
"COLOR": 2,
"CODE": 2
"CODE": 2,
"SCALE":2.2
},
"17_ttbar": {
"TITLE":"t#bar{t}",
Expand All @@ -43,7 +44,8 @@
"HISTFAIL":"MtwvMtFail",
"SYSTEMATICS":["lumi","ttbar_xsec"],
"COLOR": 2,
"CODE": 2
"CODE": 2,
"SCALE":2.2
},
"18_ttbar": {
"TITLE":"t#bar{t}",
Expand All @@ -52,7 +54,8 @@
"HISTFAIL":"MtwvMtFail",
"SYSTEMATICS":["lumi","ttbar_xsec"],
"COLOR": 2,
"CODE": 2
"CODE": 2,
"SCALE":2.2
},
"17_ttbar-semilep": {
"TITLE":"t#bar{t}",
Expand All @@ -61,7 +64,8 @@
"HISTFAIL":"MtwvMtFail",
"SYSTEMATICS":["lumi","ttbar_xsec"],
"COLOR": 2,
"CODE": 2
"CODE": 2,
"SCALE":2.2
},
"18_ttbar-semilep": {
"TITLE":"t#bar{t}",
Expand All @@ -70,7 +74,8 @@
"HISTFAIL":"MtwvMtFail",
"SYSTEMATICS":["lumi","ttbar_xsec"],
"COLOR": 2,
"CODE": 2
"CODE": 2,
"SCALE":2.2
},
"16_singletop_tW": {
"TITLE":"Single top",
Expand Down Expand Up @@ -215,7 +220,7 @@

"FIT": {
"HELP": "The fit parameters of the 2D polynomial should be configured here. Note that parameters must be named x#y$ where # is the order of the parameter in the x and $ is the order of the parameter in the y.",
"FORM":"(@0+@1*x**1+@2*x**2)*(1+@3*y)",
"FORM":"0.01*(@0+@1*x**1)*(1+@2*y)",
"0": {
"NOMINAL": 1.0,
"MIN":-10.0,
Expand All @@ -233,12 +238,6 @@
"MIN":-10.0,
"MAX":10.0,
"ERROR":0.1
},
"3": {
"NOMINAL": 1.0,
"MIN":-10.0,
"MAX":10.0,
"ERROR":0.1
}
}
}
48 changes: 48 additions & 0 deletions exercises/selection_condor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
'''
Apply simple kinematic selection and plot substructure variables
for signal and background MC and compare.
'''
import ROOT, collections,sys,os
sys.path.append('./')
sys.path.append('exercises/')
from optparse import OptionParser
from collections import OrderedDict

from TIMBER.Analyzer import analyzer, HistGroup
from TIMBER.Tools.Common import CompileCpp
from TIMBER.Tools.Plot import *
import helpers
from selection import select,bstarPayload

ROOT.gROOT.SetBatch(True)

# CL options
parser = OptionParser()
parser.add_option('-y', '--year', metavar='YEAR', type='string', action='store',
default = '',
dest = 'year',
help = 'Year (16,17,18)')
parser.add_option('-s', metavar='NAME', type='string', action='store',
default = '',
dest = 'setname',
help = 'Set name')
(options, args) = parser.parse_args()

###########################################
# Establish some global variables for use #
###########################################
bs_payload = bstarPayload(options)

CompileCpp("TIMBER/Framework/include/common.h")
CompileCpp('bstar.cc') # has the c++ functions we need when looping of the RDataFrame

# Runs when calling `python selection.py`
if __name__ == "__main__":
histgroup = select(options.setname,options.year)
outfile = ROOT.TFile.Open("rootfiles/%s_%s.root"%(options.setname,options.year),'RECREATE')
outfile.cd()
histgroup.Do('Write') # This will call TH1.Write() for all of the histograms in the group
outfile.Close()
del histgroup # Now that they are saved out, drop from memory


8 changes: 8 additions & 0 deletions gencounttest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from TIMBER.Analyzer import analyzer
import sys

a = analyzer(sys.argv[1])

print (a.RunChain.genEventCount_)
# print (a.RunChain.genEventSumw_)
# print (a.RunChain.genEventSumw2_)

0 comments on commit 594736f

Please sign in to comment.