CMS 3D CMS Logo

Classes | Functions
checkBTagCalibrationConsistency Namespace Reference

Classes

class  BtagCalibConsistencyChecker
 

Functions

def _eta_pt_discr_entries_generator (filter_keyfunc, op)
 
def run_check (filename, op=True, sys=True, flavor=True)
 
def run_check_csv (csv_data, op=True, sys=True, flavor=True)
 
def run_check_data (data_loaders, op=True, sys=True, flavor=True)
 

Function Documentation

def checkBTagCalibrationConsistency._eta_pt_discr_entries_generator (   filter_keyfunc,
  op 
)
private

Definition at line 20 of file checkBTagCalibrationConsistency.py.

References any(), ALCARECOTkAlBeamHalo_cff.filter, and list().

Referenced by checkBTagCalibrationConsistency.BtagCalibConsistencyChecker._check_coverage(), and checkBTagCalibrationConsistency.BtagCalibConsistencyChecker._check_sys_side().

20 def _eta_pt_discr_entries_generator(filter_keyfunc, op):
21  assert data
22  entries = list(filter(filter_keyfunc, data.entries))
23 
24  # use full or half eta range?
25  if any(e.params.etaMin < 0. for e in entries):
26  eta_test_points = data.eta_test_points
27  else:
28  eta_test_points = data.abseta_test_points
29 
30  for eta in eta_test_points:
31  for pt in data.pt_test_points:
32  ens_pt_eta = [e for e in entries if e.params.etaMin < eta < e.params.etaMax and
33  e.params.ptMin < pt < e.params.ptMax]
34  if op == 3:
35  for discr in data.discr_test_points:
36  ens_pt_eta_discr = [e for e in ens_pt_eta if e.params.discrMin < discr < e.params.discrMax]
37  yield eta, pt, discr, ens_pt_eta_discr
38  else:
39  yield eta, pt, None, ens_pt_eta
40 
41 
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
def _eta_pt_discr_entries_generator(filter_keyfunc, op)
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
def checkBTagCalibrationConsistency.run_check (   filename,
  op = True,
  sys = True,
  flavor = True 
)

Definition at line 216 of file checkBTagCalibrationConsistency.py.

References dataLoader.get_data(), and run_check_data().

Referenced by run_check_data().

216 def run_check(filename, op=True, sys=True, flavor=True):
217  loaders = dataLoader.get_data(filename)
218  return run_check_data(loaders, op, sys, flavor)
219 
220 
def run_check(filename, op=True, sys=True, flavor=True)
def run_check_data(data_loaders, op=True, sys=True, flavor=True)
def get_data(filename)
Definition: dataLoader.py:191
def checkBTagCalibrationConsistency.run_check_csv (   csv_data,
  op = True,
  sys = True,
  flavor = True 
)

Definition at line 221 of file checkBTagCalibrationConsistency.py.

References dataLoader.get_data_csv(), and run_check_data().

221 def run_check_csv(csv_data, op=True, sys=True, flavor=True):
222  loaders = dataLoader.get_data_csv(csv_data)
223  return run_check_data(loaders, op, sys, flavor)
224 
225 
def run_check_csv(csv_data, op=True, sys=True, flavor=True)
def get_data_csv(csv_data)
Definition: dataLoader.py:158
def run_check_data(data_loaders, op=True, sys=True, flavor=True)
def checkBTagCalibrationConsistency.run_check_data (   data_loaders,
  op = True,
  sys = True,
  flavor = True 
)

Definition at line 227 of file checkBTagCalibrationConsistency.py.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor.all(), electrons_cff.bool, cmsRelvalreport.exit, edm.print(), writedatasetfile.run, and run_check().

Referenced by run_check(), and run_check_csv().

227  op=True, sys=True, flavor=True):
228  global data, check_op, check_sys, check_flavor
229  check_op, check_sys, check_flavor = op, sys, flavor
230 
231  all_res = []
232  for dat in data_loaders:
233  data = dat
234  print('\n\n')
235  print('# Checking csv data for type / op / flavour:', \
236  data.meas_type, data.op, data.flav)
237  print('='*60 + '\n')
238  if verbose:
239  data.print_data()
240  testsuite = unittest.TestLoader().loadTestsFromTestCase(
241  BtagCalibConsistencyChecker)
242  res = unittest.TextTestRunner().run(testsuite)
243  all_res.append(not bool(res.failures))
244  return all_res
245 
246 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66