5 import checkBTagCalibrationConsistency
as checker
10 lambda e: e.params.jetFlavor == 0,
13 flav_b_data = sorted(flav_b_data, key=
lambda e: e.params.operatingPoint)
14 flav_b_data = sorted(flav_b_data, key=
lambda e: e.params.measurementType)
15 flav_b_data = sorted(flav_b_data, key=
lambda e: e.params.etaMin)
16 flav_b_data = sorted(flav_b_data, key=
lambda e: e.params.ptMin)
17 flav_b_data = sorted(flav_b_data, key=
lambda e: e.params.discrMin)
18 sys_groups = itertools.groupby(flav_b_data,
19 key=
lambda e: e.params.operatingPoint)
21 def gen_entry_dict(groups):
24 entries_by_sys =
dict((e.params.sysType, e)
for e
in grp)
25 assert len(grp) == len(entries_by_sys)
27 sys_dicts = gen_entry_dict(sys_groups)
29 def gen_flavb_csv_line(dicts):
31 central = d.pop(
'central')
32 central.params.jetFlavor = 1
33 yield central.makeCSVLine()
34 for e
in d.itervalues():
35 e.params.jetFlavor = 1
36 e.formula =
'2*(%s)-(%s)' % (e.formula, central.formula)
38 csv_lines = gen_flavb_csv_line(sys_dicts)
40 return list(l
for l
in csv_lines)
45 print 'Need input/output filenames as first/second arguments. Exit.'
47 if os.path.exists(sys.argv[2]):
48 print 'Output file exists. Exit.'
51 print '\nChecking input file consistency...'
53 checks = checker.run_check_data(loaders,
True,
True,
False)
54 for res, data
in itertools.izip(checks, loaders):
57 print 'Checks on input file failed for %s. Exit.' % typ
59 if not 0
in data.flavs:
60 print 'FLAV_B not found in input file for %s. Exit.' % typ
63 print 'FLAV_C already present in input file for %s. Exit.' % typ
66 print '\nGenerating new csv content...'
67 new_csv_data =
list(itertools.chain.from_iterable(
73 with open(sys.argv[1])
as f:
74 old_csv_data = f.readlines()
76 with open(sys.argv[2],
'w')
as f:
77 f.writelines(old_csv_data)
79 f.writelines(new_csv_data)
84 if __name__ ==
'__main__':
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