test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
objectSelection_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 ##======================================
4 ## Muons
5 ##======================================
6 
7 selectedMuons = cms.EDFilter(
8  "MuonSelector",
9  src = cms.InputTag('muons'),
10  cut = cms.string( "(isTrackerMuon) && std::abs(eta) < 2.5 && pt > 19.5"+#17. "+
11  "&& isPFMuon"+
12  "&& globalTrack.isNonnull"+
13  "&& innerTrack.hitPattern.numberOfValidPixelHits > 0"+
14  "&& innerTrack.normalizedChi2 < 10"+
15  "&& numberOfMatches > 0"+
16  "&& innerTrack.hitPattern.numberOfValidTrackerHits>5"+
17  "&& globalTrack.hitPattern.numberOfValidHits>0"+
18  "&& (pfIsolationR03.sumChargedHadronPt+std::max(0.,pfIsolationR03.sumNeutralHadronEt+pfIsolationR03.sumPhotonEt - 0.5*pfIsolationR03.sumPUPt))/pt < 0.3"+
19  "&& std::abs(innerTrack().dxy)<2.0"
20  ),
21  filter = cms.bool(False)
22  )
23 
24 
25 ##======================================
26 ## Electrons
27 ##======================================
28 
29 
30 selectedElectrons = cms.EDFilter(
31  "GsfElectronSelector",
32  src = cms.InputTag('gedGsfElectrons'),
33  cut = cms.string(
34  "std::abs(eta) < 2.5 && pt > 19.5" +
35  "&& (gsfTrack.hitPattern().numberOfHits(\'MISSING_INNER_HITS\')<=1 )" +
36  "&& (pfIsolationVariables.sumChargedHadronPt+std::max(0.,pfIsolationVariables.sumNeutralHadronEt+pfIsolationVariables.sumPhotonEt - 0.5*pfIsolationVariables.sumPUPt))/et < 0.3" +
37  "&& ((std::abs(eta) < 1.4442 " +
38  "&& std::abs(deltaEtaSuperClusterTrackAtVtx) < 0.007"+
39  "&& std::abs(deltaPhiSuperClusterTrackAtVtx) < 0.8" +
40  "&& sigmaIetaIeta < 0.01" +
41  "&& hcalOverEcal < 0.15" +
42  "&& std::abs(1./superCluster.energy - 1./p) < 0.05)"+
43  "|| (std::abs(eta) > 1.566 "+
44  "&& std::abs(deltaEtaSuperClusterTrackAtVtx) < 0.009"+
45  "&& std::abs(deltaPhiSuperClusterTrackAtVtx) < 0.10" +
46  "&& sigmaIetaIeta < 0.03" +
47  "&& hcalOverEcal < 0.10" +
48  "&& std::abs(1./superCluster.energy - 1./p) < 0.05))"
49  ),
50  filter = cms.bool(False)
51  )
52 
53 
54 ##======================================
55 ## Taus
56 ##======================================
57 
58 selectedTaus = cms.EDFilter("PFTauSelector",
59  src = cms.InputTag('hpsPFTauProducer'),
60  discriminators = cms.VPSet(
61  cms.PSet(
62  discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFinding'),
63  selectionCut = cms.double(0.5)
64  ),
65  cms.PSet(
66  discriminator = cms.InputTag('hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits'),
67  selectionCut = cms.double(0.5)
68  )
69  ),
70  cut = cms.string("pt > 20. & std::abs(eta) < 2.3")
71 )
72 
73 
74 
75 ##======================================
76 ## Photons
77 ##======================================
78 
79 selectedPhotons = cms.EDFilter("PhotonSelector",
80  src = cms.InputTag("photons"),
81  cut = cms.string(
82  "std::abs(eta) < 2.5 && pt > 19.5" +
83  "&& sigmaIetaIeta < 0.03" +
84  "&& hadronicOverEm < 0.05" +
85  "&& hasPixelSeed == 0" +
86  "&& (chargedHadronIso + neutralHadronIso + photonIso)/pt < 0.2"
87  )
88 )
89 
90 ##======================================
91 ## Jets
92 ##======================================
93 
94 #pileup jetId applied per default in the process
95 
96 jet_acc = '(pt >= 30 && std::abs(eta)<2.5)'
97 #jet_id = ''
98 
99 selectedJets = cms.EDFilter("PFJetSelector",
100  src = cms.InputTag("ak4PFJets"),
101  cut = cms.string(
102  "(pt >= 30 && std::abs(eta)<2.5)" +
103  "&& neutralHadronEnergyFraction < 0.99" +
104  "&& neutralEmEnergyFraction < 0.99" +
105  "&& getPFConstituents.size > 1"
106  )
107 )
108 
109 
110 selectionSequenceForMVANoPUMET = cms.Sequence(
111 selectedMuons+
112 selectedElectrons+
113 selectedTaus+
114 selectedPhotons+
115 selectedJets
116 )