ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HiggsAnalysis/EarlyDataStudy/python/earlyDataInterestingEvents_cff.py
Revision: 1.4
Committed: Wed Oct 13 10:50:14 2010 UTC (14 years, 6 months ago) by merkelp
Content type: text/x-python
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +27 -31 lines
Error occurred while calculating annotation data.
Log Message:
fixing quadLepton filter and tightening some more cuts

File Contents

# Content
1 from FWCore.ParameterSet import Config as cms
2
3 ## Common pre-filter sequence
4 oneGoodVertexFilter = cms.EDFilter("VertexSelector",
5 src = cms.InputTag("offlinePrimaryVertices"),
6 cut = cms.string("!isFake && ndof >= 4 && abs(z) <= 15 && position.Rho <= 2"),
7 filter = cms.bool(True), # otherwise it won't filter the events, just produce an empty vertex collection.
8 )
9 noScraping = cms.EDFilter("FilterOutScraping",
10 applyfilter = cms.untracked.bool(True),
11 debugOn = cms.untracked.bool(False), ## Or 'True' to get some per-event info
12 numtrack = cms.untracked.uint32(10),
13 thresh = cms.untracked.double(0.25)
14 )
15 earlyDataPreFilter = cms.Sequence(oneGoodVertexFilter * noScraping)
16
17 ### Define basic "good" electrons and muons
18 ## ---------------------------------
19
20 from EGamma.ECGelec.stdPreselectionSelector_cfi import *
21 from EGamma.ECGelec.spikeRemovalSelector_cfi import *
22 spikeRemovalSelector.src = cms.InputTag("stdardPreselectionSelector")
23 from RecoEgamma.ElectronIdentification.electronIdCutBasedClassBasedExt_cfi import *
24 import RecoEgamma.ElectronIdentification.electronIdCutBasedClassBasedExt_cfi
25 eidClassLoose = RecoEgamma.ElectronIdentification.electronIdCutBasedClassBasedExt_cfi.eidCutBasedClassBasedExt.clone()
26 eidClassLoose.electronQuality.string = 'Eff95Cuts'
27 eidClassLoose.src = "overlapElectronResolver"
28 eidClassMedium = RecoEgamma.ElectronIdentification.electronIdCutBasedClassBasedExt_cfi.eidCutBasedClassBasedExt.clone()
29 eidClassMedium.electronQuality.string = 'Eff90Cuts'
30 eidClassMedium.src = "overlapElectronResolver"
31
32 ELECTRON_BASE_CUT=("(pt > 5 &&" +
33 " fbrem > -0.1 &&" +
34 " eSeedClusterOverPout > 0.5 &&"+
35 " hcalOverEcal < 0.1 &&" +
36 " abs(deltaPhiSuperClusterTrackAtVtx) < 0.1 &&" +
37 " abs(deltaEtaSuperClusterTrackAtVtx) < 0.015 &&" +
38 " (( isEB && sigmaIetaIeta < 0.025 && sigmaIetaIeta > 0.005) ||" +
39 " (!isEB && sigmaIetaIeta < 0.065 && sigmaIetaIeta > 0.015)) )");
40
41
42 goodElectrons = cms.EDFilter("GsfElectronRefSelector",
43 src = cms.InputTag("spikeRemovalSelector"),
44 cut = cms.string(ELECTRON_BASE_CUT),
45 )
46
47 TM_ARBITRATION = "numberOfMatches('SegmentAndTrackArbitration')>0";
48 MUON_BASE_CUT="(isGlobalMuon || (isTrackerMuon && "+TM_ARBITRATION+"))"
49 goodMuons = cms.EDFilter("MuonRefSelector",
50 src = cms.InputTag("muons"),
51 cut = cms.string(MUON_BASE_CUT),
52 )
53
54 ## Very loosely isolated leptons (e.g. for Ws)
55 ## ---------------------------------
56 isolatedGoodMuons = cms.EDFilter("MuonRefSelector",
57 src = cms.InputTag("muons"),
58 cut = cms.string(MUON_BASE_CUT + " && ( isolationR03.hadEt + isolationR03.emEt < 10 ) && (isolationR03.emVetoEt + isolationR03.hadVetoEt < 15) && ( isolationR03.sumPt < 10 )"),
59 )
60 isolatedGoodElectrons = cms.EDFilter("GsfElectronRefSelector",
61 src = cms.InputTag("spikeRemovalSelector"),
62 cut = cms.string(ELECTRON_BASE_CUT + "&& ( dr03EcalRecHitSumEt + dr03HcalTowerSumEt + dr03TkSumPt < 15 )"),
63 )
64
65 ## High energy single objects
66 ## ---------------------------------
67 highEnergyMuons = cms.EDFilter("MuonRefSelector",
68 src = cms.InputTag("muons"),
69 cut = cms.string(isolatedGoodMuons.cut.value() + " && (pt > 35)"),
70 )
71 highEnergyElectrons = cms.EDFilter("GsfElectronRefSelector",
72 src = cms.InputTag("spikeRemovalSelector"),
73 cut = cms.string(isolatedGoodElectrons.cut.value() + "&& (pt > 35)"),
74 )
75
76
77 singleLeptons = cms.Sequence(
78 goodMuons +
79 stdardPreselectionSelector*spikeRemovalSelector*eidClassMedium*goodElectrons +
80 highEnergyMuons +
81 highEnergyElectrons +
82 isolatedGoodMuons +
83 isolatedGoodElectrons
84 )
85
86 ## Di-objects
87 ## ---------------------------------
88 DILEPTON_MASS = "(mass > 10) && "
89 DILEPTON_PT = " daughter(0).pt > 3 && daughter(1).pt > 5 && max( daughter(0).pt, daughter(1).pt ) >= 15"
90 ## For muons, require at least one of the two to be global. we don't check the charge in the inclusive selection
91 ONE_GLOBAL_MU = " && (daughter(0).isGlobalMuon || daughter(1).isGlobalMuon)"
92 diMuons = cms.EDProducer("CandViewShallowCloneCombiner",
93 decay = cms.string("goodMuons goodMuons"),
94 checkCharge = cms.bool(False), # can be changed to goodElectrons@+ goodElectrons@- to keep only OS
95 cut = cms.string(DILEPTON_MASS + DILEPTON_PT + ONE_GLOBAL_MU),
96 )
97 ## As a reference, we make also a small skim arond the J/Psi and Upsilon , to see if it works
98 diMuonsJPsi = cms.EDProducer("CandViewShallowCloneCombiner",
99 decay = cms.string("goodMuons@+ goodMuons@-"),
100 cut = cms.string("(2.6 < mass < 3.6) && daughter(0).isGlobalMuon && daughter(1).isGlobalMuon"),
101 )
102
103 diMuonsUpsilon = cms.EDProducer("CandViewShallowCloneCombiner",
104 decay = cms.string("goodMuons@+ goodMuons@-"),
105 cut = cms.string("(8.0 < mass < 11.5)" + ONE_GLOBAL_MU),
106 )
107
108 ## and one at very high mass, where the Z should dominate
109 diMuonsZ = cms.EDProducer("CandViewShallowCloneCombiner",
110 decay = cms.string("isolatedGoodMuons@+ isolatedGoodMuons@-"),
111 cut = cms.string("(mass > 60) && " + DILEPTON_PT + ONE_GLOBAL_MU),
112 )
113
114 ## For electrons, we don't enforce the opposite sign
115 diElectrons = cms.EDProducer("CandViewShallowCloneCombiner",
116 decay = cms.string("isolatedGoodElectrons isolatedGoodElectrons"), # no sign specified: allow also the SS electrons in.
117 checkCharge = cms.bool(False), # can be changed to goodElectrons@+ goodElectrons@- to keep only OS
118 cut = cms.string(DILEPTON_MASS + DILEPTON_PT),
119 )
120 ## As a reference, we make also a small skim arond the J/Psi and Upsilon, to see if it works
121 diElectronsJPsi = cms.EDProducer("CandViewShallowCloneCombiner",
122 decay = cms.string("goodElectrons goodElectrons"), # no sign specified: allow also the SS electrons in.
123 checkCharge = cms.bool(False), # can be changed to goodElectrons@+ goodElectrons@- to keep only OS
124 cut = cms.string("(2.6 < mass < 3.6) && daughter(0).pt > 3 && daughter(1).pt > 3"),
125 )
126
127 diElectronsUpsilon = cms.EDProducer("CandViewShallowCloneCombiner",
128 decay = cms.string("goodElectrons goodElectrons"), # no sign specified: allow also the SS electrons in.
129 checkCharge = cms.bool(False), # can be changed to goodElectrons@+ goodElectrons@- to keep only OS
130 cut = cms.string("(8.0 < mass < 11.5) && daughter(0).pt > 3 && daughter(1).pt > 3"),
131 )
132
133 ## and one at very high mass, where the Z should dominate
134 diElectronsZ = cms.EDProducer("CandViewShallowCloneCombiner",
135 decay = cms.string("isolatedGoodElectrons@+ isolatedGoodElectrons@-"), # no sign specified: allow also the SS electrons in.
136 checkCharge = cms.bool(False), # can be changed to goodElectrons@+ goodElectrons@- to keep only OS
137 cut = cms.string("(mass > 60) && " + DILEPTON_PT),
138 )
139
140 ## Then we make a E+Mu skim
141 crossLeptons = cms.EDProducer("CandViewShallowCloneCombiner",
142 decay = cms.string("isolatedGoodMuons isolatedGoodElectrons"), # no sign specified: allow also the SS pairs in.
143 checkCharge = cms.bool(False),
144 # cut = cms.string(DILEPTON_MASS + DILEPTON_PT + ONE_GLOBAL_MU),
145 #the cut on the mass should be lowered as soon as we integrate a tighter lepton ID
146 cut = cms.string("(mass > 20) && " + DILEPTON_PT + ONE_GLOBAL_MU),
147
148 )
149
150 diLeptons = cms.Sequence(
151 diMuons + diMuonsJPsi + diMuonsUpsilon + diMuonsZ +
152 diElectrons + diElectronsJPsi + diElectronsUpsilon + diElectronsZ +
153 crossLeptons
154 )
155
156 ## Isolated lepton plus MET, aka W candidate
157 ## ---------------------------------
158 W_MU_PT = 15; W_EL_PT = 15; W_PF_MET = 15; W_TC_MET = 15; MT_CUT = 45
159 ## Note: the 'mt()' method doesn't compute the transverse mass correctly, so we have to do it by hand.
160 MT="sqrt(2*daughter(0).pt*daughter(1).pt*(1 - cos(daughter(0).phi - daughter(1).phi)))"
161 recoWMNfromPf = cms.EDProducer("CandViewShallowCloneCombiner",
162 decay = cms.string("isolatedGoodMuons@+ pfMet"),
163 cut = cms.string(("daughter(0).pt > %f && daughter(1).pt > %f && "+MT+" > %f") % (W_MU_PT, W_PF_MET, MT_CUT)),
164 )
165 recoWMNfromTc = cms.EDProducer("CandViewShallowCloneCombiner",
166 decay = cms.string("isolatedGoodMuons@+ tcMet"),
167 cut = cms.string(("daughter(0).pt > %f && daughter(1).pt > %f && "+MT+" > %f") % (W_MU_PT, W_TC_MET, MT_CUT)),
168 )
169 recoWENfromPf = cms.EDProducer("CandViewShallowCloneCombiner",
170 decay = cms.string("isolatedGoodElectrons@+ pfMet"),
171 cut = cms.string(("daughter(0).pt > %f && daughter(1).pt > %f && "+MT+" > %f") % (W_EL_PT, W_PF_MET, MT_CUT)),
172 )
173 recoWENfromTc = cms.EDProducer("CandViewShallowCloneCombiner",
174 decay = cms.string("isolatedGoodElectrons@+ tcMet"),
175 cut = cms.string(("daughter(0).pt > %f && daughter(1).pt > %f && "+MT+" > %f") % (W_EL_PT, W_TC_MET, MT_CUT)),
176 )
177 recoWs = cms.Sequence(
178 recoWMNfromPf + recoWMNfromTc +
179 recoWENfromPf + recoWENfromTc
180 )
181
182 ## Tri and 4-objects
183 ## ---------------------------------
184 triLeptons = cms.EDProducer("CandViewShallowCloneCombiner",
185 decay = cms.string("L L L"),
186 checkCharge = cms.bool(False),
187 cut = cms.string("mass > 10 && min(min(daughter(0).pt,daughter(1).pt),daughter(2).pt) > 2 && max(max(daughter(0).pt,daughter(1).pt),daughter(2).pt) >= 5"),
188 )
189 triLeptonsMuMuMu = triLeptons.clone(decay = "isolatedGoodMuons isolatedGoodMuons isolatedGoodMuons")
190 triLeptonsMuMuEl = triLeptons.clone(decay = "isolatedGoodMuons isolatedGoodMuons isolatedGoodElectrons")
191 triLeptonsMuElEl = triLeptons.clone(decay = "isolatedGoodMuons isolatedGoodElectrons isolatedGoodElectrons")
192 triLeptonsElElEl = triLeptons.clone(decay = "isolatedGoodElectrons isolatedGoodElectrons isolatedGoodElectrons")
193
194 quadLeptons4Mu = crossLeptons.clone(decay = "diMuonsZ diMuonsZ")
195 quadLeptons2Mu2El = crossLeptons.clone(decay = "diMuonsZ diElectronsZ")
196 quadLeptons4El = crossLeptons.clone(decay = "diElectronsZ diElectronsZ")
197
198 multiLeptons = cms.Sequence(
199 triLeptonsMuMuMu + triLeptonsMuMuEl + triLeptonsMuElEl + triLeptonsElElEl +
200 quadLeptons4Mu + quadLeptons2Mu2El + quadLeptons4El
201 )
202
203 earlyDataInterestingEvents = cms.Sequence(
204 earlyDataPreFilter +
205 singleLeptons +
206 diLeptons +
207 recoWs +
208 multiLeptons
209 )
210
211