Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-06 06:06:23

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 ###################################################################
0004 # Set default phase-2 settings
0005 ###################################################################
0006 import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
0007 _PH2_GLOBAL_TAG, _PH2_ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION)
0008 
0009 process = cms.Process("ICALIB", _PH2_ERA)
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011 
0012 options = VarParsing.VarParsing('analysis')
0013 options.register('algorithm',
0014                  2, # default value
0015                  VarParsing.VarParsing.multiplicity.singleton,
0016                  VarParsing.VarParsing.varType.int,
0017                  "Algorithm to populate output sqlite file")
0018 options.parseArguments()
0019 
0020 process.load("Configuration.StandardSequences.Services_cff")
0021 process.RandomNumberGeneratorService.prod = cms.PSet(
0022     initialSeed = cms.untracked.uint32(789341),
0023     engineName = cms.untracked.string('TRandom3')
0024 )
0025 
0026 ## specify the default phase2 detector
0027 process.load("Configuration.Geometry.GeometryExtendedRun4Default_cff")
0028 process.load('Configuration.Geometry.GeometryExtendedRun4DefaultReco_cff')
0029 
0030 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0031 from Configuration.AlCa.GlobalTag import GlobalTag
0032 process.GlobalTag = GlobalTag(process.GlobalTag, _PH2_GLOBAL_TAG, '')
0033 
0034 ###################################################################
0035 # Messages
0036 ###################################################################
0037 process.load('FWCore.MessageService.MessageLogger_cfi')
0038 process.MessageLogger.cerr.enable = False
0039 process.MessageLogger.SiPhase2BadStripChannelBuilder=dict()
0040 process.MessageLogger.SiStripBadStrip=dict()
0041 process.MessageLogger.cout = cms.untracked.PSet(
0042     enable    = cms.untracked.bool(True),
0043     enableStatistics = cms.untracked.bool(True),
0044     threshold = cms.untracked.string("INFO"),
0045     default   = cms.untracked.PSet(limit = cms.untracked.int32(0)),
0046     FwkReport = cms.untracked.PSet(limit = cms.untracked.int32(-1),
0047                                    reportEvery = cms.untracked.int32(1000)
0048                                    ),
0049     SiPhase2BadStripChannelBuilder = cms.untracked.PSet( limit = cms.untracked.int32(-1)),
0050     SiStripBadStrip = cms.untracked.PSet( limit = cms.untracked.int32(-1)),
0051 )
0052 
0053 process.source = cms.Source("EmptyIOVSource",
0054     lastValue = cms.uint64(1),
0055     timetype = cms.string('runnumber'),
0056     firstValue = cms.uint64(1),
0057     interval = cms.uint64(1)
0058 )
0059 
0060 process.maxEvents = cms.untracked.PSet(
0061     input = cms.untracked.int32(1)
0062 )
0063 
0064 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0065     BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0066     DBParameters = cms.PSet(
0067         authenticationPath = cms.untracked.string('')
0068     ),
0069     timetype = cms.untracked.string('runnumber'),
0070     connect = cms.string('sqlite_file:SiStripBadStripPhase2_T33_v0.db'),
0071     toPut = cms.VPSet(cms.PSet(
0072         record = cms.string('SiStripBadStripRcd'),
0073         tag = cms.string('SiStripBadStripPhase2_T33')
0074     ))
0075 )
0076 
0077 process.prod = cms.EDAnalyzer("SiPhase2BadStripChannelBuilder",                    
0078                               Record = cms.string('SiStripBadStripRcd'),
0079                               SinceAppendMode = cms.bool(True),
0080                               IOVMode = cms.string('Run'),
0081                               printDebug = cms.untracked.bool(False),
0082                               doStoreOnDB = cms.bool(True),
0083                               #popConAlgo = cms.uint32(1), #NAIVE
0084                               #popConAlgo = cms.uint32(2), #RANDOM
0085                               popConAlgo = cms.uint32(options.algorithm), 
0086                               badComponentsFraction = cms.double(0.01)  #1% of bad strips
0087                               #badComponentsFraction = cms.double(0.05)  #5% of bad strips
0088                               #badComponentsFraction = cms.double(0.1)   #10% of bad strips
0089                               )
0090 
0091 #process.print = cms.OutputModule("AsciiOutputModule")
0092 
0093 process.p = cms.Path(process.prod)
0094 #process.ep = cms.EndPath(process.print)