ATLAS Offline Software
EventCleaningSelection.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3  */
4 
6 #include "TopEvent/EventTools.h"
8 
12 #include "xAODMuon/MuonContainer.h"
16 
17 
18 #include <algorithm>
19 #include <sstream>
20 #include <list>
22 
23 namespace top {
25  asg::AsgTool(name),
26  m_config(nullptr),
27 
28  m_grlTool("GoodRunsListSelectionTool"),
29 
30  m_trigConfTool("xAODConfigTool"),
31  m_trigDecisionTool("TrigDecisionTool"),
32  m_trigMatchTool("MatchingTool"),
33  m_trigMatchTauTool("TrigTauMatchingTool"),
34  m_globalTriggerSF("TrigGlobalEfficiencyCorrectionTool::TrigGlobal"),
35  m_globalTriggerSFLoose("TrigGlobalEfficiencyCorrectionTool::TrigGlobalLoose"),
36 
37  m_vetoEventsTrigger(false),
38  m_vetoEventsGRL(false),
39  m_vetoEventsGoodCalo(false),
40  m_vetoEventsPriVtx(true) {
41  declareProperty("config", m_config);
42 
43  declareProperty("GRLTool", m_grlTool);
44 
45  declareProperty("TrigConfigTool", m_trigConfTool);
46  declareProperty("TrigDecisionTool", m_trigDecisionTool);
47  declareProperty("TrigMatchTool", m_trigMatchTool);
48  declareProperty("TrigMatchTauTool", m_trigMatchTauTool);
49  }
50 
52  // If running on a Truth DxAOD we don't need anything so
53  // just return successfully...
54  if (m_config->isTruthDxAOD()) return StatusCode::SUCCESS;
55 
56  top::check(m_trigConfTool.retrieve(), "Failed to retrieve TrigConfTool");
57  top::check(m_trigDecisionTool.retrieve(), "Failed to retrieve TrigDecisionTool");
58  top::check(m_trigMatchTool.retrieve(),
59  "Failed to retrieve trigger matching tool");
60  if (m_config->useTaus()) top::check(m_trigMatchTauTool.retrieve(),
61  "Failed to retrieve TrigMatchTauTool");
62 
63  if (!m_config->isMC()) {
64  top::check(m_grlTool.retrieve(), "Failed to retrieve TrigDecisionTool");
65  }
66 
67  m_vetoEventsPriVtx = m_config->demandPriVtx();
68 
69  return StatusCode::SUCCESS;
70  }
71 
72  void EventCleaningSelection::setEventSelections(const std::vector<top::SelectionConfigurationData>& selections) {
73  std::set<std::pair<std::string, int> > tmpAllTriggers_Tight;
74  std::set<std::pair<std::string, int> > tmpAllTriggers_Loose;
75 
76  // get full list of global triggers
77  std::vector<std::pair<std::string, int> > globalTriggers_Tight;
78  std::vector<std::pair<std::string, int> > globalTriggers_Loose;
79  std::vector<std::pair<std::string, int> > globalElectronTriggers_Tight;
80  std::vector<std::pair<std::string, int> > globalElectronTriggers_Loose;
81  std::vector<std::pair<std::string, int> > globalMuonTriggers_Tight;
82  std::vector<std::pair<std::string, int> > globalMuonTriggers_Loose;
83  std::vector<std::pair<std::string, int> > globalPhotonTriggers_Tight;
84  std::vector<std::pair<std::string, int> > globalPhotonTriggers_Loose;
85 
86  if (m_config->useGlobalTrigger()) {
87  std::set<std::pair<std::string, int> > tmp;
88  for (auto const& triggermap : {m_config->getGlobalTriggers()}) {
89  for (auto const& pair : triggermap) {
90  auto const& triggers = getIndividualFromGlobalTriggers(pair.second);
91  tmp.insert(triggers.begin(), triggers.end());
92  }
93  }
94  globalTriggers_Tight.assign(tmp.begin(), tmp.end());
95  for (std::pair<std::string, int> const& trigger : globalTriggers_Tight) {
96  if (isElectronTrigger(trigger.first)) globalElectronTriggers_Tight.push_back(trigger);
97  if (isMuonTrigger(trigger.first)) globalMuonTriggers_Tight.push_back(trigger);
98  if (isPhotonTrigger(trigger.first)) globalPhotonTriggers_Tight.push_back(trigger);
99  }
100  tmp.clear();
101  // and the usual copy-paste-s/Tight/Loose/g story:
102  for (auto const& triggermap : {m_config->getGlobalTriggersLoose()}) {
103  for (auto const& pair : triggermap) {
104  auto const& triggers = getIndividualFromGlobalTriggers(pair.second);
105  tmp.insert(triggers.begin(), triggers.end());
106  }
107  }
108  globalTriggers_Loose.assign(tmp.begin(), tmp.end());
109  for (std::pair<std::string, int> const& trigger : globalTriggers_Loose) {
110  if (isElectronTrigger(trigger.first)) globalElectronTriggers_Loose.push_back(trigger);
111  if (isMuonTrigger(trigger.first)) globalMuonTriggers_Loose.push_back(trigger);
112  if (isPhotonTrigger(trigger.first)) globalPhotonTriggers_Loose.push_back(trigger);
113  }
114  }
115 
116  m_allTriggers_Tight.clear();
117  m_electronTriggers_Tight.clear();
118  m_muonTriggers_Tight.clear();
119  m_tauTriggers_Tight.clear();
120  m_photonTriggers_Tight.clear();
121  m_allTriggers_Loose.clear();
122  m_electronTriggers_Loose.clear();
123  m_muonTriggers_Loose.clear();
124  m_tauTriggers_Loose.clear();
125  m_photonTriggers_Loose.clear();
126 
127  // Trigger maps for TopConfig - to be used by individual selectors
128  std::shared_ptr<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > > allTriggers_perSelector_Tight(new std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > );
129  std::shared_ptr<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > > electronTriggers_perSelector_Tight(new std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > );
130  std::shared_ptr<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > > muonTriggers_perSelector_Tight(new std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > );
131  std::shared_ptr<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > > tauTriggers_perSelector_Tight(new std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > );
132  std::shared_ptr<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > > photonTriggers_perSelector_Tight(new std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > );
133  std::shared_ptr<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > > allTriggers_perSelector_Loose(new std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > );
134  std::shared_ptr<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > > electronTriggers_perSelector_Loose(new std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > );
135  std::shared_ptr<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > > muonTriggers_perSelector_Loose(new std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > );
136  std::shared_ptr<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > > tauTriggers_perSelector_Loose(new std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > );
137  std::shared_ptr<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > > photonTriggers_perSelector_Loose(new std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > );
138 
139 
140  // Loop over all selections
141  m_vetoEventsTrigger = true;
142  m_vetoEventsGRL = true;
143  m_vetoEventsGoodCalo = true;
144 
145  for (auto sel : selections) {
146  std::list<std::pair<std::string, int> > listAllTriggers_thisSelector_Tight;
147  std::vector<std::pair<std::string, int> > allTriggers_thisSelector_Tight;
148  std::vector<std::pair<std::string, int> > electronTriggers_thisSelector_Tight;
149  std::vector<std::pair<std::string, int> > muonTriggers_thisSelector_Tight;
150  std::vector<std::pair<std::string, int> > tauTriggers_thisSelector_Tight;
151  std::vector<std::pair<std::string, int> > photonTriggers_thisSelector_Tight;
152  std::list<std::pair<std::string, int> > listAllTriggers_thisSelector_Loose;
153  std::vector<std::pair<std::string, int> > allTriggers_thisSelector_Loose;
154  std::vector<std::pair<std::string, int> > electronTriggers_thisSelector_Loose;
155  std::vector<std::pair<std::string, int> > muonTriggers_thisSelector_Loose;
156  std::vector<std::pair<std::string, int> > tauTriggers_thisSelector_Loose;
157  std::vector<std::pair<std::string, int> > photonTriggers_thisSelector_Loose;
158 
159  // Loop over cut names and look for TRIGDEC, GRL, GOODCALO, PRIVTX
160  bool selectionHasTriggerCut(false);
161  bool selectionHasTriggerCut_Tight(false);
162  bool selectionHasTriggerCut_Loose(false);
163  bool selectionHasGRLCut(false);
164  bool selectionHasGOODCALOCut(false);
165  for (std::string cut : sel.m_cutnames) {
166  cut.append(" ");
167 
168  if (cut.starts_with( "GRL ")) {
169  selectionHasGRLCut = true;
170  }
171 
172  if (cut.starts_with( "GOODCALO ")) {
173  selectionHasGOODCALOCut = true;
174  }
175 
176  if (cut.starts_with( "GTRIGDEC ")) {
177  if (selectionHasTriggerCut || selectionHasTriggerCut_Loose || selectionHasTriggerCut_Tight) {
178  throw std::runtime_error("You have multiple TRIGDEC selectors for selection "
179  + sel.m_name + ". Only one per selection is allowed.");
180  }
181  if (!m_config->useGlobalTrigger()) {
182  throw std::runtime_error("The GTRIGDEC selector cannot be used without UseGlobalLeptonTriggerSF option.");
183  }
184  selectionHasTriggerCut = true;
185  allTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name,
186  std::vector<std::pair<std::string, int> >(globalTriggers_Tight.begin(),
187  globalTriggers_Tight.end())));
188  allTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name,
189  std::vector<std::pair<std::string, int> >(globalTriggers_Loose.begin(),
190  globalTriggers_Loose.end())));
191  electronTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name,
192  std::vector<std::pair<std::string, int> >(
193  globalElectronTriggers_Tight.begin(),
194  globalElectronTriggers_Tight.end())));
195  electronTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name,
196  std::vector<std::pair<std::string, int> >(
197  globalElectronTriggers_Loose.begin(),
198  globalElectronTriggers_Loose.end())));
199  muonTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name,
200  std::vector<std::pair<std::string, int> >(globalMuonTriggers_Tight.begin(),
201  globalMuonTriggers_Tight.end())));
202  muonTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name,
203  std::vector<std::pair<std::string, int> >(globalMuonTriggers_Loose.begin(),
204  globalMuonTriggers_Loose.end())));
205  photonTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name,
206  std::vector<std::pair<std::string, int> >(globalPhotonTriggers_Tight.begin(),
207  globalPhotonTriggers_Tight.end())));
208  photonTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name,
209  std::vector<std::pair<std::string, int> >(globalPhotonTriggers_Loose.begin(),
210  globalPhotonTriggers_Loose.end())));
211  }
212 
213  // function to split the trigger name of type "2@NAME" to std::pair<string, int> of NAME,2
214  auto splitTrigger = [](std::string trig) {
215  char delim = '@';
216  auto position = trig.find(delim);
217  int n(1);
218  if (position != std::string::npos) {
219  n = std::stoi(trig.substr(0, position));
220  trig = trig.substr(position+1, trig.size());
221  }
222  std::pair<std::string, int> result = std::make_pair(trig, n);
223  return result;
224  };
225 
226  if (cut.starts_with( "TRIGDEC_TIGHT ")) {
227  if (selectionHasTriggerCut_Tight) {
228  throw std::runtime_error("You have multiple TRIGDEC_TIGHT selectors for selection "
229  + sel.m_name + ". Only one per selection is allowed.");
230  }
231  if (selectionHasTriggerCut) {
232  throw std::runtime_error("Both TRIGDEC and TRIGDEC_TIGHT selectors used for selection "
233  + sel.m_name + ". Only one of the two per selection is allowed.");
234  }
235  selectionHasTriggerCut_Tight = true;
236  ATH_MSG_INFO("Tight Triggers for Selection \t" << sel.m_name << "\tare " << cut);
237 
238  //split the trigger string at spaces
239  std::stringstream ss(cut);
240  std::string item;
241  char delim = ' ';
242  while (std::getline(ss, item, delim)) {
243  if (item.size() > 0 && item.find("TRIGDEC_TIGHT") == std::string::npos) {
244  const std::pair<std::string, int> tmp = splitTrigger(item);
245  tmpAllTriggers_Tight.insert(tmp);
246  listAllTriggers_thisSelector_Tight.push_back(tmp);
247  }
248  }
249  listAllTriggers_thisSelector_Tight.sort();
250  listAllTriggers_thisSelector_Tight.unique();
251 
252  // Turn list into vector
253  for (auto trigger : listAllTriggers_thisSelector_Tight) {
254  allTriggers_thisSelector_Tight.push_back(trigger);
255  }
256 
257  // Split triggers into electron, muon and tau
258  for (const auto& trigger : allTriggers_thisSelector_Tight) {
259  if (isElectronTrigger(trigger.first)) {
260  electronTriggers_thisSelector_Tight.push_back(trigger);
261  }
262  if (isMuonTrigger(trigger.first)) {
263  muonTriggers_thisSelector_Tight.push_back(trigger);
264  }
265  if ((trigger.first.find("_tau") != std::string::npos)) {
266  tauTriggers_thisSelector_Tight.push_back(trigger);
267  }
268  if (isPhotonTrigger(trigger.first)) {
269  photonTriggers_thisSelector_Tight.push_back(trigger);
270  }
271  }
272 
273  allTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name, allTriggers_thisSelector_Tight));
274  electronTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name, electronTriggers_thisSelector_Tight));
275  muonTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name, muonTriggers_thisSelector_Tight));
276  tauTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name, tauTriggers_thisSelector_Tight));
277  photonTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name, photonTriggers_thisSelector_Tight));
278  } // Cut requested is TRIGDEC_TIGHT
279  else if (cut.starts_with( "TRIGDEC_LOOSE ")) {
280  if (selectionHasTriggerCut_Loose) {
281  throw std::runtime_error("You have multiple TRIGDEC_LOOSE selectors for selection "
282  + sel.m_name + ". Only one per selection is allowed.");
283  }
284  if (selectionHasTriggerCut) {
285  throw std::runtime_error("Both TRIGDEC and TRIGDEC_LOOSE selectors used for selection "
286  + sel.m_name + ". Only one of the two per selection is allowed.");
287  }
288  selectionHasTriggerCut_Loose = true;
289  ATH_MSG_INFO("Loose Triggers for Selection \t" << sel.m_name << "\tare " << cut);
290 
291  //split the trigger string at spaces
292  std::stringstream ss(cut);
293  std::string item;
294  char delim = ' ';
295  while (std::getline(ss, item, delim)) {
296  if (item.size() > 0 && item.find("TRIGDEC_LOOSE") == std::string::npos) {
297  const std::pair<std::string, int> tmp = splitTrigger(item);
298  tmpAllTriggers_Loose.insert(tmp);
299  listAllTriggers_thisSelector_Loose.push_back(tmp);
300  }
301  }
302  listAllTriggers_thisSelector_Loose.sort();
303  listAllTriggers_thisSelector_Loose.unique();
304 
305  // Turn list into vector
306  for (auto trigger : listAllTriggers_thisSelector_Loose) {
307  allTriggers_thisSelector_Loose.push_back(trigger);
308  }
309 
310  // Split triggers into electron, muon and tau
311  for (const auto& trigger : allTriggers_thisSelector_Loose) {
312  if (isElectronTrigger(trigger.first)) {
313  electronTriggers_thisSelector_Loose.push_back(trigger);
314  }
315  if (isMuonTrigger(trigger.first)) {
316  muonTriggers_thisSelector_Loose.push_back(trigger);
317  }
318  if ((trigger.first.find("_tau") != std::string::npos)) {
319  tauTriggers_thisSelector_Loose.push_back(trigger);
320  }
321  if (isPhotonTrigger(trigger.first)) {
322  photonTriggers_thisSelector_Loose.push_back(trigger);
323  }
324  }
325 
326  allTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name, allTriggers_thisSelector_Loose));
327  electronTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name, electronTriggers_thisSelector_Loose));
328  muonTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name, muonTriggers_thisSelector_Loose));
329  tauTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name, tauTriggers_thisSelector_Loose));
330  photonTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name, photonTriggers_thisSelector_Loose));
331  } // Cut requested is TRIGDEC_LOOSE
332  else if (cut.starts_with( "TRIGDEC ")) {
333  if (selectionHasTriggerCut) {
334  throw std::runtime_error("GTRIGDEC/TRIGDEC already used for selection "
335  + sel.m_name + ". Cannot be used multiple times.");
336  }
337  if (selectionHasTriggerCut_Tight) {
338  throw std::runtime_error("Both TRIGDEC and TRIGDEC_TIGHT already used for selection "
339  + sel.m_name + ". Cannot be used simultaneously.");
340  }
341  if (selectionHasTriggerCut_Loose) {
342  throw std::runtime_error("Both TRIGDEC and TRIGDEC_LOOSE already used for selection "
343  + sel.m_name + ". Cannot be used simultaneously.");
344  }
345  selectionHasTriggerCut = true;
346  ATH_MSG_INFO("Triggers for Selection \t" << sel.m_name << "\tare " << cut);
347 
348  //split the trigger string at spaces
349  std::stringstream ss(cut);
350  std::string item;
351  char delim = ' ';
352  while (std::getline(ss, item, delim)) {
353  if (item.size() > 0 && item.find("TRIGDEC") == std::string::npos) {
354  const std::pair<std::string, int> tmp = splitTrigger(item);
355  tmpAllTriggers_Tight.insert(tmp);
356  listAllTriggers_thisSelector_Tight.push_back(tmp);
357  tmpAllTriggers_Loose.insert(tmp);
358  listAllTriggers_thisSelector_Loose.push_back(tmp);
359  }
360  }
361  listAllTriggers_thisSelector_Tight.sort();
362  listAllTriggers_thisSelector_Tight.unique();
363  listAllTriggers_thisSelector_Loose.sort();
364  listAllTriggers_thisSelector_Loose.unique();
365 
366  // Turn list into vector
367  for (auto trigger : listAllTriggers_thisSelector_Tight) {
368  allTriggers_thisSelector_Tight.push_back(trigger);
369  }
370  for (auto trigger : listAllTriggers_thisSelector_Loose) {
371  allTriggers_thisSelector_Loose.push_back(trigger);
372  }
373  // Split triggers into electron, muon and tau
374  for (const auto& trigger : allTriggers_thisSelector_Tight) {
375  if (isElectronTrigger(trigger.first)) {
376  electronTriggers_thisSelector_Tight.push_back(trigger);
377  }
378  if (isMuonTrigger(trigger.first)) {
379  muonTriggers_thisSelector_Tight.push_back(trigger);
380  }
381  if ((trigger.first.find("_tau") != std::string::npos)) {
382  tauTriggers_thisSelector_Tight.push_back(trigger);
383  }
384  if (isPhotonTrigger(trigger.first)) {
385  photonTriggers_thisSelector_Tight.push_back(trigger);
386  }
387  }
388 
389  for (const auto& trigger : allTriggers_thisSelector_Loose) {
390  if (isElectronTrigger(trigger.first)) {
391  electronTriggers_thisSelector_Loose.push_back(trigger);
392  }
393  if (isMuonTrigger(trigger.first)) {
394  muonTriggers_thisSelector_Loose.push_back(trigger);
395  }
396  if ((trigger.first.find("_tau") != std::string::npos)) {
397  tauTriggers_thisSelector_Loose.push_back(trigger);
398  }
399  if (isPhotonTrigger(trigger.first)) {
400  photonTriggers_thisSelector_Loose.push_back(trigger);
401  }
402  }
403 
404  allTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name, allTriggers_thisSelector_Tight));
405  electronTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name, electronTriggers_thisSelector_Tight));
406  muonTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name, muonTriggers_thisSelector_Tight));
407  tauTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name, tauTriggers_thisSelector_Tight));
408  photonTriggers_perSelector_Tight->insert(std::make_pair(sel.m_name, photonTriggers_thisSelector_Tight));
409 
410  allTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name, allTriggers_thisSelector_Loose));
411  electronTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name, electronTriggers_thisSelector_Loose));
412  muonTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name, muonTriggers_thisSelector_Loose));
413  tauTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name, tauTriggers_thisSelector_Loose));
414  photonTriggers_perSelector_Loose->insert(std::make_pair(sel.m_name, photonTriggers_thisSelector_Loose));
415  } // Cut requested is TRIGDEC
416  } // Loop over all cuts
417 
418  if (!selectionHasGRLCut) {
419  m_vetoEventsGRL = false;
420  }
421 
422  if (!selectionHasGOODCALOCut) {
423  m_vetoEventsGoodCalo = false;
424  }
425 
426  if (!selectionHasTriggerCut) {
427  m_vetoEventsTrigger = false;
428  ATH_MSG_INFO("Selection " << sel.m_name << " Does not request a trigger. No event veto will be applied");
429  }
430  } // Loop over all selections
431 
432  // Add triggers configured for the global trigger SF tool
433  tmpAllTriggers_Tight.insert(globalTriggers_Tight.begin(), globalTriggers_Tight.end());
434  tmpAllTriggers_Loose.insert(globalTriggers_Loose.begin(), globalTriggers_Loose.end());
435 
436  // Turn list into vector
437  {
438  std::vector<std::pair<std::string, int> > tmp;
439  tmp.assign(tmpAllTriggers_Tight.begin(), tmpAllTriggers_Tight.end());
440  std::sort(tmp.begin(), tmp.end());
441  m_allTriggers_Tight.swap(tmp);
442  tmp.clear();
443  tmp.assign(tmpAllTriggers_Loose.begin(), tmpAllTriggers_Loose.end());
444  std::sort(tmp.begin(), tmp.end());
445  m_allTriggers_Loose.swap(tmp);
446  }
447 
448  ATH_MSG_INFO("All requested Tight triggers are:");
449  for (const auto& trigger : m_allTriggers_Tight) {
450  ATH_MSG_INFO(" " << trigger.first);
451  }
452  ATH_MSG_INFO("All requested Loose triggers are:");
453  for (const auto& trigger : m_allTriggers_Loose) {
454  ATH_MSG_INFO(" " << trigger.first);
455  }
456 
457  std::string outputInfoString("True");
458  if (!m_vetoEventsTrigger) {
459  outputInfoString = "False";
460  }
461  ATH_MSG_INFO("Apply event veto on trigger decision = " << outputInfoString);
462 
463  // Split triggers into electron, muon and tau
464  for (const auto& trigger : m_allTriggers_Tight) {
465  if (isElectronTrigger(trigger.first)) {
467  }
468  if (isMuonTrigger(trigger.first)) {
469  m_muonTriggers_Tight.push_back(trigger);
470  }
471  if ((trigger.first.find("_tau") != std::string::npos)) {
472  m_tauTriggers_Tight.push_back(trigger);
473  }
474  if (isPhotonTrigger(trigger.first)) {
475  m_photonTriggers_Tight.push_back(trigger);
476  }
477  }
478  // Split triggers into electron, muon and tau
479  for (const auto& trigger : m_allTriggers_Loose) {
480  if (isElectronTrigger(trigger.first)) {
482  }
483  if (isMuonTrigger(trigger.first)) {
484  m_muonTriggers_Loose.push_back(trigger);
485  }
486  if ((trigger.first.find("_tau") != std::string::npos)) {
487  m_tauTriggers_Loose.push_back(trigger);
488  }
489  if (isPhotonTrigger(trigger.first)) {
490  m_photonTriggers_Loose.push_back(trigger);
491  }
492  }
493 
494  // Tell TopConfig about the triggers
495  m_config->allTriggers_Tight(allTriggers_perSelector_Tight);
496  m_config->electronTriggers_Tight(electronTriggers_perSelector_Tight);
497  m_config->muonTriggers_Tight(muonTriggers_perSelector_Tight);
498  m_config->tauTriggers_Tight(tauTriggers_perSelector_Tight);
499  m_config->photonTriggers_Tight(photonTriggers_perSelector_Tight);
500  m_config->allTriggers_Loose(allTriggers_perSelector_Loose);
501  m_config->electronTriggers_Loose(electronTriggers_perSelector_Loose);
502  m_config->muonTriggers_Loose(muonTriggers_perSelector_Loose);
503  m_config->tauTriggers_Loose(tauTriggers_perSelector_Loose);
504  m_config->photonTriggers_Loose(photonTriggers_perSelector_Loose);
505 
506  // If the user has requested that all events are saved, then we'd better turn off the vetos
507  if (!m_config->saveOnlySelectedEvents()) {
508  m_vetoEventsGRL = false;
509  m_vetoEventsGoodCalo = false;
510  m_vetoEventsTrigger = false;
511  }
512  }
513 
515  const xAOD::EventInfo* eventInfo(nullptr);
516 
517  top::check(evtStore()->retrieve(eventInfo, m_config->sgKeyEventInfo()), "Failed to retrieve EventInfo");
518 
520  char passGRL(1);
521  if (!m_config->isMC() && asg::ToolStore::contains<IGoodRunsListSelectionTool> ("GoodRunsListSelectionTool")) {
522  if (!m_grlTool->passRunLB(*eventInfo)) {
523  passGRL = 0;
524  }
525  }
526  eventInfo->auxdecor<char>("AnalysisTop_GRL") = passGRL;
527 
528  // Do we veto events? Only if ALL selectors request GRL and GRL fails
529  if (m_vetoEventsGRL) {
530  if (passGRL == 1) {
531  return true;
532  }
533  if (passGRL == 0) {
534  return false;
535  }
536  }
537 
538  // otherwise, we don't veto the event
539  return true;
540  }
541 
543  const xAOD::EventInfo* eventInfo(nullptr);
544 
545  top::check(evtStore()->retrieve(eventInfo, m_config->sgKeyEventInfo()), "Failed to retrieve EventInfo");
546 
549  char passGoodCalo(1);
550  if (!m_config->isMC()) {
551  bool badTile(false), badLAr(false), badSCT(false), incompleteEvent(false);
552 
555  badTile = true;
556  }
557 
560  badLAr = true;
561  }
562 
563  // <tom.neep@cern.ch> Technically not the Calo, but this is easier :)
565  badSCT = true;
566  }
567 
568  // <tom.neep@cern.ch> Technically not the Calo (volume 2), but this is easier :)
569  if (eventInfo->isEventFlagBitSet(xAOD::EventInfo::Core, 18)) {
570  incompleteEvent = true;
571  }
572 
573  if (badTile || badLAr || badSCT || incompleteEvent) {
574  passGoodCalo = 0;
575  }
576  }
577  eventInfo->auxdecor<char>("AnalysisTop_GOODCALO") = passGoodCalo;
578 
579  // Do we veto events? Only if ALL selectors request GOODCALO and GOODCALO fails
580  if (m_vetoEventsGoodCalo) {
581  if (passGoodCalo == 1) {
582  return true;
583  }
584  if (passGoodCalo == 0) {
585  return false;
586  }
587  }
588 
589  // otherwise, we don't veto the event
590  return true;
591  }
592 
595  const xAOD::EventInfo* eventInfo(nullptr);
596 
597  top::check(evtStore()->retrieve(eventInfo, m_config->sgKeyEventInfo()), "Failed to retrieve EventInfo");
598 
599  const xAOD::VertexContainer* vertices(nullptr);
600  top::check(evtStore()->retrieve(vertices, m_config->sgKeyPrimaryVertices()), "Failed to retrieve Primary Vertices");
601 
602  char passPriVtx(0);
603  float pri_vtx_z(0);
604 
605  for (auto vtx : *vertices) {
606  if (vtx->vertexType() == xAOD::VxType::PriVtx) {
607  passPriVtx = 1;
608  pri_vtx_z = vtx->z();
609  break; // No need to loop over all vertices, we only need one
610  }
611  }
612  eventInfo->auxdecor<char>("AnalysisTop_PRIVTX") = passPriVtx;
613  if (passPriVtx == 1) eventInfo->auxdecor<float>("AnalysisTop_PRIVTX_z_position") = pri_vtx_z;
614 
615  // Do we veto events? Only if ALL selectors request PRIVTX and PRIVTX fails
616  if (m_vetoEventsPriVtx) {
617  if (passPriVtx == 1) {
618  return true;
619  }
620  if (passPriVtx == 0) {
621  return false;
622  }
623  }
624 
625  // otherwise, we don't veto the event
626  return true;
627  }
628 
630  const xAOD::EventInfo* eventInfo(nullptr);
631 
632  top::check(evtStore()->retrieve(eventInfo, m_config->sgKeyEventInfo()), "Failed to retrieve EventInfo");
633 
634  bool orOfAllTriggers(false);
635  std::set<std::pair<std::string, int> > triggers;
636  triggers.insert(m_allTriggers_Tight.begin(), m_allTriggers_Tight.end());
637  triggers.insert(m_allTriggers_Loose.begin(), m_allTriggers_Loose.end());
638  for (const auto& trigger : triggers) {
639  //decorating event with trigger decision
640  bool passThisTrigger = m_trigDecisionTool->isPassed(trigger.first);
641  char decoration = passThisTrigger ? 1 : 0;
642  eventInfo->auxdecor<char>("TRIGDEC_" + RCU::substitute(RCU::substitute(trigger.first, ".", "p"), "-", "_")) = decoration;
643  orOfAllTriggers |= passThisTrigger;
644 
645  //decorating event with trigger prescale (on Data)
646  if (!m_config->isMC()) {
647  auto cg = m_trigDecisionTool->getChainGroup(trigger.first);
648  float prescale = cg->getPrescale();
649  eventInfo->auxdecor<float>("TRIGPS_" + RCU::substitute(RCU::substitute(trigger.first, ".", "p"), "-", "_")) = prescale;
650  }
651  }
652 
653  // match offline objects to trigger
654  if (m_config->useElectrons()) matchElectrons();
655  if (m_config->useMuons()) matchMuons();
656  if (m_config->useTaus()) matchTaus();
657  if (m_config->usePhotons()) matchPhotons();
658 
659  // Do we veto events? Only if ALL selectors request TRIGDEC and no trigger passes
660  if (m_vetoEventsTrigger) {
661  return orOfAllTriggers;
662  }
663 
664  // otherwise, we don't veto the event
665  return true;
666  }
667 
669  const xAOD::EventInfo* eventInfo(nullptr);
670 
671  top::check(evtStore()->retrieve(eventInfo, m_config->sgKeyEventInfo()), "Failed to retrieve EventInfo");
672 
673  // Take electrons from input file. Decorate these before doing any calibration/shallow copies
674  const xAOD::ElectronContainer* electrons(nullptr);
675  if(m_config->useElectrons()) top::check(evtStore()->retrieve(electrons, m_config->sgKeyElectrons()), "Failed to retrieve electrons");
676 
677  // Loop over electrons
678  std::set<std::pair<std::string, int> > triggers;
681  for (const auto* el : *electrons) {
682  // Loop over electron triggers
683  for (const auto& trigger : triggers) {
684  bool match(false);
685  // Match even if event fails trigger decistion - it's important in case of pre-scaled menus
686  if (!m_config->useGlobalTrigger() && el->isAvailable<char>(m_config->getDerivationStream() + "_" + trigger.first)) {
687  match = el->auxdataConst<char>(m_config->getDerivationStream() + "_" + trigger.first);
688  } else {
689  match = m_trigMatchTool->match(*el, trigger.first);
690  }
691  char decoration = match ? 1 : 0;
692  el->auxdecor<char>("TRIGMATCH_" + trigger.first) = decoration;
693  }
694  }
695  }
696 
698  const xAOD::EventInfo* eventInfo(nullptr);
699 
700  top::check(evtStore()->retrieve(eventInfo, m_config->sgKeyEventInfo()), "Failed to retrieve EventInfo");
701 
702  // Take muons from input file. Decorate these before doing any calibration/shallow copies
703  const xAOD::MuonContainer* muons(nullptr);
704  if(m_config->useMuons()) top::check(evtStore()->retrieve(muons, m_config->sgKeyMuons()), "Failed to retrieve muons in EventCleaningSelection::matchMuons() ");
705 
706  // Loop over muons
707  std::set<std::pair<std::string, int> > triggers;
708  triggers.insert(m_muonTriggers_Tight.begin(), m_muonTriggers_Tight.end());
709  triggers.insert(m_muonTriggers_Loose.begin(), m_muonTriggers_Loose.end());
710  for (const auto* mu : *muons) {
711  // Loop over muon triggers
712  for (const auto& trigger : triggers) {
713  bool match(false);
714  // Match even if event fails trigger decistion - it's important in case of pre-scaled menus
715  if (!m_config->useGlobalTrigger() && mu->isAvailable<char>(m_config->getDerivationStream() + "_" + trigger.first)) {
716  match = mu->auxdataConst<char>(m_config->getDerivationStream() + "_" + trigger.first);
717  } else {
718  match = m_trigMatchTool->match(*mu, trigger.first);
719  }
720  char decoration = match ? 1 : 0;
721  mu->auxdecor<char>("TRIGMATCH_" + trigger.first) = decoration;
722  }
723  }
724  }
725 
727  const xAOD::EventInfo* eventInfo(nullptr);
728 
729  top::check(evtStore()->retrieve(eventInfo, m_config->sgKeyEventInfo()),
730  "Failed to retrieve EventInfo");
731 
732  // Take taus from input file.
733  // Decorate these before doing any calibration/shallow copies
734  const xAOD::TauJetContainer* taus(nullptr);
735  top::check(evtStore()->retrieve(taus, m_config->sgKeyTaus()),
736  "Failed to retrieve taus");
737 
738  // Loop over taus
739  for (const auto* tau : *taus) {
740  // Loop over tau triggers
741  for (const auto& trigger : m_tauTriggers_Tight) {
742  bool match(false);
743  // Match even if event fails trigger decistion - it's important in case of pre-scaled menus
744  match = m_trigMatchTauTool->match(tau, trigger.first);
745  if (tau->isAvailable<char>(m_config->getDerivationStream() + "_" + trigger.first)) {
746  match = tau->auxdataConst<char>(m_config->getDerivationStream() + "_" + trigger.first);
747  } else {
748  match = m_trigMatchTool->match(*tau, trigger.first);
749  }
750  char decoration = match ? 1 : 0;
751  tau->auxdecor<char>("TRIGMATCH_" + trigger.first) = decoration;
752  }
753  // Loop over tau triggers
754  for (const auto& trigger : m_tauTriggers_Loose) {
755  // let's make sure this isn't done twice
756  if (tau->isAvailable<char>("TRIGMATCH_" + trigger.first)) continue;
757  bool match(false);
758  // Match even if event fails trigger decistion - it's important in case of pre-scaled menus
759  match = m_trigMatchTauTool->match(tau, trigger.first);
760  if (tau->isAvailable<char>(m_config->getDerivationStream() + "_" + trigger.first)) {
761  match = tau->auxdataConst<char>(m_config->getDerivationStream() + "_" + trigger.first);
762  } else {
763  match = m_trigMatchTool->match(*tau, trigger.first);
764  }
765  char decoration = match ? 1 : 0;
766  tau->auxdecor<char>("TRIGMATCH_" + trigger.first) = decoration;
767  }
768  }
769  }
770 
772  const xAOD::EventInfo* eventInfo(nullptr);
773 
774  top::check(evtStore()->retrieve(eventInfo, m_config->sgKeyEventInfo()),
775  "Failed to retrieve EventInfo");
776 
777  // Take photons from input file.
778  // Decorate these before doing any calibration/shallow copies
779  const xAOD::PhotonContainer* photons(nullptr);
780  top::check(evtStore()->retrieve(photons, m_config->sgKeyPhotons()),
781  "Failed to retrieve photons");
782 
783  // Loop over photons
784  std::set<std::pair<std::string, int> > triggers;
787  for (const auto* photon : *photons) {
788  // Loop over photon triggers
789  for (const auto& trigger : triggers) {
790  bool match(false);
791  // Match even if event fails trigger decision - it's important in case of pre-scaled menus
792  if (photon->isAvailable<char>(m_config->getDerivationStream() + "_" + trigger.first)) {
793  match = photon->auxdataConst<char>(m_config->getDerivationStream() + "_" + trigger.first);
794  } else {
795  match = m_trigMatchTool->match(*photon, trigger.first);
796  }
797  char decoration = match ? 1 : 0;
798  photon->auxdecor<char>("TRIGMATCH_" + trigger.first) = decoration;
799  }
800  }
801  }
802 
803  void EventCleaningSelection::addExtraBranches(std::vector<std::string>& extraBranchList) {
804  for (const auto& trigger : m_allTriggers_Tight)
805  extraBranchList.push_back("TRIGDEC_" + trigger.first);
806  for (const auto& trigger : m_allTriggers_Loose) {
807  if (std::find(extraBranchList.begin(), extraBranchList.end(),
808  std::string {"TRIGDEC_"} +trigger.first) == extraBranchList.end()) { // to not add them twice
809  extraBranchList.push_back("TRIGDEC_" + trigger.first);
810  }
811  }
812  }
813 
815  // printout all HLT chains
816  // Debug only - this is very verbose
817  m_trigConfTool->chains().print("", 10);
818  }
819 
820  std::vector<std::pair<std::string, int> > EventCleaningSelection::getIndividualFromGlobalTriggers(
821  std::vector<std::pair<std::string, int> > const& triggers) {
822  std::vector<std::pair<std::string, int> > result;
823  std::string const delim("_OR_");
824  for (std::pair<std::string, int> const& trigger : triggers) {
825  size_t cur = 0;
826  while (true) {
827  size_t next = trigger.first.find(delim, cur);
828  bool last = (next == std::string::npos);
829  result.emplace_back(std::string("HLT_") + trigger.first.substr(cur, (last ? std::string::npos : next - cur)), 1);
830  if (last) break;
831  cur = next + delim.size();
832  }
833  }
834  return result;
835  }
836 
837  bool EventCleaningSelection::isElectronTrigger(std::string const& trigger) const {
838  top::check(trigger.find("HLT_") == 0, "Expected trigger name to start with `HLT_'");
839  bool success;
841  }
842 
843  bool EventCleaningSelection::isMuonTrigger(std::string const& trigger) const {
844  top::check(trigger.find("HLT_") == 0, "Expected trigger name to start with `HLT_'");
845  bool success;
847  }
848 
849  bool EventCleaningSelection::isPhotonTrigger(std::string const& trigger) const {
850  // this is really not the best way to do it, but TrigGlobEffCorr doesnt seem to be able to identify photon triggers
851  if (trigger.find("_1g") != std::string::npos) return true;
852  if (trigger.find("_2g") != std::string::npos) return true;
853 
854  top::check(trigger.find("HLT_") == 0, "Expected trigger name to start with `HLT_'");
855  bool success;
857 
858  }
859 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
top::EventCleaningSelection::isPhotonTrigger
bool isPhotonTrigger(std::string const &trigger) const
Definition: EventCleaningSelection.cxx:849
top::EventCleaningSelection::m_tauTriggers_Loose
std::vector< std::pair< std::string, int > > m_tauTriggers_Loose
Definition: EventCleaningSelection.h:104
top::EventCleaningSelection::m_vetoEventsGRL
bool m_vetoEventsGRL
If ALL selections request GRL, then we can veto events and not run the systematics,...
Definition: EventCleaningSelection.h:117
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
get_generator_info.result
result
Definition: get_generator_info.py:21
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::EventCleaningSelection::printTriggers
void printTriggers() const
Definition: EventCleaningSelection.cxx:814
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
top::EventCleaningSelection::m_vetoEventsPriVtx
bool m_vetoEventsPriVtx
If ALL selections request PRIVTX, then we can veto events.
Definition: EventCleaningSelection.h:124
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
top::EventCleaningSelection::setEventSelections
void setEventSelections(const std::vector< top::SelectionConfigurationData > &selections)
Definition: EventCleaningSelection.cxx:72
beamspotman.cur
def cur
Definition: beamspotman.py:671
top::EventCleaningSelection::isElectronTrigger
bool isElectronTrigger(std::string const &trigger) const
Definition: EventCleaningSelection.cxx:837
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
top::EventCleaningSelection::m_vetoEventsGoodCalo
bool m_vetoEventsGoodCalo
If ALL selections request GOODCALO, then we can veto events Data only.
Definition: EventCleaningSelection.h:121
asg
Definition: DataHandleTestTool.h:28
top::EventCleaningSelection::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: EventCleaningSelection.cxx:51
top::EventCleaningSelection::m_trigMatchTauTool
ToolHandle< Trig::ITrigTauMatchingTool > m_trigMatchTauTool
Definition: EventCleaningSelection.h:89
top::EventCleaningSelection::m_allTriggers_Tight
std::vector< std::pair< std::string, int > > m_allTriggers_Tight
List of triggers to 'or' together for each event. If any one passes, the event passes.
Definition: EventCleaningSelection.h:96
python.TrigTLAMonitorAlgorithm.triggers
triggers
Definition: TrigTLAMonitorAlgorithm.py:196
top::EventCleaningSelection::getIndividualFromGlobalTriggers
static std::vector< std::pair< std::string, int > > getIndividualFromGlobalTriggers(std::vector< std::pair< std::string, int > > const &triggers)
Definition: EventCleaningSelection.cxx:820
top::EventCleaningSelection::matchElectrons
void matchElectrons()
Match offline electrons to the trigger.
Definition: EventCleaningSelection.cxx:668
top::EventCleaningSelection::m_photonTriggers_Loose
std::vector< std::pair< std::string, int > > m_photonTriggers_Loose
Definition: EventCleaningSelection.h:105
top::EventCleaningSelection::m_allTriggers_Loose
std::vector< std::pair< std::string, int > > m_allTriggers_Loose
Definition: EventCleaningSelection.h:101
xAOD::EventInfo_v1::LAr
@ LAr
The LAr calorimeter.
Definition: EventInfo_v1.h:335
StringUtil.h
top::EventCleaningSelection::matchMuons
void matchMuons()
Match offline muons to the trigger.
Definition: EventCleaningSelection.cxx:697
SG::AuxElement::auxdecor
Decorator< T, ALLOC >::reference_type auxdecor(const std::string &name) const
Fetch an aux decoration, as a non-const reference.
EventTools.h
A few functions for doing operations on particles / events. Currently holds code for dR,...
xAOD::EventInfo_v1::Error
@ Error
The sub-detector issued an error.
Definition: EventInfo_v1.h:349
ImportData.h
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
EventCleaningSelection.h
top::EventCleaningSelection::isMuonTrigger
bool isMuonTrigger(std::string const &trigger) const
Definition: EventCleaningSelection.cxx:843
ElectronContainer.h
top::EventCleaningSelection::m_grlTool
ToolHandle< IGoodRunsListSelectionTool > m_grlTool
GoodRunsLists.
Definition: EventCleaningSelection.h:77
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
TrigGlobEffCorr::ImportData::associatedLeptonFlavour
xAOD::Type::ObjectType associatedLeptonFlavour(std::size_t leg, bool &success)
Definition: ImportData.cxx:526
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
sel
sel
Definition: SUSYToolsTester.cxx:92
top::EventCleaningSelection::applyPrimaryVertex
bool applyPrimaryVertex() const
Definition: EventCleaningSelection.cxx:593
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
BindingsTest.cut
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
Definition: BindingsTest.py:13
top::EventCleaningSelection::addExtraBranches
void addExtraBranches(std::vector< std::string > &extraBranchList)
Definition: EventCleaningSelection.cxx:803
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
top::check
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Definition: EventTools.cxx:15
top::EventCleaningSelection::m_muonTriggers_Loose
std::vector< std::pair< std::string, int > > m_muonTriggers_Loose
Definition: EventCleaningSelection.h:103
top::EventCleaningSelection::EventCleaningSelection
EventCleaningSelection(const std::string &name)
Definition: EventCleaningSelection.cxx:24
top::EventCleaningSelection::matchPhotons
void matchPhotons()
Match offline photon to the trigger.
Definition: EventCleaningSelection.cxx:771
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
TauJetContainer.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
top::EventCleaningSelection::m_electronTriggers_Tight
std::vector< std::pair< std::string, int > > m_electronTriggers_Tight
Definition: EventCleaningSelection.h:97
top::EventCleaningSelection::applyGoodCalo
bool applyGoodCalo() const
Definition: EventCleaningSelection.cxx:542
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.combo.selections
def selections(items, n)
Definition: combo.py:104
item
Definition: ItemListSvc.h:43
TopConfig.h
top::EventCleaningSelection::matchTaus
void matchTaus()
Match offline taus to the trigger.
Definition: EventCleaningSelection.cxx:726
EventInfo.h
top::EventCleaningSelection::applyTrigger
bool applyTrigger()
Definition: EventCleaningSelection.cxx:629
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
top::EventCleaningSelection::m_trigConfTool
ToolHandle< TrigConf::ITrigConfigTool > m_trigConfTool
Trigger configuration tool.
Definition: EventCleaningSelection.h:80
MuonContainer.h
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
Muon
struct TBPatternUnitContext Muon
top::EventCleaningSelection::m_vetoEventsTrigger
bool m_vetoEventsTrigger
Apply a logical OR cut to all supplied triggers If ANY selection does not request the trigger,...
Definition: EventCleaningSelection.h:113
top::EventCleaningSelection::m_electronTriggers_Loose
std::vector< std::pair< std::string, int > > m_electronTriggers_Loose
Definition: EventCleaningSelection.h:102
RCU::substitute
std::string substitute(const std::string &str, const std::string &pattern, const std::string &with)
effects: substitute all occurences of "pattern" with "with" in the string "str" returns: the substitu...
Definition: StringUtil.cxx:24
xAOD::EventInfo_v1::Tile
@ Tile
The Tile calorimeter.
Definition: EventInfo_v1.h:336
VertexContainer.h
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
top::EventCleaningSelection::m_photonTriggers_Tight
std::vector< std::pair< std::string, int > > m_photonTriggers_Tight
Definition: EventCleaningSelection.h:100
top::EventCleaningSelection::m_trigMatchTool
ToolHandle< Trig::IMatchingTool > m_trigMatchTool
Definition: EventCleaningSelection.h:86
xAOD::EventInfo_v1::errorState
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
Definition: EventInfo_v1.cxx:817
xAOD::EventInfo_v1::isEventFlagBitSet
bool isEventFlagBitSet(EventFlagSubDet subDet, size_t bit) const
Check one particular bit of one particular sub-detector.
Definition: EventInfo_v1.cxx:703
top::EventCleaningSelection::m_config
std::shared_ptr< top::TopConfig > m_config
Top config.
Definition: EventCleaningSelection.h:74
top::EventCleaningSelection::m_tauTriggers_Tight
std::vector< std::pair< std::string, int > > m_tauTriggers_Tight
Definition: EventCleaningSelection.h:99
top::EventCleaningSelection::m_muonTriggers_Tight
std::vector< std::pair< std::string, int > > m_muonTriggers_Tight
Definition: EventCleaningSelection.h:98
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
PhotonContainer.h
xAOD::EventInfo_v1::Core
@ Core
Core flags describing the event.
Definition: EventInfo_v1.h:339
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
PhysDESDM_Quirks.trigger
trigger
Definition: PhysDESDM_Quirks.py:27
top::EventCleaningSelection::m_trigDecisionTool
ToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool
Trigger decision tool.
Definition: EventCleaningSelection.h:83
xAOD::EventInfo_v1::SCT
@ SCT
The SCT.
Definition: EventInfo_v1.h:333
top::EventCleaningSelection::applyGRL
bool applyGRL() const
Definition: EventCleaningSelection.cxx:514