CMS 3D CMS Logo

dtT0WireCalibration_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from Configuration.StandardSequences.Eras import eras
3 
4 process = cms.Process("PROD",eras.Run3)
5 
6 process.load("FWCore.MessageService.MessageLogger_cfi")
7 process.MessageLogger.debugModules = cms.untracked.vstring('*')
8 process.MessageLogger.resolution=dict()
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.FrontierConditions_GlobalTag_cff")
22 from Configuration.AlCa.autoCond import autoCond
23 process.GlobalTag.globaltag=autoCond['run3_data']
24 process.load("Configuration.StandardSequences.GeometryDB_cff")
25 process.load("Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff")
26 
27 process.load("CondCore.CondDB.CondDB_cfi")
28 
29 process.load("DQMServices.Core.DQM_cfg")
30 
31 process.source = cms.Source("PoolSource",
32  fileNames = cms.untracked.vstring(
33  '/store/data/Commissioning2018/MiniDaq/RAW/v1/000/312/774/00000/CCADE144-9431-E811-9641-FA163E220C5C.root'
34 # '/store/data/Run2012C/MiniDaq/RAW/v1/000/203/540/AA9053D9-F306-E211-80A4-001D09F248F8.root',
35  #'/store/data/Run2012C/MiniDaq/RAW/v1/000/199/204/148CF2AC-CAD0-E111-A056-001D09F291D2.root',
36 
46  )
47 )
48 
49 process.maxEvents = cms.untracked.PSet(
50  input = cms.untracked.int32(-1)
51 )
52 
53 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
54 
55 # process.load("CalibMuon.DTCalibration.dt_offlineAnalysis_common_cff")
56 
57 import EventFilter.DTRawToDigi.dturosunpacker_cfi
58 process.dtunpacker = EventFilter.DTRawToDigi.dturosunpacker_cfi.dturosunpacker.clone()
59 
60 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
61  process.CondDB,
62  timetype = cms.untracked.string('runnumber'),
63  toPut = cms.VPSet(cms.PSet(
64  record = cms.string('DTT0Rcd'),
65  tag = cms.string('t0')
66  ))
67 )
68 process.PoolDBOutputService.connect = cms.string('sqlite_file:t0.db')
69 
70 process.eventInfoProvider = cms.EDFilter("EventCoordinatesSource",
71  eventInfoFolder = cms.untracked.string('EventInfo/')
72 )
73 
74 
75 # test pulse monitoring
76 process.load("DQM.DTMonitorModule.dtDigiTask_TP_cfi")
77 process.load("DQM.DTMonitorClient.dtOccupancyTest_TP_cfi")
78 process.dtTPmonitor.readDB = False
79 process.dtTPmonitor.defaultTtrig = 600
80 process.dtTPmonitor.defaultTmax = 100
81 process.dtTPmonitor.inTimeHitsLowerBound = 0
82 process.dtTPmonitor.inTimeHitsUpperBound = 0
83 #file = open("tpDead.txt")
84 wiresToDebug = cms.untracked.vstring()
85 #for line in file:
86 # corrWire = line.split()[:6]
87 # #switch station/sector
88 # corrWire[1:3] = corrWire[2:0:-1]
89 # wire = ' '.join(corrWire)
90 # #print wire
91 # wiresToDebug.append(wire)
92 #file.close()
93 
94 process.dtT0WireCalibration = cms.EDAnalyzer("DTT0Calibration",
95  correctByChamberMean = cms.bool(False),
96  # Cells for which you want the histos (default = None)
97  cellsWithHisto = wiresToDebug,
98  # Label to retrieve DT digis from the event
99  digiLabel = cms.untracked.string('dtunpacker'),
100  calibSector = cms.untracked.string('All'),
101  # Chose the wheel, sector (default = All)
102  calibWheel = cms.untracked.string('All'),
103  # Number of events to be used for the t0 per layer histos
104  eventsForWireT0 = cms.uint32(25000), #25000
105  # Name of the ROOT file which will contain the test pulse times per layer
106  rootFileName = cms.untracked.string('DTTestPulses.root'),
107  debug = cms.untracked.bool(False),
108  rejectDigiFromPeak = cms.uint32(50),
109  # Acceptance for TP peak width
110  tpPeakWidth = cms.double(15.0),
111  # Number of events to be used for the t0 per layer histos
112  eventsForLayerT0 = cms.uint32(5000), #5000
113  timeBoxWidth = cms.uint32(300),
114  tpPeakWidthPerLayer = cms.double(2.0)
115 )
116 
117 process.output = cms.OutputModule("PoolOutputModule",
118  outputCommands = cms.untracked.vstring('drop *',
119  'keep *_MEtoEDMConverter_*_*'),
120  fileName = cms.untracked.string('DQM.root')
121 )
122 
123 process.load("DQMServices.Components.MEtoEDMConverter_cff")
124 #process.DQM.collectorHost = ''
125 
126 process.p = cms.Path(process.dtunpacker*
127  process.dtTPmonitor+process.dtTPmonitorTest+
128  process.dtT0WireCalibration+
129  process.MEtoEDMConverter)
130 process.outpath = cms.EndPath(process.output)