CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HighMETSkim_cff.py
Go to the documentation of this file.
2 
3 
4 ## select events with at least one good PV
5 pvFilterHighMETSkim = cms.EDFilter(
6  "VertexSelector",
7  src = cms.InputTag("offlinePrimaryVertices"),
8  cut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"),
9  filter = cms.bool(True), # otherwise it won't filter the events, just produce an empty vertex collection.
10  )
11 
12 
13 ## apply HBHE Noise filter
14 ## import CommonTools.RecoAlgos.HBHENoiseFilter_cfi
15 ## HBHENoiseFilter = CommonTools.RecoAlgos.HBHENoiseFilter_cfi.HBHENoiseFilter.clone()
16 
17 
18 ## select events with high pfMET
19 pfMETSelectorHighMETSkim = cms.EDFilter(
20  "CandViewSelector",
21  src = cms.InputTag("pfMet"),
22  cut = cms.string( "pt()>200" )
23  )
24 
25 pfMETCounterHighMETSkim = cms.EDFilter(
26  "CandViewCountFilter",
27  src = cms.InputTag("pfMETSelectorHighMETSkim"),
28  minNumber = cms.uint32(1),
29  )
30 
31 pfMETSelSeq = cms.Sequence(
32  pvFilterHighMETSkim*
33  ##HBHENoiseFilter*
34  pfMETSelectorHighMETSkim*
35  pfMETCounterHighMETSkim
36  )
37 
38 
39 
40 ## select events with high caloMET
41 caloMETSelectorHighMETSkim = cms.EDFilter(
42  "CandViewSelector",
43  src = cms.InputTag("caloMetM"),
44  cut = cms.string( "pt()>200" )
45  )
46 
47 caloMETCounterHighMETSkim = cms.EDFilter(
48  "CandViewCountFilter",
49  src = cms.InputTag("caloMETSelectorHighMETSkim"),
50  minNumber = cms.uint32(1),
51  )
52 
53 caloMETSelSeq = cms.Sequence(
54  pvFilterHighMETSkim*
55  ##HBHENoiseFilter*
56  caloMETSelectorHighMETSkim*
57  caloMETCounterHighMETSkim
58  )
59 
60 
61 ## select events with high MET dependent on PF and Calo MET Conditions
62 CondMETSelectorHighMETSkim = cms.EDProducer(
63  "CandViewShallowCloneCombiner",
64  decay = cms.string("pfMet caloMetM"),
65  cut = cms.string(" (daughter(0).pt > 200) || (daughter(0).pt/daughter(1).pt > 2 && daughter(1).pt > 150 ) || (daughter(1).pt/daughter(0).pt > 2 && daughter(0).pt > 150 ) " )
66  )
67 
68 CondMETCounterHighMETSkim = cms.EDFilter(
69  "CandViewCountFilter",
70  src = cms.InputTag("CondMETSelectorHighMETSkim"),
71  minNumber = cms.uint32(1),
72  )
73 
74 CondMETSelSeq = cms.Sequence(
75  pvFilterHighMETSkim*
76  ##HBHENoiseFilter*
77  CondMETSelectorHighMETSkim*
78  CondMETCounterHighMETSkim
79  )
80 
81 
82 
83 ## select events with PAT METs in MINIAODSIM - remember to keep the right branches in the cmsDriver
84 miniMETSelectorHighMETSkim = cms.EDFilter(
85  "CandViewSelector",
86  src = cms.InputTag("slimmedMETs"),
87  cut = cms.string( "pt()>200" )
88  )
89 
90 miniMETCounterHighMETSkim = cms.EDFilter(
91  "CandViewCountFilter",
92  src = cms.InputTag("miniMETSelectorHighMETSkim"),
93  minNumber = cms.uint32(1),
94  )
95 
96 miniMETSelSeq = cms.Sequence(
97  ##HBHENoiseFilter*
98  miniMETSelectorHighMETSkim*
99  miniMETCounterHighMETSkim
100  )
101