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 leadPionFinding = cms.PSet(
59  name = cms.string("LeadPion"),
60  plugin = cms.string("RecoTauDiscriminantCleanerPlugin"),
61  src = cms.InputTag("DISCRIMINATOR_SRC"),
62  tolerance = tolerance_default,
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("leadCand().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  tolerance = tolerance_default,
79 )
80 
81 stripMultiplicity = cms.PSet(
82  name = cms.string("StripMultiplicity"),
83  plugin = cms.string("RecoTauStringCleanerPlugin"),
84  # Require that cones were built by ensuring the a leadCand exits
85  selection = cms.string("leadCand().isNonnull()"),
86  selectionPassFunction = cms.string("-signalPiZeroCandidates().size()"),
87  selectionFailValue = cms.double(1e3),
88  tolerance = tolerance_default,
89 )
90 
91 combinedIsolation = cms.PSet(
92  name = cms.string("CombinedIsolation"),
93  plugin = cms.string("RecoTauStringCleanerPlugin"),
94  # Require that cones were built by ensuring the a leadCand exits
95  selection = cms.string("leadCand().isNonnull()"),
96  selectionPassFunction = cms.string("isolationPFChargedHadrCandsPtSum() + isolationPFGammaCandsEtSum()"),
97  selectionFailValue = cms.double(1e3),
98  tolerance = tolerance_default,
99 )
100 
101 chargeIsolation = cms.PSet(
102  name = cms.string("ChargeIsolation"),
103  plugin = cms.string("RecoTauStringCleanerPlugin"),
104  # Require that cones were built by ensuring the a leadCand exits
105  selection = cms.string("leadCand().isNonnull()"),
106  # Prefer lower isolation activity
107  selectionPassFunction = cms.string("isolationPFChargedHadrCandsPtSum()"),
108  selectionFailValue = cms.double(1e3),
109  tolerance = tolerance_default,
110 )
111 
112 ecalIsolation = cms.PSet(
113  name = cms.string("GammaIsolation"),
114  plugin = cms.string("RecoTauStringCleanerPlugin"),
115  # Require that cones were built by ensuring the a leadCand exits
116  selection = cms.string("leadCand().isNonnull()"),
117  # Prefer lower isolation activity
118  selectionPassFunction = cms.string("isolationPFGammaCandsEtSum()"),
119  selectionFailValue = cms.double(1e3),
120  tolerance = tolerance_default,
121 )
122 
123 # CV: Reject 2-prong candidates in which one of the tracks has low pT,
124 # in order to reduce rate of 1-prong taus migrating to 2-prong decay modecanddates
125 killSoftTwoProngTaus = cms.PSet(
126  name = cms.string("killSoftTwoProngTaus"),
127  plugin = cms.string("RecoTauSoftTwoProngTausCleanerPlugin"),
128  minTrackPt = cms.double(5.),
129  tolerance = tolerance_default,
130 )