File indexing completed on 2024-06-22 02:24:02
0001 import FWCore.ParameterSet.Config as cms
0002
0003
0004 isomuons = cms.EDFilter(
0005 "MuonSelector",
0006 src = cms.InputTag('muons'),
0007 cut = cms.string("(isTrackerMuon) && std::abs(eta) < 2.5 && pt > 9.5"+
0008 "&& isPFMuon"+
0009 "&& globalTrack.isNonnull"+
0010 "&& innerTrack.hitPattern.numberOfValidPixelHits > 0"+
0011 "&& innerTrack.normalizedChi2 < 10"+
0012 "&& numberOfMatches > 0"+
0013 "&& innerTrack.hitPattern.numberOfValidTrackerHits>5"+
0014 "&& globalTrack.hitPattern.numberOfValidHits>0"+
0015 "&& (pfIsolationR03.sumChargedHadronPt+pfIsolationR03.sumNeutralHadronEt+pfIsolationR03.sumPhotonEt)/pt < 0.3"+
0016 "&& std::abs(innerTrack().dxy)<2.0"
0017 ),
0018 filter = cms.bool(False)
0019 )
0020
0021
0022 isoelectrons = cms.EDFilter(
0023 "GsfElectronSelector",
0024 src = cms.InputTag('gsfElectrons'),
0025 cut = cms.string("std::abs(eta) < 2.5 && pt > 9.5" +
0026 "&& gsfTrack.trackerExpectedHitsInner.numberOfHits == 0" +
0027
0028 "&& (isolationVariables03.tkSumPt)/et < 0.2" +
0029 "&& ((std::abs(eta) < 1.4442 " +
0030 "&& std::abs(deltaEtaSuperClusterTrackAtVtx) < 0.007"+
0031 "&& std::abs(deltaPhiSuperClusterTrackAtVtx) < 0.8" +
0032 "&& sigmaIetaIeta < 0.01" +
0033 "&& hcalOverEcal < 0.15" +
0034 "&& std::abs(1./superCluster.energy - 1./p) < 0.05)"+
0035 "|| (std::abs(eta) > 1.566 "+
0036 "&& std::abs(deltaEtaSuperClusterTrackAtVtx) < 0.009"+
0037 "&& std::abs(deltaPhiSuperClusterTrackAtVtx) < 0.10" +
0038 "&& sigmaIetaIeta < 0.03" +
0039 "&& hcalOverEcal < 0.10" +
0040 "&& std::abs(1./superCluster.energy - 1./p) < 0.05))"
0041 ),
0042 filter = cms.bool(False)
0043 )
0044
0045 from RecoJets.Configuration.RecoPFJets_cff import kt6PFJets as dummy
0046 kt6PFJetsForRhoComputationVoronoiMet = dummy.clone(
0047 doRhoFastjet = True,
0048 voronoiRfact = 0.9
0049 )
0050
0051 from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator
0052 hpsPFTauDiscriminationByDecayModeFinding = hpsSelectionDiscriminator.clone(
0053 PFTauProducer = 'hpsPFTauProducer'
0054 )
0055
0056 from RecoTauTag.RecoTau.TauDiscriminatorTools import requireLeadTrack
0057
0058 requireDecayMode = cms.PSet(
0059 BooleanOperator = cms.string("and"),
0060 decayMode = cms.PSet(
0061 Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFinding'),
0062 cut = cms.double(0.5)
0063 )
0064 )
0065
0066 import RecoTauTag.RecoTau.pfRecoTauDiscriminationAgainstMuon2_cfi as _mod
0067
0068 hpsPFTauDiscriminationAgainstMuon2 = _mod.pfRecoTauDiscriminationAgainstMuon2.clone(
0069 PFTauProducer = 'hpsPFTauProducer',
0070 Prediscriminants = requireDecayMode.clone(),
0071 discriminatorOption = 'loose',
0072 )
0073
0074 hpsPFTauDiscriminationByMVAIsolation = cms.EDProducer(
0075 "PFRecoTauDiscriminationByMVAIsolation",
0076 PFTauProducer = cms.InputTag('hpsPFTauProducer'),
0077 rhoProducer = cms.InputTag('kt6PFJetsForRhoComputationVoronoiMet','rho'),
0078 Prediscriminants = requireDecayMode.clone(),
0079 gbrfFilePath = cms.FileInPath('RecoTauTag/RecoTau/data/gbrfTauIso_v2.root'),
0080 returnMVA = cms.bool(False),
0081 mvaMin = cms.double(0.8),
0082 )
0083
0084 isotaus = cms.EDFilter(
0085 "PFTauSelector",
0086 src = cms.InputTag('hpsPFTauProducer'),
0087 BooleanOperator = cms.string("and"),
0088 discriminators = cms.VPSet(
0089 cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"), selectionCut=cms.double(0.5)),
0090
0091
0092 cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseElectronRejection"), selectionCut=cms.double(0.5)),
0093 cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationAgainstMuon2"), selectionCut=cms.double(0.5))
0094 ),
0095 cut = cms.string("std::abs(eta) < 2.3 && pt > 19.0 "),
0096 filter = cms.bool(False)
0097 )
0098
0099 isomuonTask = cms.Task(isomuons)
0100 isomuonseq = cms.Sequence(isomuonTask)
0101 isoelectronTask = cms.Task(isoelectrons)
0102 isoelectronseq = cms.Sequence(isoelectronTask)
0103 isotauTask = cms.Task(
0104
0105
0106
0107 hpsPFTauDiscriminationAgainstMuon2,
0108 isotaus
0109 )
0110 isotauseq = cms.Sequence(isotauTask)
0111
0112 leptonSelection = cms.PSet(
0113 SelectEvents = cms.PSet(
0114 SelectEvents = cms.vstring(
0115 'isomuonseq',
0116 'isoelectronseq',
0117 'isotauseq')
0118 )
0119 )