CMS 3D CMS Logo

TrackingDataMCValidation_Standalone_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
6 
7 # Primary Vertex Selector
8 selectedPrimaryVertices = cms.EDFilter("VertexSelector",
9  src = cms.InputTag('offlinePrimaryVertices'),
10  # cut = cms.string("!isFake && ndof >= 4 && abs(z) < 24 && abs(position.Rho) < 2.0"),
11  cut = cms.string(""),
12  filter = cms.bool(True)
13  )
14 # Track Selector
15 selectedTracks = cms.EDFilter("TrackSelector",
16  src = cms.InputTag('generalTracks'),
17  cut = cms.string("pt > 1.0"),
18  #cut = cms.string(""),
19  filter = cms.bool(True)
20  )
21 
22 # Track Multiplicity Selector
23 selectedMultiplicityTracks = cms.EDFilter("TrackMultiplicityFilter",
24  src = cms.InputTag('generalTracks'),
25  #cut = cms.string("pt > 1.0"),
26  nmin = cms.untracked.uint32(500),
27  cut = cms.untracked.string(""),
28  filter = cms.bool(True)
29  )
30 
31 # Track ALCARECO Selection for zerobias
32 selectedAlcaRecoZBTracks = cms.EDProducer("AlcaRecoTrackSelector",
33  src = cms.InputTag('generalTracks'),
34  #cut = cms.string("pt > 0.65 && abs(eta) < 3.5 && p > 1.5 && hitPattern.numberOfAllHits('TRACK_HITS') > 7"),
35  #cut = cms.string(""),
36  ptmin = cms.untracked.double(0.65),
37  pmin = cms.untracked.double(1.5),
38  etamin = cms.untracked.double(-3.5),
39  etamax = cms.untracked.double(3.5),
40  nhits = cms.untracked.uint32(7)
41 )
42 '''
43 # Track ALCARECO Selection for singlemuon
44 selectedAlcaRecoSMTracks = cms.EDFilter("TrackSelector",
45  src = cms.InputTag('selectedMultiplicityTracks'),
46  cut = cms.string("pt > 2.0 && abs(eta) < 3.5 && p > 1.5 && hitPattern.numberOfAllTrackerHits > 7"),
47  #cut = cms.string(""),
48  filter = cms.bool(True)
49  )
50 '''
51 # HLT path selector
52 hltPathFilter = cms.EDFilter("HLTPathSelector",
53  processName = cms.string("HLT"),
54  verbose = cms.untracked.bool(False),
55  hltPathsOfInterest = cms.vstring("HLT_ZeroBias_v"),
56  triggerResults = cms.untracked.InputTag("TriggerResults","","HLT"),
57  triggerEvent = cms.untracked.InputTag("hltTriggerSummaryAOD","","HLT")
58  )
59 
60 # HLT path selector Muon
61 hltPathFilterMuon = cms.EDFilter("HLTPathSelector",
62  processName = cms.string("HLT"),
63  verbose = cms.untracked.bool(False),
64  hltPathsOfInterest = cms.vstring("HLT_IsoMu24_v"),
65  triggerResults = cms.untracked.InputTag("TriggerResults","","HLT"),
66  triggerEvent = cms.untracked.InputTag("hltTriggerSummaryAOD","","HLT")
67  )
68 
69 # HLT path selector Electron
70 hltPathFilterElectron = cms.EDFilter("HLTPathSelector",
71  processName = cms.string("HLT"),
72  verbose = cms.untracked.bool(False),
73  hltPathsOfInterest = cms.vstring("HLT_Ele32_WPTight_Gsf_v"),
74  triggerResults = cms.untracked.InputTag("TriggerResults","","HLT"),
75  triggerEvent = cms.untracked.InputTag("hltTriggerSummaryAOD","","HLT")
76  )
77 
78 # HLT path selector ttbar
79 hltPathFilterTtbar = cms.EDFilter("HLTPathSelector",
80  processName = cms.string("HLT"),
81  verbose = cms.untracked.bool(False),
82  hltPathsOfInterest = cms.vstring("HLT_Ele32_WPTight_Gsf_v","HLT_IsoMu24_v"),
83  triggerResults = cms.untracked.InputTag("TriggerResults","","HLT"),
84  triggerEvent = cms.untracked.InputTag("hltTriggerSummaryAOD","","HLT")
85  )
86 
87 # Z->MuMu event selector
88 ztoMMEventSelector = cms.EDFilter("ZtoMMEventSelector")
89 muonTracks = cms.EDProducer("ZtoMMMuonTrackProducer")
90 # Z->ee event selector
91 ztoEEEventSelector = cms.EDFilter("ZtoEEEventSelector")
92 electronTracks = cms.EDProducer("ZtoEEElectronTrackProducer")
93 #ttbar event selector
94 ttbarEventSelector = cms.EDFilter("ttbarEventSelector")
95 ttbarTracks = cms.EDProducer("TtbarTrackProducer")
96 
97 # Added modules for V0Monitoring (standard)
98 KshortMonitor = v0Monitor.clone()
99 KshortMonitor.FolderName = "StandaloneTrackMonitor/V0Monitoring/Ks"
100 KshortMonitor.v0 = "generalV0Candidates:Kshort"
101 KshortMonitor.histoPSet.massPSet = cms.PSet(nbins = cms.int32 (100),
102  xmin = cms.double(0.400),
103  xmax = cms.double(0.600))
104 
105 LambdaMonitor = v0Monitor.clone()
106 LambdaMonitor.FolderName = "StandaloneTrackMonitor/V0Monitoring/Lambda"
107 LambdaMonitor.v0 = "generalV0Candidates:Lambda"
108 LambdaMonitor.histoPSet.massPSet = cms.PSet(nbins = cms.int32(100),
109  xmin = cms.double(1.050),
110  xmax = cms.double(1.250))
111 
112 # Added modules for V0Monitoring (for restricted mass candidates)
113 SelectedKshortMonitor = KshortMonitor.clone(
114  FolderName = "StandaloneTrackMonitor/V0Monitoring/SelectedKs",
115  v0 = "KShortEventSelector"
116 )
117 
118 SelectedLambdaMonitor = LambdaMonitor.clone(
119  FolderName = "StandaloneTrackMonitor/V0Monitoring/SelectedLambda",
120  v0 = "LambdaEventSelector"
121 )
122 
123 
126 standaloneTrackMonitorMC = standaloneTrackMonitor.clone(
127  puScaleFactorFile = "PileupScaleFactor_316060_wrt_nVertex_ZeroBias.root",
128  doPUCorrection = True,
129  isMC = True
130  )
131 standaloneValidationMinbias = cms.Sequence(
132  hltPathFilter
133  * selectedPrimaryVertices
134 # * selectedMultiplicityTracks # Use selectedMultiplicityTracks if needed nTracks > desired multiplicity
135 # * selectedAlcaRecoZBTracks
136  * selectedTracks
137  * standaloneTrackMonitor
138  * KshortMonitor
139  * LambdaMonitor)
140 
141 standaloneValidationMinbiasMC = cms.Sequence(
142  hltPathFilter
143  * selectedPrimaryVertices
144 # * selectedMultiplicityTracks # Use selectedMultiplicityTracks if needed nTracks > desired multiplicity
145 # * selectedAlcaRecoZBTracks
146  * selectedTracks
147  * standaloneTrackMonitorMC
148  * KshortMonitor
149  * LambdaMonitor)
150 
151 
154 standaloneTrackMonitorK0 = standaloneTrackMonitor.clone(
155  folderName = "K0Tracks",
156  trackInputTag = 'KshortTracks',
157  )
158 
159 standaloneTrackMonitorK0MC = standaloneTrackMonitor.clone(
160  folderName = "K0Tracks",
161  trackInputTag = 'KshortTracks',
162  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
163  doPUCorrection = True,
164  isMC = True
165  )
166 
167 standaloneTrackMonitorLambda = standaloneTrackMonitor.clone(
168  folderName = "LambdaTracks",
169  trackInputTag = 'LambdaTracks',
170  )
171 
172 standaloneTrackMonitorLambdaMC = standaloneTrackMonitor.clone(
173  folderName = "LambdaTracks",
174  trackInputTag = 'LambdaTracks',
175  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
176  doPUCorrection = True,
177  isMC = True
178  )
179 
180 standaloneValidationK0s = cms.Sequence(
181  hltPathFilter
182  * selectedPrimaryVertices
183  * KShortEventSelector
184  * KshortTracks
185  * standaloneTrackMonitorK0
186  * SelectedKshortMonitor)
187 
188 standaloneValidationK0sMC = cms.Sequence(
189  hltPathFilter
190  * selectedPrimaryVertices
191  * KShortEventSelector
192  * KshortTracks
193  * standaloneTrackMonitorK0MC
194  * SelectedKshortMonitor)
195 
196 standaloneValidationLambdas = cms.Sequence(
197  hltPathFilter
198  * selectedPrimaryVertices
199  * LambdaEventSelector
200  * LambdaTracks
201  * standaloneTrackMonitorLambda
202  * SelectedLambdaMonitor)
203 
204 standaloneValidationLambdasMC = cms.Sequence(
205  hltPathFilter
206  * selectedPrimaryVertices
207  * LambdaEventSelector
208  * LambdaTracks
209  * standaloneTrackMonitorLambdaMC
210  * SelectedLambdaMonitor)
211 
212 
215 standaloneTrackMonitorElec = standaloneTrackMonitor.clone(
216  folderName = "ElectronTracks",
217  trackInputTag = 'electronTracks',
218  )
219 
220 standaloneTrackMonitorElecMC = standaloneTrackMonitor.clone(
221  folderName = "ElectronTracks",
222  trackInputTag = 'electronTracks',
223  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
224  doPUCorrection = True,
225  isMC = True
226  )
227 
228 ZEEDetailsMC = ZEEDetails.clone(
229  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
230  doPUCorrection = True,
231  isMC = True
232  )
233 
234 standaloneValidationElec = cms.Sequence(
235  hltPathFilterElectron
236  * selectedTracks
237  * selectedPrimaryVertices
238  * ztoEEEventSelector
239  * electronTracks
240  * standaloneTrackMonitorElec
241  * standaloneTrackMonitor
242  * ZEEDetails)
243 standaloneValidationElecMC = cms.Sequence(
244  hltPathFilterElectron
245  * selectedTracks
246  * selectedPrimaryVertices
247  * ztoEEEventSelector
248  * electronTracks
249  * standaloneTrackMonitorElecMC
250  * standaloneTrackMonitorMC
251  * ZEEDetailsMC)
252 
253 
256 standaloneTrackMonitorMuon = standaloneTrackMonitor.clone(
257  folderName = "MuonTracks",
258  trackInputTag = 'muonTracks',
259  )
260 standaloneTrackMonitorMuonMC = standaloneTrackMonitor.clone(
261  folderName = "MuonTracks",
262  trackInputTag = 'muonTracks',
263  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
264  doPUCorrection = True,
265  isMC = True
266  )
267 
268 standaloneValidationMuon = cms.Sequence(
269  hltPathFilterMuon
270  * selectedTracks
271  * selectedPrimaryVertices
272  * ztoMMEventSelector
273  * muonTracks
274  * standaloneTrackMonitorMuon
275  * standaloneTrackMonitor)
276 
277 standaloneValidationMuonMC = cms.Sequence(
278  hltPathFilterMuon
279  * selectedTracks
280  * selectedPrimaryVertices
281  * ztoMMEventSelector
282  * muonTracks
283  * standaloneTrackMonitorMuonMC
284  * standaloneTrackMonitorMC)
285 
286 
289 standaloneTrackMonitorTTbar = standaloneTrackMonitor.clone(
290  folderName = "TTbarTracks",
291  trackInputTag = 'ttbarTracks',
292  )
293 
294 standaloneTrackMonitorTTbarMC = standaloneTrackMonitor.clone(
295  folderName = "TTbarTracks",
296  trackInputTag = 'ttbarTracks',
297  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
298  doPUCorrection = True,
299  isMC = True
300  )
301 
302 standaloneValidationTTbar = cms.Sequence(
303  hltPathFilterTtbar
304  * selectedPrimaryVertices
305  * ttbarEventSelector
306  * ttbarTracks
307 # * selectedTracks
308  * standaloneTrackMonitorTTbar)
309 
310 standaloneValidationTTbarMC = cms.Sequence(
311  hltPathFilterTtbar
312  * selectedPrimaryVertices
313  * ttbarEventSelector
314  * ttbarTracks
315 # * selectedTracks
316  * standaloneTrackMonitorTTbarMC)