CMS 3D CMS Logo

HLTTauDQMPath.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 #ifndef DQMOffline_Trigger_HLTTauDQMPath_h
3 #define DQMOffline_Trigger_HLTTauDQMPath_h
4 
6 
7 #include <tuple>
8 #include <vector>
9 #include <string>
10 
11 class HLTConfigProvider;
12 namespace edm {
13  class ParameterSet;
14  class TriggerResults;
15 } // namespace edm
16 namespace trigger {
17  class TriggerEvent;
18  class TriggerObject;
19 } // namespace trigger
21 
23 public:
25  using LVColl = std::vector<LV>;
26  typedef std::tuple<std::string, std::string, size_t> FilterIndex;
27 
28  constexpr static size_t kName = 0;
29  constexpr static size_t kType = 1;
30  constexpr static size_t kModuleIndex = 2;
31  constexpr static size_t kInvalidIndex = std::numeric_limits<size_t>::max();
32 
33  struct Object {
35  const int id; // from TriggerTypeDefs.h
36  };
37 
38  HLTTauDQMPath(std::string pathName, std::string hltProcess, bool doRefAnalysis, const HLTConfigProvider& HLTCP);
40 
41  bool isValid() const { return isValid_; }
42 
43  bool fired(const edm::TriggerResults& triggerResults) const;
44 
45  // index (to getFilterName, getFilterIndex) of the last passed filter
46  // -1, if the first filter rejects the event
48 
49  const std::string& getPathName() const { return pathName_; }
50  const unsigned int getPathIndex() const { return pathIndex_; }
51 
52  size_t filtersSize() const { return filterIndices_.size(); }
53  const std::string& getFilterName(size_t i) const { return std::get<kName>(filterIndices_[i]); }
54  const std::string& getFilterType(size_t i) const { return std::get<kType>(filterIndices_[i]); }
55  int getFilterNTaus(size_t i) const {
56  if (i < filterTauN_.size())
57  return filterTauN_[i];
58  else
59  return 0;
60  }
61  int getFilterNElectrons(size_t i) const {
62  if (i < filterElectronN_.size())
63  return filterElectronN_[i];
64  else
65  return 0;
66  }
67  int getFilterNMuons(size_t i) const {
68  if (i < filterMuonN_.size())
69  return filterMuonN_[i];
70  else
71  return 0;
72  }
73  int getFilterMET(size_t i) const {
74  if (i < filterMET_.size())
75  return filterMET_[i];
76  else
77  return 0;
78  }
79  int getFilterLevel(size_t i) const {
80  if (i < filterLevel_.size())
81  return filterLevel_[i];
82  else
83  return 0;
84  }
85 
86  bool isFirstFilterL1Seed() const { return isFirstL1Seed_; }
87  const std::string& getLastFilterName() const { return std::get<kName>(filterIndices_.back()); }
88 
89  bool hasL2Taus() const { return lastL2TauFilterIndex_ != kInvalidIndex; }
90  bool hasL3Taus() const { return lastL3TauFilterIndex_ != kInvalidIndex; }
93  bool hasL2Muons() const { return lastL2MuonFilterIndex_ != kInvalidIndex; }
94  bool hasL3Muons() const { return lastL3MuonFilterIndex_ != kInvalidIndex; }
95  bool hasL2CaloMET() const { return lastL2METFilterIndex_ != kInvalidIndex; }
100 
105 
110 
115 
116  // index (to edm::TriggerResults) of a filter
117  size_t getFilterIndex(size_t i) const { return std::get<kModuleIndex>(filterIndices_[i]); }
118 
119  // Get objects associated to a filter, i is the "internal" index
120  void getFilterObjects(const trigger::TriggerEvent& triggerEvent, size_t i, std::vector<Object>& retval) const;
121 
122  // i = filter index
123  bool offlineMatching(size_t i,
124  const std::vector<Object>& triggerObjects,
125  const HLTTauDQMOfflineObjects& offlineObjects,
126  double dR,
127  std::vector<Object>& matchedTriggerObjects,
128  HLTTauDQMOfflineObjects& matchedOfflineObjects) const;
129 
130  bool goodOfflineEvent(size_t i, const HLTTauDQMOfflineObjects& offlineObjects) const;
131 
132 private:
134  const bool doRefAnalysis_;
135 
136  std::vector<FilterIndex> filterIndices_;
137  std::vector<int> filterTauN_;
138  std::vector<int> filterElectronN_;
139  std::vector<int> filterMuonN_;
140  std::vector<int> filterMET_;
141  std::vector<int> filterLevel_;
143  const unsigned int pathIndex_;
161  bool isValid_;
162 };
163 
164 #endif
TriggerObject
Definition: TriggerObject.py:1
mps_fire.i
i
Definition: mps_fire.py:355
HLTTauDQMPath::fired
bool fired(const edm::TriggerResults &triggerResults) const
Definition: HLTTauDQMPath.cc:544
HLTTauDQMPath::getLastL3TauFilterIndex
size_t getLastL3TauFilterIndex() const
Definition: HLTTauDQMPath.h:99
HLTTauDQMPath::lastFilterBeforeL3MuonIndex_
size_t lastFilterBeforeL3MuonIndex_
Definition: HLTTauDQMPath.h:154
HLTTauDQMPath::lastL2TauFilterIndex_
size_t lastL2TauFilterIndex_
Definition: HLTTauDQMPath.h:145
HLTTauDQMPath::getLastFilterBeforeL3ElectronIndex
size_t getLastFilterBeforeL3ElectronIndex() const
Definition: HLTTauDQMPath.h:103
triggerMatchMonitor_cfi.triggerObjects
triggerObjects
Definition: triggerMatchMonitor_cfi.py:15
HLTTauDQMPath::doRefAnalysis_
const bool doRefAnalysis_
Definition: HLTTauDQMPath.h:134
HLTTauDQMPath::getLastFilterBeforeL2CaloMETIndex
size_t getLastFilterBeforeL2CaloMETIndex() const
Definition: HLTTauDQMPath.h:111
HLTTauDQMPath::isValid_
bool isValid_
Definition: HLTTauDQMPath.h:161
HLTTauDQMPath::lastFilterBeforeL3ElectronIndex_
size_t lastFilterBeforeL3ElectronIndex_
Definition: HLTTauDQMPath.h:150
HLTTauDQMPath::getPathName
const std::string & getPathName() const
Definition: HLTTauDQMPath.h:49
HLTTauDQMPath::filterElectronN_
std::vector< int > filterElectronN_
Definition: HLTTauDQMPath.h:138
HLTTauDQMPath::filterMuonN_
std::vector< int > filterMuonN_
Definition: HLTTauDQMPath.h:139
HLTTauDQMPath::getFilterNTaus
int getFilterNTaus(size_t i) const
Definition: HLTTauDQMPath.h:55
edm
HLT enums.
Definition: AlignableModifier.h:19
HLTTauDQMPath::lastFilterBeforeL3TauIndex_
size_t lastFilterBeforeL3TauIndex_
Definition: HLTTauDQMPath.h:146
math::XYZTLorentzVectorD
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
HLTTauDQMPath::Object::id
const int id
Definition: HLTTauDQMPath.h:35
HLTTauDQMPath::getLastL2CaloMETFilterIndex
size_t getLastL2CaloMETFilterIndex() const
Definition: HLTTauDQMPath.h:112
HLTTauDQMPath::hasL3Taus
bool hasL3Taus() const
Definition: HLTTauDQMPath.h:90
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
HLTTauDQMPath::isValid
bool isValid() const
Definition: HLTTauDQMPath.h:41
HLTTauDQMPath::getLastFilterBeforeL2MuonIndex
size_t getLastFilterBeforeL2MuonIndex() const
Definition: HLTTauDQMPath.h:106
HLTTauDQMPath::lastL2MuonFilterIndex_
size_t lastL2MuonFilterIndex_
Definition: HLTTauDQMPath.h:153
HLTTauDQMPath::lastPassedFilter
int lastPassedFilter(const edm::TriggerResults &triggerResults) const
Definition: HLTTauDQMPath.cc:546
HLTTauDQMPath::getLastL3ElectronFilterIndex
size_t getLastL3ElectronFilterIndex() const
Definition: HLTTauDQMPath.h:104
HLTTauDQMPath::hltProcess_
const std::string hltProcess_
Definition: HLTTauDQMPath.h:133
HLTTauDQMPath::getFirstFilterBeforeL2CaloMETIndex
size_t getFirstFilterBeforeL2CaloMETIndex() const
Definition: HLTTauDQMPath.h:113
HLTTauDQMPath::kInvalidIndex
constexpr static size_t kInvalidIndex
Definition: HLTTauDQMPath.h:31
SUSYBSM_Ele_HT_BTag_SingleLepton_cff.hltProcess
hltProcess
Definition: SUSYBSM_Ele_HT_BTag_SingleLepton_cff.py:26
HLTTauDQMPath::getLastL3MuonFilterIndex
size_t getLastL3MuonFilterIndex() const
Definition: HLTTauDQMPath.h:109
HLTTauDQMPath::lastL2ElectronFilterIndex_
size_t lastL2ElectronFilterIndex_
Definition: HLTTauDQMPath.h:149
HLTTauDQMPath::lastFilterBeforeL2METIndex_
size_t lastFilterBeforeL2METIndex_
Definition: HLTTauDQMPath.h:156
HLTTauDQMPath::hasL2CaloMET
bool hasL2CaloMET() const
Definition: HLTTauDQMPath.h:95
HLTTauDQMPath::lastL3TauFilterIndex_
size_t lastL3TauFilterIndex_
Definition: HLTTauDQMPath.h:147
HLTTauDQMPath::lastFilterBeforeL2MuonIndex_
size_t lastFilterBeforeL2MuonIndex_
Definition: HLTTauDQMPath.h:152
HLTTauDQMPath::FilterIndex
std::tuple< std::string, std::string, size_t > FilterIndex
Definition: HLTTauDQMPath.h:26
HLTTauDQMPath::getFilterNMuons
int getFilterNMuons(size_t i) const
Definition: HLTTauDQMPath.h:67
HLTTauDQMPath::hasL3Electrons
bool hasL3Electrons() const
Definition: HLTTauDQMPath.h:92
HLTTauDQMPath::filterTauN_
std::vector< int > filterTauN_
Definition: HLTTauDQMPath.h:137
hltMonBTagIPClient_cfi.pathName
pathName
Definition: hltMonBTagIPClient_cfi.py:5
HLTTauDQMPath::LV
math::XYZTLorentzVectorD LV
Definition: HLTTauDQMPath.h:24
HLTTauDQMPath::HLTTauDQMPath
HLTTauDQMPath(std::string pathName, std::string hltProcess, bool doRefAnalysis, const HLTConfigProvider &HLTCP)
Definition: HLTTauDQMPath.cc:351
HLTTauDQMPath::lastL2METFilterIndex_
size_t lastL2METFilterIndex_
Definition: HLTTauDQMPath.h:157
HLTTauDQMPath::getLastL2ElectronFilterIndex
size_t getLastL2ElectronFilterIndex() const
Definition: HLTTauDQMPath.h:102
HLTTauDQMOfflineObjects
Definition: HLTTauDQMPlotter.h:18
HLTTauDQMPath::getLastFilterBeforeL3TauIndex
size_t getLastFilterBeforeL3TauIndex() const
Definition: HLTTauDQMPath.h:98
HLTTauDQMPath::getFilterNElectrons
int getFilterNElectrons(size_t i) const
Definition: HLTTauDQMPath.h:61
HLTTauDQMPath::getPathIndex
const unsigned int getPathIndex() const
Definition: HLTTauDQMPath.h:50
HLTTauDQMPath::~HLTTauDQMPath
~HLTTauDQMPath()
HLTTauDQMPath::getFilterIndex
size_t getFilterIndex(size_t i) const
Definition: HLTTauDQMPath.h:117
trigger::TriggerObject
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
HLTTauDQMPath::Object
Definition: HLTTauDQMPath.h:33
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLTTauDQMPath
Definition: HLTTauDQMPath.h:22
HLTTauDQMPath::kModuleIndex
constexpr static size_t kModuleIndex
Definition: HLTTauDQMPath.h:30
HLTTauDQMPath::goodOfflineEvent
bool goodOfflineEvent(size_t i, const HLTTauDQMOfflineObjects &offlineObjects) const
Definition: HLTTauDQMPath.cc:668
ParameterSet
Definition: Functions.h:16
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HLTTauDQMPath::lastFilterBeforeL2TauIndex_
size_t lastFilterBeforeL2TauIndex_
Definition: HLTTauDQMPath.h:144
HLTTauDQMPath::isFirstL1Seed_
bool isFirstL1Seed_
Definition: HLTTauDQMPath.h:160
HLTTauDQMPath::hasL2Muons
bool hasL2Muons() const
Definition: HLTTauDQMPath.h:93
HLTTauDQMPath::filtersSize
size_t filtersSize() const
Definition: HLTTauDQMPath.h:52
LorentzVector.h
HLTTauDQMPath::getFilterName
const std::string & getFilterName(size_t i) const
Definition: HLTTauDQMPath.h:53
trigger::TriggerEvent
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
PDWG_DiPhoton_SD_cff.triggerEvent
triggerEvent
Definition: PDWG_DiPhoton_SD_cff.py:39
HLTTauDQMPath::isFirstFilterL1Seed
bool isFirstFilterL1Seed() const
Definition: HLTTauDQMPath.h:86
HLTTauDQMPath::getLastFilterBeforeL2TauIndex
size_t getLastFilterBeforeL2TauIndex() const
Definition: HLTTauDQMPath.h:96
HLTTauDQMPath::pathName_
const std::string pathName_
Definition: HLTTauDQMPath.h:142
HLTTauDQMPath::Object::object
const trigger::TriggerObject & object
Definition: HLTTauDQMPath.h:34
HLTTauDQMPath::filterLevel_
std::vector< int > filterLevel_
Definition: HLTTauDQMPath.h:141
HLTTauDQMPath::lastFilterBeforeL2ElectronIndex_
size_t lastFilterBeforeL2ElectronIndex_
Definition: HLTTauDQMPath.h:148
HLTConfigProvider
Definition: HLTConfigProvider.h:28
HLTTauDQMPath::offlineMatching
bool offlineMatching(size_t i, const std::vector< Object > &triggerObjects, const HLTTauDQMOfflineObjects &offlineObjects, double dR, std::vector< Object > &matchedTriggerObjects, HLTTauDQMOfflineObjects &matchedOfflineObjects) const
Definition: HLTTauDQMPath.cc:580
HLTTauDQMPath::getFilterMET
int getFilterMET(size_t i) const
Definition: HLTTauDQMPath.h:73
HLTTauDQMPath::kName
constexpr static size_t kName
Definition: HLTTauDQMPath.h:28
HLTTauDQMPath::getLastL2MuonFilterIndex
size_t getLastL2MuonFilterIndex() const
Definition: HLTTauDQMPath.h:107
HLTTauDQMPath::getFilterType
const std::string & getFilterType(size_t i) const
Definition: HLTTauDQMPath.h:54
HLTTauDQMPath::getFilterLevel
int getFilterLevel(size_t i) const
Definition: HLTTauDQMPath.h:79
HLTTauDQMPath::hasL2Taus
bool hasL2Taus() const
Definition: HLTTauDQMPath.h:89
HLTTauDQMPath::lastL3ElectronFilterIndex_
size_t lastL3ElectronFilterIndex_
Definition: HLTTauDQMPath.h:151
HLTTauDQMPath::pathIndex_
const unsigned int pathIndex_
Definition: HLTTauDQMPath.h:143
HLTTauDQMPath::filterIndices_
std::vector< FilterIndex > filterIndices_
Definition: HLTTauDQMPath.h:136
HLTTauDQMPath::LVColl
std::vector< LV > LVColl
Definition: HLTTauDQMPath.h:25
trigger
Definition: HLTPrescaleTableCond.h:8
HLTTauDQMPath::getLastFilterBeforeL2ElectronIndex
size_t getLastFilterBeforeL2ElectronIndex() const
Definition: HLTTauDQMPath.h:101
HLTTauDQMPath::firstL2METFilterIndex_
size_t firstL2METFilterIndex_
Definition: HLTTauDQMPath.h:159
HLTTauDQMPath::filterMET_
std::vector< int > filterMET_
Definition: HLTTauDQMPath.h:140
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
HLTTauDQMPath::kType
constexpr static size_t kType
Definition: HLTTauDQMPath.h:29
HLTObjectsMonitor_cfi.TriggerResults
TriggerResults
Definition: HLTObjectsMonitor_cfi.py:9
HLTTauDQMPath::getLastL2TauFilterIndex
size_t getLastL2TauFilterIndex() const
Definition: HLTTauDQMPath.h:97
HLTTauDQMPath::getLastFilterBeforeL3MuonIndex
size_t getLastFilterBeforeL3MuonIndex() const
Definition: HLTTauDQMPath.h:108
HLTTauDQMPath::lastL3MuonFilterIndex_
size_t lastL3MuonFilterIndex_
Definition: HLTTauDQMPath.h:155
HLTTauDQMPath::hasL2Electrons
bool hasL2Electrons() const
Definition: HLTTauDQMPath.h:91
edm::TriggerResults
Definition: TriggerResults.h:35
HLTTauDQMPath::hasL3Muons
bool hasL3Muons() const
Definition: HLTTauDQMPath.h:94
HLTTauDQMPath::getFilterObjects
void getFilterObjects(const trigger::TriggerEvent &triggerEvent, size_t i, std::vector< Object > &retval) const
Definition: HLTTauDQMPath.cc:565
ZCounting_cff.TriggerEvent
TriggerEvent
Definition: ZCounting_cff.py:5
HLTTauDQMPath::firstFilterBeforeL2METIndex_
size_t firstFilterBeforeL2METIndex_
Definition: HLTTauDQMPath.h:158
HLTTauDQMPath::getLastFilterName
const std::string & getLastFilterName() const
Definition: HLTTauDQMPath.h:87
HLTTauDQMPath::getFirstL2CaloMETFilterIndex
size_t getFirstL2CaloMETFilterIndex() const
Definition: HLTTauDQMPath.h:114