CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TopMuEGSkim_cff.py
Go to the documentation of this file.
2 
3 
4 HLTPath = "HLT_Ele*"
5 HLTProcessName = "HLT"
6 
7 ### cut on electron tag
8 #ELECTRON_ET_CUT_MIN = 10.0
9 ELECTRON_ET_CUT_MIN_TIGHT = 20.0
10 ELECTRON_ET_CUT_MIN_LOOSE = 10.0
11 ELECTRON_COLL = "gedGsfElectrons"
12 ELECTRON_CUTS = "(abs(superCluster.eta)<2.5) && (ecalEnergy*sin(superClusterPosition.theta)>" + str(ELECTRON_ET_CUT_MIN_LOOSE) + ")"
13 
14 MASS_CUT_MIN = 0.
15 
16 ##################
17 # Electron ID ######
19 
20 
21 # GsfElectron ################
22 
23 ElectronPassingVeryLooseId = cms.EDFilter("GsfElectronRefSelector",
24  src = cms.InputTag( ELECTRON_COLL ),
25  cut = cms.string( ELECTRON_CUTS )
26 )
27 
28 
29 #####################################
30 #####################################
31 import copy
33 
34 ZEM_DiJetHltFilter = cms.EDFilter("HLTHighLevel",
35  TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
36  HLTPaths = cms.vstring('HLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v*','HLT_Mu8_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v*'), # provide list of HLT paths (or patterns) you want
37  eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
38  andOr = cms.bool(True), # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
39  throw = cms.bool(False), # throw exception on unknown path names
40 # saveTags = cms.bool(False)
41  )
42 
43 
44 #elec_sequence = cms.Sequence(
45 # ZEM_DiJetHltFilter *
46 # goodElectrons *
47 # PassingVeryLooseId
48 # )
49 
50 #####################################
51 ############ MU SELECTION #########################
52 
53 
54 # Get muons of needed quality for Zs
55 looseMuonsForTop = cms.EDFilter("MuonSelector",
56  src = cms.InputTag("muons"),
57  cut = cms.string('pt > 20 && abs(eta)<2.4 && isGlobalMuon = 1 && isTrackerMuon = 1 && abs(innerTrack().dxy)<2.0'),
58  filter = cms.bool(True)
59 )
60 
61 
62 
63 elecMuon = cms.EDProducer("CandViewShallowCloneCombiner",
64  checkCharge = cms.bool(False),
65  cut = cms.string('mass > 0'),
66  decay = cms.string("looseMuonsForTop ElectronPassingVeryLooseId")
67  )
68 elecMuonFilter = cms.EDFilter("CandViewCountFilter",
69  src = cms.InputTag("elecMuon"),
70  minNumber = cms.uint32(1)
71  )
72 
73 
74 ############################################
75 ################# DI JET FILTER ###########################
76 
77 import FWCore.ParameterSet.Config as cms
78 
79 
80 Jet1 = cms.EDFilter("EtaPtMinCandViewSelector",
81  src = cms.InputTag("ak4PFJets"),
82  ptMin = cms.double(30),
83  etaMin = cms.double(-2.5),
84  etaMax = cms.double(2.5)
85  )
86 
87 dijetFilter = cms.EDFilter("CandViewCountFilter",
88  src = cms.InputTag("Jet1"),
89  minNumber = cms.uint32(2)
90  )
91 
92 
93 TopMuEGsequence = cms.Sequence(ZEM_DiJetHltFilter * looseMuonsForTop * ElectronPassingVeryLooseId * elecMuon * elecMuonFilter * Jet1 * dijetFilter)
94 
95 #from Configuration.EventContent.EventContent_cff import OutALCARECOEcalCalElectron
96 #TopMuEGSkimContent = OutALCARECOEcalCalElectron.clone()
97 #TopMuEGSkimContent.outputCommands.extend( [
98 # "keep *drop *",
99 # "keep *_pfMet_*_*",
100 # "keep *_MuEG_Skim_*"
101 # ] )