CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuTauSkim_cff.py
Go to the documentation of this file.
2 
3 
4 '''
5 ## 2012 HLT COND.S AS GIVEN BY ARUN IN 53X
6 from HLTrigger.HLTfilters.hltHighLevel_cfi import hltHighLevel as hlt_selector
7 hlt_selector.throw = cms.bool(False)
8 TauSkimMuTauMETHLT = hlt_selector.clone()
9 TauSkimMuTauMETHLT.TriggerResultsTag = cms.InputTag('TriggerResults', '', 'HLT')
10 TauSkimMuTauMETHLT.andOr=cms.bool(True)
11 TauSkimMuTauMETHLT.HLTPaths = cms.vstring("HLT_IsoMu15_eta2p1_L1ETM20_v*", "HLT_IsoMu15Rho_eta2p1_L1ETM20_v*")
12 '''
13 
14 TauSkimPFTausSelected = cms.EDFilter("PFTauSelector",
15  src = cms.InputTag("hpsPFTauProducer"),
16  discriminators = cms.VPSet(
17  cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"), #53X AND 75X
18  discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFindingNewDMs"), #HTT 2015 TWIKI
19  selectionCut=cms.double(0.5)
20 
21  ) ## COMMENT OUT IF USING THE PSET BELOW
22 # ),
23 
24  #cms.PSet(#discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"), ## 53X
25  # #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseIsolation"), #75X
26  # discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), #HTT 2015 TWIKI
27  # selectionCut=cms.double(0.5)
28  # ),
29 
30 
31  ),
32  #cut = cms.string('pt > 22. && abs(eta) < 2.3') #53X
33  #cut = cms.string('et > 15. && abs(eta) < 2.5') #75X
34  #cut = cms.string('pt > 18. && abs(eta) < 2.3') #HTT 2015 TWIKI
35  cut = cms.string('pt > 18. && abs(eta) < 2.3 && hpsPFTauMVA3IsolationChargedIsoPtSum < 2') #MICHAL'S SUGGESTION
36 )
37 
38 TauSkimPFTauSkimmedBy1 = cms.EDFilter("CandViewCountFilter",
39  src = cms.InputTag('TauSkimPFTausSelected'),
40  minNumber = cms.uint32(1)
41 )
42 
43 TauSkimPFTauSkimmedBy2 = cms.EDFilter("CandViewCountFilter",
44  src = cms.InputTag('TauSkimPFTausSelected'),
45  minNumber = cms.uint32(2)
46 )
47 
48 ## MODULE IN 53X ONLY
49 TauSkimDiTauPairs = cms.EDProducer("CandViewShallowCloneCombiner",
50  decay = cms.string("TauSkimPFTausSelected TauSkimPFTausSelected"),
51  checkCharge = cms.bool(False),
52  cut = cms.string("sqrt((daughter(0).eta-daughter(1).eta)*(daughter(0).eta-daughter(1).eta)+ min( abs(daughter(0).phi-daughter(1).phi), 2*3.1415926 - abs(daughter(0).phi-daughter(1).phi) ) * min( abs(daughter(0).phi-daughter(1).phi), 2*3.1415926 - abs(daughter(0).phi-daughter(1).phi) ) )>0.5"),
53  )
54 
55 ## MODULE IN 53X ONLY
56 TauSkimDiTauPairFilter = cms.EDFilter("CandViewCountFilter",
57  src = cms.InputTag("TauSkimDiTauPairs"),
58  minNumber = cms.uint32(1)
59  )
60 
61 
62 ## MODULE IN 53X ONLY
63 TauSkimPFTausSelectedForMuTau = TauSkimPFTausSelected.clone()
64 TauSkimPFTausSelectedForMuTau.discriminators = cms.VPSet(
65  cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"), # 53X AND 75X
66  discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFindingNewDMs"), #HTT 2015 TWIKI
67  selectionCut=cms.double(0.5)
68  ),
69 
70 # cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"), #53X
71 # #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseIsolation"), #75X
72 # discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), #HTT 2015 TWIKI
73 # selectionCut=cms.double(0.5)
74 # ),
75 
76  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection3"), #HTT 2015 TWIKI
77  selectionCut=cms.double(0.5)
78  ),
79  #cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByElectronVLooseMVA5"), #HTT 2015 TWIKI (not working!)
80  # selectionCut=cms.double(0.5)
81  # ),
82 
83 
84  )
85 
86 ## MODULE IN 53X ONLY
87 #TauSkimPFTausSelectedForMuTau.cut = cms.string('pt > 18. && abs(eta) < 2.3') #75X
88 TauSkimPFTausSelectedForMuTau.cut = cms.string('pt > 18. && abs(eta) < 2.3') #HTT 2015 TWIKI
89 TauSkimPFTauSkimmedForMuTau = cms.EDFilter("CandViewCountFilter",
90  src = cms.InputTag('TauSkimPFTausSelectedForMuTau'),
91  minNumber = cms.uint32(1)
92  )
93 ## NO MuTauMET MODULES IMPLEMETED HERE FROM 53X
94 
95 
96 ## MODULE IN 53X ONLY
97 TauSkimMuonSelected = cms.EDFilter("MuonRefSelector",
98  src = cms.InputTag("muons"),
99  cut = cms.string("pt > 20 && " + "abs(eta) < 2.1 && " +
100  "isGlobalMuon && isTrackerMuon" +
101  #" && globalTrack.isNonnull "+
102  #" && globalTrack.hitPattern.numberOfValidTrackerHits>=5"+
103  #" && globalTrack.normalizedChi2<20"+
104  " && (pfIsolationR03.sumChargedHadronPt/pt) < 0.3"
105  ),
106  )
107 
108 ## MODULE IN 53X ONLY
109 TauSkimMuonSkimmedBy1 = cms.EDFilter("CandViewCountFilter",
110  src = cms.InputTag('TauSkimMuonSelected'),
111  minNumber = cms.uint32(1)
112  )
113 
114 ## MODULE IN 53X ONLY
115 TauSkimMuTauPairs = cms.EDProducer("CandViewShallowCloneCombiner",
116  decay = cms.string("TauSkimMuonSelected TauSkimPFTausSelectedForMuTau"),
117  checkCharge = cms.bool(False),
118  cut = cms.string("sqrt((daughter(0).eta-daughter(1).eta)*(daughter(0).eta-daughter(1).eta)+ min( abs(daughter(0).phi-daughter(1).phi), 2*3.1415926 - abs(daughter(0).phi-daughter(1).phi) ) * min( abs(daughter(0).phi-daughter(1).phi), 2*3.1415926 - abs(daughter(0).phi-daughter(1).phi) ) )>0.3"), ## DR CUT LOOSENED FOLLOWING MICHAL'S SUGGESTIONS FROM 0.5 TO 0.3
119  )
120 
121 
122 ## NO MuTauMET MODULES IMPLEMETED HERE FROM 53X
123 
124 ## MODULE IN 53X ONLY
125 TauSkimMuTauPairFilter = cms.EDFilter("CandViewCountFilter",
126  src = cms.InputTag("TauSkimMuTauPairs"),
127  minNumber = cms.uint32(1)
128  )
129 
130 ## NO MuTauMET AND DITAU SEQUENCES IMPLEMETED HERE FROM 53X
131 
132 ## MUTAU SEQUENCE IN 53X ONLY
133 mutauSkimSequence = cms.Sequence(
134  TauSkimMuonSelected *
135  TauSkimMuonSkimmedBy1 *
136  TauSkimPFTausSelectedForMuTau *
137  TauSkimPFTauSkimmedForMuTau *
138  TauSkimMuTauPairs *
139  TauSkimMuTauPairFilter
140  )
141 
142 
143 
144 
145