#setting up DaVinci directory DV = GaudiExec() for decay in ["Kplus"]: decay_number = 0 sim_version = "Sim09a" dst = "DST" if (decay=="Kplus"): decay_number = 12143401 if (decay=="Kshort"): decay_number = 12145102 for polarity in ["Down","Up"]: for yr in ["2015","2016"]: E = 0 nu = "" trigger = "" stripping = "" reco = "" if (yr=="2011"): E = 3500 nu = "2" trigger = "0x40760037" stripping = "21r1" reco = "Reco14c" DV.directory = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v38r1p3/' elif (yr=="2012"): E = 4000 nu = "2.5" trigger = "0x409f0045" stripping = "21" reco = "Reco14c" DV.directory = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v38r1p3/' elif (yr=="2015"): #OnlyKplus E = 6500 nu = "1.6-25ns" trigger = "0x411400a2" stripping = "24r1" reco = "Reco15a/Turbo02" sim_version = "Sim09e" dst = "DST" DV.directory = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v44r3/' DV.platform = "x86_64-centos7-gcc62-opt" elif (yr=="2016"): #OnlyKplus E = 6500 nu = "1.6-25ns" trigger = "0x6139160F" stripping = "28r1" reco = "Reco16/Turbo03" sim_version = "Sim09e" dst = "DST" DV.directory = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v44r3/' DV.platform = "x86_64-centos7-gcc62-opt" script_opts = {"YEAR":yr,"POL":polarity,"DATA_TYPE":"MC","ENERGY":E,"NU":nu,"TRIG":trigger,"STRIP":stripping,"CHAN":decay, "NUM":decay_number, "RECO":reco, "SIM": sim_version, "DST":dst} script_1 ='/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v41r2/tuplecreation/optfiles/%(DATA_TYPE)s/KstJpsi/%(YEAR)s%(POL)s_%(DATA_TYPE)s_%(CHAN)s.py'% script_opts print ('Using optsfile: ',script_1) # script_basic = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v41r2/tuplecreation/optfiles/BasicOptfile.py' optsfile = [script_1] PATH = "/MC/%(YEAR)s/Beam%(ENERGY)sGeV-%(YEAR)s-Mag%(POL)s-Nu%(NU)s-Pythia8/%(SIM)s/Trig%(TRIG)s/%(RECO)s/Stripping%(STRIP)sNoPrescalingFlagged/%(NUM)s/ALLSTREAMS.%(DST)s" % script_opts print ('Using data: ', PATH) DV.options = optsfile j = Job( name ='RefMC%(YEAR)s%(POL)s%(CHAN)s' % script_opts, application = DV, splitter = SplitByFiles(filesPerJob = 100), inputdata = BKQuery(path=PATH).getDataset(), outputfiles = [DiracFile(namePattern='*.root')], do_auto_resubmit = True, backend = Dirac() ) j.submit()