process.flashggDiPhotonSystematics + process.flashggDiPhotonMVA + process.sampleInfo + process.hltFilter + process.pho_sequence + process.allTagsAndProbes + process.pileupReweightingProducer + process.mc_sequence + process.tree_sequence) else: process.p = cms.Path(process.flashggUpdatedIdMVADiPhotons + process.flashggDiPhotonSystematics + process.flashggDiPhotonMVA + #process.sampleInfo + process.hltFilter + process.pho_sequence + process.allTagsAndProbes + process.pileupReweightingProducer + process.mc_sequence + process.tree_sequence) process.TFileService = cms.Service( "TFileService", #fileName = cms.string(myoptions['OUTPUT_FILE_NAME']), fileName=cms.string("TnP.root"), closeFileFast=cms.untracked.bool(True)) from flashgg.MetaData.JobConfig import JobConfig customize = JobConfig(crossSections=[ "$CMSSW_BASE/src/flashgg/MetaData/data/cross_sections.json" ]) customize.setDefault("maxEvents", -1) customize.setDefault("targetLumi", 1) customize(process)
import FWCore.ParameterSet.Config as cms import FWCore.Utilities.FileUtils as FileUtils import FWCore.ParameterSet.VarParsing as VarParsing from flashgg.MetaData.samples_utils import SamplesManager process = cms.Process("zeeValidationDumper") process.load("HLTrigger.HLTfilters.hltHighLevel_cfi") process.hltFilter = process.hltHighLevel.clone() process.hltFilter.throw = cms.bool(False) from flashgg.MetaData.JobConfig import JobConfig customize = JobConfig(crossSections=["$CMSSW_BASE/src/flashgg/MetaData/data/cross_sections.json"]) customize.setDefault("maxEvents",10000) customize.setDefault("targetLumi",2.6e+4) customize.parse() if ("data_single" in customize.processId): process.hltFilter.HLTPaths = cms.vstring("HLT_Ele27_WPTight_Gsf_v*") # process.hltFilter.HLTPaths = cms.vstring("HLT_Ele22_eta2p1_WPLoose_Gsf_v*") #elif ("data_double" in customize.processId): # process.hltFilter.HLTPaths = cms.vstring("HLT_Diphoton30_18_R9Id_OR_IsoCaloId_AND_HE_R9Id_DoublePixelSeedMatch_Mass70_v*") elif ("mc_single" in customize.processId): process.hltFilter.HLTPaths = cms.vstring("HLT_Ele27_WPTight_Gsf_v*") #elif ("mc_double" in customize.processId): # process.hltFilter.HLTPaths = cms.vstring("HLT_Diphoton30_18_R9Id_OR_IsoCaloId_AND_HE_R9Id_DoublePixelSeedMatch_Mass70_v*") # process.hltFilter.HLTPaths = cms.vstring("HLT_Ele27_WPTight_Gsf_v*")#for interactive running process.load('RecoMET.METFilters.eeBadScFilter_cfi') process.eeBadScFilter.EERecHitSource = cms.InputTag("reducedEgamma","reducedEERecHits") # Saved MicroAOD Collection (data only)
process.source = cms.Source("PoolSource",fileNames=cms.untracked.vstring("/store/group/phys_higgs/cmshgg/mdonega/flashgg/RunIISpring15-50ns/Spring15BetaV2/GJet_Pt-20to40_DoubleEMEnriched_MGG-80toInf_TuneCUETP8M1_13TeV_Pythia8/RunIISpring15-50ns-Spring15BetaV2-v0-RunIISpring15DR74-Asympt50ns_MCRUN2_74_V9A-v2/150716_154944/0000/myMicroAODOutputFile_10.root")) #fixme selectedFlashggJets process.load("flashgg/MicroAOD/flashggMicroAODSequence_cff") process.load("flashgg/Taggers/flashggTagSequence_cfi") process.load("flashgg/Taggers/flashggTagTester_cfi") process.commissioning = cms.EDAnalyzer('FlashggFlashggTreeMakerWithTagSorter', VertexTag=cms.untracked.InputTag('offlineSlimmedPrimaryVertices'), VertexCandidateMapTagDz=cms.InputTag('flashggVertexMapUnique'), VertexCandidateMapTagAOD = cms.InputTag('flashggVertexMapValidator'), JetTagDz=cms.InputTag("flashggJets"), DiPhotonTag = cms.InputTag('flashggDiPhotons'), rhoFixedGridCollection=cms.InputTag('fixedGridRhoAll'), lumiWeight = cms.double(1.0), sampleIndex = cms.int32(0) ) process.TFileService = cms.Service("TFileService", fileName = cms.string("~/mounteos/cms/store/group/phys_higgs/soffi/flashgg/testMonoHLivia/Phys14MicroAODV3-55-gc1f8d91/Higgs_scalar/testMonoHLivia-Phys14MicroAODV3-55-gc1f8d91-v0-soffi-Higgs_scalar_nohdecay_gg_10GeV_13TeV_MINIAODSIM_v6-7d492cb64f2cdaff326f939f96e45c96/150703_144622/0000/myMicroAODOutputFile_10.root") ) process.p = cms.Path(process.flashggTagSequence*process.commissioning) from flashgg.MetaData.JobConfig import JobConfig customize = JobConfig(crossSections=["$CMSSW_BASE/src/flashgg/MetaData/data/cross_sections.json"]) customize.setDefault("maxEvents", 100) customize.setDefault("targetLumi", 1) customize(process)
def checkCrossSections(self): # checks if all cross sections (apart from data) # were specified import re from flashgg.MetaData.samples_utils import SamplesManager from flashgg.MetaData.JobConfig import JobConfig # ignore any escaping etc. kwargs = {} for part in re.split('\s+', self.options.cmdLine): key, value = part.split('=', 1) kwargs[key] = value if not kwargs.has_key('campaign'): print >> sys.stderr, "WARNING: campaign not set" # automatically get metadata locations right for both high-mass and SM Higgs try: from diphotons.MetaData.JobConfig import customize except ImportError: from flashgg.MetaData.JobConfig import customize if not kwargs.has_key("metaDataSrc"): kwargs["metaDataSrc"] = customize.metaDataSrc if not kwargs.has_key("crossSections"): kwargs["crossSections"] = customize.crossSections # TODO: the following line is duplicated from # JobConfig(..) but we can't make JobConfig.options.parseArguments() # to parse anything other than sys.argv without modifying sys.argv temporarily... campaign = kwargs.get('campaign', "") jobConfig = JobConfig(**kwargs) sm = SamplesManager( "$CMSSW_BASE/src/%s/MetaData/data/%s/datasets.json" % (jobConfig.metaDataSrc, campaign), jobConfig.crossSections, ) hasProblem = False # loop over all types of processes (data, signal, background) for dsList in self.options.processes.values(): for idsName in dsList: #if args were provided for this dataset, then it is a list... if isinstance(idsName, list): dsName = idsName[0] #... or just a string else: dsName = idsName # check if this datasets was selected if not self.isSelectedDataset(dsName): # skip this dataset continue #---------- try: name, xsec, totEvents, files, maxEvents = sm.getDatasetMetaData( jobConfig.maxEvents, dsName, jobId=-1, nJobs=jobConfig.nJobs) if xsec == None: print >> sys.stderr, "cross section for", dsName, "not found in", jobConfig.crossSections hasProblem = True except Exception, ex: if type(ex) == Exception and ( ex.message.startswith( 'No dataset matched the request:') or ex.message.startswith( 'More then one dataset matched the request:')): print >> sys.stderr, ex.message else: raise
process.allTagsAndProbes + process.pileupReweightingProducer + process.mc_sequence + process.tree_sequence ) else: process.p = cms.Path( process.flashggDiPhotonMVA + #process.sampleInfo + process.hltFilter + process.pho_sequence + process.allTagsAndProbes + process.pileupReweightingProducer + process.mc_sequence + process.tree_sequence ) process.TFileService = cms.Service("TFileService", #fileName = cms.string(myoptions['OUTPUT_FILE_NAME']), fileName = cms.string("TnP.root"), closeFileFast = cms.untracked.bool(True) ) from flashgg.MetaData.JobConfig import JobConfig customize = JobConfig(crossSections=["$CMSSW_BASE/src/flashgg/MetaData/data/cross_sections.json"]) customize.setDefault("maxEvents", -1) customize.setDefault("targetLumi", 1) customize(process)
from flashgg.MetaData.JobConfig import JobConfig customize = JobConfig(#metaDataSrc="diphotons", crossSections=["$CMSSW_BASE/src/flashgg/MetaData/data/cross_sections.json", "$CMSSW_BASE/src/diphotons/MetaData/data/cross_sections.json", "$CMSSW_BASE/src/diphotons/MetaData/data/cross_sections_gen_grid.json"])
import FWCore.ParameterSet.Config as cms import FWCore.Utilities.FileUtils as FileUtils import FWCore.ParameterSet.VarParsing as VarParsing from flashgg.MetaData.samples_utils import SamplesManager process = cms.Process("zeeValidationDumper") process.load("HLTrigger.HLTfilters.hltHighLevel_cfi") process.hltFilter = process.hltHighLevel.clone() process.hltFilter.throw = cms.bool(False) from flashgg.MetaData.JobConfig import JobConfig customize = JobConfig(crossSections=["$CMSSW_BASE/src/flashgg/MetaData/data/cross_sections.json"]) customize.setDefault("maxEvents",-1) customize.setDefault("targetLumi",1.0e+4) customize.parse() if ("data_single" in customize.processId): process.hltFilter.HLTPaths = cms.vstring("HLT_Ele32_WPTight_Gsf_L1DoubleEG_v") elif ("mc_single" in customize.processId): process.hltFilter.HLTPaths = cms.vstring("HLT_Ele32_WPTight_Gsf_L1DoubleEG_v*") process.load('RecoMET.METFilters.eeBadScFilter_cfi') process.eeBadScFilter.EERecHitSource = cms.InputTag("reducedEgamma","reducedEERecHits") # Saved MicroAOD Collection (data only) process.dataRequirements = cms.Sequence() process.dataRequirements += process.hltFilter process.load("FWCore.MessageService.MessageLogger_cfi") process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32( 10000 ) process.load("Configuration.StandardSequences.GeometryDB_cff")
from flashgg.MetaData.JobConfig import JobConfig customize = JobConfig( metaDataSrc="diphotons", crossSections=[ "$CMSSW_BASE/src/diphotons/MetaData/data/cross_sections.json" ])