CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
mvaPFMET_leptons_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # Single muon for Wjets
4 isomuons = cms.EDFilter(
5  "MuonSelector",
6  src = cms.InputTag('muons'),
7  cut = cms.string( "(isTrackerMuon) && std::abs(eta) < 2.5 && pt > 9.5"+#17. "+
8  "&& isPFMuon"+
9  "&& globalTrack.isNonnull"+
10  "&& innerTrack.hitPattern.numberOfValidPixelHits > 0"+
11  "&& innerTrack.normalizedChi2 < 10"+
12  "&& numberOfMatches > 0"+
13  "&& innerTrack.hitPattern.numberOfValidTrackerHits>5"+
14  "&& globalTrack.hitPattern.numberOfValidHits>0"+
15  "&& (pfIsolationR03.sumChargedHadronPt+pfIsolationR03.sumNeutralHadronEt+pfIsolationR03.sumPhotonEt)/pt < 0.3"+
16  "&& std::abs(innerTrack().dxy)<2.0"
17  ),
18  filter = cms.bool(False)
19  )
20 
21 
22 isoelectrons = cms.EDFilter(
23  "GsfElectronSelector",
24  src = cms.InputTag('gsfElectrons'),
25  cut = cms.string(
26  "std::abs(eta) < 2.5 && pt > 9.5" +
27  "&& gsfTrack.trackerExpectedHitsInner.numberOfHits == 0" +
28 # "&& (pfIsolationVariables.chargedHadronIso+pfIsolationVariables.neutralHadronIso)/et < 0.3" +
29  "&& (isolationVariables03.tkSumPt)/et < 0.2" +
30  "&& ((std::abs(eta) < 1.4442 " +
31  "&& std::abs(deltaEtaSuperClusterTrackAtVtx) < 0.007"+
32  "&& std::abs(deltaPhiSuperClusterTrackAtVtx) < 0.8" +
33  "&& sigmaIetaIeta < 0.01" +
34  "&& hcalOverEcal < 0.15" +
35  "&& std::abs(1./superCluster.energy - 1./p) < 0.05)"+
36  "|| (std::abs(eta) > 1.566 "+
37  "&& std::abs(deltaEtaSuperClusterTrackAtVtx) < 0.009"+
38  "&& std::abs(deltaPhiSuperClusterTrackAtVtx) < 0.10" +
39  "&& sigmaIetaIeta < 0.03" +
40  "&& hcalOverEcal < 0.10" +
41  "&& std::abs(1./superCluster.energy - 1./p) < 0.05))"
42  ),
43  filter = cms.bool(False)
44  )
45 
46 from RecoJets.Configuration.RecoPFJets_cff import kt6PFJets as dummy
47 kt6PFJetsForRhoComputationVoronoiMet = dummy.clone(
48  doRhoFastjet = True,
49  voronoiRfact = 0.9
50  )
51 
52 from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator
53 hpsPFTauDiscriminationByDecayModeFinding = hpsSelectionDiscriminator.clone(
54  PFTauProducer = cms.InputTag('hpsPFTauProducer')
55  )
56 
57 from RecoTauTag.RecoTau.TauDiscriminatorTools import requireLeadTrack
58 # Define decay mode prediscriminant
59 requireDecayMode = cms.PSet(
60  BooleanOperator = cms.string("and"),
61  decayMode = cms.PSet(
62  Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFinding'),
63  cut = cms.double(0.5)
64  )
65  )
66 
67 from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits
68 
69 hpsPFTauDiscriminationAgainstMuon2 = cms.EDProducer("PFRecoTauDiscriminationAgainstMuon2",
70  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
71  Prediscriminants = requireDecayMode.clone(),
72  discriminatorOption = cms.string('loose'), # available options are: 'loose', 'medium', 'tight'
73  HoPMin = cms.double(0.2)
74  )
75 
76 
77 hpsPFTauDiscriminationByMVAIsolation = cms.EDProducer(
78  "PFRecoTauDiscriminationByMVAIsolation",
79  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
80  rhoProducer = cms.InputTag('kt6PFJetsForRhoComputationVoronoiMet','rho'),
81  Prediscriminants = requireDecayMode.clone(),
82  gbrfFilePath = cms.FileInPath('RecoTauTag/RecoTau/data/gbrfTauIso_v2.root'),
83  returnMVA = cms.bool(False),
84  mvaMin = cms.double(0.8),
85  )
86 
87 isotaus = cms.EDFilter(
88  "PFTauSelector",
89  src = cms.InputTag('hpsPFTauProducer'),
90  BooleanOperator = cms.string("and"),
91  discriminators = cms.VPSet(
92  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"), selectionCut=cms.double(0.5)),
93  #cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByMVAIsolation"), selectionCut=cms.double(0.5)),
94  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), selectionCut=cms.double(0.5)),
95  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationByLooseElectronRejection"), selectionCut=cms.double(0.5)),
96  cms.PSet( discriminator=cms.InputTag("hpsPFTauDiscriminationAgainstMuon2"), selectionCut=cms.double(0.5))
97  ),
98  cut = cms.string("std::abs(eta) < 2.3 && pt > 19.0 "),
99  filter = cms.bool(False)
100  )
101 
102 isomuonseq = cms.Sequence(isomuons)
103 isoelectronseq = cms.Sequence(isoelectrons)
104 isotauseq = cms.Sequence(
105  hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits*
106  #kt6PFJetsForRhoComputationVoronoiMet*
107  #hpsPFTauDiscriminationByMVAIsolation*
108  hpsPFTauDiscriminationAgainstMuon2*
109  isotaus
110  )
111 
112 leptonSelection = cms.PSet(
113  SelectEvents = cms.PSet(
114  SelectEvents = cms.vstring(
115  'isomuonseq',
116  'isoelectronseq',
117  'isotauseq')
118  )
119  )