CMS 3D CMS Logo

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