CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CosmicsPD_Skims.py
Go to the documentation of this file.
2 
3 process = cms.Process("SKIM")
4 
5 process.configurationMetadata = cms.untracked.PSet(
6  version = cms.untracked.string('$Revision: 1.2 $'),
7  name = cms.untracked.string('$Source: /local/reps/CMSSW/CMSSW/DPGAnalysis/Skims/python/CosmicsPD_Skims.py,v $'),
8  annotation = cms.untracked.string('CRAFT Cosmics PD skim')
9 )
10 
11 #
12 #
13 # This is for testing purposes.
14 #
15 #
16 process.source = cms.Source("PoolSource",
17  fileNames = cms.untracked.vstring(
18 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/D266D139-D871-DE11-A709-001D09F28F0C.root',
19 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/CA27788D-E871-DE11-8B46-001D09F276CF.root',
20 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/AC5633B2-D471-DE11-9B3A-001D09F252F3.root',
21 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/9CD957E7-D071-DE11-B6AE-001D09F252F3.root',
22 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/94BF68F7-D171-DE11-902B-000423D986A8.root',
23 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/7838FE1E-C771-DE11-9FD5-000423D98950.root',
24 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/56632803-DD71-DE11-BAF5-000423D9870C.root',
25 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/42A67CB9-E971-DE11-AA86-001D09F252F3.root',
26 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/407225D3-D071-DE11-809B-001D09F297EF.root',
27 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/3E5E1CF0-D271-DE11-AC2B-000423D94700.root',
28 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/2C57E916-D071-DE11-AF0E-001D09F24E39.root',
29 '/store/data/Commissioning09/Cosmics/RECO/v5/000/105/755/228896A5-E571-DE11-A60B-001D09F2AF96.root'),
30 
31 # '/store/data/Commissioning08/Cosmics/RECO/CRAFT_ALL_V9_225-v1/0002/0A12CE23-D7F9-DD11-819E-00E081348D21.root'),
32  secondaryFileNames = cms.untracked.vstring(
33 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/F6887FD0-9371-DE11-B69E-00304879FBB2.root',
34 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/EEAF292E-9571-DE11-9A17-000423D94C68.root',
35 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/ECC04DEB-9071-DE11-9F3A-001D09F23174.root',
36 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/E8CE8710-9171-DE11-9211-000423D94534.root',
37 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/DEB9057C-9471-DE11-BAF5-000423D94524.root',
38 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/DC2A7158-A171-DE11-ACD3-001D09F24047.root',
39 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/D6E68664-9271-DE11-AE97-000423D9970C.root',
40 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/D2D94C9C-9171-DE11-AA96-000423D94AA8.root',
41 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/B045C7CB-9371-DE11-AF39-001D09F24489.root',
42 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/A2C791EF-9071-DE11-871D-001D09F2423B.root',
43 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/9E1A4336-9071-DE11-81BD-001D09F251B8.root',
44 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/8C28F89C-9171-DE11-B944-000423D9A2AE.root',
45 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/82A37610-9371-DE11-A293-000423D98B6C.root',
46 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/822D1510-9371-DE11-A329-000423D99A8E.root',
47 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/76515611-9371-DE11-8BF2-001D09F24024.root',
48 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/76434EA1-9171-DE11-B39F-000423D98E54.root',
49 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/6E1DB87B-9471-DE11-B4E8-000423D98B28.root',
50 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/6A15A1C7-9371-DE11-9ACB-0030487A18F2.root',
51 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/4E95107B-9471-DE11-9E86-000423D944F0.root',
52 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/42C723CA-9871-DE11-8614-000423D6B48C.root',
53 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/3E934456-9271-DE11-BA19-000423D99AA2.root',
54 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/3AF89B38-9371-DE11-AEE9-000423D33970.root',
55 '/store/data/Commissioning09/Cosmics/RAW/v3/000/105/755/2C696C5B-9271-DE11-BD57-000423D94990.root')
56 
57 # '/store/data/Commissioning08/Cosmics/RAW/v1/000/069/578/085EFED4-E5AB-DD11-9ACA-001617C3B6FE.root')
58 )
59 
60 process.maxEvents = cms.untracked.PSet(
61  input = cms.untracked.int32(500)
62 )
63 
64 process.options = cms.untracked.PSet(
65  wantSummary = cms.untracked.bool(True)
66 )
67 
68 #------------------------------------------
69 # Load standard sequences.
70 #------------------------------------------
71 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
72 process.load('Configuration/StandardSequences/GeometryIdeal_cff')
73 
74 
75 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
76 process.GlobalTag.globaltag = 'CRAFT09_R_V4::All'
77 
78 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
79 process.load("Configuration/StandardSequences/ReconstructionCosmics_cff")
80 
81 process.load('Configuration/EventContent/EventContentCosmics_cff')
82 
83 
85 process.extend(DPGAnalysis.Skims.CSCSkim_cfi)
86 
87 ############################CSCSkim trial ##########################################
88 
89 #### the path
90 
91 process.mySkim = cms.Path(process.cscSkim)
92 
93 
94 #### output
95 process.outputSkim = cms.OutputModule(
96  "PoolOutputModule",
97  outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
98  fileName = cms.untracked.string("cscskimEvents.root"),
99  dataset = cms.untracked.PSet(
100  dataTier = cms.untracked.string('RAW-RECO'),
101  filterName = cms.untracked.string('CSCSkim_trial')
102  ),
103  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('mySkim'))
104 )
105 
106 ##########################CSC Skim BField Studies#######################################
107 
108 process.cscbfield=DPGAnalysis.Skims.CSCSkim_cfi.cscSkim.clone()
109 process.cscbfield.typeOfSkim = cms.untracked.int32(9)
110 
111 #### the path
112 
113 process.BfieldStudySkim = cms.Path(process.cscbfield)
114 
115 
116 #### output
117 process.outputSkimBField = cms.OutputModule(
118  "PoolOutputModule",
119  outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
120  fileName = cms.untracked.string("CSCEvents_BFieldStudy.root"),
121  dataset = cms.untracked.PSet(
122  dataTier = cms.untracked.string('RAW-RECO'),
123  filterName = cms.untracked.string('CSCSkim_BFieldStudies')
124  ),
125  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('BfieldStudySkim'))
126 )
127 
128 
129 
130 ######################################Super Pointing#################################################
131 
132 process.cosmicMuonsBarrelOnlyFilter = cms.EDFilter("HLTMuonPointingFilter",
133  SALabel = cms.string("cosmicMuonsBarrelOnly"),
134  PropagatorName = cms.string("SteppingHelixPropagatorAny"),
135  radius = cms.double(10.0),
136  maxZ = cms.double(50.0),
137  saveTags = cms.bool(False)
138  )
139 
140 process.cosmicMuonsFilter = cms.EDFilter("HLTMuonPointingFilter",
141  SALabel = cms.string("cosmicMuons"),
142  PropagatorName = cms.string("SteppingHelixPropagatorAny"),
143  radius = cms.double(10.0),
144  maxZ = cms.double(50.0),
145  saveTags = cms.bool(False)
146  )
147 
148 process.cosmicMuons1LegFilter = cms.EDFilter("HLTMuonPointingFilter",
149  SALabel = cms.string("cosmicMuons1Leg"),
150  PropagatorName = cms.string("SteppingHelixPropagatorAny"),
151  radius = cms.double(10.0),
152  maxZ = cms.double(50.0),
153  saveTags = cms.bool(False)
154  )
155 
156 process.globalCosmicMuonsBarrelOnlyFilter = cms.EDFilter("HLTMuonPointingFilter",
157  SALabel = cms.string("globalCosmicMuonsBarrelOnly"),
158  PropagatorName = cms.string("SteppingHelixPropagatorAny"),
159  radius = cms.double(10.0),
160  maxZ = cms.double(50.0),
161  saveTags = cms.bool(False)
162  )
163 
164 process.cosmictrackfinderP5Filter = cms.EDFilter("HLTMuonPointingFilter",
165  SALabel = cms.string("cosmictrackfinderP5"),
166  PropagatorName = cms.string("SteppingHelixPropagatorAny"),
167  radius = cms.double(10.0),
168  maxZ = cms.double(50.0),
169  saveTags = cms.bool(False)
170  )
171 
172 process.globalCosmicMuonsFilter = cms.EDFilter("HLTMuonPointingFilter",
173  SALabel = cms.string("globalCosmicMuons"),
174  PropagatorName = cms.string("SteppingHelixPropagatorAny"),
175  radius = cms.double(10.0),
176  maxZ = cms.double(50.0),
177  saveTags = cms.bool(False)
178  )
179 
180 process.rsWithMaterialTracksP5Filter = cms.EDFilter("HLTMuonPointingFilter",
181  SALabel = cms.string("rsWithMaterialTracksP5"),
182  PropagatorName = cms.string("SteppingHelixPropagatorAny"),
183  radius = cms.double(10.0),
184  maxZ = cms.double(50.0),
185  saveTags = cms.bool(False)
186  )
187 
188 process.globalCosmicMuons1LegFilter = cms.EDFilter("HLTMuonPointingFilter",
189  SALabel = cms.string("globalCosmicMuons1Leg"),
190  PropagatorName = cms.string("SteppingHelixPropagatorAny"),
191  radius = cms.double(10.0),
192  maxZ = cms.double(50.0),
193  saveTags = cms.bool(False)
194  )
195 
196 process.ctfWithMaterialTracksP5Filter = cms.EDFilter("HLTMuonPointingFilter",
197  SALabel = cms.string("ctfWithMaterialTracksP5"),
198  PropagatorName = cms.string("SteppingHelixPropagatorAny"),
199  radius = cms.double(10.0),
200  maxZ = cms.double(50.0),
201  saveTags = cms.bool(False)
202  )
203 
204 
205 process.cosmicMuonsBarrelOnlyPath = cms.Path(process.cosmicMuonsBarrelOnlyFilter)
206 process.cosmicMuonsPath = cms.Path(process.cosmicMuonsFilter)
207 process.cosmicMuons1LegPath = cms.Path(process.cosmicMuons1LegFilter)
208 process.globalCosmicMuonsBarrelOnlyPath = cms.Path(process.globalCosmicMuonsBarrelOnlyFilter)
209 process.cosmictrackfinderP5Path = cms.Path(process.cosmictrackfinderP5Filter)
210 process.globalCosmicMuonsPath = cms.Path(process.globalCosmicMuonsFilter)
211 process.rsWithMaterialTracksP5Path = cms.Path(process.rsWithMaterialTracksP5Filter)
212 process.globalCosmicMuons1LegPath = cms.Path(process.globalCosmicMuons1LegFilter)
213 process.ctfWithMaterialTracksP5Path = cms.Path(process.ctfWithMaterialTracksP5Filter)
214 
215 
216 
217 process.outSP = cms.OutputModule("PoolOutputModule",
218  outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
219  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('cosmicMuonsBarrelOnlyPath',
220  'cosmicMuonsPath',
221  'cosmicMuons1LegPath',
222  'globalCosmicMuonsBarrelOnlyPath',
223  'cosmictrackfinderP5Path',
224  'globalCosmicMuonsPath',
225  'rsWithMaterialTracksP5Path',
226  'globalCosmicMuons1LegPath',
227  'ctfWithMaterialTracksP5Path')),
228  dataset = cms.untracked.PSet(
229  dataTier = cms.untracked.string('RAW-RECO'),
230  filterName = cms.untracked.string('SuperPointing')),
231  fileName = cms.untracked.string('/tmp/arizzi/superPointing.root')
232  )
233 
234 #################################Tracker Pointing###############################################
235 process.cosmictrackfinderP5TkCntFilter = cms.EDFilter("TrackCountFilter",
236  src = cms.InputTag('cosmictrackfinderP5'),
237  minNumber = cms.uint32(1)
238  )
239 
240 process.ctfWithMaterialTracksP5TkCntFilter = cms.EDFilter("TrackCountFilter",
241  src = cms.InputTag('ctfWithMaterialTracksP5'),
242  minNumber = cms.uint32(1)
243  )
244 
245 process.rsWithMaterialTracksP5TkCntFilter = cms.EDFilter("TrackCountFilter",
246  src = cms.InputTag('rsWithMaterialTracksP5'),
247  minNumber = cms.uint32(1)
248  )
249 
250 process.cosmicMuonsBarrelOnlyTkFilter = cms.EDFilter("HLTMuonPointingFilter",
251  SALabel = cms.string("cosmicMuonsBarrelOnly"),
252  PropagatorName = cms.string("SteppingHelixPropagatorAny"),
253  radius = cms.double(90.0),
254  maxZ = cms.double(130.0)
255  )
256 
257 process.cosmicMuonsBarrelOnlyTkPath = cms.Path(process.cosmicMuonsBarrelOnlyTkFilter)
258 process.cosmictrackfinderP5TkCntPath = cms.Path(process.cosmictrackfinderP5TkCntFilter)
259 process.ctfWithMaterialTracksP5TkCntPath = cms.Path(process.ctfWithMaterialTracksP5TkCntFilter)
260 process.rsWithMaterialTracksP5TkCntPath = cms.Path(process.rsWithMaterialTracksP5TkCntFilter)
261 
262 
263 process.outTP = cms.OutputModule("PoolOutputModule",
264  outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
265  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('cosmicMuonsBarrelOnlyTkPath',
266  'cosmictrackfinderP5TkCntPath',
267  'ctfWithMaterialTracksP5TkCntPath',
268  'rsWithMaterialTracksP5TkCntPath')),
269  dataset = cms.untracked.PSet(
270  dataTier = cms.untracked.string('RAW-RECO'),
271  filterName = cms.untracked.string('TrackingPointing')),
272  fileName = cms.untracked.string('/tmp/arizzi/trackerPointing.root')
273  )
274 
275 
276 ####################################### Multi Muon ###########################################################
277 
278 process.multiCosmicMuonFilter = cms.EDFilter("TrackCountFilter",
279  src = cms.InputTag('cosmicMuonsBarrelOnly'),
280  minNumber = cms.uint32(5)
281  )
282 
283 process.multiLHCMuonFilter = cms.EDFilter("TrackCountFilter",
284  src = cms.InputTag('lhcStandAloneMuonsBarrelOnly'),
285  minNumber = cms.uint32(5)
286  )
287 
288 process.multiCosmicMuonPath = cms.Path(process.multiCosmicMuonFilter)
289 process.multiLHCMuonPath = cms.Path(process.multiLHCMuonFilter)
290 
291 process.outMM = cms.OutputModule("PoolOutputModule",
292  process.RECOEventContent,
293  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('multiCosmicMuonPath',
294  'multiLHCMuonPath')),
295  dataset = cms.untracked.PSet(
296  dataTier = cms.untracked.string('RECO'),
297  filterName = cms.untracked.string('multiCosmicMuon')),
298  fileName = cms.untracked.string('/tmp/arizzi/multiMuon.root')
299  )
300 
301 process.outMM.outputCommands.append('drop *_MEtoEDMConverter_*_*')
302 
303 
304 
305 
306 
307 import FWCore.ParameterSet.Config as cms
308 import DPGAnalysis.Skims.HCALHighEnergyCombinedPath_cff
309 
310 #################################HCAL High Energy#########################################
311 
312 process.extend(DPGAnalysis.Skims.HCALHighEnergyCombinedPath_cff)
313 
314 process.outHCAL = cms.OutputModule("PoolOutputModule",
315  outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
316  SelectEvents = cms.untracked.PSet(
317  SelectEvents = cms.vstring("HCALHighEnergyPath")
318  ),
319  dataset = cms.untracked.PSet(
320  dataTier = cms.untracked.string('RAW-RECO'),
321  filterName = cms.untracked.string('HCALHighEnergy')),
322  fileName = cms.untracked.string('/tmp/arizzi/HCALHighEnergy_filter.root')
323  )
324 
325 #################################ECAL High Energy#########################################
326 process.skimming = cms.EDFilter("EcalSkim",
327  #cosmic cluster energy threshold in GeV
328  energyCutEB = cms.untracked.double(2.0),
329  energyCutEE = cms.untracked.double(2.0),
330  endcapClusterCollection = cms.InputTag("cosmicSuperClusters","CosmicEndcapSuperClusters"),
331  barrelClusterCollection = cms.InputTag("cosmicSuperClusters","CosmicBarrelSuperClusters")
332 )
333 process.ecalPath = cms.Path(process.skimming)
334 
335 process.outECAL = cms.OutputModule("PoolOutputModule",
336  process.RECOEventContent,
337  fileName = cms.untracked.string('/tmp/arizzi/ecalSkim.root'),
338  dataset = cms.untracked.PSet(
339  dataTier = cms.untracked.string('RECO'),
340  filterName = cms.untracked.string('ecalSkim_fromRECO')),
341  SelectEvents = cms.untracked.PSet(
342  SelectEvents = cms.vstring('ecalPath')
343  )
344 )
345 
346 process.outECAL.outputCommands.append('drop *_MEtoEDMConverter_*_*')
347 
348 ###############################StoppedHSCP################################
349 
350 process.outHSCP = cms.OutputModule("PoolOutputModule",
351  outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
352  SelectEvents = cms.untracked.PSet(
353  SelectEvents = cms.vstring("HLT_StoppedHSCP_*:HLT")
354  ),
355  dataset = cms.untracked.PSet(
356  dataTier = cms.untracked.string('RAW-RECO'),
357  filterName = cms.untracked.string('StoppedHSCP')),
358  fileName = cms.untracked.string('/tmp/arizzi/StoppedHSCP_filter.root')
359  )
360 
361 
362 process.outpath = cms.EndPath(process.outSP+process.outTP+process.outMM+process.outputSkim+process.outputSkimBField+process.outHCAL+process.outECAL+process.outHSCP)