Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-13 01:32:32

0001 
0002 import sys
0003 import os
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 from electronValidationCheck_Env import env
0007 cmsEnv = env() # be careful, cmsEnv != cmsenv. cmsEnv is local
0008 
0009 cmsEnv.checkSample() # check the sample value
0010 cmsEnv.checkValues()
0011 
0012 if cmsEnv.beginTag() == 'Run2_2017':
0013     from Configuration.Eras.Era_Run2_2017_cff import Run2_2017
0014     process = cms.Process("electronPostValidation",Run2_2017)
0015 elif cmsEnv.beginTag() == 'Run3':
0016     from Configuration.Eras.Era_Run3_cff import Run3
0017     process = cms.Process('electronPostValidation', Run3) 
0018 else:
0019     from Configuration.Eras.Era_Phase2_cff import Phase2
0020     process = cms.Process('electronPostValidation',Phase2)
0021 
0022 process.DQMStore = cms.Service("DQMStore")
0023 process.load("Validation.RecoEgamma.ElectronMcSignalPostValidator_cfi")
0024 process.load("DQMServices.Components.DQMStoreStats_cfi")
0025 process.load('Configuration.StandardSequences.Services_cff')
0026 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0027 # load DQM
0028 process.load("DQMServices.Core.DQM_cfg")
0029 process.load("DQMServices.Components.DQMEnvironment_cfi")
0030 process.load("Configuration.StandardSequences.EDMtoMEAtJobEnd_cff")
0031 # import DQMStore service
0032 process.load('DQMOffline.Configuration.DQMOffline_cff')
0033 
0034 # actually read in the DQM root file
0035 process.load("DQMServices.Components.DQMFileReader_cfi")
0036 
0037 # others
0038 # import of standard configurations
0039 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0040 process.load('FWCore.MessageService.MessageLogger_cfi')
0041 process.load('Configuration.EventContent.EventContent_cff')
0042 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0043 process.load('Configuration.Geometry.GeometryExtended2026D76Reco_cff')
0044 process.load('Configuration.StandardSequences.MagneticField_cff')
0045 process.load('Configuration.StandardSequences.DQMSaverAtRunEnd_cff')
0046 process.load('Configuration.StandardSequences.Harvesting_cff')
0047 
0048 from DQMServices.Components.DQMStoreStats_cfi import *
0049 dqmStoreStats.runOnEndJob = cms.untracked.bool(True)
0050 
0051 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
0052 
0053 localFileInput = os.environ['inputPostFile']#.replace(".root", "_a.root") #
0054 # Source
0055 process.source = cms.Source ("PoolSource",fileNames = cms.untracked.vstring("file:" + localFileInput),
0056 secondaryFileNames = cms.untracked.vstring(),)
0057 
0058 process.electronMcSignalPostValidator.InputFolderName = cms.string("EgammaV/ElectronMcSignalValidator")
0059 process.electronMcSignalPostValidator.OutputFolderName = cms.string("EgammaV/ElectronMcSignalValidator")
0060 
0061 from Configuration.AlCa.autoCond import autoCond
0062 #process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All'
0063 process.GlobalTag.globaltag = '123X_mcRun3_2021_realistic_v14'
0064 #process.GlobalTag.globaltag = '93X_mc2017_realistic_v1'
0065 #process.GlobalTag.globaltag = '92X_upgrade2017_realistic_v10'
0066 
0067 rel = os.environ['DD_SAMPLE']
0068 part1 = os.environ['CMSSW_VERSION']
0069 part2 = 'CMSSW_' + os.environ['TEST_GLOBAL_TAG']
0070 process.dqmSaver.workflow = '/' + rel + '/' + part1 + '-' + part2 + '/RECO'
0071 process.dqmsave_step = cms.Path(process.DQMSaver)
0072 
0073 process.p = cms.Path(process.EDMtoME * process.electronMcSignalPostValidator * process.dqmStoreStats)
0074 
0075 # Schedule
0076 process.schedule = cms.Schedule(
0077                                 process.p,
0078                                 process.dqmsave_step,
0079 )