} #-------- HOW TO RUN test = 0 if test==1: # test a single component, using a single thread. selectedComponents = [BulkGravToWWToWlepWhad_narrow_2000] for c in selectedComponents: c.files = c.files[:1] c.splitFactor = 1 elif test==2: # test a single component, using a single thread. selectedComponents = [TTJets] elif test==3: selectedComponents = [WJetsToLNu_HT2500toInf] for c in selectedComponents: c.files = c.files[:1] c.splitFactor = 1 else: # full scale production # split samples in a smarter way from CMGTools.HToZZ4L.tools.configTools import configureSplittingFromTime, printSummary configureSplittingFromTime(selectedComponents, 51, 6) # means 40 ms per event, job to last 3h # print summary of components to process printSummary(selectedComponents) selectedComponents=autoAAA(selectedComponents) config=autoConfig(selectedComponents,sequence)
v_jets = [ WJetsToLNu_LO, DYJetsToLL_M10to50_LO, DYJetsToLL_M50_LO_ext, WWTo2L2Nu ] # V+jets tt_1l = [ TTJets_SingleLeptonFromT, TTJets_SingleLeptonFromT_ext, TTJets_SingleLeptonFromTbar, TTJets_SingleLeptonFromTbar_ext ] # TT 1l tt_2l = [TTJets_DiLepton, TTJets_DiLepton_ext, TT_pow] # TT 2l boson = [WZTo3LNu, WZTo3LNu_amcatnlo] + TriBosons # multi-boson samples_slow = sig_ttv + ttv_lo + rares + convs + boson + tt_2l samples_fast = single_t + v_jets + tt_1l cropToLumi(rares, 500) cropToLumi([T_tch_powheg, TBar_tch_powheg], 50) configureSplittingFromTime(samples_fast, 50, 6) configureSplittingFromTime(samples_slow, 100, 6) selectedComponents = samples_slow + samples_fast if scaleProdToLumi > 0: # select only a subset of a sample, corresponding to a given luminosity (assuming ~30k events per MiniAOD file, which is ok for central production) target_lumi = scaleProdToLumi # in inverse picobarns for c in selectedComponents: if not c.isMC: continue nfiles = int(min(ceil(target_lumi * c.xSection / 30e3), len(c.files))) #if nfiles < 50: nfiles = min(4*nfiles, len(c.files)) print "For component %s, will want %d/%d files; AAA %s" % ( c.name, nfiles, len(c.files), "eoscms" not in c.files[0]) c.files = c.files[:nfiles] c.splitFactor = len(c.files) c.fineSplitFactor = 1
vetoTriggers=vetos[:], useAAA=useAAA) if "PromptReco" in processing: from CMGTools.Production.promptRecoRunRangeFilter import filterComponent filterComponent(comp, verbose=1) print "Will process %s (%d files)" % (comp.name, len( comp.files)) #comp.splitFactor = len(comp.files)/3 comp.splitFactor = len(comp.files) / 2 comp.fineSplitFactor = 1 selectedComponents.append(comp) if exclusiveDatasets: vetos += triggers if json is None: dmCoreSequence.remove(jsonAna) if runDataQCD: # for fake rate measurements in data configureSplittingFromTime(selectedComponents, 3.5, 2, maxFiles=15) if True: from CMGTools.Production.promptRecoRunRangeFilter import filterComponent for c in selectedComponents: printnewsummary = False if "PromptReco" in c.name: printnewsummary = True filterComponent(c, 1) c.splitFactor = len(c.files) / 6 if printnewsummary: printSummary(selectedComponents) if removeJetReCalibration: jetAna.recalibrateJets = False jetAnaScaleUp.recalibrateJets = False jetAnaScaleDown.recalibrateJets = False
test = 0 if test == 1: # test a single component, using a single thread. # selectedComponents = [BulkGravToWW_narrow_M_1200] selectedComponents = [BulkGravToWW_narrow_M_800] # selectedComponents = [QCD_HT100to200] for c in selectedComponents: c.files = c.files[:1] # c.files = ["root://eoscms.cern.ch//eos/cms/store/mc/RunIIFall17MiniAOD/QCD_HT100to200_TuneCP5_13TeV-madgraph-pythia8/MINIAODSIM/94X_mc2017_realistic_v10-v1/50000/BE340D7B-6BE9-E711-B83A-1866DAEA6E20.root"] c.splitFactor = 1 elif test == 2: # test a single component, using a single thread. selectedComponents = [TTJets] elif test == 3: selectedComponents = [WJetsToLNu_HT2500toInf] for c in selectedComponents: c.files = c.files[:1] c.splitFactor = 1 else: # full scale production # split samples in a smarter way from CMGTools.HToZZ4L.tools.configTools import configureSplittingFromTime, printSummary # means 40 ms per event, job to last 3h configureSplittingFromTime(selectedComponents, 75, 2) # print summary of components to process printSummary(selectedComponents) selectedComponents = autoAAA(selectedComponents) config = autoConfig(selectedComponents, sequence)
] # QCDPtEMEnriched = [ QCD_Pt20to30_EMEnriched, QCD_Pt30to50_EMEnriched, QCD_Pt50to80_EMEnriched, QCD_Pt80to120_EMEnriched, QCD_Pt120to170_EMEnriched ] # QCDPtbcToE = [ QCD_Pt_20to30_bcToE, QCD_Pt_30to80_bcToE, QCD_Pt_80to170_bcToE ] # QCDHT = [ QCD_HT100to200, QCD_HT200to300, QCD_HT300to500, QCD_HT500to700 ] # selectedComponents = [QCD_Mu15] + QCD_Mu5 + QCDPtEMEnriched + QCDPtbcToE + [WJetsToLNu_LO,DYJetsToLL_M10to50,DYJetsToLL_M50] # selectedComponents = [ QCD_Pt_170to250_bcToE, QCD_Pt120to170_EMEnriched, QCD_Pt170to300_EMEnriched ] # selectedComponents = [QCD_Mu15] # selectedComponents = [TTJets_SingleLeptonFromT,TTJets_SingleLeptonFromTbar] selectedComponents = [QCD_Mu15] + QCD_Mu5 + [ WJetsToLNu, DYJetsToLL_M10to50, DYJetsToLL_M50 ] time = 5.0 configureSplittingFromTime([WJetsToLNu], 20, time) # configureSplittingFromTime([WJetsToLNu_LO],20,time) configureSplittingFromTime([DYJetsToLL_M10to50], 10, time) configureSplittingFromTime([DYJetsToLL_M50], 30, time) configureSplittingFromTime([QCD_Mu15] + QCD_Mu5, 70, time) # configureSplittingFromTime(QCDPtbcToE,50,time) # configureSplittingFromTime(QCDPtEMEnriched,25,time) # configureSplittingFromTime([ QCD_HT100to200, QCD_HT200to300 ],10,time) # configureSplittingFromTime([ QCD_HT300to500, QCD_HT500to700 ],15,time) # configureSplittingFromTime([ QCD_Pt120to170_EMEnriched,QCD_Pt170to300_EMEnriched ], 15, time) # configureSplittingFromTime([ QCD_Pt_170to250_bcToE ], 30, time) if runQCDBM: configureSplittingFromTime([QCD_Mu15] + QCD_Mu5, 15, time) for c in selectedComponents: c.triggers = [] c.vetoTriggers = []
_TTV = [TTWToLNu,TTZToLLNuNu_LO,TTLLJets_m1to10] _convs = [TTGJets,TGJets,WGToLNuG,ZGTo2LG] _singleTop = [TToLeptons_sch_amcatnlo,TToLeptons_tch_amcatnlo,T_tWch,TBar_tWch] _diboson = [WZTo3LNu,ZZTo4L] _other = [tZq_ll,TTTT,WpWpJJ,WWDouble,WZZ] # WWZ ZZZ #selectedComponents = _Wjets_DY + _fakes + _ttH + _TTV + _convs + _singleTop + _diboson + _other print 'Before cropping to lumi and adjusting the splitting:' printSummary(selectedComponents) _fast = [DYJetsToLL_M10to50,WJetsToLNu,TTJets_SingleLeptonFromT,TTJets_SingleLeptonFromTbar,TTGJets,TGJets,WGToLNuG]+_singleTop _slow = [DYJetsToLL_M50,TTJets_DiLepton,ZGTo2LG,WWTo2L2Nu]+_TTV+_ttH+_diboson+_other cropToLumi(_convs+_diboson+_other,50) configureSplittingFromTime(_fast,30,5) configureSplittingFromTime(_slow,100,5) print 'After cropping to lumi and adjusting the splitting:' printSummary(selectedComponents) # Use the dropLHEweights option if you don't need the per-event LHE weights! It saves a lot of space. #selectedComponents = SMS_miniAODv2_T1tttt #susyCounter.SMS_varying_masses = ['genSusyMGluino','genSusyMNeutralino'] if scaleProdToLumi>0: # select only a subset of a sample, corresponding to a given luminosity (assuming ~30k events per MiniAOD file, which is ok for central production) target_lumi = scaleProdToLumi # in inverse picobarns for c in selectedComponents: if not c.isMC: continue nfiles = int(min(ceil(target_lumi * c.xSection / 30e3), len(c.files)))
selectedComponents = [TTLep_pow_ext] #selectedComponents = SMS_miniAODv2_T1tttt #susyCounter.SMS_varying_masses = ['genSusyMGluino','genSusyMNeutralino'] if analysis == 'susy': samples_2l = [ DYJetsToLL_M10to50, DYJetsToLL_M50, WWTo2L2Nu, ZZTo2L2Q, WZTo3LNu, TTWToLNu, TTZToLLNuNu, TTJets_DiLepton, TTHnobb_mWCutfix_ext1 ] samples_1l = [ WJetsToLNu, TTJets_SingleLeptonFromT, TTJets_SingleLeptonFromTbar, TBarToLeptons_tch_powheg, TToLeptons_sch_amcatnlo, TBar_tWch, T_tWch ] selectedComponents = samples_1l + samples_2l cropToLumi(selectedComponents, 2) configureSplittingFromTime(samples_1l, 50, 3) configureSplittingFromTime(samples_2l, 100, 3) printSummary(selectedComponents) if scaleProdToLumi > 0: # select only a subset of a sample, corresponding to a given luminosity (assuming ~30k events per MiniAOD file, which is ok for central production) target_lumi = scaleProdToLumi # in inverse picobarns for c in selectedComponents: if not c.isMC: continue nfiles = int(min(ceil(target_lumi * c.xSection / 30e3), len(c.files))) #if nfiles < 50: nfiles = min(4*nfiles, len(c.files)) print "For component %s, will want %d/%d files; AAA %s" % ( c.name, nfiles, len(c.files), "eoscms" not in c.files[0]) c.files = c.files[:nfiles] c.splitFactor = len(c.files) c.fineSplitFactor = 1