CMS 3D CMS Logo

RecoTauCleanerPlugins.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 '''
4 
5 Plugins for ranking PFTau candidates
6 
7 '''
8 
9 matchingConeCut = cms.PSet(
10  name = cms.string("MatchingCone"),
11  plugin = cms.string("RecoTauStringCleanerPlugin"),
12  # Prefer taus that are within DR<0.1 of the jet axis
13  selection = cms.string("deltaR(eta, phi, jetRef().eta, jetRef().phi) < 0.1"),
14  selectionPassFunction = cms.string("0"),
15  selectionFailValue = cms.double(1e3),
16 )
17 
18 # Prefer taus with charge == 1 (no three prongs with charge = 3)
19 unitCharge = cms.PSet(
20  name = cms.string("UnitCharge"),
21  plugin = cms.string("RecoTauStringCleanerPlugin"),
22  # Only effects three prongs
23  selection = cms.string("signalPFChargedHadrCands().size() = 3"),
24  # As 1 is lower than 3, this will always prefer those with unit charge
25  selectionPassFunction = cms.string("abs(charge())-1"),
26  # If it is a one prong, consider it just as good as a
27  # three prong with unit charge
28  selectionFailValue = cms.double(0),
29 )
30 
31 # similar to unitCharge but handles also cases where tau is made up of
32 # a combination of tracks and pf charged hadrons
33 charge = cms.PSet(
34  name = cms.string("Charge"),
35  plugin = cms.string("RecoTauChargeCleanerPlugin"),
36  # cleaner is applied to decay modes with the number of prongs given here
37  nprongs = cms.vuint32(1,3),
38  # taus with charge != 1 are rejected
39  passForCharge = cms.int32(1),
40  selectionFailValue = cms.double(0),
41 )
42 
43 # Prefer taus with pt greater 15
44 ptGt15 = cms.PSet(
45  name = cms.string("PtGt15"),
46  plugin = cms.string("RecoTauStringCleanerPlugin"),
47  selection = cms.string("pt > 15."),
48  selectionPassFunction = cms.string("0"),
49  selectionFailValue = cms.double(1e3)
50 )
51 
52 # Prefer taus that have higher TaNC output values
53 tanc = cms.PSet(
54  name = cms.string("TaNC"),
55  plugin = cms.string("RecoTauDiscriminantCleanerPlugin"),
56  src = cms.InputTag("DISCRIMINATOR_SRC"),
57 )
58 
59 leadPionFinding = cms.PSet(
60  name = cms.string("LeadPion"),
61  plugin = cms.string("RecoTauDiscriminantCleanerPlugin"),
62  src = cms.InputTag("DISCRIMINATOR_SRC"),
63 )
64 
65 pt = cms.PSet(
66  name = cms.string("Pt"),
67  plugin = cms.string("RecoTauStringCleanerPlugin"),
68  # Require that cones were built by ensuring the a leadCand exits
69  selection = cms.string("leadPFCand().isNonnull()"),
70  selectionPassFunction = cms.string("-pt()"), # CV: negative sign means that we prefer candidates of high pT
71  selectionFailValue = cms.double(1e3),
72  tolerance = cms.double(1.e-2) # CV: consider candidates with almost equal pT to be of the same rank (to avoid sensitivity to rounding errors)
73 )
74 
75 chargedHadronMultiplicity = cms.PSet(
76  name = cms.string("ChargedHadronMultiplicity"),
77  plugin = cms.string("RecoTauChargedHadronMultiplicityCleanerPlugin")
78 )
79 
80 stripMultiplicity = cms.PSet(
81  name = cms.string("StripMultiplicity"),
82  plugin = cms.string("RecoTauStringCleanerPlugin"),
83  # Require that cones were built by ensuring the a leadCand exits
84  selection = cms.string("leadPFCand().isNonnull()"),
85  selectionPassFunction = cms.string("-signalPiZeroCandidates().size()"),
86  selectionFailValue = cms.double(1e3)
87 )
88 
89 combinedIsolation = cms.PSet(
90  name = cms.string("CombinedIsolation"),
91  plugin = cms.string("RecoTauStringCleanerPlugin"),
92  # Require that cones were built by ensuring the a leadCand exits
93  selection = cms.string("leadPFCand().isNonnull()"),
94  selectionPassFunction = cms.string("isolationPFChargedHadrCandsPtSum() + isolationPFGammaCandsEtSum()"),
95  selectionFailValue = cms.double(1e3)
96 )
97 
98 chargeIsolation = cms.PSet(
99  name = cms.string("ChargeIsolation"),
100  plugin = cms.string("RecoTauStringCleanerPlugin"),
101  # Require that cones were built by ensuring the a leadCand exits
102  selection = cms.string("leadPFCand().isNonnull()"),
103  # Prefer lower isolation activity
104  selectionPassFunction = cms.string("isolationPFChargedHadrCandsPtSum()"),
105  selectionFailValue = cms.double(1e3)
106 )
107 
108 ecalIsolation = cms.PSet(
109  name = cms.string("GammaIsolation"),
110  plugin = cms.string("RecoTauStringCleanerPlugin"),
111  # Require that cones were built by ensuring the a leadCand exits
112  selection = cms.string("leadPFCand().isNonnull()"),
113  # Prefer lower isolation activity
114  selectionPassFunction = cms.string("isolationPFGammaCandsEtSum()"),
115  selectionFailValue = cms.double(1e3)
116 )
117 
118 # CV: Reject 2-prong candidates in which one of the tracks has low pT,
119 # in order to reduce rate of 1-prong taus migrating to 2-prong decay modecanddates
120 killSoftTwoProngTaus = cms.PSet(
121  name = cms.string("killSoftTwoProngTaus"),
122  plugin = cms.string("RecoTauSoftTwoProngTausCleanerPlugin"),
123  minTrackPt = cms.double(5.)
124 )