CMS 3D CMS Logo

RPCNoise_example.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 process = cms.Process("USER")
4 
5 process.load("Configuration.StandardSequences.GeometryDB_cff")
6 process.load("Configuration.StandardSequences.MagneticField_38T_cff")
7 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
8 process.GlobalTag.globaltag = 'auto:run3_data_prompt'
9 process.prefer("GlobalTag")
10 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
11 process.load("Configuration.StandardSequences.ReconstructionCosmics_cff")
12 
13 process.source = cms.Source("PoolSource",
14  fileNames = cms.untracked.vstring(
15  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/00718365-02A6-DD11-86BC-000423D98E54.root',
16  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/00725EB9-22A6-DD11-8EC1-001617DC1F70.root',
17  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/00A93B38-26A6-DD11-8676-000423D98F98.root',
18  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/00EB701D-24A6-DD11-9AA1-001617E30D38.root',
19  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/00FC7A6B-E3A5-DD11-A4D1-001617DF785A.root',
20  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/0239F671-DCA5-DD11-9268-000423D98844.root',
21  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/02450760-F4A5-DD11-B709-000423D6BA18.root',
22  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/0260B87A-49A6-DD11-9731-000423D992A4.root',
23  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/02914A0F-29A6-DD11-BD17-000423D985B0.root',
24  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/02C0EAC4-62A6-DD11-868F-000423D6CA02.root',
25  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/02CD99AF-1BA6-DD11-B71E-000423D992DC.root',
26  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/02F1E96F-50A6-DD11-938D-0019DB29C614.root',
27  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/02FA5CED-56A6-DD11-8F63-001617E30D52.root',
28  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/044D708C-5EA6-DD11-BFA5-0030487D0D3A.root',
29  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/0457B4E8-13A6-DD11-816E-000423D98920.root',
30  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/046760F2-0CA6-DD11-B377-000423D94A20.root',
31  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/04766D63-5CA6-DD11-B07D-000423D98834.root',
32  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/047C6309-29A6-DD11-AC8E-000423D6B42C.root',
33  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/04861900-22A6-DD11-90DA-000423D944F8.root',
34  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/04B99356-5AA6-DD11-950F-0030487A3C9A.root',
35  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/06192894-3FA6-DD11-9A2B-000423D990CC.root',
36  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/062D36C0-3CA6-DD11-BB50-001617C3B69C.root',
37  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/066D62D5-56A6-DD11-970B-001617C3B6CC.root',
38  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/0681071B-5DA6-DD11-A9A1-000423D99660.root',
39  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/0684A267-09A6-DD11-B4FA-000423D98B5C.root',
40  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/06AB249F-46A6-DD11-96C1-000423D99CEE.root',
41  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/06BFD55E-1CA6-DD11-AC5A-001D09F2915A.root',
42  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/08003087-DEA5-DD11-A4EE-000423D98B5C.root',
43  '/store/data/Commissioning08/Cosmics/RAW/v1/000/068/021/0866B1DE-FEA5-DD11-8F9F-0030487C6062.root'
44  )
45 )
46 process.maxEvents = cms.untracked.PSet(
47  input = cms.untracked.int32(3000)
48 )
49 
50 
51 process.load("Configuration.EventContent.EventContentCosmics_cff")
52 process.FEVT = cms.OutputModule("PoolOutputModule",
53  process.FEVTEventContent,
54  dataset = cms.untracked.PSet(dataTier = cms.untracked.string('RAW')),
55  fileName = cms.untracked.string("RPCNoise_test.root"),
56  SelectEvents = cms.untracked.PSet(
57  SelectEvents = cms.vstring('noiseEvents')
58  )
59 )
60 process.FEVT.outputCommands.append('keep *_*_*_*')
61 process.FEVT.outputCommands.append('keep FEDRawDataCollection_*_*_*')
62 process.FEVT.outputCommands.append('keep *_muonCSCDigis_*_*')
63 process.FEVT.outputCommands.append('keep *_muonDTDigis_*_*')
64 process.FEVT.outputCommands.append('keep *_muonRPCDigis_*_*')
65 process.FEVT.outputCommands.append('keep *_rpcRecHits_*_*')
66 
67 
68 #============================================================
69 # the filter
70 #============================================================
71 process.check = cms.EDFilter(
72  "RPCNoise",
73  fillHistograms = cms.untracked.bool(True),
74  histogramFileName = cms.untracked.string('histos_test.root'),
75  nRPCHitsCut = cms.untracked.int32(40),
76  nCSCWiresCut = cms.untracked.int32(10),
77  nCSCStripsCut = cms.untracked.int32(50),
78  nDTDigisCut = cms.untracked.int32(40)
79 )
80 
81 #process.noiseEvents = cms.Path(process.muonCSCDigis *
82 # process.muonRPCDigis *
83 # process.rpcRecHits *
84 # process.check)
85 
86 
87 process.muondigis = cms.Sequence(process.csctfDigis+process.dttfDigis+process.gctDigis+process.gtDigis+
88  process.gtEvmDigis+
89  process.muonCSCDigis+process.muonDTDigis+process.muonRPCDigis)
90 
91 process.noiseEvents = cms.Path(process.muondigis *
92  process.muonlocalreco *
93  process.check)
94 
95 process.outpath = cms.EndPath(process.FEVT)