CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTauCombinatoricProducer_cfi.py
Go to the documentation of this file.
1 
2 import FWCore.ParameterSet.Config as cms
3 from RecoTauTag.RecoTau.PFRecoTauQualityCuts_cfi import PFTauQualityCuts
4 from RecoTauTag.RecoTau.RecoTauEnergyRecoveryPlugin2_cfi import pfTauEnergyRecoveryPlugin2
5 
6 '''
7 
8 Configuration for combinatoric PFTau producer plugins.
9 
10 Note that this plugin produces many taus for each PFJet!
11 To be useful the output from this module must be cleaned
12 using an implementation of the RecoTauCleaner module.
13 
14 Author: Evan K. Friis, UC Davis
15 
16 
17 '''
18 
19 # N.B. for combinatoric taus that worst-case scaling
20 # is (maxTracks choose dmTracks) * (maxPiZeros choose dmPiZeros)
21 #
22 # So for decay mode 11 (3 tracks, 1 pizero), with 10 for both
23 #
24 # (10 choose 3) * (10 choose 1) = 1200!
25 
26 # Configurations for the different decay modes
27 
28 combinatoricDecayModeConfigs = cms.PSet(
29  config1prong0pi0 = cms.PSet(
30  # One prong no pizero mode
31  nCharged = cms.uint32(1),
32  nPiZeros = cms.uint32(0),
33  maxTracks = cms.uint32(6),
34  maxPiZeros = cms.uint32(0),
35  ),
36  config1prong1pi0 = cms.PSet(
37  #One prong one pizero mode
38  nCharged = cms.uint32(1),
39  nPiZeros = cms.uint32(1),
40  maxTracks = cms.uint32(6),
41  maxPiZeros = cms.uint32(6),
42  ),
43  config1prong2pi0 = cms.PSet(
44  #One prong two pizero mode
45  nCharged = cms.uint32(1),
46  nPiZeros = cms.uint32(2),
47  maxTracks = cms.uint32(6),
48  maxPiZeros = cms.uint32(5),
49  ),
50  config3prong0pi0 = cms.PSet(
51  # Three prong no pizero mode
52  nCharged = cms.uint32(3),
53  nPiZeros = cms.uint32(0),
54  maxTracks = cms.uint32(6),
55  maxPiZeros = cms.uint32(0),
56  ),
57  config3prong1pi0 = cms.PSet(
58  # Three prong one pizero mode
59  nCharged = cms.uint32(3),
60  nPiZeros = cms.uint32(1),
61  maxTracks = cms.uint32(6),
62  maxPiZeros = cms.uint32(3),
63  )
64 )
65 
66 _combinatoricTauConfig = cms.PSet(
67  name = cms.string("combinatoric"),
68  plugin = cms.string("RecoTauBuilderCombinatoricPlugin"),
69  pfCandSrc = cms.InputTag("particleFlow"),
70  usePFLeptons = cms.bool(True),
71  isolationConeSize = cms.double(0.5),
72  qualityCuts = PFTauQualityCuts,
73  decayModes = cms.VPSet(
74  combinatoricDecayModeConfigs.config1prong0pi0,
75  combinatoricDecayModeConfigs.config1prong1pi0,
76  combinatoricDecayModeConfigs.config1prong2pi0,
77  combinatoricDecayModeConfigs.config3prong0pi0,
78  #combinatoricDecayModeConfigs.config3prong1pi0,
79  )
80 )
81 
82 combinatoricRecoTaus = cms.EDProducer(
83  "RecoTauProducer",
84  jetSrc = cms.InputTag("ak5PFJets"),
85  jetRegionSrc = cms.InputTag("recoTauAK5PFJets08Region"),
86  piZeroSrc = cms.InputTag("ak5PFJetsRecoTauPiZeros"),
87  buildNullTaus = cms.bool(True),
88  # Make maximum size from which to collect isolation cone objects, w.r.t to
89  # the axis of the signal cone objects
90  builders = cms.VPSet(
91  _combinatoricTauConfig,
92  ),
93  modifiers = cms.VPSet(
94  cms.PSet(
95  name = cms.string("sipt"),
96  plugin = cms.string("RecoTauImpactParameterSignificancePlugin"),
97  qualityCuts = PFTauQualityCuts,
98  ),
99  # Electron rejection
100  cms.PSet(
101  name = cms.string("elec_rej"),
102  plugin = cms.string("RecoTauElectronRejectionPlugin"),
103  #Electron rejection parameters
104  ElectronPreIDProducer = cms.InputTag("elecpreid"),
105  EcalStripSumE_deltaPhiOverQ_minValue = cms.double(-0.1),
106  EcalStripSumE_deltaPhiOverQ_maxValue = cms.double(0.5),
107  EcalStripSumE_minClusEnergy = cms.double(0.1),
108  EcalStripSumE_deltaEta = cms.double(0.03),
109  ElecPreIDLeadTkMatch_maxDR = cms.double(0.01),
110  maximumForElectrionPreIDOutput = cms.double(-0.1),
111  DataType = cms.string("AOD"),
112  ),
113  # Tau energy recovery algorithm
114  cms.PSet(
115  pfTauEnergyRecoveryPlugin2,
116  name = cms.string("tau_en_recovery"),
117  plugin = cms.string("RecoTauEnergyRecoveryPlugin2")
118  )
119  ),
120 )