ATLAS Offline Software
|
Variables | |
format | |
level | |
parser = argparse.ArgumentParser() | |
type | |
str | |
help | |
default | |
action | |
args = parser.parse_args() | |
campaign = args.campaign | |
float | ZPURITYFACTOR = 0.9935 |
float | ZXSEC = 2.0675 |
list | zee_missing_lbs = [] |
list | zmumu_missing_lbs = [] |
int | ntoys = 10000000 |
bool | do_toys = False |
fin = ROOT.TFile.Open(args.infile) | |
runname = None | |
runnumber = int(runname.replace('run_','')) | |
out_dir = args.outdir | |
string | lb_length_name = '%s/GLOBAL/DQTGlobalWZFinder/duration_vs_LB' % runname |
string | livetime_name = '%s/GLOBAL/DQTGlobalWZFinder/avgLiveFrac_vs_LB' % runname |
grlReader = ROOT.Root.TGoodRunsListReader(args.grl) | |
grl = grlReader.GetMergedGRLCollection() | |
string | grlname = 'grl_'+str(runnumber)+'.xml' |
grl_file = doZLumi.makeGRL(runnumber, 'PHYS_StandardGRL_All_Good', grlname) | |
lb_length_old = fin.Get(lb_length_name) | |
lbmin | |
lbmax | |
lb_length = ROOT.TProfile('lb_length', 'LB length', int(lbmax-lbmin), lbmin, lbmax) | |
livetime = ROOT.TProfile('livetime', 'Livetime', int(lbmax-lbmin), lbmin, lbmax) | |
official_lum_zero = ROOT.TProfile('official_lum_zero', 'official inst luminosity', int(lbmax-lbmin), lbmin, lbmax) | |
official_mu = ROOT.TProfile('official_mu', 'official mu', int(lbmax-lbmin), lbmin, lbmax) | |
lblb = fetch_iovs("LBLB", runs=runnumber) | |
lbtime = inverse_lblb(lblb) | |
iovs_acct = fetch_iovs('COOLOFL_TRIGGER::/TRIGGER/OFLLUMI/LumiAccounting', lbtime.first.since, lbtime.last.until, tag=args.tag) | |
iovs_lum = fetch_iovs('COOLOFL_TRIGGER::%s' % args.lumifolder, lblb.first.since, lblb.last.until, tag=args.lumitag, channels=[0]) | |
dictionary | lb_start_end = {} |
dictionary | lb_lhcfill = {} |
list | offlumiov = [_ for _ in iovs_lum if _.since.lumi==iov.LumiBlock] |
lb_full = lb_length.Clone('lb_full').ProjectionX() | |
divisor = lb_length.Clone('divisor').ProjectionX() | |
px = livetime.ProjectionX() | |
hto = fin.Get('%s/GLOBAL/DQTGlobalWZFinder/m_ele_template_os' % (runname)) | |
hts = fin.Get('%s/GLOBAL/DQTGlobalWZFinder/m_ele_template_ss' % (runname)) | |
dictionary | o_recoeff_fit = {} |
dictionary | o_recoerr_fit = {} |
list | lb_minus_one_reco_eff = [1.0, 1.0, 1.0] |
this_lb = int(lb_full.GetBinCenter(ibin)) | |
string | lb = "lb_" + str(this_lb) |
pileup = round(official_mu[ibin]) | |
hmo = fin.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_good_os' % (runname, lb)) | |
hms = fin.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_good_ss' % (runname, lb)) | |
hno = fin.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_bad_os' % (runname, lb)) | |
hns = fin.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_bad_ss' % (runname, lb)) | |
eff = 0 | |
err = 0 | |
int | weight = 1/pow(err, 2) |
arr_rec_eff = array('d') | |
arr_rec_err = array('d') | |
arr_mu = array('d') | |
tg_fit = ROOT.TGraphErrors(len(arr_mu), arr_mu, arr_rec_eff, ROOT.nullptr, arr_rec_err) | |
string | fit_type = "pol0" |
csvfile = open(out_dir, 'w') | |
csvwriter = csv.writer(csvfile, delimiter=',') | |
dictionary | lb_minus_one_trig_eff = {} |
bool | bad_database = False |
dictionary | out_dict = {} |
loclivetime = divisor[ibin] | |
dictionary | this_fill = lb_lhcfill[this_lb] |
int | passgrl = 1 |
string | hname = runname + '/lb_'+str(int(ibin+lbmin-0.5))+'/GLOBAL/DQTGlobalWZFinder/m_Z_mass_opsele' |
h = fin.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_eltrigtp_matches_os' % (runname, lb)) | |
float | ACCEPTANCE = 0.2971 |
z_m = fin.Get(hname).Integral() | |
z_merr = math.sqrt(z_m) | |
int | N1 = 0 |
N2 = h.GetBinContent(3) | |
eff_trig | |
err_trig | |
arr_trig | |
arr_NZ | |
bin1 = hmo.GetXaxis().FindBin(86000) | |
bin2 = hmo.GetXaxis().FindBin(95000) | |
eff_reco | |
err_reco | |
arr_reco | |
bin3 = hmo.GetXaxis().FindBin(120000) | |
bin4 = hmo.GetXaxis().FindBin(250000) | |
matchos_peak = hmo.Integral(bin1, bin2) | |
matchos_tail = hmo.Integral(bin3, bin4) | |
matchss_tail = hms.Integral(bin3, bin4) | |
nomatchos_peak = hno.Integral(bin1, bin2) | |
nomatchos_tail = hno.Integral(bin3, bin4) | |
templateos_peak = hto.Integral(bin1, bin2) | |
templateos_tail = hto.Integral(bin3, bin4) | |
templatess_tail = hts.Integral(bin3, bin4) | |
int | defaulted_reco_eff = 0 |
int | defaulted_trig_eff = 0 |
tuple | arr_comb = (1.0 - (1.0 - arr_trig)**2) * (arr_reco)**2 |
tuple | nonan_arr_comb = arr_comb[~np.isnan(arr_comb)] |
eff_comb = np.median(nonan_arr_comb) | |
tuple | err_comb = nonan_arr_comb.std() |
float | eff_Acomb = ACCEPTANCE * eff_comb |
float | err_Acomb = ACCEPTANCE * err_comb |
tuple | effcy = arr_comb * dq_cf.correction(official_mu[ibin], channel, campaign, runnumber) |
tuple | effcyerr = err_comb * dq_cf.correction(official_mu[ibin], channel, campaign, runnumber) |
float | zlumi = 0.0 |
float | CORRECTIONS = ZPURITYFACTOR/ACCEPTANCE/ZXSEC |
arr_zlumi = np.divide(arr_NZ, effcy) * (CORRECTIONS)/loclivetime | |
zlumistat = arr_zlumi.std() | |
float | zrate = zlumi / CORRECTIONS |
int | lumi_index = len(out_dict['Zee'])-3 |
int | error_index = len(out_dict['Zee'])-2 |
tuple | zll_lumi = (out_dict['Zee'][lumi_index] + out_dict['Zmumu'][lumi_index])/2 |
float | zll_lumi_err = 0.5 * math.sqrt( pow(out_dict['Zee'][error_index], 2) + pow(out_dict['Zmumu'][error_index], 2) ) |
lb_start | |
lb_end | |
list | out_write = [this_fill, runnumber, this_lb, lb_start, lb_end, loclivetime, lb_full[ibin], official_lum_zero[ibin], official_mu[ibin], passgrl] + out_dict["Zee"] + out_dict["Zmumu"] + [zll_lumi, zll_lumi_err] |
float dqt_zlumi_pandas.ACCEPTANCE = 0.2971 |
Definition at line 292 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.action |
Definition at line 32 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.args = parser.parse_args() |
Definition at line 39 of file dqt_zlumi_pandas.py.
Definition at line 386 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.arr_mu = array('d') |
Definition at line 199 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.arr_NZ |
Definition at line 327 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.arr_rec_eff = array('d') |
Definition at line 197 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.arr_rec_err = array('d') |
Definition at line 198 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.arr_reco |
Definition at line 339 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.arr_trig |
Definition at line 327 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.arr_zlumi = np.divide(arr_NZ, effcy) * (CORRECTIONS)/loclivetime |
Definition at line 407 of file dqt_zlumi_pandas.py.
bool dqt_zlumi_pandas.bad_database = False |
Definition at line 238 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.bin1 = hmo.GetXaxis().FindBin(86000) |
Definition at line 336 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.bin2 = hmo.GetXaxis().FindBin(95000) |
Definition at line 337 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.bin3 = hmo.GetXaxis().FindBin(120000) |
Definition at line 351 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.bin4 = hmo.GetXaxis().FindBin(250000) |
Definition at line 352 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.campaign = args.campaign |
Definition at line 40 of file dqt_zlumi_pandas.py.
float dqt_zlumi_pandas.CORRECTIONS = ZPURITYFACTOR/ACCEPTANCE/ZXSEC |
Definition at line 404 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.csvfile = open(out_dir, 'w') |
Definition at line 223 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.csvwriter = csv.writer(csvfile, delimiter=',') |
Definition at line 224 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.default |
Definition at line 31 of file dqt_zlumi_pandas.py.
int dqt_zlumi_pandas.defaulted_reco_eff = 0 |
Definition at line 373 of file dqt_zlumi_pandas.py.
int dqt_zlumi_pandas.defaulted_trig_eff = 0 |
Definition at line 374 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.divisor = lb_length.Clone('divisor').ProjectionX() |
Definition at line 143 of file dqt_zlumi_pandas.py.
bool dqt_zlumi_pandas.do_toys = False |
Definition at line 52 of file dqt_zlumi_pandas.py.
int dqt_zlumi_pandas.eff = 0 |
Definition at line 182 of file dqt_zlumi_pandas.py.
float dqt_zlumi_pandas.eff_Acomb = ACCEPTANCE * eff_comb |
Definition at line 394 of file dqt_zlumi_pandas.py.
tuple dqt_zlumi_pandas.eff_comb = np.median(nonan_arr_comb) |
Definition at line 388 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.eff_reco |
Definition at line 339 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.eff_trig |
Definition at line 327 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.effcy = arr_comb * dq_cf.correction(official_mu[ibin], channel, campaign, runnumber) |
Definition at line 398 of file dqt_zlumi_pandas.py.
tuple dqt_zlumi_pandas.effcyerr = err_comb * dq_cf.correction(official_mu[ibin], channel, campaign, runnumber) |
Definition at line 401 of file dqt_zlumi_pandas.py.
int dqt_zlumi_pandas.err = 0 |
Definition at line 182 of file dqt_zlumi_pandas.py.
float dqt_zlumi_pandas.err_Acomb = ACCEPTANCE * err_comb |
Definition at line 395 of file dqt_zlumi_pandas.py.
tuple dqt_zlumi_pandas.err_comb = nonan_arr_comb.std() |
Definition at line 389 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.err_reco |
Definition at line 339 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.err_trig |
Definition at line 327 of file dqt_zlumi_pandas.py.
int dqt_zlumi_pandas.error_index = len(out_dict['Zee'])-2 |
Definition at line 421 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.fin = ROOT.TFile.Open(args.infile) |
Definition at line 54 of file dqt_zlumi_pandas.py.
string dqt_zlumi_pandas.fit_type = "pol0" |
Definition at line 215 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.format |
Definition at line 26 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.grl = grlReader.GetMergedGRLCollection() |
Definition at line 86 of file dqt_zlumi_pandas.py.
Definition at line 89 of file dqt_zlumi_pandas.py.
Definition at line 88 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.grlReader = ROOT.Root.TGoodRunsListReader(args.grl) |
Definition at line 84 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.h = fin.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_eltrigtp_matches_os' % (runname, lb)) |
Definition at line 282 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.help |
Definition at line 29 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.hmo = fin.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_good_os' % (runname, lb)) |
Definition at line 176 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.hms = fin.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_good_ss' % (runname, lb)) |
Definition at line 177 of file dqt_zlumi_pandas.py.
string dqt_zlumi_pandas.hname = runname + '/lb_'+str(int(ibin+lbmin-0.5))+'/GLOBAL/DQTGlobalWZFinder/m_Z_mass_opsele' |
Definition at line 279 of file dqt_zlumi_pandas.py.
Definition at line 178 of file dqt_zlumi_pandas.py.
Definition at line 179 of file dqt_zlumi_pandas.py.
Definition at line 151 of file dqt_zlumi_pandas.py.
Definition at line 152 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.iovs_acct = fetch_iovs('COOLOFL_TRIGGER::/TRIGGER/OFLLUMI/LumiAccounting', lbtime.first.since, lbtime.last.until, tag=args.tag) |
Definition at line 111 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.iovs_lum = fetch_iovs('COOLOFL_TRIGGER::%s' % args.lumifolder, lblb.first.since, lblb.last.until, tag=args.lumitag, channels=[0]) |
Definition at line 115 of file dqt_zlumi_pandas.py.
string dqt_zlumi_pandas.lb = "lb_" + str(this_lb) |
Definition at line 173 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.lb_end |
Definition at line 425 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.lb_full = lb_length.Clone('lb_full').ProjectionX() |
Definition at line 142 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.lb_length = ROOT.TProfile('lb_length', 'LB length', int(lbmax-lbmin), lbmin, lbmax) |
Definition at line 93 of file dqt_zlumi_pandas.py.
string dqt_zlumi_pandas.lb_length_name = '%s/GLOBAL/DQTGlobalWZFinder/duration_vs_LB' % runname |
Definition at line 76 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.lb_length_old = fin.Get(lb_length_name) |
Definition at line 91 of file dqt_zlumi_pandas.py.
dictionary dqt_zlumi_pandas.lb_lhcfill = {} |
Definition at line 118 of file dqt_zlumi_pandas.py.
dictionary dqt_zlumi_pandas.lb_minus_one_reco_eff = [1.0, 1.0, 1.0] |
Definition at line 170 of file dqt_zlumi_pandas.py.
dictionary dqt_zlumi_pandas.lb_minus_one_trig_eff = {} |
Definition at line 234 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.lb_start |
Definition at line 425 of file dqt_zlumi_pandas.py.
dictionary dqt_zlumi_pandas.lb_start_end = {} |
Definition at line 117 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.lblb = fetch_iovs("LBLB", runs=runnumber) |
Definition at line 109 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.lbmax |
Definition at line 92 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.lbmin |
Definition at line 92 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.lbtime = inverse_lblb(lblb) |
Definition at line 110 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.level |
Definition at line 26 of file dqt_zlumi_pandas.py.
Definition at line 102 of file dqt_zlumi_pandas.py.
string dqt_zlumi_pandas.livetime_name = '%s/GLOBAL/DQTGlobalWZFinder/avgLiveFrac_vs_LB' % runname |
Definition at line 77 of file dqt_zlumi_pandas.py.
int dqt_zlumi_pandas.loclivetime = divisor[ibin] |
Definition at line 246 of file dqt_zlumi_pandas.py.
int dqt_zlumi_pandas.lumi_index = len(out_dict['Zee'])-3 |
Definition at line 420 of file dqt_zlumi_pandas.py.
Definition at line 353 of file dqt_zlumi_pandas.py.
Definition at line 354 of file dqt_zlumi_pandas.py.
Definition at line 355 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.N1 = 0 |
Definition at line 322 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.N2 = h.GetBinContent(3) |
Definition at line 325 of file dqt_zlumi_pandas.py.
Definition at line 356 of file dqt_zlumi_pandas.py.
Definition at line 357 of file dqt_zlumi_pandas.py.
Definition at line 387 of file dqt_zlumi_pandas.py.
int dqt_zlumi_pandas.ntoys = 10000000 |
Definition at line 51 of file dqt_zlumi_pandas.py.
dictionary dqt_zlumi_pandas.o_recoeff_fit = {} |
Definition at line 166 of file dqt_zlumi_pandas.py.
dictionary dqt_zlumi_pandas.o_recoerr_fit = {} |
Definition at line 167 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.official_lum_zero = ROOT.TProfile('official_lum_zero', 'official inst luminosity', int(lbmax-lbmin), lbmin, lbmax) |
Definition at line 106 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.official_mu = ROOT.TProfile('official_mu', 'official mu', int(lbmax-lbmin), lbmin, lbmax) |
Definition at line 107 of file dqt_zlumi_pandas.py.
Definition at line 133 of file dqt_zlumi_pandas.py.
dictionary dqt_zlumi_pandas.out_dict = {} |
Definition at line 241 of file dqt_zlumi_pandas.py.
string dqt_zlumi_pandas.out_dir = args.outdir |
Definition at line 69 of file dqt_zlumi_pandas.py.
list dqt_zlumi_pandas.out_write = [this_fill, runnumber, this_lb, lb_start, lb_end, loclivetime, lb_full[ibin], official_lum_zero[ibin], official_mu[ibin], passgrl] + out_dict["Zee"] + out_dict["Zmumu"] + [zll_lumi, zll_lumi_err] |
Definition at line 429 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.parser = argparse.ArgumentParser() |
Definition at line 28 of file dqt_zlumi_pandas.py.
int dqt_zlumi_pandas.passgrl = 1 |
Definition at line 267 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.pileup = round(official_mu[ibin]) |
Definition at line 174 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.px = livetime.ProjectionX() |
Definition at line 144 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.runname = None |
Definition at line 55 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.runnumber = int(runname.replace('run_','')) |
Definition at line 59 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.str |
Definition at line 29 of file dqt_zlumi_pandas.py.
Definition at line 358 of file dqt_zlumi_pandas.py.
Definition at line 359 of file dqt_zlumi_pandas.py.
Definition at line 360 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.tg_fit = ROOT.TGraphErrors(len(arr_mu), arr_mu, arr_rec_eff, ROOT.nullptr, arr_rec_err) |
Definition at line 213 of file dqt_zlumi_pandas.py.
string dqt_zlumi_pandas.this_fill = lb_lhcfill[this_lb] |
Definition at line 262 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.this_lb = int(lb_full.GetBinCenter(ibin)) |
Definition at line 172 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.type |
Definition at line 29 of file dqt_zlumi_pandas.py.
Definition at line 189 of file dqt_zlumi_pandas.py.
Definition at line 311 of file dqt_zlumi_pandas.py.
dqt_zlumi_pandas.z_merr = math.sqrt(z_m) |
Definition at line 312 of file dqt_zlumi_pandas.py.
list dqt_zlumi_pandas.zee_missing_lbs = [] |
Definition at line 48 of file dqt_zlumi_pandas.py.
tuple dqt_zlumi_pandas.zll_lumi = (out_dict['Zee'][lumi_index] + out_dict['Zmumu'][lumi_index])/2 |
Definition at line 422 of file dqt_zlumi_pandas.py.
float dqt_zlumi_pandas.zll_lumi_err = 0.5 * math.sqrt( pow(out_dict['Zee'][error_index], 2) + pow(out_dict['Zmumu'][error_index], 2) ) |
Definition at line 423 of file dqt_zlumi_pandas.py.
tuple dqt_zlumi_pandas.zlumi = 0.0 |
Definition at line 403 of file dqt_zlumi_pandas.py.
float dqt_zlumi_pandas.zlumistat = arr_zlumi.std() |
Definition at line 410 of file dqt_zlumi_pandas.py.
list dqt_zlumi_pandas.zmumu_missing_lbs = [] |
Definition at line 49 of file dqt_zlumi_pandas.py.
float dqt_zlumi_pandas.ZPURITYFACTOR = 0.9935 |
Definition at line 42 of file dqt_zlumi_pandas.py.
float dqt_zlumi_pandas.zrate = zlumi / CORRECTIONS |
Definition at line 411 of file dqt_zlumi_pandas.py.
float dqt_zlumi_pandas.ZXSEC = 2.0675 |
Definition at line 44 of file dqt_zlumi_pandas.py.