6 ROOT.gROOT.ProcessLine(
'.L BTagCalibrationStandalone.cc+')
10 except AttributeError:
11 print 'ROOT.BTagEntry is needed! Please copy ' \
12 'BTagCalibrationStandalone.[h|cc] to the working directory. Exit.'
15 separate_by_op =
False
16 separate_by_flav =
False
20 def __init__(self, csv_data, measurement_type, operating_point, flavour):
22 self.
op = operating_point
32 if (e.params.measurementType == measurement_type
33 and ((
not separate_by_op)
34 or e.params.operatingPoint == operating_point)
35 and ((
not separate_by_flav)
36 or e.params.jetFlavor == flavour)
40 raise RuntimeError(
"Error: can not interpret line: " + l)
47 self.
ops = set(e.params.operatingPoint
for e
in ens)
48 self.
flavs = set(e.params.jetFlavor
for e
in ens)
49 self.
syss = set(e.params.sysType
for e
in ens)
50 self.
etas = set((e.params.etaMin, e.params.etaMax)
for e
in ens)
51 self.
pts = set((e.params.ptMin, e.params.ptMax)
for e
in ens)
52 self.
discrs = set((e.params.discrMin, e.params.discrMax)
54 if e.params.operatingPoint == 3)
60 if any(e.params.operatingPoint == 3
for e
in ens):
64 if e.params.operatingPoint == 3
69 if e.params.operatingPoint == 3
77 eta_test_points =
list(itertools.ifilter(
80 (a + eps
for a, _
in self.
etas),
81 (a - eps
for a, _
in self.
etas),
82 (b + eps
for _, b
in self.
etas),
83 (b - eps
for _, b
in self.
etas),
87 abseta_test_points =
list(itertools.ifilter(
88 lambda x: 0. < x < self.
ETA_MAX,
90 (a + eps
for a, _
in self.
etas),
91 (a - eps
for a, _
in self.
etas),
92 (b + eps
for _, b
in self.
etas),
93 (b - eps
for _, b
in self.
etas),
97 pt_test_points =
list(itertools.ifilter(
100 (a + eps
for a, _
in self.
pts),
101 (a - eps
for a, _
in self.
pts),
102 (b + eps
for _, b
in self.
pts),
103 (b - eps
for _, b
in self.
pts),
107 discr_test_points =
list(itertools.ifilter(
110 (a + eps
for a, _
in self.
discrs),
111 (a - eps
for a, _
in self.
discrs),
112 (b + eps
for _, b
in self.
discrs),
113 (b - eps
for _, b
in self.
discrs),
124 print "\nFound operating points:"
127 print "\nFound jet flavors:"
130 print "\nFound sys types (need at least 'central', 'up', 'down'; " \
131 "also 'up_SYS'/'down_SYS' compatibility is checked):"
134 print "\nFound eta ranges: (need everything covered from %g or 0. " \
138 print "\nFound pt ranges: (need everything covered from %g " \
142 print "\nFound discr ranges: (only needed for operatingPoint==3, " \
146 print "\nTest points for eta (bounds +- epsilon):"
149 print "\nTest points for pt (bounds +- epsilon):"
152 print "\nTest points for discr (bounds +- epsilon):"
160 l.split(
',')[1].strip()
162 if len(l.split()) == 11
169 if len(l.split()) == 11
170 )
if separate_by_op
else [
'all']
176 if len(l.split()) == 11
177 )
if separate_by_flav
else [
'all']
186 lds =
filter(
lambda d: d.entries, lds)
191 with open(filename)
as f:
192 csv_data = f.readlines()
193 if not (csv_data
and "OperatingPoint" in csv_data[0]):
194 print "Data file does not contain typical header: %s. Exit" % filename
bool any(const std::vector< T > &v, const T &what)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run