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.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.FrontierConditions_GlobalTag_cff")
21 from Configuration.AlCa.autoCond import autoCond
22 process.GlobalTag.globaltag=autoCond['run3_data']
23 process.load("Configuration.StandardSequences.GeometryDB_cff")
24 process.load("Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff")
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 
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)