CMS 3D CMS Logo

dtT0WireCalibration_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 process = cms.Process("PROD")
4 
5 process.load("FWCore.MessageService.MessageLogger_cfi")
6 process.MessageLogger.debugModules = cms.untracked.vstring('*')
7 process.MessageLogger.destinations = cms.untracked.vstring('cerr')
8 process.MessageLogger.categories.append('resolution')
9 process.MessageLogger.cerr = cms.untracked.PSet(
10  FwkReport = cms.untracked.PSet(
11  limit = cms.untracked.int32(100),
12  reportEvery = cms.untracked.int32(1000)
13  ),
14  threshold = cms.untracked.string('DEBUG'),
15  noLineBreaks = cms.untracked.bool(False),
16  DEBUG = cms.untracked.PSet(limit = cms.untracked.int32(0)),
17  INFO = cms.untracked.PSet(limit = cms.untracked.int32(0)),
18  resolution = cms.untracked.PSet(limit = cms.untracked.int32(-1))
19 )
20 
21 process.load("Configuration.StandardSequences.GeometryDB_cff")
22 process.load("Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff")
23 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff")
24 process.GlobalTag.globaltag = ""
25 
26 process.load("CondCore.CondDB.CondDB_cfi")
27 
28 process.load("DQMServices.Core.DQM_cfg")
29 
30 process.source = cms.Source("PoolSource",
31  fileNames = cms.untracked.vstring(
32  '/store/data/Commissioning2018/MiniDaq/RAW/v1/000/312/774/00000/CCADE144-9431-E811-9641-FA163E220C5C.root'
33 # '/store/data/Run2012C/MiniDaq/RAW/v1/000/203/540/AA9053D9-F306-E211-80A4-001D09F248F8.root',
34  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/199/204/148CF2AC-CAD0-E111-A056-001D09F291D2.root',
35 ### '/store/data/Run2012C/MiniDaq/RAW/v1/000/200/132/D0E088D3-D7DC-E111-92D2-00237DDC5C24.root',
36  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/198/510/0C50021A-F4C8-E111-B861-001D09F2512C.root',
37  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/199/206/EC54DD2C-D3D0-E111-9019-5404A63886CE.root',
38  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/200/131/E024E67D-D6DC-E111-A404-0025901D6288.root',
39  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/201/074/92295641-C3E7-E111-899B-0025901D629C.root',
40  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/200/133/ACB373F1-D9DC-E111-B891-003048F024FE.root',
41  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/203/276/2CF5C87C-E303-E211-A314-001D09F28F25.root',
42  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/203/535/1EEFEF95-F506-E211-A872-001D09F2906A.root',
43  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/200/665/1C75364F-0EE3-E111-8021-BCAEC5329705.root',
44  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/200/716/8A0AC842-A3E3-E111-A669-001D09F291D7.root'
45  )
46 )
47 
48 process.maxEvents = cms.untracked.PSet(
49  input = cms.untracked.int32(-1)
50 )
51 
52 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
53 
54 # process.load("CalibMuon.DTCalibration.dt_offlineAnalysis_common_cff")
55 
56 import EventFilter.DTRawToDigi.dturosunpacker_cfi
57 process.dtunpacker = EventFilter.DTRawToDigi.dturosunpacker_cfi.dturosunpacker.clone()
58 
59 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
60  process.CondDB,
61  timetype = cms.untracked.string('runnumber'),
62  toPut = cms.VPSet(cms.PSet(
63  record = cms.string('DTT0Rcd'),
64  tag = cms.string('t0')
65  ))
66 )
67 process.PoolDBOutputService.connect = cms.string('sqlite_file:t0.db')
68 
69 process.eventInfoProvider = cms.EDFilter("EventCoordinatesSource",
70  eventInfoFolder = cms.untracked.string('EventInfo/')
71 )
72 
73 
74 # test pulse monitoring
75 process.load("DQM.DTMonitorModule.dtDigiTask_TP_cfi")
76 process.load("DQM.DTMonitorClient.dtOccupancyTest_TP_cfi")
77 process.dtTPmonitor.readDB = False
78 process.dtTPmonitor.defaultTtrig = 600
79 process.dtTPmonitor.defaultTmax = 100
80 process.dtTPmonitor.inTimeHitsLowerBound = 0
81 process.dtTPmonitor.inTimeHitsUpperBound = 0
82 #file = open("tpDead.txt")
83 wiresToDebug = cms.untracked.vstring()
84 #for line in file:
85 # corrWire = line.split()[:6]
86 # #switch station/sector
87 # corrWire[1:3] = corrWire[2:0:-1]
88 # wire = ' '.join(corrWire)
89 # #print wire
90 # wiresToDebug.append(wire)
91 #file.close()
92 
93 process.dtT0WireCalibration = cms.EDAnalyzer("DTT0Calibration",
94  correctByChamberMean = cms.bool(False),
95  # Cells for which you want the histos (default = None)
96  cellsWithHisto = wiresToDebug,
97  # Label to retrieve DT digis from the event
98  digiLabel = cms.untracked.string('dtunpacker'),
99  calibSector = cms.untracked.string('All'),
100  # Chose the wheel, sector (default = All)
101  calibWheel = cms.untracked.string('All'),
102  # Number of events to be used for the t0 per layer histos
103  eventsForWireT0 = cms.uint32(25000), #25000
104  # Name of the ROOT file which will contain the test pulse times per layer
105  rootFileName = cms.untracked.string('DTTestPulses.root'),
106  debug = cms.untracked.bool(False),
107  rejectDigiFromPeak = cms.uint32(50),
108  # Acceptance for TP peak width
109  tpPeakWidth = cms.double(15.0),
110  # Number of events to be used for the t0 per layer histos
111  eventsForLayerT0 = cms.uint32(5000), #5000
112  timeBoxWidth = cms.uint32(300),
113  tpPeakWidthPerLayer = cms.double(2.0)
114 )
115 
116 process.output = cms.OutputModule("PoolOutputModule",
117  outputCommands = cms.untracked.vstring('drop *',
118  'keep *_MEtoEDMConverter_*_*'),
119  fileName = cms.untracked.string('DQM.root')
120 )
121 
122 process.load("DQMServices.Components.MEtoEDMConverter_cff")
123 #process.DQM.collectorHost = ''
124 
125 process.p = cms.Path(process.dtunpacker*
126  process.dtTPmonitor+process.dtTPmonitorTest+
127  process.dtT0WireCalibration+
128  process.MEtoEDMConverter)
129 process.outpath = cms.EndPath(process.output)