CMS 3D CMS Logo

TrackingDataMCValidation_Standalone_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
4 # from DQM.TrackingMonitor.V0Monitor_cfi import *
5 
6 # Primary Vertex Selector
7 selectedPrimaryVertices = cms.EDFilter("VertexSelector",
8  src = cms.InputTag('offlinePrimaryVertices'),
9  # cut = cms.string("!isFake && ndof >= 4 && abs(z) < 24 && abs(position.Rho) < 2.0"),
10  cut = cms.string(""),
11  filter = cms.bool(True)
12  )
13 # Track Selector
14 selectedTracks = cms.EDFilter("TrackSelector",
15  src = cms.InputTag('generalTracks'),
16  cut = cms.string("pt > 1.0"),
17  #cut = cms.string(""),
18  filter = cms.bool(True)
19  )
20 
21 # Track Multiplicity Selector
22 selectedMultiplicityTracks = cms.EDFilter("TrackMultiplicityFilter",
23  src = cms.InputTag('generalTracks'),
24  #cut = cms.string("pt > 1.0"),
25  nmin = cms.untracked.uint32(500),
26  cut = cms.untracked.string(""),
27  filter = cms.bool(True)
28  )
29 
30 # Track ALCARECO Selection for zerobias
31 selectedAlcaRecoZBTracks = cms.EDProducer("AlcaRecoTrackSelector",
32  src = cms.InputTag('generalTracks'),
33  #cut = cms.string("pt > 0.65 && abs(eta) < 3.5 && p > 1.5 && hitPattern.numberOfAllHits('TRACK_HITS') > 7"),
34  #cut = cms.string(""),
35  ptmin = cms.untracked.double(0.65),
36  pmin = cms.untracked.double(1.5),
37  etamin = cms.untracked.double(-3.5),
38  etamax = cms.untracked.double(3.5),
39  nhits = cms.untracked.uint32(7)
40 )
41 '''
42 # Track ALCARECO Selection for singlemuon
43 selectedAlcaRecoSMTracks = cms.EDFilter("TrackSelector",
44  src = cms.InputTag('selectedMultiplicityTracks'),
45  cut = cms.string("pt > 2.0 && abs(eta) < 3.5 && p > 1.5 && hitPattern.numberOfAllTrackerHits > 7"),
46  #cut = cms.string(""),
47  filter = cms.bool(True)
48  )
49 '''
50 # HLT path selector
51 hltPathFilter = cms.EDFilter("HLTPathSelector",
52  processName = cms.string("HLT"),
53  verbose = cms.untracked.bool(False),
54  hltPathsOfInterest = cms.vstring("HLT_ZeroBias_v"),
55  triggerResults = cms.untracked.InputTag("TriggerResults","","HLT"),
56  triggerEvent = cms.untracked.InputTag("hltTriggerSummaryAOD","","HLT")
57  )
58 
59 # HLT path selector Muon
60 hltPathFilterMuon = cms.EDFilter("HLTPathSelector",
61  processName = cms.string("HLT"),
62  verbose = cms.untracked.bool(False),
63  hltPathsOfInterest = cms.vstring("HLT_IsoMu24_v"),
64  triggerResults = cms.untracked.InputTag("TriggerResults","","HLT"),
65  triggerEvent = cms.untracked.InputTag("hltTriggerSummaryAOD","","HLT")
66  )
67 
68 # HLT path selector Electron
69 hltPathFilterElectron = cms.EDFilter("HLTPathSelector",
70  processName = cms.string("HLT"),
71  verbose = cms.untracked.bool(False),
72  hltPathsOfInterest = cms.vstring("HLT_Ele32_WPTight_Gsf_v"),
73  triggerResults = cms.untracked.InputTag("TriggerResults","","HLT"),
74  triggerEvent = cms.untracked.InputTag("hltTriggerSummaryAOD","","HLT")
75  )
76 
77 # HLT path selector ttbar
78 hltPathFilterTtbar = cms.EDFilter("HLTPathSelector",
79  processName = cms.string("HLT"),
80  verbose = cms.untracked.bool(False),
81  hltPathsOfInterest = cms.vstring("HLT_Ele32_WPTight_Gsf_v","HLT_IsoMu24_v"),
82  triggerResults = cms.untracked.InputTag("TriggerResults","","HLT"),
83  triggerEvent = cms.untracked.InputTag("hltTriggerSummaryAOD","","HLT")
84  )
85 
86 # Z->MuMu event selector
87 ztoMMEventSelector = cms.EDFilter("ZtoMMEventSelector")
88 muonTracks = cms.EDProducer("ZtoMMMuonTrackProducer")
89 # Z->ee event selector
90 ztoEEEventSelector = cms.EDFilter("ZtoEEEventSelector")
91 electronTracks = cms.EDProducer("ZtoEEElectronTrackProducer")
92 #ttbar event selector
93 ttbarEventSelector = cms.EDFilter("ttbarEventSelector")
94 ttbarTracks = cms.EDProducer("TtbarTrackProducer")
95 
96 # Added module for V0Monitoring for Ks only
97 # KshortMonitor = v0Monitor.clone()
98 # KshortMonitor.FolderName = cms.string("Tracking/V0Monitoring/Ks")
99 # KshortMonitor.v0 = cms.InputTag('generalV0Candidates:Kshort')
100 # KshortMonitor.histoPSet.massPSet = cms.PSet(
101 # nbins = cms.int32 ( 100 ),
102 # xmin = cms.double( 0.400),
103 # xmax = cms.double( 0.600),
104 # )
105 
106 # For MinBias
107 standaloneTrackMonitorMC = standaloneTrackMonitor.clone(
108  puScaleFactorFile = "PileupScaleFactor_316060_wrt_nVertex_ZeroBias.root",
109  doPUCorrection = True,
110  isMC = True
111  )
112 standaloneValidationMinbias = cms.Sequence(
113  hltPathFilter
114  * selectedPrimaryVertices
115 # * selectedMultiplicityTracks # Use selectedMultiplicityTracks if needed nTracks > desired multiplicity
116 # * selectedAlcaRecoZBTracks
117  * selectedTracks
118  * standaloneTrackMonitor)
119 standaloneValidationMinbiasMC = cms.Sequence(
120  hltPathFilter
121  * selectedPrimaryVertices
122 # * selectedMultiplicityTracks # Use selectedMultiplicityTracks if needed nTracks > desired multiplicity
123 # * selectedAlcaRecoZBTracks
124  * selectedTracks
125  * standaloneTrackMonitorMC)
126 # For ZtoEE
127 standaloneTrackMonitorElec = standaloneTrackMonitor.clone(
128  folderName = "ElectronTracks",
129  trackInputTag = 'electronTracks',
130  )
131 
132 standaloneTrackMonitorElecMC = standaloneTrackMonitor.clone(
133  folderName = "ElectronTracks",
134  trackInputTag = 'electronTracks',
135  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
136  doPUCorrection = True,
137  isMC = True
138  )
139 
140 ZEEDetailsMC = ZEEDetails.clone(
141  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
142  doPUCorrection = True,
143  isMC = True
144  )
145 
146 standaloneValidationElec = cms.Sequence(
147  hltPathFilterElectron
148  * selectedTracks
149  * selectedPrimaryVertices
150  * ztoEEEventSelector
151  * electronTracks
152  * standaloneTrackMonitorElec
153  * standaloneTrackMonitor
154  * ZEEDetails)
155 standaloneValidationElecMC = cms.Sequence(
156  hltPathFilterElectron
157  * selectedTracks
158  * selectedPrimaryVertices
159  * ztoEEEventSelector
160  * electronTracks
161  * standaloneTrackMonitorElecMC
162  * standaloneTrackMonitorMC
163  * ZEEDetailsMC)
164 # For ZtoMM
165 standaloneTrackMonitorMuon = standaloneTrackMonitor.clone(
166  folderName = "MuonTracks",
167  trackInputTag = 'muonTracks',
168  )
169 standaloneTrackMonitorMuonMC = standaloneTrackMonitor.clone(
170  folderName = "MuonTracks",
171  trackInputTag = 'muonTracks',
172  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
173  doPUCorrection = True,
174  isMC = True
175  )
176 
177 standaloneValidationMuon = cms.Sequence(
178  hltPathFilterMuon
179  * selectedTracks
180  * selectedPrimaryVertices
181  * ztoMMEventSelector
182  * muonTracks
183  * standaloneTrackMonitorMuon
184  * standaloneTrackMonitor)
185 
186 standaloneValidationMuonMC = cms.Sequence(
187  hltPathFilterMuon
188  * selectedTracks
189  * selectedPrimaryVertices
190  * ztoMMEventSelector
191  * muonTracks
192  * standaloneTrackMonitorMuonMC
193  * standaloneTrackMonitorMC)
194 
195 # For ttbar
196 standaloneTrackMonitorTTbar = standaloneTrackMonitor.clone(
197  folderName = "TTbarTracks",
198  trackInputTag = 'ttbarTracks',
199  )
200 
201 standaloneTrackMonitorTTbarMC = standaloneTrackMonitor.clone(
202  folderName = "TTbarTracks",
203  trackInputTag = 'ttbarTracks',
204  puScaleFactorFile = "PileupScaleFactor_316082_wrt_nVertex_DYToLL.root",
205  doPUCorrection = True,
206  isMC = True
207  )
208 
209 standaloneValidationTTbar = cms.Sequence(
210  hltPathFilterTtbar
211  * selectedPrimaryVertices
212  * ttbarEventSelector
213  * ttbarTracks
214 # * selectedTracks
215  * standaloneTrackMonitorTTbar)
216 
217 standaloneValidationTTbarMC = cms.Sequence(
218  hltPathFilterTtbar
219  * selectedPrimaryVertices
220  * ttbarEventSelector
221  * ttbarTracks
222 # * selectedTracks
223  * standaloneTrackMonitorTTbarMC)