def testSample(): storage = None #"/eos/user/i/ineuteli/samples/nano/$ERA/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext1-v1/NANOAODSIM", "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext2-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'TT', 'TT', "/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v2/NANOAODSIM", store=storage, url=url, file=filelist, opts='toppt=True', ), D( 'Data', 'SingleMuon_Run2016C', "/SingleMuon/Run2016C-Nano25Oct2019-v1/NANOAOD", store=storage, url=url, file=filelist, ), ] terms = [ 'DY', 'DY*Jets', 'DY?Jets', 'DY[1J]', ] # PRINT for sample in samples: LOG.header(sample.name) print ">>> %-14s = %r" % ("group", sample.group) print ">>> %-14s = %r" % ("name", sample.name) print ">>> %-14s = %r" % ("paths", sample.paths) print ">>> %-14s = %r" % ("url", sample.url) print ">>> %-14s = %r" % ("era", sample.era) print ">>> %-14s = %r" % ("channels", sample.channels) print ">>> %-14s = %r" % ("storage", sample.storage) print ">>> %-14s = %r" % ("extraopts", sample.extraopts) print ">>> %-14s = %r" % ("nfilesperjob", sample.nfilesperjob) for term in terms: match = sample.match(term, verb=4)
def testEventBased(args, verb=0): storage = None #"/eos/user/i/ineuteli/samples/nano/$ERA/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext1-v1/NANOAODSIM", #"/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext2-v1/NANOAODSIM", store=storage, url=url, ), #M('TT','TT', # "/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v2/NANOAODSIM", # store=storage,url=url, #), #D('Data','SingleMuon_Run2016C', "/SingleMuon/Run2016C-Nano25Oct2019-v1/NANOAOD", # store=storage,url=url, #), ] for sample in samples: print sample files = sample.getfiles()[:8] chunks = chunkify_by_evts(files, nmax=100000) for chunk in chunks: print chunk
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = None #"/eos/user/${USER::1}/$USER/samples/nano/$ERA/$DAS" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18NanoAODv6-Nano25Oct2019_102X_upgrade2018_realistic_v20-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), # TTBAR M( 'TT', 'TTTo2L2Nu', "/TTTo2L2Nu_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18NanoAODv6-Nano25Oct2019_102X_upgrade2018_realistic_v20-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='toppt=True', ), M( 'TT',
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = "/eos/cms/store/group/phys_tau/TauFW/nano/UL2016_postVFP/$DAS" url = None #"root://eosuser.cern.ch/" filelist = "samples/files/UL2016_postVFP/$SAMPLE.txt" samples = [ # DRELL-YAN M('DY','DYJetsToLL_M-10to50', "/DYJetsToLL_M-10to50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL16NanoAODv2-106X_mcRun2_asymptotic_v15-v1/NANOAODSIM", store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL16NanoAODv2-106X_mcRun2_asymptotic_v15-v1/NANOAODSIM", store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_MatchEWPDG20_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL16NanoAODv2-106X_mcRun2_asymptotic_v15-v1/NANOAODSIM", store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DY2JetsToLL_M-50', "/DY2JetsToLL_M-50_MatchEWPDG20_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL16NanoAODv2-106X_mcRun2_asymptotic_v15-v1/NANOAODSIM", store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DY3JetsToLL_M-50', "/DY3JetsToLL_M-50_MatchEWPDG20_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL16NanoAODv2-106X_mcRun2_asymptotic_v15-v1/NANOAODSIM", store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DY4JetsToLL_M-50', "/DY4JetsToLL_M-50_MatchEWPDG20_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL16NanoAODv2-106X_mcRun2_asymptotic_v15-v1/NANOAODSIM", store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DYJetsToMuTauh_M-50', #"/DYJetsToTauTauToMuTauh_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL16NanoAODv2-106X_mcRun2_asymptotic_v15-v1/NANOAODSIM", # BUGGY Summer19 "/DYJetsToTauTauToMuTauh_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/lathomas-NANOAODv2Step_UL16nonAPV-ae987f664fa23fba95446c7ef5426a19/USER", # Summer20, PRIVATE production store=storage,url=url,files=filelist,opts="useT1=True,zpt=True",channels=["skim*",'mutau*']), #M('DY','DYJetsToEorMuTauh_M-50',
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = "/pnfs/psi.ch/cms/trivcat/store/user/ineuteli/samples/NANOAOD_2016/$PATH" #storage = "/pnfs/psi.ch/cms/trivcat/store/user/ineuteli/samples/nano/2016/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext1-v1/NANOAODSIM", "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext2-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY2JetsToLL_M-50',
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = "/pnfs/psi.ch/cms/trivcat/store/user/$USER/samples/NANOAOD_UL2017/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN #M('DY','DYJetsToLL_M-10to50', # "/DYJetsToLL_M-10to50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017_12Apr2018_Nano25Oct2019_102X_mc2017_realistic_v7-v2/NANOAODSIM", # "/DYJetsToLL_M-10to50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017_12Apr2018_Nano25Oct2019_102X_mc2017_realistic_v7_ext1-v1/NANOAODSIM", # store=storage,url=url,file=filelist,opts='zpt=True'), M('DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL17NanoAODv2-106X_mc2017_realistic_v8-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', nfilesperjob=3), M('DY', 'DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL17NanoAODv2-106X_mc2017_realistic_v8-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', nfilesperjob=2), M('DY', 'DY2JetsToLL_M-50', "/DY2JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL17NanoAODv2-106X_mc2017_realistic_v8-v1/NANOAODSIM", store=storage,
storage = None #"/eos/user/i/$USER/samples/nano/$ERA/$DAS" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN #M('DY','DYJetsToLL_M-10to50', # "/DYJetsToLL_M-10to50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017_12Apr2018_Nano25Oct2019_102X_mc2017_realistic_v7-v2/NANOAODSIM", # "/DYJetsToLL_M-10to50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017_12Apr2018_Nano25Oct2019_102X_mc2017_realistic_v7_ext1-v1/NANOAODSIM", # store=storage,url=url,file=filelist,opts='zpt=True', #), M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL17NanoAOD-106X_mc2017_realistic_v6-v2/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL17NanoAOD-106X_mc2017_realistic_v6-v3/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY',
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = None #"/eos/user/${USER::1}/$USER/samples/nano/$ERA/$DAS" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN #M('DY','DYJetsToLL_M-10to50', # "/DYJetsToLL_M-10to50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v1/NANOAODSIM", # store=storage,url=url,files=filelist,opts='zpt=True',), M('DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL16NanoAODAPVv2-106X_mcRun2_asymptotic_preVFP_v9-v1/NANOAODSIM", store=storage, url=url, files=filelist, opts='zpt=True'), M('DY', 'DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL16NanoAODAPVv2-106X_mcRun2_asymptotic_preVFP_v9-v1/NANOAODSIM", store=storage, url=url, files=filelist, opts='zpt=True'), M('DY', 'DY2JetsToLL_M-50', "/DY2JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL16NanoAODAPVv2-106X_mcRun2_asymptotic_preVFP_v9-v1/NANOAODSIM", store=storage, url=url, files=filelist,
def testSample(): era = "2016" storage = None #"/eos/user/i/ineuteli/samples/nano/$ERA/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext1-v1/NANOAODSIM", "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext2-v1/NANOAODSIM", store=storage, url=url, files=filelist, opts='zpt=True', ), M( 'TT', 'TT', "/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v2/NANOAODSIM", store=storage, url=url, files=filelist, opts='toppt=True', ), D( 'Data', 'SingleMuon_Run2016C', "/SingleMuon/Run2016C-Nano25Oct2019-v1/NANOAOD", store=storage, url=url, files=filelist, ), ] terms = [ 'DY', 'DY*Jets', 'DY?Jets', 'DY[1J]', ] # PRINT listname = "test/files/$ERA/$SAMPLE.txt" for sample in samples: LOG.header(sample.name) print ">>> %-14s = %r" % ("group", sample.group) print ">>> %-14s = %r" % ("name", sample.name) print ">>> %-14s = %r" % ("paths", sample.paths) print ">>> %-14s = %r" % ("url", sample.url) print ">>> %-14s = %r" % ("era", sample.era) print ">>> %-14s = %r" % ("channels", sample.channels) print ">>> %-14s = %r" % ("storage", sample.storage) print ">>> %-14s = %r" % ("extraopts", sample.extraopts) print ">>> %-14s = %r" % ("nfilesperjob", sample.nfilesperjob) print ">>> %-14s = %r" % ("files", sample.files) print ">>> %-14s = %r" % ("nevents", sample.nevents) ## MATCH #for term in terms: # match = sample.match(term,verb=4) # WRITE fname = repkey(listname, ERA=era) print ">>>\n>>> Write..." sample.writefiles(fname, nevts=True) # write Sample.files to txt file print ">>> %-14s = %r" % ("listname", fname) #print ">>> %-14s = %r"%("files",sample.files) print ">>> %-14s = %r" % ("nfiles", len(sample.files)) print ">>> %-14s = %r" % ("nevents", sample.nevents) # LOAD print ">>>\n>>> Reset..." newsample = Sample(sample.group, sample.name, *sample.paths, store=storage, url=url, files=fname, opts=sample.extraopts) print ">>> %-14s = %r" % ("listname", fname) print ">>> %-14s = %r" % ("files", newsample.files) print ">>> %-14s = %r" % ("nfiles", len(newsample.files)) print ">>> %-14s = %r" % ("nevents", newsample.nevents) print ">>> Call Sample.getfiles..." # load Sample.files from txt file files = newsample.getfiles() print ">>> %-14s = %r" % ("files", newsample.files) print ">>> %-14s = %r" % ("nfiles", len(newsample.files)) print ">>> %-14s = %r" % ("nevents", newsample.nevents)
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = None #"/eos/user/i/ineuteli/samples/nano/$ERA/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv5_PU2017RECOSIMstep_12Apr2018_v1-DeepTauv2p1_TauPOG-v1/USER", "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv5_PU2017RECOSIMstep_12Apr2018_ext1_v1-DeepTauv2p1_TauPOG-v1/USER", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017_12Apr2018_Nano25Oct2019_new_pmx_102X_mc2017_realistic_v7-v1/NANOAODSIM", "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017_12Apr2018_Nano25Oct2019_v3_102X_mc2017_realistic_v7_ext1-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY2JetsToLL_M-50',
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = "/pnfs/psi.ch/cms/trivcat/store/user/$USER/samples/NANOAOD_2018/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18NanoAODv6-Nano25Oct2019_102X_upgrade2018_realistic_v20-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18NanoAODv6-Nano25Oct2019_102X_upgrade2018_realistic_v20-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY2JetsToLL_M-50', "/DY2JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18NanoAODv6-Nano25Oct2019_102X_upgrade2018_realistic_v20-v1/NANOAODSIM", store=storage,
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = "/pnfs/psi.ch/cms/trivcat/store/user/ineuteli/samples/NANOAOD_2017/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv5_PU2017RECOSIMstep_12Apr2018_v1-DeepTauv2p1_TauPOG-v1/USER", "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv5_PU2017RECOSIMstep_12Apr2018_ext1_v1-DeepTauv2p1_TauPOG-v1/USER", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017_12Apr2018_Nano25Oct2019_new_pmx_102X_mc2017_realistic_v7-v1/NANOAODSIM", "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017_12Apr2018_Nano25Oct2019_v3_102X_mc2017_realistic_v7_ext1-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY',
def testSample(args): era = "2016" storage = None #"/eos/user/i/ineuteli/samples/nano/$ERA/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" verbosity = args.verbosity samples = [ M('DY','DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext1-v1/NANOAODSIM", "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext2-v1/NANOAODSIM", store=storage,url=url,files=filelist,opts='zpt=True', ), M('TT','TT', "/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v2/NANOAODSIM", store=storage,url=url,files=filelist,opts='toppt=True', ), M('WJ','W4JetsToLNu', "/W4JetsToLNu_TuneCP5_13TeV-madgraphMLM-pythia8/lathomas-NANOAODv2Step_UL16nonAPV-ae987f664fa23fba95446c7ef5426a19/USER", store=storage,url=url,files=filelist, #instance='prod/phys03', ), D('Data','SingleMuon_Run2016C', "/SingleMuon/Run2016C-Nano25Oct2019-v1/NANOAOD", store=storage,url=url,files=filelist, ), ] filters = args.filters terms = [ 'DY', 'DY*Jets', 'DY?Jets', 'DY[1J]', 'DY*pythia8', ] + filters # PRINT listname = "test/files/$ERA/$SAMPLE.txt" for sample in samples: LOG.header(sample.name) print ">>> %-14s = %r"%("group",sample.group) print ">>> %-14s = %r"%("name",sample.name) print ">>> %-14s = %r"%("paths",sample.paths) print ">>> %-14s = %r"%("url",sample.url) print ">>> %-14s = %r"%("era",sample.era) print ">>> %-14s = %r"%("channels",sample.channels) print ">>> %-14s = %r"%("storage",sample.storage) print ">>> %-14s = %r"%("extraopts",sample.extraopts) print ">>> %-14s = %r"%("nfilesperjob",sample.nfilesperjob) print ">>> %-14s = %r"%("files",sample.files) print ">>> %-14s = %r"%("nevents",sample.nevents) # MATCH print ">>> Testing matching:" for term in terms: match = sample.match(term,verb=verbosity) match = color('YES','green',b=True) if match else color('NO','red',b=True) print ">>> %r matches to %r: %s"%(sample.name,term,match) if filters and not all(sample.match(f,verb=verbosity) for f in filters): continue # WRITE fname = repkey(listname,ERA=era) print ">>>\n>>> Write..." sample.writefiles(fname,nevts=True) # write Sample.files to txt file print ">>> %-14s = %r"%("listname",fname) #print ">>> %-14s = %r"%("files",sample.files) print ">>> %-14s = %r"%("nfiles",len(sample.files)) print ">>> %-14s = %r"%("nevents",sample.nevents) # LOAD print ">>>\n>>> Reset..." newsample = Sample(sample.group,sample.name,*sample.paths, store=storage,url=url,files=fname,opts=sample.extraopts) print ">>> %-14s = %r"%("listname",fname) print ">>> %-14s = %r"%("files",newsample.files) print ">>> %-14s = %r"%("nfiles",len(newsample.files)) print ">>> %-14s = %r"%("nevents",newsample.nevents) print ">>> Call Sample.getfiles..." # load Sample.files from txt file files = newsample.getfiles() print ">>> %-14s = %r"%("files",newsample.files) print ">>> %-14s = %r"%("nfiles",len(newsample.files)) print ">>> %-14s = %r"%("nevents",newsample.nevents) print ">>> %-14s = %r"%("filenevts",newsample.filenevts)
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = "/pnfs/psi.ch/cms/trivcat/store/user/ineuteli/samples/NANOAOD_2016/$PATH" #storage = "/pnfs/psi.ch/cms/trivcat/store/user/ineuteli/samples/nano/2016/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext1-v1/NANOAODSIM", "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext2-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), #M('DY','DY1JetsToLL_M-50', # "/DY1JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v1/NANOAODSIM", # store=storage,url=url,file=filelist,opts='zpt=True', #), #M('DY','DY2JetsToLL_M-50', # "/DY2JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v1/NANOAODSIM", # store=storage,url=url,file=filelist,opts='zpt=True', #), #M('DY','DY3JetsToLL_M-50', # "/DY3JetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v1/NANOAODSIM", # store=storage,url=url,file=filelist,opts='zpt=True',
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = None #"/eos/user/i/ineuteli/samples/nano/$ERA/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext1-v1/NANOAODSIM", #"/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7_ext2-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), # TTBAR M( 'TT', 'TT', "/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/RunIISummer16NanoAODv6-PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v2/NANOAODSIM", store=storage, url=url, file=filelist, opts='toppt=True', ), # DATA
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = "/pnfs/psi.ch/cms/trivcat/store/user/$USER/samples/NANOAOD_2017/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN M( 'DY', 'DYJetsToLL_M-50', #"/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv5_PU2017RECOSIMstep_12Apr2018_v1-DeepTauv2p1_TauPOG-v1/USER", # BUGGY PU #"/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv5_PU2017RECOSIMstep_12Apr2018_ext1_v1-DeepTauv2p1_TauPOG-v1/USER", # BUGGY PU "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017RECOSIMstep_12Apr2018_Nano25Oct2019_102X_mc2017_realistic_v7-v1/NANOAODSIM", # BUGGY PU "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017RECOSIMstep_12Apr2018_Nano25Oct2019_102X_mc2017_realistic_v7_ext1-v1/NANOAODSIM", # BUGGY PU store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017_12Apr2018_Nano25Oct2019_new_pmx_102X_mc2017_realistic_v7-v1/NANOAODSIM", "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIFall17NanoAODv6-PU2017_12Apr2018_Nano25Oct2019_v3_102X_mc2017_realistic_v7_ext1-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M(
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = None #"/eos/user/i/ineuteli/samples/nano/$ERA/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18NanoAODv6-Nano25Oct2019_102X_upgrade2018_realistic_v20-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), # TTBAR M( 'TT', 'TTTo2L2Nu', "/TTTo2L2Nu_TuneCP5_13TeV-powheg-pythia8/RunIIAutumn18NanoAODv6-Nano25Oct2019_102X_upgrade2018_realistic_v20-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='toppt=True', ), M( 'TT', 'TTToSemiLeptonic',
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = "/eos/cms/store/group/phys_tau/TauFW/nano/UL2018/$DAS" url = None #"root://eosuser.cern.ch/" filelist = "samples/files/UL2018/$SAMPLE.txt" samples = [ # DRELL-YAN M('DY','DYJetsToLL_M-10to50', "/DYJetsToLL_M-10to50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL18NanoAODv2-106X_upgrade2018_realistic_v15_L1v1-v1/NANOAODSIM", store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL18NanoAODv2-106X_upgrade2018_realistic_v15_L1v1-v1/NANOAODSIM", # BUGGY Summer19 "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer20UL18NanoAODv2-106X_upgrade2018_realistic_v15_L1v1-v1/NANOAODSIM", store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL18NanoAODv2-106X_upgrade2018_realistic_v15_L1v1-v1/NANOAODSIM", # BUGGY Summer19 store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DY2JetsToLL_M-50', "/DY2JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL18NanoAODv2-106X_upgrade2018_realistic_v15_L1v1-v1/NANOAODSIM", # BUGGY Summer19 store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DY3JetsToLL_M-50', "/DY3JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL18NanoAODv2-106X_upgrade2018_realistic_v15_L1v1-v1/NANOAODSIM", # BUGGY Summer19 store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DY4JetsToLL_M-50', "/DY4JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL18NanoAODv2-106X_upgrade2018_realistic_v15_L1v1-v1/NANOAODSIM", # BUGGY Summer19 store=storage,url=url,files=filelist,opts="useT1=True,zpt=True"), M('DY','DYJetsToMuTauh_M-50', "/DYJetsToTauTauToMuTauh_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIISummer19UL18NanoAODv2-106X_upgrade2018_realistic_v15_L1v1-v1/NANOAODSIM", # BUGGY Summer19 store=storage,url=url,files=filelist,opts="useT1=True,zpt=True",channels=["skim*",'mutau*']),
from TauFW.PicoProducer.storage.Sample import MC as M from TauFW.PicoProducer.storage.Sample import Data as D storage = "/pnfs/psi.ch/cms/trivcat/store/user/ineuteli/samples/NANOAOD_2018/$PATH" url = None #"root://cms-xrd-global.cern.ch/" filelist = None #"samples/files/2016/$SAMPLE.txt" samples = [ # DRELL-YAN M( 'DY', 'DYJetsToLL_M-50', "/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18NanoAODv6-Nano25Oct2019_102X_upgrade2018_realistic_v20-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY1JetsToLL_M-50', "/DY1JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18NanoAODv6-Nano25Oct2019_102X_upgrade2018_realistic_v20-v1/NANOAODSIM", store=storage, url=url, file=filelist, opts='zpt=True', ), M( 'DY', 'DY2JetsToLL_M-50', "/DY2JetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18NanoAODv6-Nano25Oct2019_102X_upgrade2018_realistic_v20-v1/NANOAODSIM",