-
Notifications
You must be signed in to change notification settings - Fork 1
/
makeSelection.py
98 lines (77 loc) · 2.55 KB
/
makeSelection.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import copy
from ROOT import *
from pyrootTools import *
from HgParameters import *
from HgCuts import getDefaultCuts, combineCuts
from os import path
# macro for plotting post-selection for H(bb)gamma
# John Hakala 7/13/16
samplesDirs = getSamplesDirs()
#dataFileName = samplesDirs["dataDir"]
#mass = "1000"
sampleFileName=path.join(samplesDirs["dataDDdir"], "ddTree_data2016SinglePhoton.root")
#sampleFileName="testSilver.root"
cuts = getDefaultCuts("higgs", True)
btagCuts = copy.deepcopy(cuts)
btagCuts.pop("antibtag")
btagComboCut = combineCuts(btagCuts)
print btagComboCut
antibtagCuts = copy.deepcopy(cuts)
antibtagCuts.pop("btag")
antibtagComboCut = combineCuts(antibtagCuts)
print antibtagComboCut
notagCuts = copy.deepcopy(btagCuts)
notagCuts.pop("btag")
notagComboCut = combineCuts(notagCuts)
print notagComboCut
sampleFile = TFile(sampleFileName)
print "sampleFileName %s:" % sampleFileName,
print sampleFile
higgsTree = sampleFile.Get("higgs")
print "higgsTree: ",
print higgsTree
print "\nall cuts, btag cat\n "
print higgsTree.Draw("phJetInvMass_puppi_softdrop_higgs", btagComboCut)
print "\nall cuts, antibtag cat\n "
print higgsTree.Draw("phJetInvMass_puppi_softdrop_higgs", antibtagComboCut)
print "\nno btag cut\n "
print higgsTree.Draw("phJetInvMass_puppi_softdrop_higgs", notagComboCut)
#print notagComboCut
#print notagCuts
notagCuts.pop("ptOverM")
notagComboCut = combineCuts(notagCuts)
print "\nno pT/M cut\n "
print higgsTree.Draw("phJetInvMass_puppi_softdrop_higgs", notagComboCut)
#print notagComboCut
#print notagCuts
#notagCuts.pop("deltaR")
#notagComboCut = combineCuts(notagCuts)
#print "\nno deltaR cut\n "
#print higgsTree.Draw("phJetInvMass_puppi_softdrop_higgs", notagComboCut)
#
#print notagComboCut
#print notagCuts
notagCuts.pop("phEta")
notagComboCut = combineCuts(notagCuts)
print "\nno phEta cut\n "
print higgsTree.Draw("phJetInvMass_puppi_softdrop_higgs", notagComboCut)
#print notagComboCut
#print notagCuts
notagCuts.pop("jetAbsEta")
notagComboCut = combineCuts(notagCuts)
print "\nno jetEta cut\n "
print higgsTree.Draw("phJetInvMass_puppi_softdrop_higgs", notagComboCut)
#print notagComboCut
#print notagCuts
notagCuts.pop("turnon")
notagComboCut = combineCuts(notagCuts)
print "\nno turnon cut\n "
print higgsTree.Draw("phJetInvMass_puppi_softdrop_higgs", notagComboCut)
#print notagComboCut
#print notagCuts
notagCuts.pop("higgsWindow")
notagComboCut = combineCuts(notagCuts)
print "\nno higgs window cut\n "
print higgsTree.Draw("phJetInvMass_puppi_softdrop_higgs", notagComboCut)
#print notagComboCut
#print notagCuts