CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <boost/regex.hpp>
8 
9 #include<tuple>
10 #include<vector>
11 #include<string>
12 
13 class HLTConfigProvider;
14 namespace edm {
15  class ParameterSet;
16  class TriggerResults;
17 }
18 namespace trigger {
19  class TriggerEvent;
20  class TriggerObject;
21 }
23 
25 public:
27  typedef std::vector<LV> LVColl;
28 
29  struct Object {
31  const int id; // from TriggerTypeDefs.h
32  };
33 
34  HLTTauDQMPath(const std::string& hltProcess, const std::string& dqmFolder, bool doRefAnalysis);
36 
37  void initialize(const edm::ParameterSet& pset);
38 
39  bool beginRun(const HLTConfigProvider& HLTCP);
40 
41  bool fired(const edm::TriggerResults& triggerResults) const;
42 
43  // index (to getFilterName, getFilterIndex) of the last passed filter
44  // -1, if the first filter rejects the event
46 
47  const std::string& getPathName() const { return pathName_; }
48  const unsigned int getPathIndex() const { return pathIndex_; }
49 
50  size_t filtersSize() const { return filterIndices_.size(); }
51  const std::string& getFilterName(size_t i) const { return std::get<0>(filterIndices_[i]); }
52  int getFilterNTaus(size_t i) const { return filterTauN_[i]; }
53  int getFilterNElectrons(size_t i) const {return filterElectronN_[i]; }
54  int getFilterNMuons(size_t i) const {return filterMuonN_[i]; }
55 
56  bool isFirstFilterL1Seed() const { return isFirstL1Seed_; }
57  const std::string& getLastFilterName() const { return std::get<0>(filterIndices_.back()); }
58 
65 
66  // index (to edm::TriggerResults) of a filter
67  size_t getFilterIndex(size_t i) const { return std::get<1>(filterIndices_[i]); }
68 
69  // Get objects associated to a filter, i is the "internal" index
70  void getFilterObjects(const trigger::TriggerEvent& triggerEvent, size_t i, std::vector<Object>& retval) const;
71 
72  // i = filter index
73  bool offlineMatching(size_t i, const std::vector<Object>& triggerObjects, const HLTTauDQMOfflineObjects& offlineObjects, double dR, std::vector<Object>& matchedTriggerObjects, HLTTauDQMOfflineObjects& matchedOfflineObjects) const;
74 
75  bool goodOfflineEvent(size_t i, const HLTTauDQMOfflineObjects& offlineObjects) const;
76 
77  typedef std::tuple<std::string, size_t> FilterIndex;
78 private:
81  const bool doRefAnalysis_;
82 
83  std::vector<boost::regex> pathRegexs_;
84  std::vector<boost::regex> ignoreFilterTypes_;
85  std::vector<boost::regex> ignoreFilterNames_;
86 
87  std::vector<FilterIndex> filterIndices_;
88  std::vector<int> filterTauN_;
89  std::vector<int> filterElectronN_;
90  std::vector<int> filterMuonN_;
92  unsigned int pathIndex_;
98 };
99 
100 
101 #endif
std::vector< boost::regex > pathRegexs_
Definition: HLTTauDQMPath.h:83
size_t getLastL2TauFilterIndex() const
Definition: HLTTauDQMPath.h:62
int i
Definition: DBlmapReader.cc:9
std::tuple< std::string, size_t > FilterIndex
Definition: HLTTauDQMPath.h:77
bool goodOfflineEvent(size_t i, const HLTTauDQMOfflineObjects &offlineObjects) const
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
std::vector< boost::regex > ignoreFilterTypes_
Definition: HLTTauDQMPath.h:84
int lastPassedFilter(const edm::TriggerResults &triggerResults) const
const unsigned int getPathIndex() const
Definition: HLTTauDQMPath.h:48
int getFilterNElectrons(size_t i) const
Definition: HLTTauDQMPath.h:53
int getFilterNTaus(size_t i) const
Definition: HLTTauDQMPath.h:52
bool isFirstFilterL1Seed() const
Definition: HLTTauDQMPath.h:56
std::vector< LV > LVColl
Definition: HLTTauDQMPath.h:27
const std::string hltProcess_
Definition: HLTTauDQMPath.h:79
void initialize(const edm::ParameterSet &pset)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
size_t getLastFilterBeforeL3TauIndex() const
Definition: HLTTauDQMPath.h:63
void getFilterObjects(const trigger::TriggerEvent &triggerEvent, size_t i, std::vector< Object > &retval) const
int getFilterNMuons(size_t i) const
Definition: HLTTauDQMPath.h:54
HLTTauDQMPath(const std::string &hltProcess, const std::string &dqmFolder, bool doRefAnalysis)
const T & max(const T &a, const T &b)
size_t lastFilterBeforeL2TauIndex_
Definition: HLTTauDQMPath.h:93
unsigned int pathIndex_
Definition: HLTTauDQMPath.h:92
size_t filtersSize() const
Definition: HLTTauDQMPath.h:50
const std::string & getLastFilterName() const
Definition: HLTTauDQMPath.h:57
size_t lastFilterBeforeL3TauIndex_
Definition: HLTTauDQMPath.h:95
bool hasL3Taus() const
Definition: HLTTauDQMPath.h:60
static std::string const triggerResults
Definition: EdmProvDump.cc:41
std::string pathName_
Definition: HLTTauDQMPath.h:91
size_t getLastL3TauFilterIndex() const
Definition: HLTTauDQMPath.h:64
bool beginRun(const HLTConfigProvider &HLTCP)
bool offlineMatching(size_t i, const std::vector< Object > &triggerObjects, const HLTTauDQMOfflineObjects &offlineObjects, double dR, std::vector< Object > &matchedTriggerObjects, HLTTauDQMOfflineObjects &matchedOfflineObjects) const
std::vector< int > filterTauN_
Definition: HLTTauDQMPath.h:88
const std::string dqmFolder_
Definition: HLTTauDQMPath.h:80
math::XYZTLorentzVectorD LV
Definition: HLTTauDQMPath.h:26
std::vector< FilterIndex > filterIndices_
Definition: HLTTauDQMPath.h:87
size_t getFilterIndex(size_t i) const
Definition: HLTTauDQMPath.h:67
const bool doRefAnalysis_
Definition: HLTTauDQMPath.h:81
std::vector< boost::regex > ignoreFilterNames_
Definition: HLTTauDQMPath.h:85
const std::string & getFilterName(size_t i) const
Definition: HLTTauDQMPath.h:51
size_t lastL3TauFilterIndex_
Definition: HLTTauDQMPath.h:96
bool fired(const edm::TriggerResults &triggerResults) const
size_t lastL2TauFilterIndex_
Definition: HLTTauDQMPath.h:94
size_t getLastFilterBeforeL2TauIndex() const
Definition: HLTTauDQMPath.h:61
const std::string & getPathName() const
Definition: HLTTauDQMPath.h:47
std::vector< int > filterElectronN_
Definition: HLTTauDQMPath.h:89
bool hasL2Taus() const
Definition: HLTTauDQMPath.h:59
std::vector< int > filterMuonN_
Definition: HLTTauDQMPath.h:90
const trigger::TriggerObject & object
Definition: HLTTauDQMPath.h:30