-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSingleMuSelections.py
More file actions
100 lines (79 loc) · 3.14 KB
/
SingleMuSelections.py
File metadata and controls
100 lines (79 loc) · 3.14 KB
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
import FWCore.ParameterSet.Config as cms
import copy
##########################################################################
##### Set up control regions for use with the doubleElectron dataset #####
##########################################################################
from OSUT3Analysis.ControlRegions.Preselections import *
singleMuTriggerPath = cms.vstring("HLT_IsoMu24_v")
##########################################################################
WtoMu_Selection = cms.PSet(
name = cms.string("W to Mu"),
triggers = singleMuTriggerPath,
cuts = cms.VPSet ()
)
WtoMu_Selection.cuts.extend(copy.deepcopy(Event_Preselection.cuts))
WtoMu_Selection.cuts.extend(copy.deepcopy(Muon_Preselection.cuts))
for cut in WtoMu_Selection.cuts:
if "muons" in str(cut.inputCollection):
cut.numberRequired = cms.string('== 1')
met_cut = cms.PSet (
inputCollection = cms.string("mets"),
cutString = cms.string("pt > 40"),
numberRequired = cms.string("== 1")
)
WtoMu_Selection.cuts.append(met_cut)
metMT_cut = cms.PSet (
inputCollection = cms.string("muons"),
cutString = cms.string("metMT > 40"),
numberRequired = cms.string("== 1")
)
WtoMu_Selection.cuts.append(metMT_cut)
##########################################################################
TTbartoMuHad_Selection = cms.PSet(
name = cms.string("TTbar to MuHad"),
triggers = singleMuTriggerPath,
cuts = cms.VPSet ()
)
TTbartoMuHad_Selection.cuts.extend(copy.deepcopy(Event_Preselection.cuts))
TTbartoMuHad_Selection.cuts.extend(copy.deepcopy(Muon_Preselection.cuts))
for cut in TTbartoMuHad_Selection.cuts:
if "muons" in str(cut.inputCollection):
cut.numberRequired = cms.string('== 1')
jet_eta_cut = cms.PSet (
inputCollection = cms.string("jets"),
cutString = cms.string("abs(eta) < 2.4"),
numberRequired = cms.string(">= 4")
)
TTbartoMuHad_Selection.cuts.append(jet_eta_cut)
jet_pt_cut = cms.PSet (
inputCollection = cms.string("jets"),
cutString = cms.string("pt > 30"),
numberRequired = cms.string(">= 4")
)
TTbartoMuHad_Selection.cuts.append(jet_pt_cut)
btag_cut = cms.PSet (
inputCollection = cms.string("jets"),
cutString = cms.string("btagCombinedSecVertex > 0.679"),
numberRequired = cms.string(">= 2")
)
TTbartoMuHad_Selection.cuts.append(btag_cut)
##########################################################################
QCDtoMu_Selection = cms.PSet(
name = cms.string("QCD to Mu"),
triggers = singleMuTriggerPath,
cuts = cms.VPSet ()
)
QCDtoMu_Selection.cuts.extend(copy.deepcopy(Event_Preselection.cuts))
QCDtoMu_Selection.cuts.extend(copy.deepcopy(Muon_Preselection.cuts))
for cut in QCDtoMu_Selection.cuts:
if "muons" in str(cut.inputCollection):
cut.numberRequired = cms.string('== 1')
if "relPFdBetaIso" in str(cut.cutString) and "muons" in str(cut.inputCollection):
cut.cutString = cms.string('relPFdBetaIso > 0.3')
met_cut = cms.PSet (
inputCollection = cms.string("mets"),
cutString = cms.string("pt < 40"),
numberRequired = cms.string("== 1")
)
QCDtoMu_Selection.cuts.append(met_cut)
##########################################################################