Classes | |
class | Assoc |
class | Flash |
Define objects #. More... | |
class | Hit |
Functions | |
def | ApproxCompare (left, right, tolerance=0.001) |
Define utility functions #. More... | |
def | CountFailures (left, right) |
def | ListFailures (left, right) |
def | ListFailuresFlash (left, right) |
def | ListFailuresAssoc (left, right) |
def | ListFailuresHit (left, right) |
Variables | |
bool | startup = False |
Parse arguments #. More... | |
string | usage = "usage: %prog -n <nominal file> -t <test file> [-o <dir>] [-s] [-d] [-e 0,1] [--opdets=0,1] " |
parser = OptionParser(usage=usage) | |
dest | |
help | |
metavar | |
default | |
False | |
action | |
options | |
args | |
list | versions = [ "nominal", "test" ] |
S = versions[0] | |
R = versions[1] | |
dictionary | files = {} |
dictionary | hittrees = {} |
dictionary | flashtrees = {} |
dictionary | assoctrees = {} |
dictionary | all = {} |
Flash Comparison #. More... | |
onlies = copy.deepcopy(all) | |
Hit Comparison #. More... | |
int | iS = 0 |
list | matches = [] |
int | failures = [0]*8 |
bool | found = False |
index = all[E][v].index(flsh) | |
failures_here = ListFailures(flsh[S],flsh[R]) | |
maxval = len(onlies[E][S]) | |
list | widgets |
pbar = pb.ProgressBar(widgets=widgets, maxval=maxval, term_width=100) | |
end | |
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for iR in range(len(onlies[E][R])): if onlies[E][S][iS] == onlies[E][R][iR]: matches.append( { S: onlies[E][S].pop( iS ), R: onlies[E][R].pop( iR ) } ) found = True break if not found: matches.append( { S: iS += 1 if iS >= len(onlies[E][S]): break pbar.finish() print "" More... | |
dictionary | color = { S:kBlack, R:kRed } |
Flash and Hit Plots #. More... | |
string | hstyle = "hist" |
int | mstyle = 20 |
int | lstyle = 2 |
int | nbins = 100 |
c1 = TCanvas("c1","c1") | |
h1 = gROOT.FindObject("h"+name+"1") | |
h2 = gROOT.FindObject("h"+name+"2") | |
hRatio = h2.Clone("hRatio") | |
ratio | |
True | |
forceOne | |
ignoreError | |
l1 = TLine(gPad.GetUxmin(), 1, gPad.GetUxmax(), 1) | |
def ValidateOpDetReco.ApproxCompare | ( | left, | |
right, | |||
tolerance = 0.001 |
|||
) |
Define utility functions #.
Definition at line 58 of file ValidateOpDetReco.py.
def ValidateOpDetReco.CountFailures | ( | left, | |
right | |||
) |
Definition at line 64 of file ValidateOpDetReco.py.
def ValidateOpDetReco.ListFailures | ( | left, | |
right | |||
) |
Definition at line 67 of file ValidateOpDetReco.py.
def ValidateOpDetReco.ListFailuresAssoc | ( | left, | |
right | |||
) |
Definition at line 87 of file ValidateOpDetReco.py.
def ValidateOpDetReco.ListFailuresFlash | ( | left, | |
right | |||
) |
Definition at line 72 of file ValidateOpDetReco.py.
def ValidateOpDetReco.ListFailuresHit | ( | left, | |
right | |||
) |
Definition at line 100 of file ValidateOpDetReco.py.
ValidateOpDetReco.action |
Definition at line 26 of file ValidateOpDetReco.py.
dictionary ValidateOpDetReco.all = {} |
Flash Comparison #.
Definition at line 335 of file ValidateOpDetReco.py.
ValidateOpDetReco.args |
Definition at line 32 of file ValidateOpDetReco.py.
dictionary ValidateOpDetReco.assoctrees = {} |
Definition at line 319 of file ValidateOpDetReco.py.
ValidateOpDetReco.c1 = TCanvas("c1","c1") |
Definition at line 586 of file ValidateOpDetReco.py.
dictionary ValidateOpDetReco.color = { S:kBlack, R:kRed } |
Definition at line 578 of file ValidateOpDetReco.py.
ValidateOpDetReco.default |
Definition at line 25 of file ValidateOpDetReco.py.
ValidateOpDetReco.dest |
Definition at line 23 of file ValidateOpDetReco.py.
ValidateOpDetReco.end |
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for iR in range(len(onlies[E][R])): if onlies[E][S][iS] == onlies[E][R][iR]: matches.append( { S: onlies[E][S].pop( iS ), R: onlies[E][R].pop( iR ) } ) found = True break if not found: matches.append( { S: iS += 1 if iS >= len(onlies[E][S]): break pbar.finish() print ""
Definition at line 548 of file ValidateOpDetReco.py.
int ValidateOpDetReco.failures = [0]*8 |
Definition at line 354 of file ValidateOpDetReco.py.
ValidateOpDetReco.failures_here = ListFailures(flsh[S],flsh[R]) |
Definition at line 385 of file ValidateOpDetReco.py.
ValidateOpDetReco.False |
Definition at line 26 of file ValidateOpDetReco.py.
dictionary ValidateOpDetReco.files = {} |
Definition at line 313 of file ValidateOpDetReco.py.
dictionary ValidateOpDetReco.flashtrees = {} |
Definition at line 318 of file ValidateOpDetReco.py.
ValidateOpDetReco.forceOne |
Definition at line 614 of file ValidateOpDetReco.py.
Definition at line 358 of file ValidateOpDetReco.py.
ValidateOpDetReco.h1 = gROOT.FindObject("h"+name+"1") |
Definition at line 601 of file ValidateOpDetReco.py.
ValidateOpDetReco.h2 = gROOT.FindObject("h"+name+"2") |
Definition at line 602 of file ValidateOpDetReco.py.
ValidateOpDetReco.help |
Definition at line 23 of file ValidateOpDetReco.py.
dictionary ValidateOpDetReco.hittrees = {} |
Definition at line 317 of file ValidateOpDetReco.py.
ValidateOpDetReco.hRatio = h2.Clone("hRatio") |
Definition at line 610 of file ValidateOpDetReco.py.
string ValidateOpDetReco.hstyle = "hist" |
Definition at line 579 of file ValidateOpDetReco.py.
ValidateOpDetReco.ignoreError |
Definition at line 614 of file ValidateOpDetReco.py.
Definition at line 379 of file ValidateOpDetReco.py.
int ValidateOpDetReco.iS = 0 |
Definition at line 351 of file ValidateOpDetReco.py.
ValidateOpDetReco.l1 = TLine(gPad.GetUxmin(), 1, gPad.GetUxmax(), 1) |
Definition at line 616 of file ValidateOpDetReco.py.
int ValidateOpDetReco.lstyle = 2 |
Definition at line 581 of file ValidateOpDetReco.py.
list ValidateOpDetReco.matches = [] |
Definition at line 353 of file ValidateOpDetReco.py.
Definition at line 420 of file ValidateOpDetReco.py.
ValidateOpDetReco.metavar |
Definition at line 23 of file ValidateOpDetReco.py.
int ValidateOpDetReco.mstyle = 20 |
Definition at line 580 of file ValidateOpDetReco.py.
int ValidateOpDetReco.nbins = 100 |
Definition at line 583 of file ValidateOpDetReco.py.
dictionary ValidateOpDetReco.onlies = copy.deepcopy(all) |
ValidateOpDetReco.options |
Definition at line 32 of file ValidateOpDetReco.py.
Definition at line 22 of file ValidateOpDetReco.py.
Definition at line 424 of file ValidateOpDetReco.py.
ValidateOpDetReco.R = versions[1] |
Definition at line 311 of file ValidateOpDetReco.py.
ValidateOpDetReco.ratio |
Definition at line 614 of file ValidateOpDetReco.py.
ValidateOpDetReco.S = versions[0] |
Definition at line 310 of file ValidateOpDetReco.py.
Parse arguments #.
Definition at line 15 of file ValidateOpDetReco.py.
ValidateOpDetReco.True |
Definition at line 614 of file ValidateOpDetReco.py.
string ValidateOpDetReco.usage = "usage: %prog -n <nominal file> -t <test file> [-o <dir>] [-s] [-d] [-e 0,1] [--opdets=0,1] " |
Definition at line 21 of file ValidateOpDetReco.py.
list ValidateOpDetReco.versions = [ "nominal", "test" ] |
Definition at line 309 of file ValidateOpDetReco.py.
list ValidateOpDetReco.widgets |
Definition at line 421 of file ValidateOpDetReco.py.