test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ZMuMuGolden_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 import copy
4 
5 ###################################################
6 # muons for ZMuMu #
7 ###################################################
8 
9 goodGlobalMuons = cms.EDFilter("MuonViewRefSelector",
10  src = cms.InputTag("muons"),
11  cut = cms.string('isGlobalMuon = 1 & isTrackerMuon = 1 & pt > 20 & abs(eta)<2.1 & isolationR03().sumPt<3.0 & abs(globalTrack().dxy)<0.2 & globalTrack().hitPattern().numberOfValidTrackerHits>10'),
12  filter = cms.bool(True)
13 )
14 
15 ###################################################
16 # combiner module #
17 ###################################################
18 
19 zmmCands = cms.EDFilter("CandViewShallowCloneCombiner",
20  checkCharge = cms.bool(True),
21  cut = cms.string('mass > 60 & mass<120 & charge=0'),
22  decay = cms.string("goodGlobalMuons@+ goodGlobalMuons@-")
23 )
24 
25 
26 # dimuon filter
27 dimuonsFilter = cms.EDFilter("CandViewCountFilter",
28  src = cms.InputTag("zmmCands"),
29  minNumber = cms.uint32(1)
30 )
31 
32 ### trigger filter: selection of the events which have fired the HLT trigger path given. You may want to use it or to duisegard at all add a trigger match or not....
33 
34 
35 
37 
38 dimuonsHLTFilter = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
39 # Add this to access 8E29 menu
40 dimuonsHLTFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","HLT")
41 # for 1E31 menu
42 #dimuonsHLTFilter.HLTPaths = ["HLT_Mu9", "HLT_DoubleMu3"]
43 dimuonsHLTFilter.HLTPaths = ["HLT_Mu9"]
44 
45 
46 
47 
48 ##################################################
49 ### trigger mathching, optional #######
50 ##################################################
51 
52 zSelection = cms.PSet(
53 ## cut already implemented, but one could add more (e.g. massMin, massMax,... change the pt or eta cut....)
54  cut = cms.string("charge = 0 & daughter(0).pt > 20 & daughter(1).pt > 20 & abs(daughter(0).eta)<2.1 & abs(daughter(1).eta)<2.1 & mass > 60"),
55  )
56 
57 
58 ##ZMuMu: at least one HLT trigger match
59 goodZToMuMuAtLeast1HLT = cms.EDFilter(
60  "ZGoldenSelectorAndFilter",
61  zSelection,
62  TrigTag = cms.InputTag("TriggerResults::HLT"),
63  triggerEvent = cms.InputTag( "hltTriggerSummaryAOD::HLT" ),
64  src = cms.InputTag("zmmCands"),
65  condition =cms.string("atLeastOneMatched"),
66  hltPath = cms.string("HLT_Mu9"),
67  L3FilterName= cms.string("hltSingleMu9L3Filtered9"),
68  maxDPtRel = cms.double( 1.0 ),
69  maxDeltaR = cms.double( 0.2 ),
70  filter = cms.bool(True)
71 )
72 
73 
74 
75 
76 ewkZMuMuGoldenSequence = cms.Sequence(
77  goodGlobalMuons
78 # one may want to disregard the HLT filter
79  # * dimuonsHLTFilter
80  * zmmCands
81  * dimuonsFilter
82 # one may want to disregard the HLT matching
83  # * goodZToMuMuAtLeast1HLT
84 )
85 
86