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 
22  cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"), ## 53X
23  #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseIsolation"), #75X
24  discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), #HTT 2015 TWIKI
25  selectionCut=cms.double(0.5)
26  ),
27 
28 
29  ),
30  #cut = cms.string('pt > 22. && abs(eta) < 2.3') #53X
31  #cut = cms.string('et > 15. && abs(eta) < 2.5') #75X
32  cut = cms.string('pt > 18. && abs(eta) < 2.3') #HTT 2015 TWIKI
33 )
34 
35 TauSkimPFTauSkimmedBy1 = cms.EDFilter("CandViewCountFilter",
36  src = cms.InputTag('TauSkimPFTausSelected'),
37  minNumber = cms.uint32(1)
38 )
39 
40 TauSkimPFTauSkimmedBy2 = cms.EDFilter("CandViewCountFilter",
41  src = cms.InputTag('TauSkimPFTausSelected'),
42  minNumber = cms.uint32(2)
43 )
44 
45 ## MODULE IN 53X ONLY
46 TauSkimDiTauPairs = cms.EDProducer("CandViewShallowCloneCombiner",
47  decay = cms.string("TauSkimPFTausSelected TauSkimPFTausSelected"),
48  checkCharge = cms.bool(False),
49  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"),
50  )
51 
52 ## MODULE IN 53X ONLY
53 TauSkimDiTauPairFilter = cms.EDFilter("CandViewCountFilter",
54  src = cms.InputTag("TauSkimDiTauPairs"),
55  minNumber = cms.uint32(1)
56  )
57 
58 
59 ## MODULE IN 53X ONLY
60 TauSkimPFTausSelectedForMuTau = TauSkimPFTausSelected.clone()
61 TauSkimPFTausSelectedForMuTau.discriminators = cms.VPSet(
62  cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"), # 53X AND 75X
63  discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFindingNewDMs"), #HTT 2015 TWIKI
64  selectionCut=cms.double(0.5)
65  ),
66  cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"), #53X
67  #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseIsolation"), #75X
68  discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), #HTT 2015 TWIKI
69  selectionCut=cms.double(0.5)
70  ),
71  cms.PSet( #discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection"), #53X
72  discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection3"), #HTT 2015 TWIKI
73  selectionCut=cms.double(0.5)
74  ),
75  #cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByElectronVLooseMVA5"), #HTT 2015 TWIKI (not working!)
76  # selectionCut=cms.double(0.5)
77  # ),
78 
79 
80  )
81 
82 ## MODULE IN 53X ONLY
83 #TauSkimPFTausSelectedForMuTau.cut = cms.string('pt > 18. && abs(eta) < 2.3') #75X
84 TauSkimPFTausSelectedForMuTau.cut = cms.string('pt > 18. && abs(eta) < 2.3') #HTT 2015 TWIKI
85 TauSkimPFTauSkimmedForMuTau = cms.EDFilter("CandViewCountFilter",
86  src = cms.InputTag('TauSkimPFTausSelectedForMuTau'),
87  minNumber = cms.uint32(1)
88  )
89 ## NO MuTauMET MODULES IMPLEMETED HERE FROM 53X
90 
91 
92 ## MODULE IN 53X ONLY
93 TauSkimMuonSelected = cms.EDFilter("MuonRefSelector",
94  src = cms.InputTag("muons"),
95  cut = cms.string("pt > 20 && " + "abs(eta) < 2.1 && " +
96  "isGlobalMuon && isTrackerMuon" +
97  #" && globalTrack.isNonnull "+
98  #" && globalTrack.hitPattern.numberOfValidTrackerHits>=5"+
99  #" && globalTrack.normalizedChi2<20"+
100  " && (pfIsolationR03.sumChargedHadronPt/pt) < 0.3"
101  ),
102  )
103 
104 ## MODULE IN 53X ONLY
105 TauSkimMuonSkimmedBy1 = cms.EDFilter("CandViewCountFilter",
106  src = cms.InputTag('TauSkimMuonSelected'),
107  minNumber = cms.uint32(1)
108  )
109 
110 ## MODULE IN 53X ONLY
111 TauSkimMuTauPairs = cms.EDProducer("CandViewShallowCloneCombiner",
112  decay = cms.string("TauSkimMuonSelected TauSkimPFTausSelectedForMuTau"),
113  checkCharge = cms.bool(False),
114  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
115  )
116 
117 
118 ## NO MuTauMET MODULES IMPLEMETED HERE FROM 53X
119 
120 ## MODULE IN 53X ONLY
121 TauSkimMuTauPairFilter = cms.EDFilter("CandViewCountFilter",
122  src = cms.InputTag("TauSkimMuTauPairs"),
123  minNumber = cms.uint32(1)
124  )
125 
126 ## NO MuTauMET AND DITAU SEQUENCES IMPLEMETED HERE FROM 53X
127 
128 ## MUTAU SEQUENCE IN 53X ONLY
129 mutauSkimSequence = cms.Sequence(
130  TauSkimMuonSelected *
131  TauSkimMuonSkimmedBy1 *
132  TauSkimPFTausSelectedForMuTau *
133  TauSkimPFTauSkimmedForMuTau *
134  TauSkimMuTauPairs *
135  TauSkimMuTauPairFilter
136  )
137 
138 
139 
140 
141