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
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 
114 standaloneTrackMonitorMC = standaloneTrackMonitor.clone(
115  puScaleFactorFile = "PileupScaleFactor_316060_wrt_nVertex_ZeroBias.root",
116  doPUCorrection = True,
117  isMC = True
118  )
119 standaloneValidationMinbias = cms.Sequence(
120  hltPathFilter
121  * selectedPrimaryVertices
122 # * selectedMultiplicityTracks # Use selectedMultiplicityTracks if needed nTracks > desired multiplicity
123 # * selectedAlcaRecoZBTracks
124  * selectedTracks
125  * standaloneTrackMonitor
126  * KshortMonitor
127  * LambdaMonitor)
128 
129 standaloneValidationMinbiasMC = cms.Sequence(
130  hltPathFilter
131  * selectedPrimaryVertices
132 # * selectedMultiplicityTracks # Use selectedMultiplicityTracks if needed nTracks > desired multiplicity
133 # * selectedAlcaRecoZBTracks
134  * selectedTracks
135  * standaloneTrackMonitorMC
136  * KshortMonitor
137  * LambdaMonitor)
138 
139 
142 standaloneTrackMonitorK0 = standaloneTrackMonitor.clone(
143  folderName = "K0Tracks",
144  trackInputTag = 'KshortTracks',
145  )
146 
147 standaloneTrackMonitorK0MC = standaloneTrackMonitor.clone(
148  folderName = "K0Tracks",
149  trackInputTag = 'KshortTracks',
150  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
151  doPUCorrection = True,
152  isMC = True
153  )
154 
155 standaloneTrackMonitorLambda = standaloneTrackMonitor.clone(
156  folderName = "LambdaTracks",
157  trackInputTag = 'LambdaTracks',
158  )
159 
160 standaloneTrackMonitorLambdaMC = standaloneTrackMonitor.clone(
161  folderName = "LambdaTracks",
162  trackInputTag = 'LambdaTracks',
163  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
164  doPUCorrection = True,
165  isMC = True
166  )
167 
168 standaloneValidationK0s = cms.Sequence(
169  hltPathFilter
170  * selectedPrimaryVertices
171  * KShortEventSelector
172  * KshortTracks
173  * standaloneTrackMonitorK0
174  * KshortMonitor)
175 
176 standaloneValidationK0sMC = cms.Sequence(
177  hltPathFilter
178  * selectedPrimaryVertices
179  * KShortEventSelector
180  * KshortTracks
181  * standaloneTrackMonitorK0
182  * KshortMonitor)
183 
184 standaloneValidationLambdas = cms.Sequence(
185  hltPathFilter
186  * selectedPrimaryVertices
187  * LambdaEventSelector
188  * LambdaTracks
189  * standaloneTrackMonitorLambda
190  * LambdaMonitor)
191 
192 standaloneValidationLambdasMC = cms.Sequence(
193  hltPathFilter
194  * selectedPrimaryVertices
195  * LambdaEventSelector
196  * LambdaTracks
197  * standaloneTrackMonitorLambdaMC
198  * LambdaMonitor)
199 
200 
203 standaloneTrackMonitorElec = standaloneTrackMonitor.clone(
204  folderName = "ElectronTracks",
205  trackInputTag = 'electronTracks',
206  )
207 
208 standaloneTrackMonitorElecMC = standaloneTrackMonitor.clone(
209  folderName = "ElectronTracks",
210  trackInputTag = 'electronTracks',
211  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
212  doPUCorrection = True,
213  isMC = True
214  )
215 
216 ZEEDetailsMC = ZEEDetails.clone(
217  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
218  doPUCorrection = True,
219  isMC = True
220  )
221 
222 standaloneValidationElec = cms.Sequence(
223  hltPathFilterElectron
224  * selectedTracks
225  * selectedPrimaryVertices
226  * ztoEEEventSelector
227  * electronTracks
228  * standaloneTrackMonitorElec
229  * standaloneTrackMonitor
230  * ZEEDetails)
231 standaloneValidationElecMC = cms.Sequence(
232  hltPathFilterElectron
233  * selectedTracks
234  * selectedPrimaryVertices
235  * ztoEEEventSelector
236  * electronTracks
237  * standaloneTrackMonitorElecMC
238  * standaloneTrackMonitorMC
239  * ZEEDetailsMC)
240 
241 
244 standaloneTrackMonitorMuon = standaloneTrackMonitor.clone(
245  folderName = "MuonTracks",
246  trackInputTag = 'muonTracks',
247  )
248 standaloneTrackMonitorMuonMC = standaloneTrackMonitor.clone(
249  folderName = "MuonTracks",
250  trackInputTag = 'muonTracks',
251  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
252  doPUCorrection = True,
253  isMC = True
254  )
255 
256 standaloneValidationMuon = cms.Sequence(
257  hltPathFilterMuon
258  * selectedTracks
259  * selectedPrimaryVertices
260  * ztoMMEventSelector
261  * muonTracks
262  * standaloneTrackMonitorMuon
263  * standaloneTrackMonitor)
264 
265 standaloneValidationMuonMC = cms.Sequence(
266  hltPathFilterMuon
267  * selectedTracks
268  * selectedPrimaryVertices
269  * ztoMMEventSelector
270  * muonTracks
271  * standaloneTrackMonitorMuonMC
272  * standaloneTrackMonitorMC)
273 
274 
277 standaloneTrackMonitorTTbar = standaloneTrackMonitor.clone(
278  folderName = "TTbarTracks",
279  trackInputTag = 'ttbarTracks',
280  )
281 
282 standaloneTrackMonitorTTbarMC = standaloneTrackMonitor.clone(
283  folderName = "TTbarTracks",
284  trackInputTag = 'ttbarTracks',
285  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
286  doPUCorrection = True,
287  isMC = True
288  )
289 
290 standaloneValidationTTbar = cms.Sequence(
291  hltPathFilterTtbar
292  * selectedPrimaryVertices
293  * ttbarEventSelector
294  * ttbarTracks
295 # * selectedTracks
296  * standaloneTrackMonitorTTbar)
297 
298 standaloneValidationTTbarMC = cms.Sequence(
299  hltPathFilterTtbar
300  * selectedPrimaryVertices
301  * ttbarEventSelector
302  * ttbarTracks
303 # * selectedTracks
304  * standaloneTrackMonitorTTbarMC)