Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-12 03:21:44

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # Single muon for Wjets
0004 isomuons = cms.EDFilter(
0005     "MuonSelector",
0006     src = cms.InputTag('muons'),
0007     cut = cms.string("(isTrackerMuon) && std::abs(eta) < 2.5 && pt > 9.5"+#17. "+
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 #                     "&& (pfIsolationVariables.chargedHadronIso+pfIsolationVariables.neutralHadronIso)/et     < 0.3"  +
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 # Define decay mode prediscriminant
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 from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits
0067 import RecoTauTag.RecoTau.pfRecoTauDiscriminationAgainstMuon2_cfi as _mod
0068 
0069 hpsPFTauDiscriminationAgainstMuon2 = _mod.pfRecoTauDiscriminationAgainstMuon2.clone(
0070     PFTauProducer = 'hpsPFTauProducer',
0071     Prediscriminants = requireDecayMode.clone(),
0072     discriminatorOption = 'loose', # available options are: 'loose', 'medium', 'tight'
0073 )
0074 
0075 hpsPFTauDiscriminationByMVAIsolation = cms.EDProducer(
0076     "PFRecoTauDiscriminationByMVAIsolation",
0077     PFTauProducer = cms.InputTag('hpsPFTauProducer'),
0078     rhoProducer = cms.InputTag('kt6PFJetsForRhoComputationVoronoiMet','rho'),
0079     Prediscriminants = requireDecayMode.clone(),
0080     gbrfFilePath = cms.FileInPath('RecoTauTag/RecoTau/data/gbrfTauIso_v2.root'),
0081     returnMVA = cms.bool(False),
0082     mvaMin = cms.double(0.8),
0083 )
0084 
0085 isotaus = cms.EDFilter(
0086     "PFTauSelector",
0087     src = cms.InputTag('hpsPFTauProducer'),
0088     BooleanOperator = cms.string("and"),
0089     discriminators = cms.VPSet(
0090         cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"),       selectionCut=cms.double(0.5)),
0091         #cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByMVAIsolation"),           selectionCut=cms.double(0.5)),
0092         cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),           selectionCut=cms.double(0.5)),
0093         cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseElectronRejection"), selectionCut=cms.double(0.5)),
0094         cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationAgainstMuon2"),             selectionCut=cms.double(0.5)) 
0095     ),
0096     cut = cms.string("std::abs(eta) < 2.3 && pt > 19.0 "),
0097     filter = cms.bool(False)
0098 )
0099 
0100 isomuonTask     = cms.Task(isomuons)
0101 isomuonseq      = cms.Sequence(isomuonsTask)
0102 isoelectronTask = cms.Task(isoelectrons)
0103 isoelectronseq  = cms.Sequence(isoelectronsTask)
0104 isotauTask      = cms.Task(
0105      hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits,
0106      #kt6PFJetsForRhoComputationVoronoiMet,
0107      #hpsPFTauDiscriminationByMVAIsolation,
0108      hpsPFTauDiscriminationAgainstMuon2,
0109      isotaus
0110     )
0111 isotauseq      = cms.Sequence(isotauTask)
0112 
0113 leptonSelection = cms.PSet(
0114     SelectEvents = cms.PSet(
0115        SelectEvents = cms.vstring(
0116        'isomuonseq',
0117        'isoelectronseq',
0118        'isotauseq')
0119     )
0120 )