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("DiamondSampic")
0004 
0005 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10000) )
0006 
0007 process.source = cms.Source("EmptySource")
0008 
0009 process.load('RecoPPS.Local.totemTimingLocalReconstruction_cff')
0010 
0011 # import of standard configurations
0012 process.load('Configuration.StandardSequences.Services_cff')
0013 process.load('FWCore.MessageService.MessageLogger_cfi')
0014 process.load('Configuration.EventContent.EventContent_cff')
0015 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0016 
0017 from Configuration.AlCa.GlobalTag import GlobalTag
0018 process.GlobalTag = GlobalTag(process.GlobalTag, '113X_dataRun3_Prompt_Candidate_2021_08_24_17_11_47')
0019 
0020 ################
0021 #digi converter
0022 ################
0023 process.totemTimingRawToDigi = cms.EDProducer('DiamondSampicDigiProducer',
0024     #input path of the testbeam data
0025     sampicFilesVec=cms.vstring("/eos/cms/store/group/dpg_ctpps/comm_ctpps/201905_DesyTestbeam/MergedDev/Ntuple_runsampic_159_runtelescope_636.root"),
0026     ################
0027     #channel mapping
0028     ################
0029     idsMapping = cms.VPSet(
0030         cms.PSet(detId = cms.vuint32(2054160384,2054553600,2056257536,2056650752), treeChId = cms.uint32(8)),
0031         cms.PSet(detId = cms.vuint32(2054164480,2054557696,2056261632,2056654848), treeChId = cms.uint32(9)),
0032         cms.PSet(detId = cms.vuint32(2054168576,2054561792,2056265728,2056658944), treeChId = cms.uint32(10)),
0033         cms.PSet(detId = cms.vuint32(2054172672,2054565888,2056269824,2056663040), treeChId = cms.uint32(11)),
0034         cms.PSet(detId = cms.vuint32(2054176768,2054569984,2056273920,2056667136), treeChId = cms.uint32(12)),
0035         cms.PSet(detId = cms.vuint32(2054180864,2054574080,2056278016,2056671232), treeChId = cms.uint32(13)),
0036         cms.PSet(detId = cms.vuint32(2054184960,2054578176,2056282112,2056675328), treeChId = cms.uint32(14)),
0037         cms.PSet(detId = cms.vuint32(2054189056,2054582272,2056286208,2056679424), treeChId = cms.uint32(15)),
0038         cms.PSet(detId = cms.vuint32(2054193152,2054586368,2056290304,2056683520), treeChId = cms.uint32(16)),
0039         cms.PSet(detId = cms.vuint32(2054197248,2054590464,2056294400,2056687616), treeChId = cms.uint32(17)),
0040         cms.PSet(detId = cms.vuint32(2054201344,2054594560,2056298496,2056691712), treeChId = cms.uint32(18)),
0041         cms.PSet(detId = cms.vuint32(2054205440,2054598656,2056302592,2056695808), treeChId = cms.uint32(19)),
0042 
0043         cms.PSet(detId = cms.vuint32(2054291456,2054422528,2056388608,2056519680), treeChId = cms.uint32(20)),
0044         cms.PSet(detId = cms.vuint32(2054295552,2054426624,2056392704,2056523776), treeChId = cms.uint32(21)),
0045         cms.PSet(detId = cms.vuint32(2054299648,2054430720,2056396800,2056527872), treeChId = cms.uint32(22)),
0046         cms.PSet(detId = cms.vuint32(2054303744,2054434816,2056400896,2056531968), treeChId = cms.uint32(23)),
0047         cms.PSet(detId = cms.vuint32(2054307840,2054438912,2056404992,2056536064), treeChId = cms.uint32(24)),
0048         cms.PSet(detId = cms.vuint32(2054311936,2054443008,2056409088,2056540160), treeChId = cms.uint32(25)),
0049         cms.PSet(detId = cms.vuint32(2054316032,2054447104,2056413184,2056544256), treeChId = cms.uint32(26)),
0050         cms.PSet(detId = cms.vuint32(2054320128,2054451200,2056417280,2056548352), treeChId = cms.uint32(27)),
0051         cms.PSet(detId = cms.vuint32(2054324224,2054455296,2056421376,2056552448), treeChId = cms.uint32(28)),
0052         cms.PSet(detId = cms.vuint32(2054328320,2054459392,2056425472,2056556544), treeChId = cms.uint32(29)),
0053         cms.PSet(detId = cms.vuint32(2054332416,2054463488,2056429568,2056560640), treeChId = cms.uint32(30)),
0054         cms.PSet(detId = cms.vuint32(2054336512,2054467584,2056433664,2056564736), treeChId = cms.uint32(31))
0055 
0056     )
0057 )
0058 
0059 ################
0060 #geometry
0061 ################
0062 process.load('Geometry.VeryForwardGeometry.geometryRPFromDD_2021_cfi')
0063 
0064 ################
0065 #calib
0066 ################
0067  
0068 #load calibrations from json    
0069 #process.totemTimingRecHits.timingCalibrationTag= cms.string('ppsTimingCalibrationESSource:TotemTimingCalibration')
0070 #process.ppsTimingCalibrationESSource = cms.ESSource('PPSTimingCalibrationESSource',
0071 #  calibrationFile = cms.FileInPath('RecoPPS/Local/data/1plane_2.json'),#calibration file does not yet exist in db
0072 #  subDetector = cms.uint32(1),
0073 #  appendToDataLabel = cms.string('TotemTimingCalibration')
0074 #)
0075 
0076 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0077 process.diamondSampicDQMSource = DQMEDAnalyzer('DiamondSampicDQMSource',
0078     tagDigi = cms.InputTag("totemTimingRawToDigi", "TotemTiming"),
0079     tagFEDInfo = cms.InputTag("totemTimingRawToDigi", "TotemTiming"),
0080     tagRecHits = cms.InputTag("totemTimingRecHits"),
0081     tagTracks = cms.InputTag("diamondSampicLocalTracks"),
0082     tagLocalTrack = cms.InputTag("totemRPLocalTrackFitter"),
0083 
0084     minimumStripAngleForTomography = cms.double(0),
0085     maximumStripAngleForTomography = cms.double(1),
0086     samplesForNoise = cms.untracked.uint32(6),
0087 
0088     verbosity = cms.untracked.uint32(10),
0089     plotOnline=cms.untracked.bool(False)
0090 )
0091 # load DQM framework
0092 process.load("DQM.Integration.config.environment_cfi")
0093 process.dqmEnv.subSystemFolder = "CTPPS"
0094 process.dqmEnv.eventInfoFolder = "EventInfo"
0095 process.dqmSaver.path = ""
0096 process.dqmSaver.tag = "CTPPS"
0097 
0098 
0099 process.totemTimingRecHits.mergeTimePeaks= cms.bool(False)
0100 
0101 #process.load('CondCore.CondDB.CondDB_cfi')
0102 #process.CondDB.connect = 'sqlite_file:ppsDiamondSampicTiming_calibration.sqlite' # SQLite input
0103 #process.PoolDBESSource = cms.ESSource('PoolDBESSource',
0104 #        process.CondDB,
0105 #        DumpStats = cms.untracked.bool(True),
0106 #        toGet = cms.VPSet(
0107 #            cms.PSet(
0108 #                record = cms.string('PPSTimingCalibrationRcd'),
0109 #                tag = cms.string('DiamondSampicCalibration')
0110 #            )
0111 #        )
0112 #    )
0113 process.totemTimingRecHits.timingCalibrationTag= cms.string('GlobalTag:DiamondSampicCalibration')
0114 
0115 process.out = cms.OutputModule("PoolOutputModule",
0116     fileName = cms.untracked.string('file:diamondSampicReco.root')
0117     
0118 )
0119 
0120 process.p = cms.Path(process.totemTimingRawToDigi*
0121     process.diamondSampicLocalReconstruction*
0122     process.diamondSampicDQMSource
0123 )
0124 
0125 process.outpath = cms.EndPath(process.out* process.dqmEnv *
0126     process.dqmSaver)
0127 
0128