CMS 3D CMS Logo

MuTauSkim_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
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  )
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  discriminatorContainers = cms.VPSet(),
33  #cut = cms.string('pt > 22. && abs(eta) < 2.3') #53X
34  #cut = cms.string('et > 15. && abs(eta) < 2.5') #75X
35  #cut = cms.string('pt > 18. && abs(eta) < 2.3') #HTT 2015 TWIKI
36  cut = cms.string('pt > 18. && abs(eta) < 2.3 && hpsPFTauMVA3IsolationChargedIsoPtSum < 2') #MICHAL'S SUGGESTION
37 )
38 
39 TauSkimPFTauSkimmedBy1 = cms.EDFilter("CandViewCountFilter",
40  src = cms.InputTag('TauSkimPFTausSelected'),
41  minNumber = cms.uint32(1)
42 )
43 
44 TauSkimPFTauSkimmedBy2 = cms.EDFilter("CandViewCountFilter",
45  src = cms.InputTag('TauSkimPFTausSelected'),
46  minNumber = cms.uint32(2)
47 )
48 
49 
50 TauSkimDiTauPairs = cms.EDProducer("CandViewShallowCloneCombiner",
51  decay = cms.string("TauSkimPFTausSelected TauSkimPFTausSelected"),
52  checkCharge = cms.bool(False),
53  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"),
54  )
55 
56 
57 TauSkimDiTauPairFilter = cms.EDFilter("CandViewCountFilter",
58  src = cms.InputTag("TauSkimDiTauPairs"),
59  minNumber = cms.uint32(1)
60  )
61 
62 
63 
64 TauSkimPFTausSelectedForMuTau = TauSkimPFTausSelected.clone()
65 TauSkimPFTausSelectedForMuTau.discriminators = cms.VPSet(
66  cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"), # 53X AND 75X
67  discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFindingNewDMs"), #HTT 2015 TWIKI
68  selectionCut=cms.double(0.5)
69  ),
70 
71 # cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"), #53X
72 # #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseIsolation"), #75X
73 # discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), #HTT 2015 TWIKI
74 # selectionCut=cms.double(0.5)
75 # ),
76 
77  #cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByElectronVLooseMVA5"), #HTT 2015 TWIKI (not working!)
78  # selectionCut=cms.double(0.5)
79  # ),
80 
81 
82  )
83 
84 TauSkimPFTausSelectedForMuTau.discriminatorContainers = cms.VPSet(
85  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByMuonRejection3"),
86  workingPoints=cms.vstring("ByLooseMuonRejection3"),
87  rawValues=cms.vstring(),
88  selectionCuts=cms.vdouble()
89  )
90 )
91 
92 
94 TauSkimPFTausSelectedForMuTau.cut = cms.string('pt > 18. && abs(eta) < 2.3') #HTT 2015 TWIKI
95 TauSkimPFTauSkimmedForMuTau = cms.EDFilter("CandViewCountFilter",
96  src = cms.InputTag('TauSkimPFTausSelectedForMuTau'),
97  minNumber = cms.uint32(1)
98  )
99 
100 
101 
102 
103 TauSkimMuonSelected = cms.EDFilter("MuonRefSelector",
104  src = cms.InputTag("muons"),
105  cut = cms.string("pt > 20 && " + "abs(eta) < 2.1 && " +
106  "isGlobalMuon && isTrackerMuon" +
107  #" && globalTrack.isNonnull "+
108  #" && globalTrack.hitPattern.numberOfValidTrackerHits>=5"+
109  #" && globalTrack.normalizedChi2<20"+
110  " && (pfIsolationR03.sumChargedHadronPt/pt) < 0.3"
111  ),
112  )
113 
114 
115 TauSkimMuonSkimmedBy1 = cms.EDFilter("CandViewCountFilter",
116  src = cms.InputTag('TauSkimMuonSelected'),
117  minNumber = cms.uint32(1)
118  )
119 
120 
121 TauSkimMuTauPairs = cms.EDProducer("CandViewShallowCloneCombiner",
122  decay = cms.string("TauSkimMuonSelected TauSkimPFTausSelectedForMuTau"),
123  checkCharge = cms.bool(False),
124  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"),
125  )
126 
127 
128 
129 
130 
131 TauSkimMuTauPairFilter = cms.EDFilter("CandViewCountFilter",
132  src = cms.InputTag("TauSkimMuTauPairs"),
133  minNumber = cms.uint32(1)
134  )
135 
136 
137 
138 
139 mutauSkimSequence = cms.Sequence(
140  TauSkimMuonSelected *
141  TauSkimMuonSkimmedBy1 *
142  TauSkimPFTausSelectedForMuTau *
143  TauSkimPFTauSkimmedForMuTau *
144  TauSkimMuTauPairs *
145  TauSkimMuTauPairFilter
146  )
147 
148 
149 
150 
151