

for polarity in ["Down","Up"]:
    for yr in ["11","12","15","16","17","18"]:
        E = 0
        nu = 0
        trigger = 0
        if (yr=="11"):
            E = 3500
            nu = 2
            reco="14"
            stripping = "21r1p1a"
	    directory = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v38r1p3/' 
        elif (yr=="12"):
            E = 4000
            reco="14"
            stripping = "21r0p1a"
	    directory = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v38r1p3/' 
        elif (yr=="15"):
            E = 6500
            reco="15a"
            stripping = "24"
	    directory = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v41r2/' 
        elif (yr=="16"):
            E = 6500
            reco="16"
            stripping = "28"
	    directory = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v41r2/' 
        elif (yr=="17"):
            E = 6500
            reco="17"
            stripping = "29r2"
	    directory = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v44r3/' 
        elif (yr=="18"):
            E = 6500
            reco="18"
            stripping = "34"
	    directory = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v44r3/' 

        script_opts = {"YEAR":yr,"POL":polarity,"DATA_TYPE":"data","ENERGY":E,"RECO":reco,"STRIP":stripping}
        script_1 ='/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v41r2/tuplecreation/optfiles/%(DATA_TYPE)s/20%(YEAR)s%(POL)s_%(DATA_TYPE)s.py'% script_opts
      #  script_basic = '/afs/cern.ch/work/r/rekopecn/public/B_2_KstarMuMu/DaVinciDev_v41r2/tuplecreation/optfiles/BasicOptfile.py'%(YEAR)s%(POL)s_%(DATA_TYPE)s_%(CHAN)s

        optsfile = [script_1]

        PATH ="/LHCb/Collision%(YEAR)s/Beam%(ENERGY)sGeV-VeloClosed-Mag%(POL)s/Real Data/Reco%(RECO)s/Stripping%(STRIP)s/90000000/LEPTONIC.MDST" % script_opts
	print 'Using data: ', PATH
	#print 'Using script: ', script_1
	#print 'Using DV version: ', directory, platform

