Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:00

0001 import FWCore.ParameterSet.Config as cms
0002 import copy
0003 
0004 # compute IsoDeposits from all PFCandidates
0005 tauIsoDepositPFCandidates = cms.EDProducer("CandIsoDepositProducer",
0006     src = cms.InputTag("hpsPFTauProducer"),
0007     MultipleDepositsFlag = cms.bool(False),
0008     trackType = cms.string('candidate'),
0009     ExtractorPSet = cms.PSet(
0010         # PFTau specific Extractor, which allows to exclude particles within tau signal cone from IsoDeposit computation
0011         ComponentName = cms.string('PFTauExtractor'),
0012 
0013         # collection of PFCandidates to be used for IsoDeposit computation
0014         candidateSource = cms.InputTag("particleFlow"),
0015 
0016         # size of outer cone for which IsoDeposits are computed
0017         DR_Max = cms.double(1.0),
0018         # size of inner cone excluded from IsoDeposit computation
0019         DR_Veto = cms.double(0.),
0020 
0021         # max. distance in z-direction between tau production vertex and PFCandidates included in IsoDeposit computation
0022         # (cut per default disabled, since well-defined for PFCandidates associated to tracks (PFChargedHadrons) only)
0023         Diff_z = cms.double(1.e+4),
0024         # max. distance in x-y between tau production vertex and PFCandidates included in IsoDeposit computation
0025         # (cut per default disabled, since well-defined for PFCandidates associated to tracks (PFChargedHadrons) only)
0026         Diff_r = cms.double(1.e+4),
0027 
0028         # collection of PFTaus, needed for excluding particles in tau signal cone from IsoDeposit
0029         tauSource = cms.InputTag("hpsPFTauProducer"),
0030         # maximum distance in eta-phi, needed to match PFTau to direction passed as function argument to Extractor
0031         dRmatchPFTau = cms.double(0.1),
0032         # size of cones around tau signal cone particles excluded from IsoDeposit computation
0033         dRvetoPFTauSignalConeConstituents = cms.double(0.01),
0034 
0035         DepositLabel = cms.untracked.string('')
0036     )
0037 )
0038 
0039 # compute IsoDeposits from PFChargedHadrons
0040 # (enable cut on z and x-y distance between tau and PFCandidate production vertex)
0041 tauIsoDepositPFChargedHadrons = copy.deepcopy(tauIsoDepositPFCandidates)
0042 tauIsoDepositPFChargedHadrons.ExtractorPSet.candidateSource = cms.InputTag("pfAllChargedHadronsPFBRECO")
0043 tauIsoDepositPFChargedHadrons.ExtractorPSet.Diff_z = cms.double(0.2)
0044 tauIsoDepositPFChargedHadrons.ExtractorPSet.Diff_r = cms.double(0.1)
0045 
0046 # compute IsoDeposits from PFNeutralHadrons
0047 tauIsoDepositPFNeutralHadrons = copy.deepcopy(tauIsoDepositPFCandidates)
0048 tauIsoDepositPFNeutralHadrons.ExtractorPSet.candidateSource = cms.InputTag("pfAllNeutralHadronsPFBRECO")
0049 
0050 # compute IsoDeposits from PFGammas
0051 tauIsoDepositPFGammas = copy.deepcopy(tauIsoDepositPFCandidates)
0052 tauIsoDepositPFGammas.ExtractorPSet.candidateSource = cms.InputTag("pfAllPhotonsPFBRECO")
0053 
0054 patPFTauIsolationTask = cms.Task(
0055     tauIsoDepositPFCandidates,
0056     tauIsoDepositPFChargedHadrons,
0057     tauIsoDepositPFNeutralHadrons,
0058     tauIsoDepositPFGammas
0059 )
0060 patPFTauIsolation = cms.Sequence(patPFTauIsolationTask)