Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:41

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process('CTPPS')
0004 
0005 from RecoPPS.Local.PPSTimingCalibrationModeEnum_cff import PPSTimingCalibrationModeEnum
0006 calibrationMode = PPSTimingCalibrationModeEnum.CondDB
0007 
0008 # import of standard configurations
0009 process.load('Configuration.StandardSequences.Services_cff')
0010 process.load('FWCore.MessageService.MessageLogger_cfi')
0011 process.load('Configuration.EventContent.EventContent_cff')
0012 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0013 
0014 from Configuration.AlCa.GlobalTag import GlobalTag
0015 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_hlt_relval', '')
0016 
0017 if calibrationMode == PPSTimingCalibrationModeEnum.JSON:
0018     process.load('CondFormats.PPSObjects.ppsTimingCalibrationESSource_cfi')
0019     process.ppsTimingCalibrationESSource.calibrationFile = cms.FileInPath('RecoPPS/Local/data/timing_offsets_ufsd_2018.dec18.cal.json')
0020 elif calibrationMode == PPSTimingCalibrationModeEnum.SQLite:
0021     # load calibrations from database
0022     process.load('CondCore.CondDB.CondDB_cfi')
0023     process.CondDB.connect = 'sqlite_file:ppsDiamondTiming_calibration.sqlite' # SQLite input
0024     process.PoolDBESSource = cms.ESSource('PoolDBESSource',
0025         process.CondDB,
0026         DumpStats = cms.untracked.bool(True),
0027         toGet = cms.VPSet(
0028             cms.PSet(
0029                 record = cms.string('PPSTimingCalibrationRcd'),
0030                 tag = cms.string('PPSDiamondTimingCalibration')
0031             )
0032         )
0033     )
0034 
0035 # raw data source
0036 #process.source = cms.Source("NewEventStreamFileReader",
0037 #    fileNames = cms.untracked.vstring(
0038 #        '/store/t0streamer/Data/Physics/000/286/591/run286591_ls0521_streamPhysics_StorageManager.dat',
0039 #        '/store/t0streamer/Minidaq/A/000/303/982/run303982_ls0001_streamA_StorageManager.dat',
0040 #    )
0041 #)
0042 process.source = cms.Source('PoolSource',
0043     fileNames = cms.untracked.vstring(
0044 #        '/store/data/Run2017E/ZeroBias/RAW/v1/000/304/447/00000/001C958C-7FA9-E711-858F-02163E011A5F.root',
0045 #        '/store/data/Commissioning2018/ZeroBias/RAW/v1/000/314/816/00000/FCDB2DE6-4845-E811-91A1-FA163E6CD0D3.root',
0046         '/store/data/Run2018C/DoubleMuon/RAW/v1/000/319/525/00000/CE9C5CAC-AD85-E811-852B-FA163E26680F.root',
0047     ),
0048 )
0049 
0050 process.maxEvents = cms.untracked.PSet(
0051     input = cms.untracked.int32(-1)
0052 )
0053 process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32( 1000 )
0054 
0055 # raw-to-digi conversion
0056 process.load("EventFilter.CTPPSRawToDigi.ctppsRawToDigi_cff")
0057 
0058 # local RP reconstruction chain with standard settings
0059 process.load("RecoPPS.Configuration.recoCTPPS_cff")
0060 
0061 # rechits production
0062 process.load('Geometry.VeryForwardGeometry.geometryRPFromDD_2018_cfi')
0063 process.load('RecoPPS.Local.ctppsDiamondRecHits_cfi')
0064 
0065 # local tracks fitter
0066 process.load('RecoPPS.Local.ctppsDiamondLocalTracks_cfi')
0067 
0068 process.output = cms.OutputModule("PoolOutputModule",
0069     fileName = cms.untracked.string("file:AOD.root"),
0070     outputCommands = cms.untracked.vstring(
0071         'drop *',
0072         'keep *_ctpps*_*_*',
0073     ),
0074 )
0075 
0076 # execution configuration
0077 process.p = cms.Path(
0078     process.ctppsDiamondRawToDigi *
0079     process.ctppsDiamondLocalReconstruction
0080 )
0081 
0082 process.outpath = cms.EndPath(process.output)
0083