CMS 3D CMS Logo

HLTMuonPlotter.h
Go to the documentation of this file.
1 #ifndef HLTriggerOffline_Muon_HLTMuonPlotter_H
2 #define HLTriggerOffline_Muon_HLTMuonPlotter_H
3 
16 
23 
30 
32 
34 
36 
37 #include <algorithm>
38 #include <cctype>
39 #include <iostream>
40 #include <map>
41 #include <set>
42 #include <tuple>
43 #include <vector>
44 
45 #include "TPRegexp.h"
46 
48 public:
52 
55  const std::vector<std::string> &,
56  const std::vector<std::string> &,
60  const L1MuonMatcherAlgoForDQM &);
61 
63  delete genMuonSelector_;
64  delete recMuonSelector_;
65  }
66 
67  void beginJob();
68  void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &);
69  void analyze(const edm::Event &, const edm::EventSetup &);
70 
71 private:
72  struct MatchStruct {
74  const l1t::Muon *candL1;
75  std::vector<const reco::RecoChargedCandidate *> candHlt;
77  candBase = nullptr;
78  candL1 = nullptr;
79  }
81  candBase = cand;
82  candL1 = nullptr;
83  }
84  bool operator<(MatchStruct match) { return candBase->pt() < match.candBase->pt(); }
85  bool operator>(MatchStruct match) { return candBase->pt() > match.candBase->pt(); }
86  };
88  bool operator()(MatchStruct a, MatchStruct b) { return a.candBase->pt() > b.candBase->pt(); }
89  };
90 
91  void analyzePath(const edm::Event &,
92  const std::string &,
93  const std::string &,
94  const std::vector<MatchStruct> &,
96  void findMatches(std::vector<MatchStruct> &,
97  const l1t::MuonVectorRef &candsL1,
98  const std::vector<std::vector<const reco::RecoChargedCandidate *>> &);
100 
103 
104  std::vector<std::string> moduleLabels_;
105  std::vector<std::string> stepLabels_;
106 
110 
111  std::vector<double> parametersEta_;
112  std::vector<double> parametersPhi_;
113  std::vector<double> parametersTurnOn_;
114 
115  double cutMinPt_;
116  double cutMaxEta_;
117  unsigned int cutMotherId_;
118  std::vector<double> cutsDr_;
121 
124 
126 
127  std::map<std::string, MonitorElement *> elements_;
128 };
129 
130 #endif
MatchStruct(const reco::Candidate *cand)
virtual double pt() const =0
transverse momentum
void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &)
std::string hltPath_
bool operator>(MatchStruct match)
unsigned int cutMotherId_
std::vector< double > parametersEta_
bool operator<(MatchStruct match)
std::string genMuonCut_
HLTMuonPlotter(const edm::ParameterSet &, std::string, const std::vector< std::string > &, const std::vector< std::string > &, const edm::EDGetTokenT< trigger::TriggerEventWithRefs > &, const edm::EDGetTokenT< reco::GenParticleCollection > &, const edm::EDGetTokenT< reco::MuonCollection > &, const L1MuonMatcherAlgoForDQM &)
std::vector< std::string > moduleLabels_
void findMatches(std::vector< MatchStruct > &, const l1t::MuonVectorRef &candsL1, const std::vector< std::vector< const reco::RecoChargedCandidate *>> &)
std::vector< MuonRef > MuonVectorRef
Definition: Muon.h:15
std::string recMuonCut_
std::vector< double > cutsDr_
std::vector< const reco::RecoChargedCandidate * > candHlt
edm::EDGetTokenT< reco::MuonCollection > recMuonLabel_
void analyzePath(const edm::Event &, const std::string &, const std::string &, const std::vector< MatchStruct > &, edm::Handle< trigger::TriggerEventWithRefs >)
void analyze(const edm::Event &, const edm::EventSetup &)
StringCutObjectSelector< reco::GenParticle > * genMuonSelector_
const reco::Candidate * candBase
dqm::legacy::MonitorElement MonitorElement
Definition: Muon.h:21
std::vector< std::string > stepLabels_
const l1t::Muon * candL1
void bookHist(DQMStore::IBooker &, std::string, std::string, std::string, std::string)
double b
Definition: hdecay.h:118
L1MuonMatcherAlgoForDQM l1Matcher_
bool operator()(MatchStruct a, MatchStruct b)
StringCutObjectSelector< reco::Muon > * recMuonSelector_
std::vector< double > parametersPhi_
double a
Definition: hdecay.h:119
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
std::map< std::string, MonitorElement * > elements_
std::string hltProcessName_
dqm::legacy::DQMStore DQMStore
edm::EDGetTokenT< reco::GenParticleCollection > genParticleLabel_
edm::EDGetTokenT< trigger::TriggerEventWithRefs > hltTriggerSummaryRAW_
std::vector< double > parametersTurnOn_
Definition: Run.h:45
L1MuonMatcherAlgoT< edm::Transition::BeginRun > L1MuonMatcherAlgoForDQM