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