70 lines
2.0 KiB
Python
70 lines
2.0 KiB
Python
|
|
|
|
import os
|
|
|
|
def get_path(decay = "Kplus", year = "2012", polarity = "Down"):
|
|
sim_version = "Sim09a"
|
|
dst = "DST"
|
|
E = 0
|
|
nu = ""
|
|
trigger = ""
|
|
stripping = ""
|
|
reco = ""
|
|
|
|
if (decay=="Kplus"): decay_number = 12113446 #12113445
|
|
if (decay=="Kshort"): decay_number = 12115179 #12115178
|
|
if (decay=="Kplus"): year_list = ["2011","2012","2015","2016"]
|
|
|
|
if (year=="2011"):
|
|
E = 3500
|
|
nu = "2"
|
|
trigger = "0x40760037"
|
|
stripping = "21r1p1"
|
|
reco = "Reco14c"
|
|
sim_version = "Sim09f"
|
|
elif (year=="2012"):
|
|
E = 4000
|
|
nu = "2.5"
|
|
trigger = "0x409f0045"
|
|
stripping = "21r0p1"
|
|
reco = "Reco14c"
|
|
sim_version = "Sim09f"
|
|
elif (year=="2012spec"):
|
|
year = "2012"
|
|
E = 4000
|
|
nu = "2.5"
|
|
trigger = "0x4097003d" #Only for Kshort!
|
|
stripping = "21r0p1"
|
|
reco = "Reco14c"
|
|
sim_version = "Sim09f"
|
|
elif (year=="2015"):
|
|
E = 6500
|
|
nu = "1.6-25ns"
|
|
trigger = "0x411400a2"
|
|
stripping = "24"
|
|
reco = "Reco15a/Turbo02"
|
|
sim_version = "Sim09b"
|
|
dst = "MDST"
|
|
elif (year=="2016"):
|
|
E = 6500
|
|
nu = "1.6-25ns"
|
|
trigger = "0x6138160F"
|
|
stripping = "28"
|
|
reco = "Reco16/Turbo03"
|
|
sim_version = "Sim09c"
|
|
dst = "MDST"
|
|
|
|
script_opts = {"YEAR":year,"POL":polarity,"DATA_TYPE":"PHSP","ENERGY":E,"NU":nu,"TRIG":trigger,"STRIP":stripping,"CHAN":decay, "NUM":decay_number, "RECO":reco, "SIM": sim_version, "DST":dst }
|
|
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)sFiltered/Merge14/%(NUM)s/B2XMUMU.STRIP.%(DST)s" % script_opts
|
|
|
|
return PATH
|
|
|
|
def get_eff(decay = "Kplus", year = "2012", polarity = "Down"):
|
|
command = "lb-run LHCbDirac/prod dirac-bookkeeping-rejection-stats -B " + str(get_path(decay,year,polarity))
|
|
print command
|
|
os.system(command)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
get_eff()
|