CMS 3D CMS Logo

singleTopDQM_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #Primary vertex selection
4 PVCut = "abs(z) < 24. & position.rho < 2. & ndof > 4 & !isFake"
5 
6 #Jet selection
7 looseJetCut = "(chargedHadronEnergyFraction()>0 && chargedMultiplicity()>0 && chargedEmEnergyFraction()<0.99 && neutralHadronEnergyFraction()<0.99 && neutralEmEnergyFraction()<0.99 && (chargedMultiplicity()+neutralMultiplicity())>1) && abs(eta)<=2.4 "
8 
9 tightJetCut = "(chargedHadronEnergyFraction()>0 && chargedMultiplicity()>0 && chargedEmEnergyFraction()<0.99 && neutralHadronEnergyFraction()<0.90 && neutralEmEnergyFraction()<0.90 && (chargedMultiplicity()+neutralMultiplicity())>1) && abs(eta)<=2.4 "
10 
11 #Loose muon selection
12 looseMuonCut = "(muonRef.isNonnull && (muonRef.isGlobalMuon || muonRef.isTrackerMuon) && muonRef.isPFMuon)"
13 looseIsoCut = "(muonRef.pfIsolationR04.sumChargedHadronPt + max(0., muonRef.pfIsolationR04.sumNeutralHadronEt + muonRef.pfIsolationR04.sumPhotonEt - 0.5 * muonRef.pfIsolationR04.sumPUPt) ) / muonRef.pt < 0.25"
14 
15 #Medium muon selection. Also requires either good global muon or tight segment compatibility
16 mediumMuonCut = looseMuonCut + " muonRef.innerTrack.validFraction > 0.8"
17 
18 #Tight muon selection. Lacks distance to primary vertex variables, dz<0.5, dxy < 0.2. Now done at .cc
19 tightMuonCut = "muonRef.isNonnull && muonRef.isGlobalMuon && muonRef.isPFMuon && muonRef.globalTrack.normalizedChi2 < 10. && muonRef.globalTrack.hitPattern.numberOfValidMuonHits > 0 && " + \
20  "muonRef.numberOfMatchedStations > 1 && muonRef.innerTrack.hitPattern.numberOfValidPixelHits > 0 && muonRef.innerTrack.hitPattern.trackerLayersWithMeasurement > 5 "
21 tightIsoCut = "(muonRef.pfIsolationR04.sumChargedHadronPt + max(0., muonRef.pfIsolationR04.sumNeutralHadronEt + muonRef.pfIsolationR04.sumPhotonEt - 0.5 * muonRef.pfIsolationR04.sumPUPt) ) / muonRef.pt < 0.15"
22 
23 #Electron selections
24 looseEleCut = "(( gsfElectronRef.full5x5_sigmaIetaIeta() < 0.011 && gsfElectronRef.superCluster().isNonnull() && gsfElectronRef.superCluster().seed().isNonnull() && (gsfElectronRef.deltaEtaSuperClusterTrackAtVtx() - gsfElectronRef.superCluster().eta() + gsfElectronRef.superCluster().seed().eta()) < 0.00477 && abs(gsfElectronRef.deltaPhiSuperClusterTrackAtVtx()) < 0.222 && gsfElectronRef.hadronicOverEm() < 0.298 && abs(1.0 - gsfElectronRef.eSuperClusterOverP())*1.0/gsfElectronRef.ecalEnergy() < 0.241 && gsfElectronRef.gsfTrack.hitPattern().numberOfLostHits('MISSING_INNER_HITS') <= 1 && abs(gsfElectronRef.superCluster().eta()) < 1.479) || (gsfElectronRef.full5x5_sigmaIetaIeta() < 0.0314 && gsfElectronRef.superCluster().isNonnull() && gsfElectronRef.superCluster().seed().isNonnull() && (gsfElectronRef.deltaEtaSuperClusterTrackAtVtx() - gsfElectronRef.superCluster().eta() + gsfElectronRef.superCluster().seed().eta()) < 0.00868 && abs(gsfElectronRef.deltaPhiSuperClusterTrackAtVtx()) < 0.213 && gsfElectronRef.hadronicOverEm() < 0.101 && abs(1.0 - gsfElectronRef.eSuperClusterOverP())*1.0/gsfElectronRef.ecalEnergy() < 0.14 && gsfElectronRef.gsfTrack.hitPattern().numberOfLostHits('MISSING_INNER_HITS') <= 1 && abs(gsfElectronRef.superCluster().eta()) > 1.479))"
25 
26 tightEleCut = "((gsfElectronRef.full5x5_sigmaIetaIeta() < 0.00998 && gsfElectronRef.superCluster().isNonnull() && gsfElectronRef.superCluster().seed().isNonnull() && (gsfElectronRef.deltaEtaSuperClusterTrackAtVtx() - gsfElectronRef.superCluster().eta() + gsfElectronRef.superCluster().seed().eta()) < 0.00308 && abs(gsfElectronRef.deltaPhiSuperClusterTrackAtVtx()) < 0.0816 && gsfElectronRef.hadronicOverEm() < 0.0414 && abs(1.0 - gsfElectronRef.eSuperClusterOverP())*1.0/gsfElectronRef.ecalEnergy() < 0.0129 && gsfElectronRef.gsfTrack.hitPattern().numberOfLostHits('MISSING_INNER_HITS') <= 1 && abs(gsfElectronRef.superCluster().eta()) < 1.479) || (gsfElectronRef.full5x5_sigmaIetaIeta() < 0.0292 && gsfElectronRef.superCluster().isNonnull() && gsfElectronRef.superCluster().seed().isNonnull() && (gsfElectronRef.deltaEtaSuperClusterTrackAtVtx() - gsfElectronRef.superCluster().eta() + gsfElectronRef.superCluster().seed().eta()) < 0.00605 && abs(gsfElectronRef.deltaPhiSuperClusterTrackAtVtx()) < 0.0394 && gsfElectronRef.hadronicOverEm() < 0.0641 && abs(1.0 - gsfElectronRef.eSuperClusterOverP())*1.0/gsfElectronRef.ecalEnergy() < 0.0129 && gsfElectronRef.gsfTrack.hitPattern().numberOfLostHits('MISSING_INNER_HITS') <= 1 && abs(gsfElectronRef.superCluster().eta()) > 1.479))"
27 
28 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
29 
30 singleTopMuonMediumDQM = DQMEDAnalyzer('SingleTopTChannelLeptonDQM',
31 
37  setup = cms.PSet(
38  directory = cms.string("Physics/Top/SingleTopMuonMediumDQM/"),
39  sources = cms.PSet(
40  muons = cms.InputTag("pfIsolatedMuonsEI"),
41  elecs = cms.InputTag("pfIsolatedElectronsEI"),
42  jets = cms.InputTag("ak4PFJetsCHS"),
43  mets = cms.VInputTag("pfMet"),
44  pvs = cms.InputTag("offlinePrimaryVertices")
45  ),
46  monitoring = cms.PSet(
47  verbosity = cms.string("DEBUG")
48  ),
49  pvExtras = cms.PSet(
50  select = cms.string(PVCut)
51  ),
52  elecExtras = cms.PSet(
53  select = cms.string(tightEleCut + "& pt>20 & abs(eta)<2.5 & (abs(gsfElectronRef.superCluster().eta()) <= 1.4442 || abs(gsfElectronRef.superCluster().eta()) >= 1.5660)"),
54  rho = cms.InputTag("fixedGridRhoFastjetAll"),
55  ),
56  muonExtras = cms.PSet(
57  select = cms.string(tightMuonCut + " && pt>20 & abs(eta)<2.4"),
58  isolation = cms.string(looseIsoCut)
59  ),
60  jetExtras = cms.PSet(
61  jetCorrector = cms.InputTag("dqmAk4PFCHSL1FastL2L3Corrector"), #Use pak4PFCHSL1FastL2L3Residual for data!!!
62  select = cms.string("pt>30 & abs(eta)< 2.4"),
63  jetBTaggers = cms.PSet(
64  cvsVertex = cms.PSet(
65  label = cms.InputTag("pfCombinedInclusiveSecondaryVertexV2BJetTags"),
66  workingPoint = cms.double(0.890)
67  )
68  ),
69  ),
70  massExtras = cms.PSet(
71  lowerEdge = cms.double( 70.),
72  upperEdge = cms.double(110.)
73  ),
74  ),
75 
78  preselection = cms.PSet(
79  vertex = cms.PSet(
80  src = cms.InputTag("offlinePrimaryVertices"),
81  select = cms.string(PVCut)
82  )
83  ),
84 
87  selection = cms.VPSet(
88  cms.PSet(
89  label = cms.string("muons/pf:step0"),
90  src = cms.InputTag("pfIsolatedMuonsEI"),
91  select = cms.string(tightMuonCut + " && pt>20 & abs(eta)<2.4"),
92  min = cms.int32(1),
93  ),
94  cms.PSet(
95  label = cms.string("jets/pf:step1"),
96  src = cms.InputTag("ak4PFJetsCHS"),
97  select = cms.string("pt>30 & abs(eta)<2.4"),
98  min = cms.int32(2),
99  ),
100  cms.PSet(
101  label = cms.string("met:step2"),
102  src = cms.InputTag("pfMet"),
103  select = cms.string("pt>30"),
104  ),
105  )
106 )
107 
108 singleTopElectronMediumDQM = DQMEDAnalyzer('SingleTopTChannelLeptonDQM',
109 
115  setup = cms.PSet(
116 
119  directory = cms.string("Physics/Top/SingleTopElectronMediumDQM/"),
120  sources = cms.PSet(
121  muons = cms.InputTag("pfIsolatedMuonsEI"),
122  elecs = cms.InputTag("pfIsolatedElectronsEI"),
123  jets = cms.InputTag("ak4PFJetsCHS"),
124  mets = cms.VInputTag("pfMet"),
125  pvs = cms.InputTag("offlinePrimaryVertices")
126  ),
127  monitoring = cms.PSet(
128  verbosity = cms.string("DEBUG")
129  ),
130  pvExtras = cms.PSet(
131  select = cms.string(PVCut)
132  ),
133  elecExtras = cms.PSet(
134  select = cms.string(tightEleCut + "& pt>20 & abs(eta)<2.5 & (abs(gsfElectronRef.superCluster().eta()) <= 1.4442 || abs(gsfElectronRef.superCluster().eta()) >= 1.5660)"),
135  rho = cms.InputTag("fixedGridRhoFastjetAll"),
136  ),
137  muonExtras = cms.PSet(
138  select = cms.string(tightMuonCut + " && pt>20 & abs(eta)<2.4"),
139  isolation = cms.string(looseIsoCut)
140  ),
141  jetExtras = cms.PSet(
142  jetCorrector = cms.InputTag("dqmAk4PFCHSL1FastL2L3Corrector"), #Use pak4PFCHSL1FastL2L3Residual for data!!!
143  select = cms.string("pt>30 & abs(eta)< 2.4"),
144  jetBTaggers = cms.PSet(
145  cvsVertex = cms.PSet(
146  label = cms.InputTag("pfCombinedInclusiveSecondaryVertexV2BJetTags"),
147  workingPoint = cms.double(0.890)
148  )
149  ),
150  ),
151  massExtras = cms.PSet(
152  lowerEdge = cms.double( 70.),
153  upperEdge = cms.double(110.)
154  ),
155  ),
156 
159  preselection = cms.PSet(
160  vertex = cms.PSet(
161  src = cms.InputTag("offlinePrimaryVertices"),
162  select = cms.string(PVCut)
163  )
164  ),
165 
168  selection = cms.VPSet(
169 # cms.PSet(
170 # label = cms.string("presel"),
171 # src = cms.InputTag("offlinePrimaryVertices"),
172 # select = cms.string('!isFake && ndof >= 4 && abs(z)<24. && position.Rho <= 2.0'),
173 # ),
174 # cms.PSet(
175 # label = cms.string("elecs/pf:step0"),
176 # src = cms.InputTag("pfIsolatedElectronsEI"),
177 # electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ),
178 # select = cms.string("pt>30 & abs(eta)<2.5 & abs(gsfElectronRef.gsfTrack.d0)<0.02 && gsfElectronRef.gsfTrack.hitPattern().numberOfLostHits('MISSING_INNER_HITS') <= 0 && (abs(gsfElectronRef.superCluster.eta) <= 1.4442 || abs(gsfElectronRef.superCluster.eta) >= 1.5660) && " + EletightIsoCut),
179 # min = cms.int32(1),
180 # max = cms.int32(1),
181 # ),*/
182  cms.PSet(
183  label = cms.string("elecs/pf:step0"),
184  src = cms.InputTag("pfIsolatedElectronsEI"),
185  select = cms.string("pt>20 & abs(eta)<2.5 & (abs(gsfElectronRef.superCluster().eta()) <= 1.4442 || abs(gsfElectronRef.superCluster().eta()) >= 1.5660) &&" + tightEleCut),
186  min = cms.int32(1),
187  ),
188  cms.PSet(
189  label = cms.string("jets/pf:step1"),
190  src = cms.InputTag("ak4PFJetsCHS"),
191  select = cms.string("pt>30 & abs(eta)<2.4"),
192  min = cms.int32(2),
193  ),
194  cms.PSet(
195  label = cms.string("met:step2"),
196  src = cms.InputTag("pfMet"),
197  select = cms.string("pt>30"),
198  ),
199  )
200 )