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.PFRecoTauEnergyAlgorithmPlugin_cfi import pfTauEnergyAlgorithmPlugin
5 from RecoTauTag.RecoTau.PFRecoTauPFJetInputs_cfi import PFRecoTauPFJetInputs
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  config2prong0pi0 = cms.PSet(
51  # Three prong no pizero mode (one of the tracks failed to get reconstructed)
52  nCharged = cms.uint32(2),
53  nPiZeros = cms.uint32(0),
54  maxTracks = cms.uint32(6),
55  maxPiZeros = cms.uint32(0),
56  ),
57  config2prong1pi0 = cms.PSet(
58  # Three prong one pizero mode (one of the tracks failed to get reconstructed)
59  nCharged = cms.uint32(2),
60  nPiZeros = cms.uint32(1),
61  maxTracks = cms.uint32(6),
62  maxPiZeros = cms.uint32(3),
63  ),
64  config3prong0pi0 = cms.PSet(
65  # Three prong no pizero mode
66  nCharged = cms.uint32(3),
67  nPiZeros = cms.uint32(0),
68  maxTracks = cms.uint32(6),
69  maxPiZeros = cms.uint32(0),
70  )
71 )
72 
73 _combinatoricTauConfig = cms.PSet(
74  name = cms.string("combinatoric"),
75  plugin = cms.string("RecoTauBuilderCombinatoricPlugin"),
76  pfCandSrc = cms.InputTag("particleFlow"),
77  isolationConeSize = PFRecoTauPFJetInputs.isolationConeSize,
78  qualityCuts = PFTauQualityCuts,
79  decayModes = cms.VPSet(
80  combinatoricDecayModeConfigs.config1prong0pi0,
81  combinatoricDecayModeConfigs.config1prong1pi0,
82  combinatoricDecayModeConfigs.config1prong2pi0,
83  combinatoricDecayModeConfigs.config2prong0pi0,
84  combinatoricDecayModeConfigs.config2prong1pi0,
85  combinatoricDecayModeConfigs.config3prong0pi0
86  )
87 )
88 
89 combinatoricRecoTaus = cms.EDProducer("RecoTauProducer",
90  jetSrc = PFRecoTauPFJetInputs.inputJetCollection,
91  minJetPt = PFRecoTauPFJetInputs.minJetPt,
92  maxJetAbsEta = PFRecoTauPFJetInputs.maxJetAbsEta,
93  jetRegionSrc = cms.InputTag("recoTauAK4PFJets08Region"),
94  chargedHadronSrc = cms.InputTag('ak4PFJetsRecoTauChargedHadrons'),
95  piZeroSrc = cms.InputTag("ak4PFJetsRecoTauPiZeros"),
96  buildNullTaus = cms.bool(True),
97  # Make maximum size from which to collect isolation cone objects, w.r.t to
98  # the axis of the signal cone objects
99  builders = cms.VPSet(
100  _combinatoricTauConfig
101  ),
102  modifiers = cms.VPSet(
103  cms.PSet(
104  name = cms.string("sipt"),
105  plugin = cms.string("RecoTauImpactParameterSignificancePlugin"),
106  qualityCuts = PFTauQualityCuts,
107  ),
108  # Electron rejection
109  cms.PSet(
110  name = cms.string("elec_rej"),
111  plugin = cms.string("RecoTauElectronRejectionPlugin"),
112  #Electron rejection parameters
113  ElectronPreIDProducer = cms.InputTag("elecpreid"),
114  EcalStripSumE_deltaPhiOverQ_minValue = cms.double(-0.1),
115  EcalStripSumE_deltaPhiOverQ_maxValue = cms.double(0.5),
116  EcalStripSumE_minClusEnergy = cms.double(0.1),
117  EcalStripSumE_deltaEta = cms.double(0.03),
118  ElecPreIDLeadTkMatch_maxDR = cms.double(0.01),
119  maximumForElectrionPreIDOutput = cms.double(-0.1),
120  DataType = cms.string("AOD"),
121  ),
122  # Tau energy reconstruction
123  # (to avoid double-counting of energy carried by neutral PFCandidates
124  # in case PFRecoTauChargedHadrons are built from reco::Tracks)
125  cms.PSet(
126  pfTauEnergyAlgorithmPlugin,
127  name = cms.string("tau_en_reconstruction"),
128  plugin = cms.string("PFRecoTauEnergyAlgorithmPlugin"),
129  verbosity = cms.int32(0)
130  )
131  )
132 )