CMS 3D CMS Logo

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  config3prong1pi0 = cms.PSet( # suggestions made by CV
72  # Three prong one pizero mode
73  nCharged = cms.uint32(3),
74  nPiZeros = cms.uint32(1),
75  maxTracks = cms.uint32(6),
76  maxPiZeros = cms.uint32(3),
77  )
78 )
79 
80 combinatoricModifierConfigs = [
81  cms.PSet(
82  name = cms.string("sipt"),
83  plugin = cms.string("RecoTauImpactParameterSignificancePlugin"),
84  qualityCuts = PFTauQualityCuts,
85  ),
86  # Electron rejection
87  cms.PSet(
88  name = cms.string("elec_rej"),
89  plugin = cms.string("RecoTauElectronRejectionPlugin"),
90  #Electron rejection parameters
91  ElectronPreIDProducer = cms.InputTag("elecpreid"),
92  EcalStripSumE_deltaPhiOverQ_minValue = cms.double(-0.1),
93  EcalStripSumE_deltaPhiOverQ_maxValue = cms.double(0.5),
94  EcalStripSumE_minClusEnergy = cms.double(0.1),
95  EcalStripSumE_deltaEta = cms.double(0.03),
96  ElecPreIDLeadTkMatch_maxDR = cms.double(0.01),
97  maximumForElectrionPreIDOutput = cms.double(-0.1),
98  DataType = cms.string("AOD"),
99  ),
100  # Tau energy reconstruction
101  # (to avoid double-counting of energy carried by neutral PFCandidates
102  # in case PFRecoTauChargedHadrons are built from reco::Tracks)
103  cms.PSet(
104  pfTauEnergyAlgorithmPlugin,
105  name = cms.string("tau_en_reconstruction"),
106  plugin = cms.string("PFRecoTauEnergyAlgorithmPlugin"),
107  )
108 ]
109 
110 _combinatoricTauConfig = cms.PSet(
111  name = cms.string("combinatoric"),
112  plugin = cms.string("RecoTauBuilderCombinatoricPlugin"),
113  pfCandSrc = cms.InputTag("particleFlow"),
114  isolationConeSize = PFRecoTauPFJetInputs.isolationConeSize,
115  qualityCuts = PFTauQualityCuts,
116  decayModes = cms.VPSet(
117  combinatoricDecayModeConfigs.config1prong0pi0,
118  combinatoricDecayModeConfigs.config1prong1pi0,
119  combinatoricDecayModeConfigs.config1prong2pi0,
120  combinatoricDecayModeConfigs.config2prong0pi0,
121  combinatoricDecayModeConfigs.config2prong1pi0,
122  combinatoricDecayModeConfigs.config3prong0pi0,
123  combinatoricDecayModeConfigs.config3prong1pi0
124  ),
125  signalConeSize = cms.string("max(min(0.1, 3.0/pt()), 0.05)"),
126  minAbsPhotonSumPt_insideSignalCone = cms.double(2.5),
127  minRelPhotonSumPt_insideSignalCone = cms.double(0.10),
128  minAbsPhotonSumPt_outsideSignalCone = cms.double(1.e+9), # CV: always require at least some photon energy inside signal cone
129  minRelPhotonSumPt_outsideSignalCone = cms.double(1.e+9), # for a tau to be reconstructed in a decay mode with pi0s
130  verbosity = cms.int32(0)
131 )
132 
133 combinatoricRecoTaus = cms.EDProducer("RecoTauProducer",
134  jetSrc = PFRecoTauPFJetInputs.inputJetCollection,
135  minJetPt = PFRecoTauPFJetInputs.minJetPt,
136  maxJetAbsEta = PFRecoTauPFJetInputs.maxJetAbsEta,
137  jetRegionSrc = cms.InputTag("recoTauAK4PFJets08Region"),
138  chargedHadronSrc = cms.InputTag('ak4PFJetsRecoTauChargedHadrons'),
139  piZeroSrc = cms.InputTag("ak4PFJetsRecoTauPiZeros"),
140  buildNullTaus = cms.bool(False),
141  outputSelection = cms.string("leadChargedHadrCand().isNonnull()"), # MB: always require that leading PFChargedHadron candidate exists
142  # Make maximum size from which to collect isolation cone objects, w.r.t to
143  # the axis of the signal cone objects
144  builders = cms.VPSet(
145  _combinatoricTauConfig
146  ),
147  modifiers = cms.VPSet(
148  combinatoricModifierConfigs
149  )
150 )
PFRecoTauQualityCuts_cfi