00001 import FWCore.ParameterSet.Config as cms
00002 import copy
00003
00004 '''
00005
00006 Sequences for HPS taus
00007
00008 '''
00009
00010
00011 from RecoTauTag.RecoTau.PFRecoTauDiscriminationByIsolation_cfi import *
00012 from RecoTauTag.RecoTau.PFRecoTauDiscriminationByLeadingTrackFinding_cfi import *
00013 from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectron_cfi import *
00014 from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon_cfi import *
00015
00016
00017 from RecoTauTag.RecoTau.TauDiscriminatorTools import *
00018
00019
00020
00021 from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import \
00022 hpsSelectionDiscriminator
00023 hpsPFTauDiscriminationByDecayModeFinding = copy.deepcopy(
00024 hpsSelectionDiscriminator)
00025 hpsPFTauDiscriminationByDecayModeFinding.PFTauProducer \
00026 = cms.InputTag('hpsPFTauProducer')
00027
00028
00029
00030 requireDecayMode = cms.PSet(
00031 BooleanOperator = cms.string("and"),
00032 decayMode = cms.PSet(
00033 Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFinding'),
00034 cut = cms.double(0.5)
00035 )
00036 )
00037
00038
00039 hpsPFTauDiscriminationByLooseIsolation = copy.deepcopy(pfRecoTauDiscriminationByIsolation)
00040 setTauSource(hpsPFTauDiscriminationByLooseIsolation, 'hpsPFTauProducer')
00041 hpsPFTauDiscriminationByLooseIsolation.Prediscriminants = requireDecayMode
00042
00043
00044
00045 mediumPFTauQualityCuts = cms.PSet(
00046 signalQualityCuts = cms.PSet(
00047 minTrackPt = cms.double(0.8),
00048 maxTrackChi2 = cms.double(100.),
00049 maxTransverseImpactParameter = cms.double(0.03),
00050 maxDeltaZ = cms.double(0.2),
00051 minTrackPixelHits = cms.uint32(0),
00052
00053 minTrackHits = cms.uint32(3),
00054 minGammaEt = cms.double(0.5),
00055 useTracksInsteadOfPFHadrons = cms.bool(False),
00056 ),
00057 isolationQualityCuts = cms.PSet(
00058 minTrackPt = cms.double(0.8),
00059 maxTrackChi2 = cms.double(100.),
00060 maxTransverseImpactParameter = cms.double(0.03),
00061 maxDeltaZ = cms.double(0.2),
00062 minTrackPixelHits = cms.uint32(0),
00063 minTrackHits = cms.uint32(3),
00064 minGammaEt = cms.double(0.8),
00065 useTracksInsteadOfPFHadrons = cms.bool(False),
00066 )
00067 )
00068
00069 hpsPFTauDiscriminationByMediumIsolation = copy.deepcopy(pfRecoTauDiscriminationByIsolation)
00070 setTauSource(hpsPFTauDiscriminationByMediumIsolation, 'hpsPFTauProducer')
00071 hpsPFTauDiscriminationByMediumIsolation.Prediscriminants = requireDecayMode
00072 hpsPFTauDiscriminationByMediumIsolation.qualityCuts = mediumPFTauQualityCuts
00073
00074
00075
00076 loosePFTauQualityCuts = cms.PSet(
00077 signalQualityCuts = cms.PSet(
00078 minTrackPt = cms.double(0.5),
00079 maxTrackChi2 = cms.double(100.),
00080 maxTransverseImpactParameter = cms.double(0.03),
00081 maxDeltaZ = cms.double(0.2),
00082 minTrackPixelHits = cms.uint32(0),
00083
00084 minTrackHits = cms.uint32(3),
00085 minGammaEt = cms.double(0.5),
00086 useTracksInsteadOfPFHadrons = cms.bool(False),
00087 ),
00088 isolationQualityCuts = cms.PSet(
00089 minTrackPt = cms.double(0.5),
00090 maxTrackChi2 = cms.double(100.),
00091 maxTransverseImpactParameter = cms.double(0.03),
00092 maxDeltaZ = cms.double(0.2),
00093 minTrackPixelHits = cms.uint32(0),
00094 minTrackHits = cms.uint32(3),
00095 minGammaEt = cms.double(0.5),
00096 useTracksInsteadOfPFHadrons = cms.bool(False),
00097 )
00098 )
00099
00100 hpsPFTauDiscriminationByTightIsolation = copy.deepcopy(pfRecoTauDiscriminationByIsolation)
00101 setTauSource(hpsPFTauDiscriminationByTightIsolation, 'hpsPFTauProducer')
00102 hpsPFTauDiscriminationByTightIsolation.Prediscriminants = requireDecayMode
00103 hpsPFTauDiscriminationByTightIsolation.qualityCuts = loosePFTauQualityCuts
00104
00105
00106 hpsPFTauDiscriminationAgainstElectron = copy.deepcopy(pfRecoTauDiscriminationAgainstElectron)
00107 setTauSource(hpsPFTauDiscriminationAgainstElectron, 'hpsPFTauProducer')
00108 hpsPFTauDiscriminationAgainstElectron.Prediscriminants = noPrediscriminants
00109
00110 hpsPFTauDiscriminationAgainstMuon = copy.deepcopy(pfRecoTauDiscriminationAgainstMuon)
00111 setTauSource(hpsPFTauDiscriminationAgainstMuon, 'hpsPFTauProducer')
00112 hpsPFTauDiscriminationAgainstMuon.Prediscriminants = noPrediscriminants
00113
00114
00115 hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus")
00116
00117
00118 hpsTightIsolationCleaner = hpsPFTauDiscriminationByTightIsolation.clone(
00119 Prediscriminants = noPrediscriminants,
00120 PFTauProducer = cms.InputTag("combinatoricRecoTaus"),
00121 )
00122 hpsMediumIsolationCleaner = hpsPFTauDiscriminationByMediumIsolation.clone(
00123 Prediscriminants = noPrediscriminants,
00124 PFTauProducer = cms.InputTag("combinatoricRecoTaus"),
00125 )
00126 hpsLooseIsolationCleaner = hpsPFTauDiscriminationByLooseIsolation.clone(
00127 Prediscriminants = noPrediscriminants,
00128 PFTauProducer = cms.InputTag("combinatoricRecoTaus"),
00129 )
00130
00131 import RecoTauTag.RecoTau.RecoTauCleanerPlugins as cleaners
00132
00133 hpsPFTauProducer = cms.EDProducer(
00134 "RecoTauCleaner",
00135 src = cms.InputTag("combinatoricRecoTaus"),
00136 cleaners = cms.VPSet(
00137
00138 cleaners.unitCharge,
00139
00140 cms.PSet(
00141 name = cms.string("HPS_Select"),
00142 plugin = cms.string("RecoTauDiscriminantCleanerPlugin"),
00143 src = cms.InputTag("hpsSelectionDiscriminator"),
00144 ),
00145
00146
00147 cms.PSet(
00148 name = cms.string("TightIso"),
00149 plugin = cms.string("RecoTauDiscriminantCleanerPlugin"),
00150 src = cms.InputTag("hpsTightIsolationCleaner"),
00151 ),
00152 cms.PSet(
00153 name = cms.string("MediumIso"),
00154 plugin = cms.string("RecoTauDiscriminantCleanerPlugin"),
00155 src = cms.InputTag("hpsMediumIsolationCleaner"),
00156 ),
00157 cms.PSet(
00158 name = cms.string("LooseIso"),
00159 plugin = cms.string("RecoTauDiscriminantCleanerPlugin"),
00160 src = cms.InputTag("hpsLooseIsolationCleaner"),
00161 ),
00162
00163
00164 cleaners.combinedIsolation
00165 )
00166 )
00167
00168 produceHPSPFTaus = cms.Sequence(
00169 hpsSelectionDiscriminator
00170 *hpsTightIsolationCleaner
00171 *hpsMediumIsolationCleaner
00172 *hpsLooseIsolationCleaner
00173 *hpsPFTauProducer
00174 )
00175
00176 produceAndDiscriminateHPSPFTaus = cms.Sequence(
00177 produceHPSPFTaus*
00178 hpsPFTauDiscriminationByDecayModeFinding*
00179 hpsPFTauDiscriminationByLooseIsolation*
00180 hpsPFTauDiscriminationByMediumIsolation*
00181 hpsPFTauDiscriminationByTightIsolation*
00182 hpsPFTauDiscriminationAgainstElectron*
00183 hpsPFTauDiscriminationAgainstMuon
00184 )