CMS 3D CMS Logo

MinBiasPDSkim_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 process = cms.Process("SKIM")
4 
5 process.configurationMetadata = cms.untracked.PSet(
6  version = cms.untracked.string('$Revision: 1.36 $'),
7  name = cms.untracked.string('$Source: /cvs/CMSSW/CMSSW/DPGAnalysis/Skims/python/MinBiasPDSkim_cfg.py,v $'),
8  annotation = cms.untracked.string('Combined MinBias skim')
9 )
10 # selection eff. on 1000 events
11 #file:/tmp/azzi/Background.root
12 #/tmp/azzi/Background.root ( 0 events, 664191 bytes )
13 #file:/tmp/azzi/MinBiascscskimEvents.root
14 #/tmp/azzi/MinBiascscskimEvents.root ( 0 events, 664212 bytes )
15 #file:/tmp/azzi/MuonDPGSkim.root
16 #/tmp/azzi/MuonDPGSkim.root ( 95 events, 40887080 bytes )
17 #file:/tmp/azzi/StoppedHSCP_filter.root
18 #/tmp/azzi/StoppedHSCP_filter.root ( 124 events, 28507733 bytes )
19 #file:/tmp/azzi/ValSkim.root
20 #/tmp/azzi/ValSkim.root ( 22 events, 9588726 bytes )
21 #file:/tmp/azzi/ecalrechitfilter.root
22 #/tmp/azzi/ecalrechitfilter.root ( 23 events, 14583758 bytes )
23 #file:/tmp/azzi/logerror_filter.root
24 #/tmp/azzi/logerror_filter.root ( 14 events, 9389296 bytes )
25 #file:/tmp/azzi/TPGSkim.root
26 #/tmp/azzi/TPGSkim.root ( 46 events, 20271643 bytes )
27 
28 #
29 #
30 # This is for testing purposes.
31 #
32 #
33 process.source = cms.Source("PoolSource",
34  fileNames = cms.untracked.vstring(
35 # run 136066 lumi~500
36 '/store/data/Run2010A/MinimumBias/RECO/v1/000/136/066/18F6DB82-5566-DF11-B289-0030487CAF0E.root'),
37  secondaryFileNames = cms.untracked.vstring(
38 '/store/data/Run2010A/MinimumBias/RAW/v1/000/136/066/38D48BED-3C66-DF11-88A5-001D09F27003.root')
39 )
40 
41 process.source.inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
42 
43 process.maxEvents = cms.untracked.PSet(
44  input = cms.untracked.int32(-1)
45 )
46 
47 
48 #------------------------------------------
49 # Load standard sequences.
50 #------------------------------------------
51 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
52 process.load('Configuration/StandardSequences/GeometryIdeal_cff')
53 
54 
55 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
56 process.GlobalTag.globaltag = 'GR_R_38X_V13::All'
57 
58 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
59 process.load("Configuration/StandardSequences/Reconstruction_cff")
60 process.load('Configuration/EventContent/EventContent_cff')
61 
62 #drop collections created on the fly
63 process.FEVTEventContent.outputCommands.append("drop *_MEtoEDMConverter_*_*")
64 process.FEVTEventContent.outputCommands.append("drop *_*_*_SKIM")
65 
66 #
67 # Load common sequences
68 #
69 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskAlgoTrigConfig_cff')
70 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
71 process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
72 
73 ###########################################################################################
74 #------------------------------------------
75 # parameters for the CSCSkim module
76 #------------------------------------------
77 process.load("DPGAnalysis/Skims/CSCSkim_cfi")
78 
79 
80 #set to minimum activity
81 process.cscSkim.minimumSegments = 1
82 process.cscSkim.minimumHitChambers = 1
83 
84 # this is for filtering on HLT path
85 process.hltBeamHalo = cms.EDFilter("HLTHighLevel",
86  TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
87  HLTPaths = cms.vstring('HLT_CSCBeamHalo','HLT_CSCBeamHaloOverlapRing1','HLT_CSCBeamHaloOverlapRing','HLT_CSCBeamHaloRing2or3'), # provide list of HLT paths (or patterns) you want
88  eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
89  andOr = cms.bool(True), # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
90  throw = cms.bool(False), # throw exception on unknown path names
91  saveTags = cms.bool(False)
92  )
93 
94 #### the path
95 process.cscHaloSkim = cms.Path(process.hltBeamHalo+process.cscSkim)
96 
97 
98 
99 #### output
100 process.outputBeamHaloSkim = cms.OutputModule("PoolOutputModule",
101  outputCommands = process.FEVTEventContent.outputCommands,
102  fileName = cms.untracked.string("/tmp/azzi/MinBiascscskimEvents.root"),
103  dataset = cms.untracked.PSet(
104  dataTier = cms.untracked.string('RAW-RECO'),
105  filterName = cms.untracked.string('CSCSkim_BeamHalo_MinBias')
106  ),
107  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('cscHaloSkim'))
108 )
109 
110 
111 ########################## Muon tracks Filter ############################
112 process.muonSkim=cms.EDFilter("CandViewCountFilter",
113  src =cms.InputTag("muons"), minNumber = cms.uint32(1))
114 process.muonTracksSkim = cms.Path(process.muonSkim)
115 
116 
117 ###########################################################################
118 
119 process.outputMuonSkim = cms.OutputModule("PoolOutputModule",
120  fileName = cms.untracked.string('/tmp/azzi/MuonSkim.root'),
121  outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
122  dataset = cms.untracked.PSet(
123  dataTier = cms.untracked.string('RECO'),
124  filterName = cms.untracked.string('Muon_skim')),
125  SelectEvents = cms.untracked.PSet(
126  SelectEvents = cms.vstring("muonTracksSkim")
127  )
128 )
129 ####################################################################################
130 
131 ##################################stoppedHSCP############################################
132 
133 
134 # this is for filtering on HLT path
135 process.hltstoppedhscp = cms.EDFilter("HLTHighLevel",
136  TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
137  HLTPaths = cms.vstring("HLT_StoppedHSCP*"), # provide list of HLT paths (or patterns) you want
138  eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
139  andOr = cms.bool(True), # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
140  throw = cms.bool(False) # throw exception on unknown path names
141  )
142 
143 process.HSCP=cms.Path(process.hltstoppedhscp)
144 
145 process.outHSCP = cms.OutputModule("PoolOutputModule",
146  outputCommands = process.FEVTEventContent.outputCommands,
147  fileName = cms.untracked.string('/tmp/azzi/StoppedHSCP_filter.root'),
148  dataset = cms.untracked.PSet(
149  dataTier = cms.untracked.string('RAW-RECO'),
150  filterName = cms.untracked.string('Skim_StoppedHSCP')),
151 
152  SelectEvents = cms.untracked.PSet(
153  SelectEvents = cms.vstring("HSCP")
154  ))
155 
156 ###########################################################################################
157 #------------------------------------------
158 # parameters for the PFGCollisions skim3
159 #------------------------------------------
160 process.load('HLTrigger.special.hltPhysicsDeclared_cfi')
161 process.hltPhysicsDeclared.L1GtReadoutRecordTag = 'gtDigis'
162 
163 process.hltbeamgas = cms.EDFilter("HLTHighLevel",
164 TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
165  HLTPaths = cms.vstring('HLT_L1_BptxXOR_BscMinBiasOR'), # provide list of HLT paths (or patterns) you want
166  eventSetupPathsKey = cms.string(''),
167  andOr = cms.bool(True),
168  throw = cms.bool(False),
169  saveTags = cms.bool(False)
170 
171 )
172 
173 #### the path
174 process.pfgskim3noncross = cms.Path(process.hltPhysicsDeclared*process.hltbeamgas)
175 
176 #### output
177 process.outputpfgskim3 = cms.OutputModule("PoolOutputModule",
178  outputCommands = process.FEVTEventContent.outputCommands,
179  fileName = cms.untracked.string("/tmp/azzi/Background.root"),
180  dataset = cms.untracked.PSet(
181  dataTier = cms.untracked.string('RAW-RECO'),
182  filterName = cms.untracked.string('BEAMBKGV3')
183  ),
184  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('pfgskim3noncross'))
185 )
186 
187 ###########################################################################################
188 ###########################################################################################
189 
190 #===========================================================
191 
192 #################################logerrorharvester############################################
193 process.load("FWCore.Modules.logErrorFilter_cfi")
195 
196 process.gtEvmDigis = gtEvmDigis.clone()
197 process.stableBeam = cms.EDFilter("HLTBeamModeFilter",
198  L1GtEvmReadoutRecordTag = cms.InputTag("gtEvmDigis"),
199  AllowedBeamMode = cms.vuint32(11),
200  saveTags = cms.bool(False)
201  )
202 
203 process.logerrorpath=cms.Path(process.gtEvmDigis+process.stableBeam+process.logErrorFilter)
204 
205 process.outlogerr = cms.OutputModule("PoolOutputModule",
206  outputCommands = process.FEVTEventContent.outputCommands,
207  fileName = cms.untracked.string('/tmp/azzi/logerror_filter.root'),
208  dataset = cms.untracked.PSet(
209  dataTier = cms.untracked.string('RAW-RECO'),
210  filterName = cms.untracked.string('Skim_logerror')),
211 
212  SelectEvents = cms.untracked.PSet(
213  SelectEvents = cms.vstring("logerrorpath")
214  ))
215 
216 #===========================================================
217 ###########################ngood event per lumi##########################################
218 process.primaryVertexFilter = cms.EDFilter("VertexSelector",
219  src = cms.InputTag("offlinePrimaryVertices"),
220  cut = cms.string("!isFake && ndof > 4 && abs(z) <= 15 && position.Rho <= 2"), # tracksSize() > 3 for the older cut
221  filter = cms.bool(True), # otherwise it won't filter the events, just produce an empty vertex collection.
222 )
223 
224 
225 process.noscraping = cms.EDFilter("FilterOutScraping",
226 applyfilter = cms.untracked.bool(True),
227 debugOn = cms.untracked.bool(False),
228 numtrack = cms.untracked.uint32(10),
229 thresh = cms.untracked.double(0.25)
230 )
231 
232 ###Tracks selection
233 process.trackSelector =cms.EDFilter("TrackSelector",
234  src = cms.InputTag("generalTracks"),
235  cut = cms.string('quality("highPurity")')
236  )
237 
238 #process.trackSelector = cms.EDProducer("QualityFilter",
239 # TrackQuality = cms.string('highPurity'),
240 # recTracks = cms.InputTag("generalTracks")
241 # )
242 
243 process.trackFilter = cms.EDFilter("TrackCountFilter",
244  src = cms.InputTag("trackSelector"),
245  minNumber = cms.uint32(10)
246  )
247 
248 process.nottoomanytracks = cms.EDFilter("NMaxPerLumi",
249  nMaxPerLumi = cms.uint32(8)
250  )
251 process.relvaltrackskim = cms.Path(process.primaryVertexFilter+process.noscraping+
252  process.trackSelector + process.trackFilter + process.nottoomanytracks )
253 
254 ### muon selection
255 process.muonSelector = cms.EDFilter("MuonSelector",
256  src = cms.InputTag("muons"),
257  cut = cms.string(" isGlobalMuon && isTrackerMuon && pt > 3")
258  )
259 process.muonFilter = cms.EDFilter("MuonCountFilter",
260  src = cms.InputTag("muonSelector"),
261  minNumber = cms.uint32(1)
262  )
263 process.nottoomanymuons = cms.EDFilter("NMaxPerLumi",
264  nMaxPerLumi = cms.uint32(2)
265  )
266 process.relvalmuonskim = cms.Path(process.primaryVertexFilter+process.noscraping+
267  process.muonSelector + process.muonFilter + process.nottoomanymuons )
268 
269 #### output
270 process.outputvalskim = cms.OutputModule("PoolOutputModule",
271  outputCommands = process.FEVTEventContent.outputCommands,
272  fileName = cms.untracked.string("/tmp/azzi/ValSkim.root"),
273  dataset = cms.untracked.PSet(
274  dataTier = cms.untracked.string('RAW-RECO'),
275  filterName = cms.untracked.string('valskim')
276  ),
277  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('relvaltrackskim','relvalmuonskim')
278  ))
279 
280 
281 ###########################################################################
282 ######################################TPG Performance SKIMS#####################################
283 
284 process.load('DPGAnalysis/Skims/singleMuonSkim_cff')
285 process.load('DPGAnalysis/Skims/singleElectronSkim_cff')
286 process.load('DPGAnalysis/Skims/muonTagProbeFilters_cff')
287 process.load('DPGAnalysis/Skims/electronTagProbeFilters_cff')
288 process.load('DPGAnalysis/Skims/singlePhotonSkim_cff')
289 process.load('DPGAnalysis/Skims/jetSkim_cff')
290 process.load('DPGAnalysis/Skims/METSkim_cff')
291 process.load('DPGAnalysis/Skims/singlePfTauSkim_cff')
292 
293 #process.singleMuPt20SkimPath=cms.Path(process.singleMuPt20RecoQualitySeq)
294 #process.singleMuPt15SkimPath=cms.Path(process.singleMuPt15RecoQualitySeq)
295 #process.singleMuPt10SkimPath=cms.Path(process.singleMuPt10RecoQualitySeq)
296 process.singleMuPt5SkimPath=cms.Path(process.singleMuPt5RecoQualitySeq)
297 #process.singleElectronPt20SkimPath=cms.Path(process.singleElectronPt20RecoQualitySeq)
298 #process.singleElectronPt15SkimPath=cms.Path(process.singleElectronPt15RecoQualitySeq)
299 #process.singleElectronPt10SkimPath=cms.Path(process.singleElectronPt10RecoQualitySeq)
300 process.singleElectronPt5SkimPath=cms.Path(process.singleElectronPt5RecoQualitySeq)
301 #process.singlePhotonPt20SkimPath=cms.Path(process.singlePhotonPt20QualitySeq)
302 #process.singlePhotonPt15SkimPath=cms.Path(process.singlePhotonPt15QualitySeq)
303 #process.singlePhotonPt10SkimPath=cms.Path(process.singlePhotonPt10QualitySeq)
304 process.singlePhotonPt5SkimPath=cms.Path(process.singlePhotonPt5QualitySeq)
305 #process.muonZMMSkimPath=cms.Path(process.muonZMMRecoQualitySeq)
306 process.muonJPsiMMSkimPath=cms.Path(process.muonJPsiMMRecoQualitySeq)
307 #process.electronZEESkimPath=cms.Path(process.electronZEERecoQualitySeq)
308 process.jetSkimPath=cms.Path(process.jetRecoQualitySeq)
309 #process.METSkimPath=cms.Path(process.METQualitySeq)
310 process.singlePfTauPt15SkimPath=cms.Path(process.singlePfTauPt15QualitySeq)
311 
312 process.outTPGSkim = cms.OutputModule("PoolOutputModule",
313  outputCommands = process.FEVTHLTALLEventContent.outputCommands,
314  fileName = cms.untracked.string("/tmp/azzi/TPGSkim.root"),
315  dataset = cms.untracked.PSet(
316  dataTier = cms.untracked.string('USER'),
317  filterName = cms.untracked.string('TPGSkim')
318  ),
319  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring(
320  #'singleMuPt20SkimPath',
321  #'singleMuPt15SkimPath',
322  #'singleMuPt10SkimPath',
323  'singleMuPt5SkimPath',
324  #'singleElectronPt20SkimPath',
325  #'singleElectronPt15SkimPath',
326  #'singleElectronPt10SkimPath',
327  'singleElectronPt5SkimPath',
328  #'singlePhotonPt20SkimPath',
329  #'singlePhotonPt15SkimPath',
330  #'singlePhotonPt10SkimPath',
331  'singlePhotonPt5SkimPath',
332  #'muonZMMSkimPath',
333  'muonJPsiMMSkimPath',
334  #'electronZEESkimPath',
335  'jetSkimPath',
336  #'METSkimPath',
337  'singlePfTauPt15SkimPath'))
338 )
339 
340 
341 ###########################################################################
342 
343 
344 process.options = cms.untracked.PSet(
345  wantSummary = cms.untracked.bool(True)
346 )
347 
348 #process.outpath = cms.EndPath(process.outputBeamHaloSkim+process.outputMuonSkim+process.outHSCP+process.outputpfgskim3+process.outlogerr+process.outputvalskim+process.outTPGSkim)
349 #BeamHalo removed
350 process.outpath = cms.EndPath(process.outputMuonSkim+process.outHSCP+process.outputpfgskim3+process.outlogerr+process.outputvalskim+process.outTPGSkim)
351 
352 
353