CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PDWG_TauSkim_cff.py
Go to the documentation of this file.
2 
3 from HLTrigger.HLTfilters.hltHighLevel_cfi import hltHighLevel as hlt_selector
4 hlt_selector.throw = cms.bool(False)
5 TauSkimMuTauMETHLT = hlt_selector.clone()
6 TauSkimMuTauMETHLT.TriggerResultsTag = cms.InputTag('TriggerResults', '', 'HLT')
7 TauSkimMuTauMETHLT.andOr=cms.bool(True)
8 TauSkimMuTauMETHLT.HLTPaths = cms.vstring("HLT_IsoMu15_eta2p1_L1ETM20_v*", "HLT_IsoMu15Rho_eta2p1_L1ETM20_v*")
9 
10 TauSkimPFTausSelected = cms.EDFilter("PFTauSelector",
11  src = cms.InputTag("hpsPFTauProducer"),
12  discriminators = cms.VPSet(
13  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"),
14  selectionCut=cms.double(0.5)
15  ),
16  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"),
17  selectionCut=cms.double(0.5)
18  ),
19  ),
20  cut = cms.string('pt > 22. && abs(eta) < 2.3')
21 )
22 
23 TauSkimPFTauSkimmedBy1 = cms.EDFilter("CandViewCountFilter",
24  src = cms.InputTag('TauSkimPFTausSelected'),
25  minNumber = cms.uint32(1)
26 )
27 
28 TauSkimPFTauSkimmedBy2 = cms.EDFilter("CandViewCountFilter",
29  src = cms.InputTag('TauSkimPFTausSelected'),
30  minNumber = cms.uint32(2)
31 )
32 
33 TauSkimDiTauPairs = cms.EDProducer("CandViewShallowCloneCombiner",
34  decay = cms.string("TauSkimPFTausSelected TauSkimPFTausSelected"),
35  checkCharge = cms.bool(False),
36  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"),
37  )
38 
39 TauSkimDiTauPairFilter = cms.EDFilter("CandViewCountFilter",
40  src = cms.InputTag("TauSkimDiTauPairs"),
41  minNumber = cms.uint32(1)
42  )
43 
44 TauSkimPFTausSelectedForMuTau = TauSkimPFTausSelected.clone()
45 TauSkimPFTausSelectedForMuTau.discriminators = cms.VPSet(
46  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"),
47  selectionCut=cms.double(0.5)
48  ),
49  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr"),
50  selectionCut=cms.double(0.5)
51  ),
52  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection"),
53  selectionCut=cms.double(0.5)
54  ),
55  )
56 TauSkimPFTausSelectedForMuTau.cut = cms.string('pt > 18. && abs(eta) < 2.3')
57 TauSkimPFTauSkimmedForMuTau = cms.EDFilter("CandViewCountFilter",
58  src = cms.InputTag('TauSkimPFTausSelectedForMuTau'),
59  minNumber = cms.uint32(1)
60  )
61 
62 TauSkimPFTausSelectedForMuTauMET = TauSkimPFTausSelected.clone()
63 TauSkimPFTausSelectedForMuTauMET.cut = cms.string('pt > 18. && abs(eta) < 2.3')
64 TauSkimPFTauSkimmedForMuTauMET = cms.EDFilter("CandViewCountFilter",
65  src = cms.InputTag('TauSkimPFTausSelectedForMuTauMET'),
66  minNumber = cms.uint32(1)
67  )
68 
69 TauSkimMuonSelected = cms.EDFilter("MuonRefSelector",
70  src = cms.InputTag("muons"),
71  cut = cms.string("pt > 15 && " + "abs(eta) < 2.4 && " +
72  "isGlobalMuon && isTrackerMuon" +
73  " && globalTrack.isNonnull "+
74  " && globalTrack.hitPattern.numberOfValidTrackerHits>=5"+
75  " && globalTrack.normalizedChi2<20"+
76  " && (pfIsolationR03.sumChargedHadronPt/pt) < 0.3"
77  ),
78  )
79 
80 TauSkimMuonSkimmedBy1 = cms.EDFilter("CandViewCountFilter",
81  src = cms.InputTag('TauSkimMuonSelected'),
82  minNumber = cms.uint32(1)
83  )
84 
85 TauSkimMuTauPairs = cms.EDProducer("CandViewShallowCloneCombiner",
86  decay = cms.string("TauSkimMuonSelected TauSkimPFTausSelectedForMuTau"),
87  checkCharge = cms.bool(False),
88  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"),
89  )
90 
91 TauSkimMuTauMETPairs = cms.EDProducer("CandViewShallowCloneCombiner",
92  decay = cms.string("TauSkimMuonSelected TauSkimPFTausSelectedForMuTauMET"),
93  checkCharge = cms.bool(False),
94  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"),
95  )
96 
97 TauSkimMuTauPairFilter = cms.EDFilter("CandViewCountFilter",
98  src = cms.InputTag("TauSkimMuTauPairs"),
99  minNumber = cms.uint32(1)
100  )
101 TauSkimMuTauMETPairFilter = cms.EDFilter("CandViewCountFilter",
102  src = cms.InputTag("TauSkimMuTauMETPairs"),
103  minNumber = cms.uint32(1)
104  )
105 
106 
107 tauSkim1Sequence = cms.Sequence(
108  TauSkimPFTausSelected *
109  TauSkimPFTauSkimmedBy1
110  )
111 
112 tauSkim2Sequence = cms.Sequence(
113  TauSkimPFTausSelected *
114  TauSkimPFTauSkimmedBy2 *
115  TauSkimDiTauPairs *
116  TauSkimDiTauPairFilter
117  )
118 
119 mutauSkimSequence = cms.Sequence(
120  TauSkimMuonSelected *
121  TauSkimMuonSkimmedBy1 *
122  TauSkimPFTausSelectedForMuTau *
123  TauSkimPFTauSkimmedForMuTau *
124  TauSkimMuTauPairs *
125  TauSkimMuTauPairFilter
126  )
127 
128 mutauMETSkimSequence = cms.Sequence(
129  TauSkimMuTauMETHLT *
130  TauSkimMuonSelected *
131  TauSkimMuonSkimmedBy1 *
132  TauSkimPFTausSelectedForMuTauMET *
133  TauSkimPFTauSkimmedForMuTauMET *
134  TauSkimMuTauMETPairs *
135  TauSkimMuTauMETPairFilter
136  )