-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmodelsAllZTest.py
74 lines (52 loc) · 1.88 KB
/
modelsAllZTest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import samples2016
import samples2017
import samples2018
samples = {}
samples.update(samples2016.samples)
samples.update(samples2017.samples)
samples.update(samples2018.samples)
import models2016Z as models2016
import models2017Z as models2017
import models2018Z as models2018
name="Z"
background={}
signal={}
data = {'All': ['data2016','data2017','data2018']}
for models in [models2016,models2017,models2018]:
for mapToFillName in ["background","signal"]:
mapToRead = getattr(models,mapToFillName)
mapToFill = globals()[mapToFillName]
for sampleSet in mapToRead:
if sampleSet in mapToFill:
for sample in mapToRead[sampleSet]:
if not sample in mapToFill[sampleSet]: mapToFill[sampleSet].append(sample)
else: mapToFill[sampleSet] = mapToRead[sampleSet]
import pprint
print "\nbackground = ",
pprint.pprint(background)
print "\nsignal = ",
pprint.pprint(signal)
print "\ndata = ",
pprint.pprint(data)
print
#sorting
backgroundSorted=["Other","Top","DY0J","DY1J","DY2J","EWKZ"]
backgroundSorted+=[x for x in background if x not in backgroundSorted]
fillcolor={}
fillcolor.update(models2016.fillcolor)
fillcolor.update(models2017.fillcolor)
fillcolor.update(models2018.fillcolor)
systematicsToPlot=["LHEPdfUp","LHEPdfDown","QGLweightUp","QGLweightDown","JERUp","JERDown","puWeightUp","puWeightDown","LHERenUp","LHERenDown","LHEFacUp","LHEFacDown","MuScaleUp","MuScaleDown","AlternativeUp","AlternativeDown"]
from jesnames import jes2016
from jernames import jernames
systematicsForDC=systematicsToPlot+[x[10:] for x in jes2016 ]+jernames
systematicsToPlot+=["JESUp","JESDown"]
from rebinning import *
#possibly change the rebinning here
from systematicGrouping import *
systematicDetail = systematicGrouping(background, signal)
linecolor=fillcolor
markercolor=fillcolor
### REMVE SYSTEMATICS !!! ###
systematicsToPlot=[]
systematicsForDC=[]