Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-24 01:11:14

0001 # Auto generated configuration file
0002 # using: 
0003 # Revision: 1.381.2.28 
0004 # Source: /local/reps/CMSSW/CMSSW/Configuration/PyReleaseValidation/python/ConfigBuilder.py,v 
0005 # with command line options: step4 --data --conditions auto:com10 --scenario pp -s ALCAHARVEST:SiStripGains --filein file:PromptCalibProdSiStripGains.root -n -1 --no_exec
0006 import FWCore.ParameterSet.Config as cms
0007 from FWCore.ParameterSet.VarParsing import VarParsing
0008 
0009 options = VarParsing("analysis")
0010 options.register("globalTag", "auto:run3_data_express", VarParsing.multiplicity.singleton, VarParsing.varType.string, "Global tag (express, to check the homogeneity of the calibration range)")
0011 options.register("outputDbFile", "sqlite_file:promptCalibConditions.db", VarParsing.multiplicity.singleton, VarParsing.varType.string, "Connection string of output database")
0012 options.register("fitMethod", "Legacy", VarParsing.multiplicity.singleton, VarParsing.varType.string, "Fit strategy (Legacy, DDRng, DDRngAllConv, or DDRngConvExceptTOBL5L6")
0013 options.register("DQMOutput", False, VarParsing.multiplicity.singleton, VarParsing.varType.bool, "Produce DQM output")
0014 options.parseArguments()
0015 
0016 process = cms.Process('ALCAHARVEST')
0017 
0018 # import of standard configurations
0019 process.load('Configuration.StandardSequences.Services_cff')
0020 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0021 process.load('FWCore.MessageService.MessageLogger_cfi')
0022 process.load('Configuration.EventContent.EventContent_cff')
0023 process.load('Configuration.StandardSequences.AlCaHarvesting_cff')
0024 process.load('Configuration.Geometry.GeometryRecoDB_cff')
0025 process.load('Configuration.StandardSequences.MagneticField_cff')
0026 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0027 
0028 process.maxEvents = cms.untracked.PSet(
0029     input = cms.untracked.int32(-1)
0030 )
0031 
0032 # Input source
0033 process.source = cms.Source("PoolSource",
0034     secondaryFileNames = cms.untracked.vstring(),
0035     fileNames = cms.untracked.vstring(options.inputFiles),
0036     processingMode = cms.untracked.string('RunsAndLumis')
0037 )
0038 
0039 
0040 process.options = cms.untracked.PSet(
0041     Rethrow = cms.untracked.vstring('ProductNotFound'),
0042     fileMode = cms.untracked.string('FULLMERGE')
0043 )
0044 
0045 # Production Info
0046 process.configurationMetadata = cms.untracked.PSet(
0047     version = cms.untracked.string('$Revision: 1.381.2.28 $'),
0048     annotation = cms.untracked.string('step4 nevts:-1'),
0049     name = cms.untracked.string('PyReleaseValidation')
0050 )
0051 
0052 # Output definition
0053 process.load("Configuration.StandardSequences.DQMSaverAtJobEnd_cff") ## multi-run
0054 
0055 ## temporary workaround
0056 process.load("FWCore.Services.InitRootHandlers_cfi")
0057 process.InitRootHandlers.ResetRootErrHandler = cms.untracked.bool(False)
0058 
0059 # Additional output definition
0060 
0061 # Other statements
0062 process.PoolDBOutputService.toPut.append(process.ALCAHARVESTSiStripGains_dbOutput)
0063 process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVESTSiStripGains_metadata)
0064 from Configuration.AlCa.GlobalTag import GlobalTag
0065 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0066 
0067 process.PoolDBOutputService.connect = cms.string(options.outputDbFile)
0068 
0069 # Path and EndPath definitions
0070 process.ALCAHARVESTDQMSaveAndMetadataWriter = cms.Path(process.dqmSaver+process.pclMetadataWriter)
0071 process.SiStripGains = cms.Path(process.ALCAHARVESTSiStripGains)
0072 
0073 process.dqmSaver.saveAtJobEnd = cms.untracked.bool(options.DQMOutput)
0074 
0075 if options.outputFile:
0076     process.alcaSiStripGainsHarvester.StoreGainsTree = cms.untracked.bool(True)
0077     process.TFileService = cms.Service("TFileService", fileName = cms.string(options.outputFile))
0078 
0079 process.alcaSiStripGainsHarvester.GoodFracForTagProd = cms.untracked.double(.95)
0080 process.alcaSiStripGainsHarvester.NClustersForTagProd = cms.untracked.double(2.e8)
0081 if options.fitMethod == "Legacy":
0082     process.alcaSiStripGainsHarvester.FitDataDrivenRange = cms.untracked.bool(False)
0083     process.alcaSiStripGainsHarvester.FitGaussianConvolution = cms.untracked.bool(False)
0084     process.alcaSiStripGainsHarvester.FitGaussianConvolutionTOBL5L6 = cms.untracked.bool(False)
0085 elif options.fitMethod == "DDRng":
0086     process.alcaSiStripGainsHarvester.FitDataDrivenRange = cms.untracked.bool(True)
0087     process.alcaSiStripGainsHarvester.FitGaussianConvolution = cms.untracked.bool(False)
0088     process.alcaSiStripGainsHarvester.FitGaussianConvolutionTOBL5L6 = cms.untracked.bool(False)
0089 elif options.fitMethod == "DDRngAllConv":
0090     process.alcaSiStripGainsHarvester.FitDataDrivenRange = cms.untracked.bool(True)
0091     process.alcaSiStripGainsHarvester.FitGaussianConvolution = cms.untracked.bool(True)
0092     process.alcaSiStripGainsHarvester.FitGaussianConvolutionTOBL5L6 = cms.untracked.bool(True)
0093 elif options.fitMethod == "DDRngConvExceptTOBL5L6":
0094     process.alcaSiStripGainsHarvester.FitDataDrivenRange = cms.untracked.bool(True)
0095     process.alcaSiStripGainsHarvester.FitGaussianConvolution = cms.untracked.bool(True)
0096     process.alcaSiStripGainsHarvester.FitGaussianConvolutionTOBL5L6 = cms.untracked.bool(False)
0097 else:
0098     raise RuntimeError("Unknown fit method: {0}".format(options.fitMethod))
0099 
0100 # Schedule definition
0101 process.schedule = cms.Schedule(process.SiStripGains,
0102                                 process.ALCAHARVESTDQMSaveAndMetadataWriter)
0103 
0104 #process.alcaSiStripGainsHarvester.calibrationMode = cms.untracked.string("IsoBunch")