Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-16 05:48:35

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.options = cms.untracked.PSet( )
0023 
0024 process.DQMStore = cms.Service("DQMStore")
0025 process.load("Validation.RecoEgamma.ElectronMcSignalPostValidatorMiniAOD_cfi")
0026 process.load("DQMServices.Components.DQMStoreStats_cfi")
0027 process.load('Configuration.StandardSequences.Services_cff')
0028 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0029 # load DQM
0030 process.load("DQMServices.Core.DQM_cfg")
0031 process.load("DQMServices.Components.DQMEnvironment_cfi")
0032 process.load("Configuration.StandardSequences.EDMtoMEAtJobEnd_cff")
0033 # import DQMStore service
0034 process.load('DQMOffline.Configuration.DQMOffline_cff')
0035 
0036 # actually read in the DQM root file
0037 process.load("DQMServices.Components.DQMFileReader_cfi")
0038 
0039 # others
0040 # import of standard configurations
0041 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0042 process.load('FWCore.MessageService.MessageLogger_cfi')
0043 process.load('Configuration.EventContent.EventContent_cff')
0044 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0045 process.load('Configuration.Geometry.GeometryExtended2026D76Reco_cff')
0046 process.load('Configuration.StandardSequences.MagneticField_cff')
0047 process.load('Configuration.StandardSequences.DQMSaverAtRunEnd_cff')
0048 process.load('Configuration.StandardSequences.Harvesting_cff')
0049 
0050 
0051 from DQMServices.Components.DQMStoreStats_cfi import *
0052 dqmStoreStats.runOnEndJob = cms.untracked.bool(True)
0053 
0054 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
0055 
0056 print('= inputPostFile : %s' % os.environ['inputPostFile'])
0057 t1 = os.environ['inputPostFile'].split('.')
0058 localFileInput = os.environ['inputPostFile']#.replace(".root", "_a.root") #
0059 # Source
0060 process.source = cms.Source ("PoolSource",fileNames = cms.untracked.vstring("file:" + localFileInput),
0061 secondaryFileNames = cms.untracked.vstring(),)
0062 
0063 process.electronMcSignalPostValidatorMiniAOD.InputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD")
0064 process.electronMcSignalPostValidatorMiniAOD.OutputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD")
0065 
0066 from Configuration.AlCa.autoCond import autoCond
0067 #process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All'
0068 process.GlobalTag.globaltag = '122X_mcRun4_realistic_v1'
0069 #process.GlobalTag.globaltag = '113X_mcRun4_realistic_v4'
0070 #process.GlobalTag.globaltag = '93X_mc2017_realistic_v1'
0071 
0072 process.dqmSaver.workflow = '/electronHistos/' + t1[1] + '/RECO3'
0073 process.dqmsave_step = cms.Path(process.DQMSaver)
0074 
0075 process.p = cms.Path(process.EDMtoME * process.electronMcSignalPostValidatorMiniAOD * process.dqmStoreStats)
0076 
0077 # Schedule
0078 process.schedule = cms.Schedule(
0079                                 process.p,
0080                                 process.dqmsave_step,
0081 )