Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:43

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("READ")
0004 
0005 process.load("FWCore.MessageService.MessageLogger_cfi")
0006 process.MessageLogger.cerr.FwkReport.reportEvery = 1000000                            # do not clog output with IO
0007 
0008 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10000000) )       # large number of events is needed since we probe 5000LS for run (see below)
0009 
0010 ####################################################################
0011 # Empty source 
0012 ####################################################################
0013 
0014 process.source = cms.Source("EmptySource",
0015                             firstRun = cms.untracked.uint32(273291),
0016                             firstLuminosityBlock = cms.untracked.uint32(1),           # probe one LS after the other
0017                             numberEventsInLuminosityBlock = cms.untracked.uint32(1),  # probe one event per LS
0018                             numberEventsInRun = cms.untracked.uint32(5000),           # a number of events > the number of LS possible in a real run (5000 s ~ 32 h)
0019                             )
0020 
0021 ####################################################################
0022 # Connect to conditions DB
0023 ####################################################################
0024 
0025 # either from Global Tag
0026 # process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cfi")
0027 # from Configuration.AlCa.GlobalTag import GlobalTag
0028 # process.GlobalTag = GlobalTag(process.GlobalTag,"auto:run2_data")
0029 
0030 # ...or specify database connection and tag:  
0031 from CondCore.CondDB.CondDB_cfi import *
0032 CondDBBeamSpotObjects = CondDB.clone(connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'))
0033 process.dbInput = cms.ESSource("PoolDBESSource",
0034                                CondDBBeamSpotObjects,
0035                                toGet = cms.VPSet(cms.PSet(record = cms.string('BeamSpotObjectsRcd'),
0036                                                           tag = cms.string('BeamSpotObjects_PCL_byLumi_v0_prompt') #choose your own favourite
0037                                                           )
0038                                                  )
0039                                )
0040 
0041 ####################################################################
0042 # Load and configure analyzer
0043 ####################################################################
0044 process.load("CondTools.BeamSpot.BeamSpotRcdRead_cfi")
0045 process.BeamSpotRead.rawFileName = 'reference_prompt_BeamSpotObjects_PCL_byLumi_v0_prompt.txt'
0046 
0047 ####################################################################
0048 # Output file
0049 ####################################################################
0050 process.TFileService = cms.Service("TFileService",
0051                                    fileName=cms.string("reference_prompt_BeamSpotObjects_2016_LumiBased_v0_offline.root")
0052                                    ) 
0053 
0054 # Put module in path:
0055 process.p = cms.Path(process.BeamSpotRead)