CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTauCleanerPlugins.py
Go to the documentation of this file.
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 # Prefer taus with pt greater 15
32 ptGt15 = cms.PSet(
33  name = cms.string("PtGt15"),
34  plugin = cms.string("RecoTauStringCleanerPlugin"),
35  selection = cms.string("pt > 15."),
36  selectionPassFunction = cms.string("0"),
37  selectionFailValue = cms.double(1e3)
38 )
39 
40 # Prefer taus that have higher TaNC output values
41 tanc = cms.PSet(
42  name = cms.string("TaNC"),
43  plugin = cms.string("RecoTauDiscriminantCleanerPlugin"),
44  src = cms.InputTag("DISCRIMINATOR_SRC"),
45 )
46 
47 leadPionFinding = cms.PSet(
48  name = cms.string("LeadPion"),
49  plugin = cms.string("RecoTauDiscriminantCleanerPlugin"),
50  src = cms.InputTag("DISCRIMINATOR_SRC"),
51 )
52 
53 pt = cms.PSet(
54  name = cms.string("Pt"),
55  plugin = cms.string("RecoTauStringCleanerPlugin"),
56  # Require that cones were built by ensuring the a leadCand exits
57  selection = cms.string("leadPFCand().isNonnull()"),
58  selectionPassFunction = cms.string("-pt()"), # CV: negative sign means that we prefer candidates of high pT
59  selectionFailValue = cms.double(1e3),
60  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)
61 )
62 
63 stripMultiplicity = cms.PSet(
64  name = cms.string("StripMultiplicity"),
65  plugin = cms.string("RecoTauStringCleanerPlugin"),
66  # Require that cones were built by ensuring the a leadCand exits
67  selection = cms.string("leadPFCand().isNonnull()"),
68  selectionPassFunction = cms.string("-signalPiZeroCandidates().size()"),
69  selectionFailValue = cms.double(1e3)
70 )
71 
72 combinedIsolation = cms.PSet(
73  name = cms.string("CombinedIsolation"),
74  plugin = cms.string("RecoTauStringCleanerPlugin"),
75  # Require that cones were built by ensuring the a leadCand exits
76  selection = cms.string("leadPFCand().isNonnull()"),
77  selectionPassFunction = cms.string("isolationPFChargedHadrCandsPtSum() + isolationPFGammaCandsEtSum()"),
78  selectionFailValue = cms.double(1e3)
79 )
80 
81 chargeIsolation = cms.PSet(
82  name = cms.string("ChargeIsolation"),
83  plugin = cms.string("RecoTauStringCleanerPlugin"),
84  # Require that cones were built by ensuring the a leadCand exits
85  selection = cms.string("leadPFCand().isNonnull()"),
86  # Prefer lower isolation activity
87  selectionPassFunction = cms.string("isolationPFChargedHadrCandsPtSum()"),
88  selectionFailValue = cms.double(1e3)
89 )
90 
91 ecalIsolation = cms.PSet(
92  name = cms.string("GammaIsolation"),
93  plugin = cms.string("RecoTauStringCleanerPlugin"),
94  # Require that cones were built by ensuring the a leadCand exits
95  selection = cms.string("leadPFCand().isNonnull()"),
96  # Prefer lower isolation activity
97  selectionPassFunction = cms.string("isolationPFGammaCandsEtSum()"),
98  selectionFailValue = cms.double(1e3)
99 )
100