DAS  3.0
Das Analysis System
Filters

#include <Filters.h>

+ Collaboration diagram for Filters:

Public Member Functions

 Filters (int year)
 
void operator() (MET *met, RecEvent *event)
 

Public Attributes

vector< TString > METnames
 
vector< int > METbitsToApply
 

Constructor & Destructor Documentation

◆ Filters()

Filters ( int  year)
inline
Todo:
Check list of filters for 2016
Todo:
Check list of filters for 2017 and 18
31  {
32  switch (year) {
33  case 2016:
34  METnames = {"goodVertices", "globalSuperTightHalo2016Filter", "HBHENoiseFilter",
35  "HBHENoiseIsoFilter", "EcalDeadCellTriggerPrimitiveFilter",
36  "BadPFMuonFilter", /*this one destroys Herwig16, for some reason*/
37  "BadPFMuonDzFilter", //always return null value, to be better studied
38  "BadChargedCandidateFilter", /*this one too, but anyway, it is no longer recommended for any */
39  "eeBadScFilter" /*this one is useless*/};
40 
41  METbitsToApply = {0, 1, 2, 3, 4, 5, 6, /*7,*/ 8};
42  break;
43  case 2017:
44  case 2018:
45  // filters 6 and 9 always null, to be better investigated!!! filters 7 and 8 not recommended
46  METnames = {"goodVertices", "globalSuperTightHalo2016Filter", "HBHENoiseFilter",
47  "HBHENoiseIsoFilter", "EcalDeadCellTriggerPrimitiveFilter",
48  "BadPFMuonFilter", /*this one destroys Herwig16, for some reason*/
49  "BadPFMuonDzFilter",
50  "BadChargedCandidateFilter",
51  "eeBadScFilter",
52  "hfNoisyHitsFilter",
53  "ecalBadCalibFilter"};
54  METbitsToApply = {0, 1, 2, 3, 4, 5, 6, /*7,*/ 8, /*9,*/ 10};
55  break;
56  default:
57  BOOST_THROW_EXCEPTION( invalid_argument(Form("%d is not (currently) not handled.", year)) );
58  }
59 
60  cout << "MET bits:";
61  for (auto bit: METbitsToApply)
62  cout << ' ' << bit;
63  cout << endl;
64  }

Member Function Documentation

◆ operator()()

void operator() ( MET met,
RecEvent event 
)
inline
67  {
68  // testing MET filters
69  bool passFilters = true;
70  // BadChargedCandidateFilter is no longer recommended
71  for (size_t ibit = 0; ibit < METnames.size(); ++ibit) {
72 
73  bool bit = met->Bit.at(ibit);
74 
75  if (find(METbitsToApply.begin(), METbitsToApply.end(), ibit) != METbitsToApply.end())
76  passFilters = passFilters && bit;
77  }
78 
79  if (!passFilters)
80  event->weights *= 0;
81  }

Member Data Documentation

◆ METbitsToApply

vector<int> METbitsToApply

◆ METnames

vector<TString> METnames

The documentation for this struct was generated from the following file:
Ntupliser_cfg.year
int year
Definition: Ntupliser_cfg.py:63
DAS::MissingET::Filters::METnames
vector< TString > METnames
Definition: Filters.h:23
DAS::MET::Bit
std::vector< bool > Bit
flags for application of MET filters (see n-tupliser config file)
Definition: Event.h:89
met
DAS::MET met
Definition: classes.h:28
DAS::MissingET::Filters::METbitsToApply
vector< int > METbitsToApply
Definition: Filters.h:24