Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-15 22:40:45

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_data', '')
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:totemTiming_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('TotemTimingCalibration')
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/Commissioning2018/ZeroBias/RAW/v1/000/314/816/00000/FCDB2DE6-4845-E811-91A1-FA163E6CD0D3.root',
0045     ),
0046 )
0047 
0048 process.maxEvents = cms.untracked.PSet(
0049     input = cms.untracked.int32(-1)
0050 )
0051 
0052 # raw-to-digi conversion
0053 process.load("EventFilter.CTPPSRawToDigi.ctppsRawToDigi_cff")
0054 
0055 # rechits production
0056 process.load('Geometry.VeryForwardGeometry.geometryRPFromDD_2021_cfi')
0057 process.load('RecoPPS.Local.totemTimingLocalReconstruction_cff')
0058 
0059 process.output = cms.OutputModule("PoolOutputModule",
0060     fileName = cms.untracked.string("file:AOD.root"),
0061     outputCommands = cms.untracked.vstring(
0062         'drop *',
0063         'keep *_totemTiming*_*_*',
0064     ),
0065 )
0066 
0067 # execution configuration
0068 #Diamond Sampic flow
0069 process.p = cms.Path(
0070     process.ctppsRawToDigi*
0071     process.diamondSampicLocalReconstruction
0072 )
0073 
0074 #Legacy UFSD flow
0075 #process.totemTimingRecHits.saturationLimit=cms.double(0.85)
0076 #process.p = cms.Path(
0077 #    process.ctppsRawToDigi*
0078 #    process.totemTimingLocalReconstruction
0079 #)
0080 
0081 process.outpath = cms.EndPath(process.output)