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 
13 
21 
28 
35 
37 
40 
41 #include "boost/tuple/tuple.hpp"
42 #include <algorithm>
43 #include <cctype>
44 #include <iostream>
45 #include <map>
46 #include <set>
47 #include <vector>
48 
49 #include "TPRegexp.h"
50 
51 const unsigned int kNull = (unsigned int)-1;
52 
54 public:
57  const std::vector<std::string> &,
58  const std::vector<std::string> &,
62 
64  delete genMuonSelector_;
65  delete recMuonSelector_;
66  }
67 
68  void beginJob();
69  void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &);
70  void analyze(const edm::Event &, const edm::EventSetup &);
71 
72  static boost::tuple<edm::EDGetTokenT<trigger::TriggerEventWithRefs>,
76 
77 private:
78  struct MatchStruct {
80  const l1t::Muon *candL1;
81  std::vector<const reco::RecoChargedCandidate *> candHlt;
83  candBase = nullptr;
84  candL1 = nullptr;
85  }
87  candBase = cand;
88  candL1 = nullptr;
89  }
90  bool operator<(MatchStruct match) { return candBase->pt() < match.candBase->pt(); }
91  bool operator>(MatchStruct match) { return candBase->pt() > match.candBase->pt(); }
92  };
94  bool operator()(MatchStruct a, MatchStruct b) { return a.candBase->pt() > b.candBase->pt(); }
95  };
96 
97  void analyzePath(const edm::Event &,
98  const std::string &,
99  const std::string &,
100  const std::vector<MatchStruct> &,
102  void findMatches(std::vector<MatchStruct> &,
103  const l1t::MuonVectorRef &candsL1,
104  const std::vector<std::vector<const reco::RecoChargedCandidate *>> &);
106 
109 
110  std::vector<std::string> moduleLabels_;
111  std::vector<std::string> stepLabels_;
112 
114  edm::EDGetTokenT<reco::GenParticleCollection> genParticleLabel_;
116 
117  std::vector<double> parametersEta_;
118  std::vector<double> parametersPhi_;
119  std::vector<double> parametersTurnOn_;
120 
121  double cutMinPt_;
122  double cutMaxEta_;
123  unsigned int cutMotherId_;
124  std::vector<double> cutsDr_;
127 
130 
132 
133  std::map<std::string, MonitorElement *> elements_;
134 };
135 
136 #endif
HLTMuonPlotter(const edm::ParameterSet &, std::string, const std::vector< std::string > &, const std::vector< std::string > &, const boost::tuple< edm::EDGetTokenT< trigger::TriggerEventWithRefs >, edm::EDGetTokenT< reco::GenParticleCollection >, edm::EDGetTokenT< reco::MuonCollection >> &)
MatchStruct(const reco::Candidate *cand)
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)
L1MuonMatcherAlgo l1Matcher_
std::string genMuonCut_
std::vector< std::string > moduleLabels_
std::vector< MuonRef > MuonVectorRef
Definition: Muon.h:15
static boost::tuple< edm::EDGetTokenT< trigger::TriggerEventWithRefs >, edm::EDGetTokenT< reco::GenParticleCollection >, edm::EDGetTokenT< reco::MuonCollection > > getTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
std::string recMuonCut_
void findMatches(std::vector< MatchStruct > &, const l1t::MuonVectorRef &candsL1, const std::vector< std::vector< const reco::RecoChargedCandidate * >> &)
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
Definition: Muon.h:21
std::vector< std::string > stepLabels_
const l1t::Muon * candL1
const unsigned int kNull
virtual double pt() const =0
transverse momentum
void bookHist(DQMStore::IBooker &, std::string, std::string, std::string, std::string)
double b
Definition: hdecay.h:120
bool operator()(MatchStruct a, MatchStruct b)
StringCutObjectSelector< reco::Muon > * recMuonSelector_
std::vector< double > parametersPhi_
double a
Definition: hdecay.h:121
Matcher of reconstructed objects to L1 Muons.
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_
edm::EDGetTokenT< reco::GenParticleCollection > genParticleLabel_
edm::EDGetTokenT< trigger::TriggerEventWithRefs > hltTriggerSummaryRAW_
std::vector< double > parametersTurnOn_
Definition: Run.h:45