2 #include <system_error>
14 namespace pt = boost::property_tree;
15 namespace fs = filesystem;
34 METnames = {
"goodVertices",
"globalSuperTightHalo2016Filter",
"HBHENoiseFilter",
35 "HBHENoiseIsoFilter",
"EcalDeadCellTriggerPrimitiveFilter",
38 "BadChargedCandidateFilter",
41 METbitsToApply = {0, 1, 2, 3, 4, 5, 6, 8};
46 METnames = {
"goodVertices",
"globalSuperTightHalo2016Filter",
"HBHENoiseFilter",
47 "HBHENoiseIsoFilter",
"EcalDeadCellTriggerPrimitiveFilter",
50 "BadChargedCandidateFilter",
53 "ecalBadCalibFilter"};
54 METbitsToApply = {0, 1, 2, 3, 4, 5, 6, 8, 10};
57 BOOST_THROW_EXCEPTION( invalid_argument(Form(
"%d is not (currently) not handled.",
year)) );
61 for (
auto bit: METbitsToApply)
69 bool passFilters =
true;
71 for (
size_t ibit = 0; ibit < METnames.size(); ++ibit) {
73 bool bit =
met->
Bit.at(ibit);
75 if (find(METbitsToApply.begin(), METbitsToApply.end(), ibit) != METbitsToApply.end())
76 passFilters = passFilters && bit;