ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HiggsAnalysis/EarlyDataStudy/python/earlyDataInterestingEvents_cff.py
Revision: 1.2
Committed: Mon May 10 15:26:29 2010 UTC (14 years, 11 months ago) by mangano
Content type: text/x-python
Branch: MAIN
CVS Tags: V00-02-00, V00-01-03, V00-01-02, V00-01-01, V00-01-00
Changes since 1.1: +38 -21 lines
Log Message:
make selection tighter to keep the rate of selected events within 300 events/day

File Contents

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